diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2015-05-10 23:30:21 -0400 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-06-03 11:48:36 +1000 |
commit | fc6bde6fcee5810d400f6080fe2039469c4d2ad3 (patch) | |
tree | 9d7601abffcc807c5d6c90f899e61b48dd8983f4 /win32 | |
parent | 87d9837674dfb6ff391470e04bc610a6c11f58f2 (diff) | |
download | perl-fc6bde6fcee5810d400f6080fe2039469c4d2ad3.tar.gz |
remove redundant PERL_EXPORT_C and PERL_XS_EXPORT_C macros
These 2 macros were created for the Symbian port in commit
"Symbian port of Perl" to replace a direct "extern" token. I guess the
author was unaware of PERL_CALLCONV.
PERL_CALLCONV is the official macro to use. PERL_XS_EXPORT_C and
PERL_EXPORT_C have no usage on cpan grep except for modules with direct
copies of core headers. A defect of using PERL_EXPORT_C and
PERL_XS_EXPORT_C instead of PERL_CALLCONV is that win32/win32.h has no
knowledge of the 2 macros and doesn't set them, and os/os2ish.h doesn't
either. On Win32, since the unix defaults are used instead of Win32
specific "__declspec(dllimport)" token, XS modules use indirect function
stubs in each XS module placed by the CC to call into perl5**.dll instead
of directly calls the core C functions. I observed this in in XS-Typemap's
DLL. To simplify the API, and to decrease the amount of macros needing to
implemented to support each platform, just remove the 2 macros.
Since perl.h's fallback defaults for PERL_CALLCONV are very late in perl.h,
they need to be moved up before function declarations start in perlio.h
(perlio.h is included from iperlsys.h).
win32iop.h contains the "PerlIO" and SV" tokens, so perlio.h must be
included before win32iop.h is. Including perlio.h so early in win32.h,
causes PERL_CALLCONV not be defined since Win32 platform uses the
fallback in perl.h, since win32.h doesn't always define PERL_CALLCONV and
sometimes relies on the fallback. Since win32iop.h contains alot of
declarations, it belongs with other declarations such as those in proto.h
so move it from win32.h to perl.h.
the "free" token in struct regexp_engine conflicts with win32iop's
"#define free win32_free" so rename that member.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/win32/win32.h b/win32/win32.h index daefeb84fb..7c65310d27 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -636,14 +636,6 @@ EXTERN_C _CRTIMP ioinfo* __pioinfo[]; #endif #define PERLIO_NOT_STDIO 0 -#include "perlio.h" - -/* - * This provides a layer of functions and macros to ensure extensions will - * get to use the same RTL functions as the core. - */ -#include "win32iop.h" - #define EXEC_ARGV_CAST(x) ((const char *const *) x) DllExport void *win32_signal_context(void); |