diff options
author | Alain Barbet <alian@cpan.org> | 2002-10-18 17:29:29 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-10-13 20:20:11 +0000 |
commit | e86dc0c41ed9eefc2361861d4442f7ef62f3441c (patch) | |
tree | ffa103e2051d16f9ae51b9e5eec0d2e58ecdc019 | |
parent | ce1e1c678d48c8627af909c45ad2e1ffd37ed82a (diff) | |
download | perl-e86dc0c41ed9eefc2361861d4442f7ef62f3441c.tar.gz |
Integrate change 18046, as suggested by Abe Timmerman :
Subject: Re: Smoke 18027 FAIL(F) MSWin32 5.0 Win2000Pro (MSWin32-x86)
Message-ID: <3DB00CB9.70708@alianwebserver.com>
p4raw-id: //depot/maint-5.6/perl-5.6.2@21443
p4raw-edited: from //depot/perl@18046 'edit in' win32/makefile.mk
(@18030..)
p4raw-integrated: from //depot/perl@18046 'merge in' README.win32
(@17671..) win32/win32.c (@18030..)
-rw-r--r-- | README.win32 | 19 | ||||
-rw-r--r-- | win32/makefile.mk | 6 | ||||
-rw-r--r-- | win32/win32.c | 7 |
3 files changed, 25 insertions, 7 deletions
diff --git a/README.win32 b/README.win32 index b1f24fe91e..409018d97b 100644 --- a/README.win32 +++ b/README.win32 @@ -125,15 +125,26 @@ and edit win32/config.vc to change "make=nmake" into "make=dmake". The latter step is only essential if you want to use dmake as your default make for building extensions using MakeMaker. -=item Mingw32 with GCC +=item MinGW32 with gcc -GCC-2.95.2 binaries can be downloaded from: +The latest release of MinGW (at the time of writing) is 2.0.0, which comes +with gcc-3.2, and can be downloaded here: - ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/ + http://sourceforge.net/projects/mingw + +Perl compiles with earlier releases of gcc (2.95 and up) that can be +downloaded from the same place. If you use gcc-3.2, comment out the +line: + + USE_GCC_V3_2 *= define + +in win32\makefile.mk You also need dmake. See L</"Make"> above on how to get it. -The GCC-2.95.2 bundle comes with Mingw32 libraries and headers. +=item MinGW release 1 + +The MinGW-1.1 bundle comes with gcc-2.95.3. 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 diff --git a/win32/makefile.mk b/win32/makefile.mk index 2f706833ff..59d99dbd56 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -37,6 +37,9 @@ INST_TOP *= $(INST_DRV)\perl #CCTYPE *= BORLAND # mingw32+gcc-2.95.2 or better CCTYPE *= GCC +# Uncomment this if you are using the latest MinGW release (2.0.0) +# with gcc3.2 +#USE_GCC_V3_2 *= define # # uncomment this if your Borland compiler is older than v5.4. @@ -410,6 +413,9 @@ LINK_FLAGS += -L"$(CCLIBDIR)\Release" CC = gcc LINK32 = gcc +.IF "$(USE_GCC_V3_2)" == "define" +LINK32 = g++ +.END LIB32 = ar rc IMPLIB = dlltool RSC = rc diff --git a/win32/win32.c b/win32/win32.c index cceb2e53ea..2aeaea5a0e 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -15,7 +15,8 @@ #define Win32_Winsock #endif #include <windows.h> -#ifndef __MINGW32__ /* GCC/Mingw32-2.95.2 forgot the WINAPI on CommandLineToArgvW() */ +/* GCC-2.95.2/Mingw32-1.1 forgot the WINAPI on CommandLineToArgvW() */ +#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION==1) # include <shellapi.h> #else LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCommandLine, int * pNumArgs); @@ -60,8 +61,8 @@ int _CRT_glob = 0; #endif -#if defined(__MINGW32__) -/* Mingw32 is missing some prototypes */ +#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION==1) +/* Mingw32-1.1 is missing some prototypes */ FILE * _wfopen(LPCWSTR wszFileName, LPCWSTR wszMode); FILE * _wfdopen(int nFd, LPCWSTR wszMode); FILE * _freopen(LPCWSTR wszFileName, LPCWSTR wszMode, FILE * pOldStream); |