summaryrefslogtreecommitdiff
path: root/src/if_perl.xs
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_perl.xs')
-rw-r--r--src/if_perl.xs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/if_perl.xs b/src/if_perl.xs
index 118f60487..4c46f2abb 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -13,8 +13,22 @@
#define _memory_h /* avoid memset redeclaration */
#define IN_PERL_FILE /* don't include if_perl.pro from proto.h */
+/*
+ * Currently 32-bit version of ActivePerl is built with VC6.
+ * (http://community.activestate.com/faq/windows-compilers-perl-modules)
+ * It means that time_t should be 32-bit. However the default size of
+ * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T.
+ */
+#if defined(WIN32) && !defined(_WIN64)
+# define _USE_32BIT_TIME_T
+#endif
+
#include "vim.h"
+#include <EXTERN.h>
+#include <perl.h>
+#include <XSUB.h>
+
/*
* Work around clashes between Perl and Vim namespace. proto.h doesn't