summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1998-06-20 21:05:51 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1998-06-20 21:05:51 +0000
commit4e61ee4d2394e4b120037f733150ee6041bf95f2 (patch)
tree40c54639df8451e85a975263aa5cc981f249ad7f /win32
parent3e83fff7485ec2aa4f013e05fa43596a76f92102 (diff)
downloadperl-4e61ee4d2394e4b120037f733150ee6041bf95f2.tar.gz
Patches to build with EGCS-1.0.2 Mingw32 port.
p4raw-id: //depot/ansiperl@1160
Diffstat (limited to 'win32')
-rw-r--r--win32/config_H.gc2
-rw-r--r--win32/dl_win32.xs18
-rw-r--r--win32/makefile.mk4
-rw-r--r--win32/win32.h7
4 files changed, 23 insertions, 8 deletions
diff --git a/win32/config_H.gc b/win32/config_H.gc
index 9c674b6fbe..16fab75490 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -1066,7 +1066,7 @@
/* 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
diff --git a/win32/dl_win32.xs b/win32/dl_win32.xs
index d72173129e..a5183c3d90 100644
--- a/win32/dl_win32.xs
+++ b/win32/dl_win32.xs
@@ -26,6 +26,7 @@ calls.
#include "EXTERN.h"
#include "perl.h"
+#include "win32.h"
#ifdef PERL_OBJECT
#define NO_XSLOCKS
@@ -33,6 +34,19 @@ calls.
#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
@@ -96,7 +110,7 @@ dl_load_file(filename,flags=0)
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);
@@ -112,7 +126,7 @@ dl_find_symbol(libhandle, symbolname)
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);
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 0fb6734523..35004f8665 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -42,7 +42,7 @@ CCTYPE *= GCC
#
# 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
@@ -62,7 +62,7 @@ CCTYPE *= GCC
# 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
diff --git a/win32/win32.h b/win32/win32.h
index a6a2f9d5c5..eaced2821e 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -31,9 +31,6 @@ typedef long long __int64;
#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,
@@ -60,6 +57,10 @@ typedef long long __int64;
#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>