summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-12 06:43:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-12 06:43:03 +0000
commit73c4f7a1d0b3ac27682d86c953e22cbc7dc810e6 (patch)
treed12e2ac03334a26b273c7b91e41aba6df9cfc33f /perl.h
parent22b491d3a115964a8dde699347569bf3176f8b1a (diff)
downloadperl-73c4f7a1d0b3ac27682d86c953e22cbc7dc810e6.tar.gz
EXTERN_C declarations for global arrays in various
headers, so perl can be built even in C++ mode; win32 build fixups; regen headers p4raw-id: //depot/perl@3537
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/perl.h b/perl.h
index 33368b1ad2..60a41ea5ed 100644
--- a/perl.h
+++ b/perl.h
@@ -150,7 +150,7 @@ class CPerlObj;
#else
# define START_EXTERN_C
# define END_EXTERN_C
-# define EXTERN_C
+# define EXTERN_C extern
#endif
#ifdef OP_IN_REGISTER
@@ -1502,14 +1502,14 @@ typedef pthread_key_t perl_key;
#ifdef PERL_IMPLICIT_CONTEXT
# ifdef USE_THREADS
struct perl_thread;
-# define pTHX struct perl_thread *thr
+# define pTHX register struct perl_thread *thr
# define aTHX thr
# define dTHXa(a) pTHX = (struct perl_thread *)a
# define dTHX dTHXa(SvPVX(PL_thrsv))
# define dTHR dNOOP
# else
# define MULTIPLICITY
-# define pTHX PerlInterpreter *my_perl
+# define pTHX register PerlInterpreter *my_perl
# define aTHX my_perl
# define dTHXa(a) pTHX = (PerlInterpreter *)a
# define dTHX dTHXa(PL_curinterp)
@@ -1932,17 +1932,10 @@ typedef Sighandler_t Sigsave_t;
#endif
-/*
- * These need prototyping here because <proto.h> isn't
- * included until after runops is initialised.
- */
-
-#ifndef PERL_OBJECT
+#ifdef PERL_OBJECT
+typedef int (CPerlObj::*runops_proc_t) (void);
+#else
typedef int (*runops_proc_t) (pTHX);
-int Perl_runops_standard (pTHX);
-#ifdef DEBUGGING
-int Perl_runops_debug (pTHX);
-#endif
#endif
/* _ (for $_) must be first in the following list (DEFSV requires it) */
@@ -1973,6 +1966,8 @@ extern char ** environ; /* environment variables supplied via exec */
# endif
#endif
+START_EXTERN_C
+
/* handy constants */
EXTCONST char PL_warn_uninit[]
INIT("Use of uninitialized value");
@@ -2231,6 +2226,8 @@ EXTCONST char* PL_block_type[];
#endif
#endif
+END_EXTERN_C
+
/*****************************************************************************/
/* This lexer/parser stuff is currently global since yacc is hard to reenter */
/*****************************************************************************/
@@ -2350,10 +2347,6 @@ typedef struct exitlistentry {
#ifdef PERL_OBJECT
extern "C" CPerlObj* perl_alloc (IPerlMem*, IPerlEnv*, IPerlStdIO*, IPerlLIO*, IPerlDir*, IPerlSock*, IPerlProc*);
-#ifdef PERL_OBJECT
-typedef int (CPerlObj::*runops_proc_t) (void);
-#endif /* PERL_OBJECT */
-
#undef EXT
#define EXT
#undef EXTCONST
@@ -2482,7 +2475,9 @@ END_EXTERN_C
#define PERLVARIC(var,type,init) EXTCONST type PL_##var INIT(init);
#ifndef PERL_GLOBAL_STRUCT
+START_EXTERN_C
#include "perlvars.h"
+END_EXTERN_C
#endif
#ifndef MULTIPLICITY
@@ -2523,6 +2518,8 @@ PERLVAR(object_compatibility[30], char)
#undef PERLVARI
#undef PERLVARIC
+START_EXTERN_C
+
#ifdef DOINIT
EXT MGVTBL PL_vtbl_sv = {Perl_magic_get,
@@ -2727,6 +2724,8 @@ EXTCONST char * PL_AMG_names[NofAMmeth] = {
EXTCONST char * PL_AMG_names[NofAMmeth];
#endif /* def INITAMAGIC */
+END_EXTERN_C
+
struct am_table {
long was_ok_sub;
long was_ok_am;