From: Gurusamy Sarathy Date: Sat, 19 Feb 2000 04:14:19 +0000 (+0000) Subject: some fixes for mingw32/GCC (SETERRNO() still appears to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a1f88acf2a2aec3c61c878c837070234df78c08;p=p5sagit%2Fp5-mst-13.2.git some fixes for mingw32/GCC (SETERRNO() still appears to trash memory) p4raw-id: //depot/perl@5129 --- diff --git a/README.win32 b/README.win32 index 6889ab7..5499d3a 100644 --- a/README.win32 +++ b/README.win32 @@ -121,9 +121,9 @@ GCC-2.95.2 binaries can be downloaded from: The GCC-2.95.2 bundle comes with Mingw32 libraries and headers. -Make sure you install the binaries as indicated in the README for -the GCC bundle. You may need to set up a few environment variables -(usually run from a batch file). +Make sure you install the binaries that work with MSVCRT.DLL as indicated +in the README for the GCC bundle. You may need to set up a few environment +variables (usually run from a batch file). You also need dmake. See L above on how to get it. diff --git a/t/lib/safe2.t b/t/lib/safe2.t index 876e7a3..293b515 100755 --- a/t/lib/safe2.t +++ b/t/lib/safe2.t @@ -124,7 +124,7 @@ print $@ =~ /foo bar/ ? "ok 29\n" : "not ok 29\n"; my $t = 30; $cpt->rdo('/non/existant/file.name'); # The regexp is getting rather baroque. -print $! =~ /No such file|file specification syntax error|A file or directory in the path name does not exist|Invalid argument|Device not configured|file not found|File or directory doesn't exist/i ? "ok $t\n" : "not ok $t # $!\n"; $t++; +print $! =~ /cannot find|No such file|file specification syntax error|A file or directory in the path name does not exist|Invalid argument|Device not configured|file not found|File or directory doesn't exist/i ? "ok $t\n" : "not ok $t # $!\n"; $t++; # test #31 is gone. print 1 ? "ok $t\n" : "not ok $t\n#$@/$!\n"; $t++; diff --git a/t/op/mkdir.t b/t/op/mkdir.t index 4bd1b21..e946023 100755 --- a/t/op/mkdir.t +++ b/t/op/mkdir.t @@ -19,8 +19,8 @@ $ENV{LANGUAGE} = 'C'; # GNU locale extension print (mkdir('blurfl',0777) ? "ok 1\n" : "not ok 1\n"); print (mkdir('blurfl',0777) ? "not ok 2\n" : "ok 2\n"); -print ($! =~ /exist|denied/ ? "ok 3\n" : "# $!\nnot ok 3\n"); +print ($! =~ /cannot move|exist|denied/ ? "ok 3\n" : "# $!\nnot ok 3\n"); print (-d 'blurfl' ? "ok 4\n" : "not ok 4\n"); print (rmdir('blurfl') ? "ok 5\n" : "not ok 5\n"); print (rmdir('blurfl') ? "not ok 6\n" : "ok 6\n"); -print ($! =~ /such|exist|not found/i ? "ok 7\n" : "not ok 7\n"); +print ($! =~ /cannot find|such|exist|not found/i ? "ok 7\n" : "# $!\nnot ok 7\n"); diff --git a/win32/makefile.mk b/win32/makefile.mk index fd5733f..6357300 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -99,9 +99,9 @@ INST_ARCH *= \$(ARCHNAME) # Visual C++ >= 6.x #CCTYPE *= MSVC60 # Borland 5.02 or later -CCTYPE *= BORLAND -# mingw32/gcc-2.95.2 or better -#CCTYPE *= GCC +#CCTYPE *= BORLAND +# mingw32+gcc-2.95.2 or better +CCTYPE *= GCC # # uncomment this if you are compiling under Windows 95/98 and command.com @@ -165,9 +165,9 @@ CCTYPE *= BORLAND # so you may have to set CCHOME explicitly (spaces in the path name should # not be quoted) # -CCHOME *= c:\bc5 +#CCHOME *= c:\bc5 #CCHOME *= $(MSVCDIR) -#CCHOME *= D:\packages\mingw32 +CCHOME *= c:\gcc-2.95.2-msvcrt CCINCDIR *= $(CCHOME)\include CCLIBDIR *= $(CCHOME)\lib @@ -288,8 +288,8 @@ ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) .ENDIF -.IF "$(USE_OBJECT)" == "define" -ARCHNAME = $(ARCHNAME)-thread +.IF "$(USE_ITHREADS)" == "define" +ARCHNAME !:= $(ARCHNAME)-thread .ENDIF # Visual Studio 98 specific @@ -409,6 +409,9 @@ OBJOUT_FLAG = -o EXEOUT_FLAG = -o LIBOUT_FLAG = +# NOTE: we assume that GCC uses MSVCRT.DLL +BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX + .ELSE CC = cl @@ -591,11 +594,7 @@ CFGH_TMPL = config_H.bc CFGSH_TMPL = config.gc CFGH_TMPL = config_H.gc -.IF "$(USE_OBJECT)" == "define" -PERLIMPLIB = ..\libperlcore$(a) -.ELSE -PERLIMPLIB = ..\libperl$(a) -.ENDIF +PERLIMPLIB = ..\libperl56$(a) .ELSE diff --git a/win32/win32.h b/win32/win32.h index 65d24e4..4e9a422 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -75,6 +75,7 @@ #include #include #include +#include #ifndef EXT #include "EXTERN.h" #endif