extern char *tzname[];
# endif
#else
+#if !defined(__GNUC__) && !defined(tzname)
char *tzname[] = { "" , "" };
#endif
+#endif
/* XXX struct tm on some systems (SunOS4/BSD) contains extra (non POSIX)
* fields for which we don't have Configure support yet:
/* MYMALLOC:
* This symbol, if defined, indicates that we're using our own malloc.
*/
-#define MYMALLOC /**/
+/*#define MYMALLOC /**/
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
#include "EXTERN.h"
#include "perl.h"
+#include "win32.h"
#ifdef PERL_OBJECT
#define NO_XSLOCKS
#include "XSUB.h"
+static SV *error_sv;
+
+static char *
+OS_Error_String(void)
+{
+ DWORD err = GetLastError();
+ STRLEN len;
+ if (!error_sv)
+ error_sv = newSVpv("",0);
+ win32_str_os_error(error_sv,err);
+ return SvPV(error_sv,len);
+}
+
#include "dlutils.c" /* SaveError() etc */
static void
DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," libref=%x\n", RETVAL));
ST(0) = sv_newmortal() ;
if (RETVAL == NULL)
- SaveError(PERL_OBJECT_THIS_ "%d",GetLastError()) ;
+ SaveError(PERL_OBJECT_THIS_ "load_file:%s",OS_Error_String()) ;
else
sv_setiv( ST(0), (IV)RETVAL);
DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," symbolref = %x\n", RETVAL));
ST(0) = sv_newmortal() ;
if (RETVAL == NULL)
- SaveError(PERL_OBJECT_THIS_ "%d",GetLastError()) ;
+ SaveError(PERL_OBJECT_THIS_ "find_symbol:%s",OS_Error_String()) ;
else
sv_setiv( ST(0), (IV)RETVAL);
#
# uncomment next line if you want debug version of perl (big,slow)
-#CFG *= Debug
+CFG *= Debug
#
# if you have the source for des_fcrypt(), uncomment this and make sure the
# you may have compiled with/without it. Be prepared to recompile all extensions
# if you change the default. Currently, this cannot be enabled if you ask for
# PERL_OBJECT above.
-PERL_MALLOC *= define
+#PERL_MALLOC *= define
#
# set the install locations of the compiler include/libraries
#define __declspec(x)
#define PERL_GLOBAL_STRUCT
#define MULTIPLICITY
-#ifndef TLS_OUT_OF_INDEXES
-#define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF
-#endif
#endif
/* Define DllExport akin to perl's EXT,
#define CONTEXT PERL_CONTEXT /* Avoid conflict of CONTEXT defs. */
#endif /*WIN32_LEAN_AND_MEAN */
+#ifndef TLS_OUT_OF_INDEXES
+#define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF
+#endif
+
#include <dirent.h>
#include <io.h>
#include <process.h>