Message-ID: <
481F5325.5090907@x-ray.at>
p4raw-id: //depot/perl@33792
'NAME' => 'Win32CORE',
'VERSION_FROM' => 'Win32CORE.pm',
);
+
+# undef USEIMPORTLIB for static compilation
+sub MY::cflags {
+ package MY; # so that "SUPER" works right
+ my ($self, $libperl)=@_;
+ return '' unless $self->needs_linking();
+ my $base = $self->SUPER::cflags($libperl);
+ if ($self->{LINKTYPE} eq 'static') {
+ $base =~ s/CCFLAGS =(.*)$/CCFLAGS =\1 -UUSEIMPORTLIB /m;
+ }
+ return $base;
+}
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
+#if defined(__CYGWIN__) && !defined(USEIMPORTLIB)
+ #undef WIN32
+#endif
#include "EXTERN.h"
+#if defined(__CYGWIN__) && !defined(USEIMPORTLIB)
+ #define EXTCONST extern const
+#endif
#include "perl.h"
#include "XSUB.h"
* should never be called though, as Win32CORE.pm doesn't use DynaLoader.
*/
}
-#ifdef __CYGWIN__
+#if defined(__CYGWIN__) && defined(USEIMPORTLIB)
__declspec(dllexport)
#endif
void