From db7a66f3afe1127a6258c6f476dd11243aef60f3 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 2 Nov 2008 09:23:34 +0000 Subject: [PATCH] + fixed zlib for windows, resolves #12451 + test git-svn-id: trunk@12013 - --- .gitattributes | 1 + packages/zlib/src/zlib.pp | 2 ++ tests/Makefile | 4 ++-- tests/Makefile.fpc | 2 +- tests/test/packages/zlib/tzlib1.pp | 7 +++++++ 5 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 tests/test/packages/zlib/tzlib1.pp diff --git a/.gitattributes b/.gitattributes index 999286be0d..3832007f6e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7596,6 +7596,7 @@ tests/test/packages/webtbs/tw11570.pp svneol=native#text/plain tests/test/packages/webtbs/tw1808.pp svneol=native#text/plain tests/test/packages/webtbs/tw3820.pp svneol=native#text/plain tests/test/packages/win-base/tdispvar1.pp svneol=native#text/plain +tests/test/packages/zlib/tzlib1.pp svneol=native#text/plain tests/test/t4cc1.pp svneol=native#text/plain tests/test/t4cc2.pp svneol=native#text/plain tests/test/tabstrcl.pp svneol=native#text/plain diff --git a/packages/zlib/src/zlib.pp b/packages/zlib/src/zlib.pp index 607d5cc457..3dc170f412 100644 --- a/packages/zlib/src/zlib.pp +++ b/packages/zlib/src/zlib.pp @@ -29,7 +29,9 @@ const {$endif windows} {$endif} +{$ifndef windows} {$linklib libz} +{$endif windows} type { Compatible with paszlib } diff --git a/tests/Makefile b/tests/Makefile index 3294b9d741..69d547176d 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,5 +1,5 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/10/22] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/09/28] # default: allexectests MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded @@ -1443,7 +1443,7 @@ ifndef LOG export LOG:=$(TEST_OUTPUTDIR)/log endif TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem -TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/fcl-process +TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/fcl-process packages/zlib ifdef QUICKTEST export QUICKTEST else diff --git a/tests/Makefile.fpc b/tests/Makefile.fpc index 565500d018..00b39697f3 100644 --- a/tests/Makefile.fpc +++ b/tests/Makefile.fpc @@ -120,7 +120,7 @@ endif # Subdirs available in the test subdir TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem -TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/fcl-process +TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/fcl-process packages/zlib ifdef QUICKTEST export QUICKTEST diff --git a/tests/test/packages/zlib/tzlib1.pp b/tests/test/packages/zlib/tzlib1.pp new file mode 100644 index 0000000000..faee599fa2 --- /dev/null +++ b/tests/test/packages/zlib/tzlib1.pp @@ -0,0 +1,7 @@ +{ %NOTE=This test requires an installed zlib1 shared library } +{ simple compilation test } +uses + zlib; +begin + writeln(zlibVersion); +end.