diff --git a/.cvsignore b/.cvsignore index 815b0b8ad08aa15b29adbfe70271b95c6cab0883..ac4d0e714e27d907d0cf04d42bf33a5666e0065d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -20,3 +20,4 @@ libssl.pc *.flc semantic.cache Makefile +*.dll* diff --git a/Configure b/Configure index f1760083aadbd29de57adbbbe8bbeb0ec8c5a39c..b0fd82866dc183b098aac9eb63802ad46b063773 100755 --- a/Configure +++ b/Configure @@ -494,7 +494,7 @@ my %table=( "BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32", # MinGW -"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin -shared:.dll.a", +"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a", # UWIN "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32", @@ -1192,13 +1192,16 @@ if (!$no_shared) if (!$IsMK1MF) { + # add {no-}static-engine to options to allow mkdef.pl to work without extra arguments if ($no_shared) { $openssl_other_defines.="#define OPENSSL_NO_DYNAMIC_ENGINE\n"; + $options.=" static-engine"; } else { $openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n"; + $options.=" no-static-engine"; } } diff --git a/Makefile.org b/Makefile.org index 249e57321902a33c13e0fa0871e4905a74e62e0e..e5317ca4d86b55a040db09038fd6761a8837bf83 100644 --- a/Makefile.org +++ b/Makefile.org @@ -534,6 +534,16 @@ install_sw: chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ fi ); \ + if expr $(PLATFORM) : 'mingw' > /dev/null; then \ + ( case $$i in \ + *crypto*) i=libeay32.dll;; \ + *ssl*) i=ssleay32.dll;; \ + esac; \ + echo installing $$i; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ + chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ + fi; \ fi; \ done; \ ( here="`pwd`"; \ diff --git a/Makefile.shared b/Makefile.shared index 8bc6dd4ccd821ea3eecdaefb730992a82db26376..6970e58da736e9ecb351d58115a488154d07b6ef 100644 --- a/Makefile.shared +++ b/Makefile.shared @@ -248,16 +248,21 @@ link_o.cygwin: INHIBIT_SYMLINKS=yes; \ SHLIB=cyg$(LIBNAME); \ base=-Wl,--enable-auto-image-base; \ + deffile=; \ if expr $(PLATFORM) : 'mingw' > /dev/null; then \ - SHLIB=$(LIBNAME); base=; \ + SHLIB=$(LIBNAME)eay32; base=; \ + if test -f $(LIBNAME)eay32.def; then \ + deffile=$(LIBNAME)eay32.def; \ + fi; \ fi; \ SHLIB_SUFFIX=.dll; \ LIBVERSION="$(LIBVERSION)"; \ SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ - SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-s,-Bsymbolic"; \ + SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base $$deffile -Wl,-s,-Bsymbolic"; \ $(LINK_SO_O) +#for mingw target if def-file is in use dll-name should match library-name link_a.cygwin: @ $(CALC_VERSIONS); \ INHIBIT_SYMLINKS=yes; \ @@ -265,9 +270,13 @@ link_a.cygwin: dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; extras=; \ base=-Wl,--enable-auto-image-base; \ if expr $(PLATFORM) : 'mingw' > /dev/null; then \ - SHLIB=$(LIBNAME); SHLIB_SOVER=32; \ + case $(LIBNAME) in \ + crypto) SHLIB=libeay;; \ + ssl) SHLIB=ssleay;; \ + esac; \ + SHLIB_SOVER=32; \ extras="$(LIBNAME).def"; \ - $(PERL) util/mkdef.pl 32 $(LIBNAME) > $$extras; \ + $(PERL) util/mkdef.pl 32 $$SHLIB > $$extras; \ base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \ fi; \ dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \ diff --git a/apps/.cvsignore b/apps/.cvsignore index ac07a77768035e185675d6b2c3428eedb3d26c79..9981329b02956926c369a06744e8e94ea606e413 100644 --- a/apps/.cvsignore +++ b/apps/.cvsignore @@ -5,3 +5,4 @@ der_chop.bak CA.pl *.flc semantic.cache +*.dll diff --git a/crypto/.cvsignore b/crypto/.cvsignore index 52d2683ea30a2c223e921e910e2ac1d1d92477ab..337529eecebe5ec28834b2b073986df083c76bb4 100644 --- a/crypto/.cvsignore +++ b/crypto/.cvsignore @@ -4,5 +4,5 @@ opensslconf.h Makefile.save *.flc semantic.cache -x86cpuid-elf.s -x86_64cpuid.s +*cpuid.s +uplink-cof.s diff --git a/crypto/aes/.cvsignore b/crypto/aes/.cvsignore index 957e89ba05d856186a9c0735191e6591d7380233..035489ba785d34415f4a556ba2103cf5ae0c3ba8 100644 --- a/crypto/aes/.cvsignore +++ b/crypto/aes/.cvsignore @@ -2,5 +2,4 @@ lib Makefile.save *.flc semantic.cache -ax86-elf.s -aes-x86_64.s +aes-*.s diff --git a/crypto/bf/.cvsignore b/crypto/bf/.cvsignore index 403e8f3eabce6c52313c0b5d9e4945ac13dd8e55..86da787e1bc88c2565459439373ca37052f3d885 100644 --- a/crypto/bf/.cvsignore +++ b/crypto/bf/.cvsignore @@ -2,4 +2,4 @@ lib Makefile.save *.flc semantic.cache -bx86-elf.s +bf-*.s diff --git a/crypto/bn/.cvsignore b/crypto/bn/.cvsignore index f8067f2553d013bb3db5359514c91147bbc02c3c..ebe4b61bb3cd7a4169bd4db11895331e1641d860 100644 --- a/crypto/bn/.cvsignore +++ b/crypto/bn/.cvsignore @@ -2,7 +2,6 @@ lib Makefile.save *.flc semantic.cache -co86-elf.s -bn86-elf.s -mo86-elf.s -x86_64-mont.s +co-*.s +bn-*.s +*-mont.s diff --git a/crypto/camellia/.cvsignore b/crypto/camellia/.cvsignore index a65b41774ad52b3cc7b60496d35eaafc5da4bb16..c6d03a9dbc6b8f0c2044d3f751abc8410a06fea0 100644 --- a/crypto/camellia/.cvsignore +++ b/crypto/camellia/.cvsignore @@ -1 +1,2 @@ lib +Makefile.save diff --git a/crypto/cast/.cvsignore b/crypto/cast/.cvsignore index e79919b118190946849960e8386886c6ebc106c0..56fedb2d5c7803b81386e889514203f3341bc1ad 100644 --- a/crypto/cast/.cvsignore +++ b/crypto/cast/.cvsignore @@ -2,4 +2,4 @@ lib Makefile.save *.flc semantic.cache -cx86-elf.s +cx86-*.s diff --git a/crypto/des/.cvsignore b/crypto/des/.cvsignore index 5dcc40f4f4953ad5e3f09a5eff7e01e0c88a57fc..6f011eae8af284cd5ce19f55a4752455930f83af 100644 --- a/crypto/des/.cvsignore +++ b/crypto/des/.cvsignore @@ -3,5 +3,5 @@ Makefile.save des *.flc semantic.cache -yx86-elf.s -dx86-elf.s +crypt*.s +des-*.s diff --git a/crypto/md5/.cvsignore b/crypto/md5/.cvsignore index 50d58e881ae361d9e6cb2138a56f527b7b2cee7c..e7bf5ddce405091209bd936f9b95ebcf2e4965d6 100644 --- a/crypto/md5/.cvsignore +++ b/crypto/md5/.cvsignore @@ -2,5 +2,4 @@ lib Makefile.save *.flc semantic.cache -mx86-elf.s -md5-x86_64.s +md5-*.s diff --git a/crypto/rc4/.cvsignore b/crypto/rc4/.cvsignore index 8885ec12a7ac328cf0783a0d2193a792580770f1..55e2f07396d5f496876d11714643d4ad95cef203 100644 --- a/crypto/rc4/.cvsignore +++ b/crypto/rc4/.cvsignore @@ -2,5 +2,4 @@ lib Makefile.save *.flc semantic.cache -rx86-elf.s -rc4-x86_64.s +rc4-*.s diff --git a/crypto/ripemd/.cvsignore b/crypto/ripemd/.cvsignore index f7abe18d0bbd01ea7e3a509e01036dc880e9edb4..4e5de4863b3fdbe215205791a7e9da9dfa87e03e 100644 --- a/crypto/ripemd/.cvsignore +++ b/crypto/ripemd/.cvsignore @@ -2,4 +2,4 @@ lib Makefile.save *.flc semantic.cache -rm86-elf.s +rmd-*.s diff --git a/crypto/sha/.cvsignore b/crypto/sha/.cvsignore index 6ab2266d0041aa2fd3835e519ad14ada74ebe89b..4f51f915e70ee779aa793e8201c4f735d02b636b 100644 --- a/crypto/sha/.cvsignore +++ b/crypto/sha/.cvsignore @@ -2,10 +2,6 @@ lib Makefile.save *.flc semantic.cache -sx86-elf.s -s512sse2-elf.s -sha1-x86_64.s -sha256-x86_64.s -sha512-x86_64.s -sha256x86-elf.s -sha512x86-elf.s +sha1-*.s +sha256-*.s +sha512-*.s diff --git a/crypto/ts/.cvsignore b/crypto/ts/.cvsignore index a65b41774ad52b3cc7b60496d35eaafc5da4bb16..c6d03a9dbc6b8f0c2044d3f751abc8410a06fea0 100644 --- a/crypto/ts/.cvsignore +++ b/crypto/ts/.cvsignore @@ -1 +1,2 @@ lib +Makefile.save diff --git a/crypto/whrlpool/.cvsignore b/crypto/whrlpool/.cvsignore index 60be998d18958d44a6c0aeacae1686ec8ad6c4db..baa1c427103c3d67e5641ba00c9a29f537c847e5 100644 --- a/crypto/whrlpool/.cvsignore +++ b/crypto/whrlpool/.cvsignore @@ -1,3 +1,3 @@ lib -w86mmx-elf.s -wp-x86_64.s +Makefile.save +wp-*.s diff --git a/crypto/x509/Makefile b/crypto/x509/Makefile index ca8f02bfe7b9cf8b1946beda0f33e653257c97a8..72c82278f43ddc26cb496f515408b6dae7302c21 100644 --- a/crypto/x509/Makefile +++ b/crypto/x509/Makefile @@ -48,7 +48,7 @@ lib: $(LIBOBJ) @touch lib files: - $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO links: @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) diff --git a/engines/.cvsignore b/engines/.cvsignore index 47b5fd114a5623e39d5f5a211b0b570751dc7b7e..b722ca89579851b001adb2c7298ff52859cef6f2 100644 --- a/engines/.cvsignore +++ b/engines/.cvsignore @@ -3,3 +3,4 @@ lib libs *.flc semantic.cache +*.dll diff --git a/engines/Makefile b/engines/Makefile index 7796cb53511a1aa8cfbe7c121c891756577c5235..e3719bcdae8ef29864cb2cc06fa08d61174b29aa 100644 --- a/engines/Makefile +++ b/engines/Makefile @@ -99,26 +99,29 @@ links: # for shared libraries as well as for Cygwin which uses the # dlfcn_name_converter and therefore stores the engines with .so suffix, too. # XXXXX This was extended to HP-UX dl targets, which use .sl suffix. +# XXXXX This was extended to mingw targets, which use eay32.dll suffix without lib as prefix. install: @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... @if [ -n "$(SHARED_LIBS)" ]; then \ set -e; \ for l in $(LIBNAMES); do \ ( echo installing $$l; \ + pfx=lib; \ if [ "$(PLATFORM)" != "Cygwin" ]; then \ case "$(CFLAGS)" in \ - *DSO_BEOS*) sfx="so";; \ - *DSO_DLFCN*) sfx="so";; \ - *DSO_DL*) sfx="sl";; \ - *) sfx="bad";; \ + *DSO_BEOS*) sfx=".so";; \ + *DSO_DLFCN*) sfx=".so";; \ + *DSO_DL*) sfx=".sl";; \ + *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ + *) sfx=".bad";; \ esac; \ - cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \ + cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l$$sfx.new; \ else \ - sfx="so"; \ - cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \ + sfx=".so"; \ + cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l$$sfx.new; \ fi; \ - chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \ + chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l$$sfx.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l$$sfx ); \ done; \ fi @target=install; $(RECURSIVE_MAKE) diff --git a/engines/ccgost/.cvsignore b/engines/ccgost/.cvsignore index 47b5fd114a5623e39d5f5a211b0b570751dc7b7e..b722ca89579851b001adb2c7298ff52859cef6f2 100644 --- a/engines/ccgost/.cvsignore +++ b/engines/ccgost/.cvsignore @@ -3,3 +3,4 @@ lib libs *.flc semantic.cache +*.dll diff --git a/engines/ccgost/Makefile b/engines/ccgost/Makefile index 737fad3754667d5f24c9cb800339019ab9355b37..eae172f30674bc78d3dbc41f506d590c9c0f0273 100644 --- a/engines/ccgost/Makefile +++ b/engines/ccgost/Makefile @@ -44,20 +44,22 @@ install: if [ -n "$(SHARED_LIBS)" ]; then \ set -e; \ echo installing $(LIBNAME); \ + pfx=lib; \ if [ "$(PLATFORM)" != "Cygwin" ]; then \ case "$(CFLAGS)" in \ - *DSO_BEOS*) sfx="so";; \ - *DSO_DLFCN*) sfx="so";; \ - *DSO_DL*) sfx="sl";; \ - *) sfx="bad";; \ + *DSO_BEOS*) sfx=".so";; \ + *DSO_DLFCN*) sfx=".so";; \ + *DSO_DL*) sfx=".sl";; \ + *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ + *) sfx=".bad";; \ esac; \ - cp lib$(LIBNAME).$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \ + cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx.new; \ else \ sfx="so"; \ - cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \ + cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx.new; \ fi; \ - chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx; \ + chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$${pfx}$(LIBNAME)$$sfx; \ fi links: diff --git a/ms/mingw32.bat b/ms/mingw32.bat index 8c7c63e0f265894a3cfefe62d3b2a5f4b614de49..7c26983035b252f5711e6dd747eeeff5da931a90 100644 --- a/ms/mingw32.bat +++ b/ms/mingw32.bat @@ -79,7 +79,7 @@ mingw32-make -f ms/mingw32a.mak if errorlevel 1 goto end echo Generating the DLLs and input libraries -dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lwsock32 -lgdi32 +dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32 if errorlevel 1 goto end dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a if errorlevel 1 goto end diff --git a/ms/mw.bat b/ms/mw.bat index c5ccd693e3dace645e1646a5d832a001616d1dc9..64a21b8ebb69e37ff2705cd6801e63054800bf64 100644 --- a/ms/mw.bat +++ b/ms/mw.bat @@ -15,7 +15,7 @@ make -f ms/mingw32.mak if errorlevel 1 goto end @rem Generate the DLLs and input libraries -dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lwsock32 -lgdi32 +dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32 if errorlevel 1 goto end dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a if errorlevel 1 goto end diff --git a/shlib/win32.bat b/shlib/win32.bat index c807a99d353d2a5aa204da71188bf54eb286196b..2b0faaa17ba0b41d5c19e24d33ea8bacb94066ed 100755 --- a/shlib/win32.bat +++ b/shlib/win32.bat @@ -14,5 +14,5 @@ cl /Focrypto.obj -DWIN32 %OPTIONS% -c crypto\crypto.c cl /Fossl.obj -DWIN32 %OPTIONS% -c ssl\ssl.c cl /Foeay.obj -DWIN32 %OPTIONS% -c apps\eay.c -cl /Fessleay.exe %OPTIONS% eay.obj ssl.obj crypto.obj crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib wsock32.lib +cl /Fessleay.exe %OPTIONS% eay.obj ssl.obj crypto.obj crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib ws2_32.lib diff --git a/shlib/win32dll.bat b/shlib/win32dll.bat index 294c94c81c094daada1d98cdae7f47ffc77aca3e..844e3537c8d39317b23c99aa3cc77087b3f2d95b 100755 --- a/shlib/win32dll.bat +++ b/shlib/win32dll.bat @@ -5,9 +5,9 @@ set OPTIONS2=/W3 /WX /Ox /Gf /nologo set OPTIONS=%OPTIONS1% %OPTIONS2% -cl /Felibeay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\libeay32.def crypto\crypto.c crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib wsock32.lib +cl /Felibeay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\libeay32.def crypto\crypto.c crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib ws2_32.lib cl /Fessleay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\ssleay32.def ssl\ssl.c libeay32.lib -cl /Fessleay.exe /MD -DWIN32 %OPTIONS% apps\eay.c ssleay32.lib libeay32.lib user32.lib wsock32.lib +cl /Fessleay.exe /MD -DWIN32 %OPTIONS% apps\eay.c ssleay32.lib libeay32.lib user32.lib ws2_32.lib diff --git a/test/.cvsignore b/test/.cvsignore index ee951f24f33af8e767316caae29854bb2a4a2aac..8b5997c6dcb7f0be37009f6c0c728c75f587cff0 100644 --- a/test/.cvsignore +++ b/test/.cvsignore @@ -31,3 +31,4 @@ sha512t *.flc semantic.cache newkey.pem +*.dll diff --git a/util/mkerr.pl b/util/mkerr.pl index aac87bbf3b8f8186426edb654b9ffb9dcd44fa81..6004853bc166ef1614e8cf26b7339711ccd42751 100644 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -377,6 +377,10 @@ foreach $lib (keys %csrc) "#ifndef HEADER_${lib}_ERR_H\n", "#define HEADER_${lib}_ERR_H\n", "\n", +"#ifdef __cplusplus\n", +"extern \"C\" {\n", +"#endif\n", +"\n", "/* BEGIN ERROR CODES */\n"; } open (OUT, ">$hfile") || die "Can't Open File $hfile for writing\n"; diff --git a/util/pl/BC-32.pl b/util/pl/BC-32.pl index 99b8c058d2c4153a71f7c2a9bfaa0e2a329ce513..1f1e13fb4068d0033e28ad97d40748b0fb63bf3a 100644 --- a/util/pl/BC-32.pl +++ b/util/pl/BC-32.pl @@ -117,7 +117,7 @@ ___ else { local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; - $ex.=' wsock32.lib gdi32.lib'; + $ex.=' ws2_32.lib gdi32.lib'; $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; } $ret.="\n"; diff --git a/util/pl/Mingw32.pl b/util/pl/Mingw32.pl index b76b7afd27d8e4ba4b69140069f80ed1b205ae17..fe3fb27a7860f7cda22697286ddbcba347471041 100644 --- a/util/pl/Mingw32.pl +++ b/util/pl/Mingw32.pl @@ -55,7 +55,7 @@ $link='${CC}'; $lflags='${CFLAGS}'; $efile='-o '; $exep=''; -$ex_libs="-lwsock32 -lgdi32"; +$ex_libs="-lws2_32 -lgdi32"; # static library stuff $mklib='ar r';