浏览代码

Merged revisions 12013 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r12013 | florian | 2008-11-02 10:23:34 +0100 (So, 02 Nov 2008) | 2 lines

+ fixed zlib for windows, resolves #12451
+ test
........

git-svn-id: branches/fixes_2_2@12014 -

florian 17 年之前
父节点
当前提交
1d383b0508
共有 5 个文件被更改,包括 17 次插入3 次删除
  1. 1 0
      .gitattributes
  2. 2 0
      packages/zlib/src/zlib.pp
  3. 6 2
      tests/Makefile
  4. 1 1
      tests/Makefile.fpc
  5. 7 0
      tests/test/packages/zlib/tzlib1.pp

+ 1 - 0
.gitattributes

@@ -7230,6 +7230,7 @@ tests/test/packages/hash/tmdtest.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

+ 2 - 0
packages/zlib/src/zlib.pp

@@ -29,7 +29,9 @@ const
   {$endif windows}
 {$endif}
 
+{$ifndef windows}
 {$linklib libz}
+{$endif windows}
 
 type
   { Compatible with paszlib }

+ 6 - 2
tests/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/15]
+# 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
@@ -115,6 +115,10 @@ FPC:=$(shell $(FPCPROG) -PB)
 endif
 ifneq ($(findstring Error,$(FPC)),)
 override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+else
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
+endif
 endif
 else
 override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
@@ -1442,7 +1446,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
+TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/zlib
 ifdef QUICKTEST
 export QUICKTEST
 else

+ 1 - 1
tests/Makefile.fpc

@@ -123,7 +123,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
+TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/zlib
 
 ifdef QUICKTEST
 export QUICKTEST

+ 7 - 0
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.