diff options
author | Craig A. Berry <craigberry@mac.com> | 2015-01-02 18:42:31 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2015-01-02 19:21:04 -0600 |
commit | 400638aa931c474ea2549c80aeb58d36a9f65db3 (patch) | |
tree | 8456a4332e573a30326ae794a11eb9003d39eb97 /INTERN.h | |
parent | 4e2794096b6999123c408ee2ccfc3f1a92bd4bb2 (diff) | |
download | perl-400638aa931c474ea2549c80aeb58d36a9f65db3.tar.gz |
Ditch the custom extern/const model on VMS.
We've been using globaldef/globalref for global data since eons
ago. It was a requirement for the ancient and long-defunct VAXC
compiler (not to be confused with DEC C for OpenVMS VAX), but
DEC/Compaq/HP C supports extern and const pretty much the way
everybody else does, and has for many years. HP C also supports
globaldef/globalref for backward compatibility, but the C++ compiler
does not, so continuing to use it means two different models for
C and C++.
While there is a slight theoretical benefit to using the old model
and its fine-grained control of program section attributes and
having all the read-write variables in one program section and all
the read-only variables in another, there is no measureable
performance or code size benefit, and being different just isn't
worth the aggravation.
So let's resign ourselves to having a separate program section in
the shareable image for each global item and make a couple of places
in the code easier on everyone's eyeballs and less likely to collide
with other work.
Diffstat (limited to 'INTERN.h')
-rw-r--r-- | INTERN.h | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -18,16 +18,7 @@ #undef dEXT #undef EXTCONST #undef dEXTCONST -#if defined(VMS) && !defined(__GNUC__) - /* Suppress portability warnings from DECC for VMS-specific extensions */ -# ifdef __DECC -# pragma message disable (GLOBALEXT,NOSHAREEXT,READONLYEXT) -# endif -# define EXT globaldef {"$GLOBAL_RW_VARS"} noshare -# define dEXT globaldef {"$GLOBAL_RW_VARS"} noshare -# define EXTCONST globaldef {"$GLOBAL_RO_VARS"} readonly -# define dEXTCONST globaldef {"$GLOBAL_RO_VARS"} readonly -#else + # if (defined(WIN32) && defined(__MINGW32__)) || defined(__SYMBIAN32__) # ifdef __cplusplus # define EXT __declspec(dllexport) @@ -53,7 +44,6 @@ # define dEXTCONST const # endif # endif -#endif #undef INIT #define INIT(x) = x |