diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-05-01 14:39:31 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-06-12 16:15:22 +0200 |
commit | 457c538539eca0f3c596861d7d14ab0c0e9ee438 (patch) | |
tree | 3c2d5297ad80a80b290499ef46ff60c6e3b70814 | |
parent | 0447859b8a048144ae0ece76a2f7595840942fcb (diff) | |
download | perl-457c538539eca0f3c596861d7d14ab0c0e9ee438.tar.gz |
Move PL_{revision,version,subversion} to perl.h, making them const U8.
To get the initialisation to work, the location of #include patchlevel.h needs
to be moved.
-rw-r--r-- | embedvar.h | 9 | ||||
-rw-r--r-- | globvar.sym | 3 | ||||
-rw-r--r-- | perl.h | 35 | ||||
-rw-r--r-- | perlapi.h | 6 | ||||
-rw-r--r-- | perlvars.h | 9 |
5 files changed, 26 insertions, 36 deletions
diff --git a/embedvar.h b/embedvar.h index a6c894ab8e..af58e425a4 100644 --- a/embedvar.h +++ b/embedvar.h @@ -757,8 +757,6 @@ #define PL_Gperlio_mutex (my_vars->Gperlio_mutex) #define PL_ppaddr (my_vars->Gppaddr) #define PL_Gppaddr (my_vars->Gppaddr) -#define PL_revision (my_vars->Grevision) -#define PL_Grevision (my_vars->Grevision) #define PL_runops_dbg (my_vars->Grunops_dbg) #define PL_Grunops_dbg (my_vars->Grunops_dbg) #define PL_runops_std (my_vars->Grunops_std) @@ -777,8 +775,6 @@ #define PL_Gsig_trapped (my_vars->Gsig_trapped) #define PL_sigfpe_saved (my_vars->Gsigfpe_saved) #define PL_Gsigfpe_saved (my_vars->Gsigfpe_saved) -#define PL_subversion (my_vars->Gsubversion) -#define PL_Gsubversion (my_vars->Gsubversion) #define PL_sv_placeholder (my_vars->Gsv_placeholder) #define PL_Gsv_placeholder (my_vars->Gsv_placeholder) #define PL_thr_key (my_vars->Gthr_key) @@ -787,8 +783,6 @@ #define PL_Gtimesbase (my_vars->Gtimesbase) #define PL_use_safe_putenv (my_vars->Guse_safe_putenv) #define PL_Guse_safe_putenv (my_vars->Guse_safe_putenv) -#define PL_version (my_vars->Gversion) -#define PL_Gversion (my_vars->Gversion) #define PL_veto_cleanup (my_vars->Gveto_cleanup) #define PL_Gveto_cleanup (my_vars->Gveto_cleanup) #define PL_watch_pvx (my_vars->Gwatch_pvx) @@ -820,7 +814,6 @@ #define PL_Gperlio_fd_refcnt_size PL_perlio_fd_refcnt_size #define PL_Gperlio_mutex PL_perlio_mutex #define PL_Gppaddr PL_ppaddr -#define PL_Grevision PL_revision #define PL_Grunops_dbg PL_runops_dbg #define PL_Grunops_std PL_runops_std #ifdef OS2 @@ -831,12 +824,10 @@ #define PL_Gsig_ignoring PL_sig_ignoring #define PL_Gsig_trapped PL_sig_trapped #define PL_Gsigfpe_saved PL_sigfpe_saved -#define PL_Gsubversion PL_subversion #define PL_Gsv_placeholder PL_sv_placeholder #define PL_Gthr_key PL_thr_key #define PL_Gtimesbase PL_timesbase #define PL_Guse_safe_putenv PL_use_safe_putenv -#define PL_Gversion PL_version #define PL_Gveto_cleanup PL_veto_cleanup #define PL_Gwatch_pvx PL_watch_pvx diff --git a/globvar.sym b/globvar.sym index 83e7e1ac6e..9bfdb23949 100644 --- a/globvar.sym +++ b/globvar.sym @@ -41,14 +41,17 @@ ppaddr regkind reg_name reg_extflags_name +revision sig_name sig_num simple simple_bitmask +subversion utf8skip uuemap varies varies_bitmask +version warn_nl warn_nosemi warn_reserved @@ -4200,6 +4200,18 @@ extern char ** environ; /* environment variables supplied via exec */ # endif #endif +#define PERL_PATCHLEVEL_H_IMPLICIT +#include "patchlevel.h" +#undef PERL_PATCHLEVEL_H_IMPLICIT + +#define PERL_VERSION_STRING STRINGIFY(PERL_REVISION) "." \ + STRINGIFY(PERL_VERSION) "." \ + STRINGIFY(PERL_SUBVERSION) + +#define PERL_API_VERSION_STRING STRINGIFY(PERL_API_REVISION) "." \ + STRINGIFY(PERL_API_VERSION) "." \ + STRINGIFY(PERL_API_SUBVERSION) + START_EXTERN_C /* handy constants */ @@ -4263,6 +4275,17 @@ EXTCONST char PL_cshname[] # define PL_cshlen (sizeof(CSH "") - 1) #endif +/* These are baked at compile time into any shared perl library. + In future releases this will allow us in main() to sanity test the + library we're linking against. */ + +EXTCONST U8 PL_revision + INIT(PERL_REVISION); +EXTCONST U8 PL_version + INIT(PERL_VERSION); +EXTCONST U8 PL_subversion + INIT(PERL_SUBVERSION); + EXTCONST char PL_uuemap[65] INIT("`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"); @@ -4869,18 +4892,6 @@ typedef struct exitlistentry { # define FAKE_DEFAULT_SIGNAL_HANDLERS #endif -#define PERL_PATCHLEVEL_H_IMPLICIT -#include "patchlevel.h" -#undef PERL_PATCHLEVEL_H_IMPLICIT - -#define PERL_VERSION_STRING STRINGIFY(PERL_REVISION) "." \ - STRINGIFY(PERL_VERSION) "." \ - STRINGIFY(PERL_SUBVERSION) - -#define PERL_API_VERSION_STRING STRINGIFY(PERL_API_REVISION) "." \ - STRINGIFY(PERL_API_VERSION) "." \ - STRINGIFY(PERL_API_SUBVERSION) - #if !defined(MULTIPLICITY) struct interpreter { @@ -147,8 +147,6 @@ END_EXTERN_C #define PL_perlio_mutex (*Perl_Gperlio_mutex_ptr(NULL)) #undef PL_ppaddr #define PL_ppaddr (*Perl_Gppaddr_ptr(NULL)) -#undef PL_revision -#define PL_revision (*Perl_Grevision_ptr(NULL)) #undef PL_runops_dbg #define PL_runops_dbg (*Perl_Grunops_dbg_ptr(NULL)) #undef PL_runops_std @@ -165,8 +163,6 @@ END_EXTERN_C #define PL_sig_trapped (*Perl_Gsig_trapped_ptr(NULL)) #undef PL_sigfpe_saved #define PL_sigfpe_saved (*Perl_Gsigfpe_saved_ptr(NULL)) -#undef PL_subversion -#define PL_subversion (*Perl_Gsubversion_ptr(NULL)) #undef PL_sv_placeholder #define PL_sv_placeholder (*Perl_Gsv_placeholder_ptr(NULL)) #undef PL_thr_key @@ -175,8 +171,6 @@ END_EXTERN_C #define PL_timesbase (*Perl_Gtimesbase_ptr(NULL)) #undef PL_use_safe_putenv #define PL_use_safe_putenv (*Perl_Guse_safe_putenv_ptr(NULL)) -#undef PL_version -#define PL_version (*Perl_Gversion_ptr(NULL)) #undef PL_veto_cleanup #define PL_veto_cleanup (*Perl_Gveto_cleanup_ptr(NULL)) #undef PL_watch_pvx diff --git a/perlvars.h b/perlvars.h index fb6201ecef..2facbeba78 100644 --- a/perlvars.h +++ b/perlvars.h @@ -145,15 +145,6 @@ PERLVARI(Gveto_cleanup, int, FALSE) /* exit without cleanup */ PERLVARI(Grunops_std, runops_proc_t, Perl_runops_standard) PERLVARI(Grunops_dbg, runops_proc_t, Perl_runops_debug) - -/* These are baked at compile time into any shared perl library. - In future 5.10.x releases this will allow us in main() to sanity test the - library we're linking against. */ - -PERLVARI(Grevision, U8, PERL_REVISION) -PERLVARI(Gversion, U8, PERL_VERSION) -PERLVARI(Gsubversion, U8, PERL_SUBVERSION) - #if defined(MULTIPLICITY) # define PERL_INTERPRETER_SIZE_UPTO_MEMBER(member) \ STRUCT_OFFSET(struct interpreter, member) + \ |