From: Rolf K. <lab...@us...> - 2004-12-25 16:32:51
|
Update of /cvsroot/opengtoolkit/lvzip/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31060/c_source Modified Files: configure macbin.c macbin.h zlibvc.def zlibvc.dsp Log Message: Some modifications to allow use of Windows API file functions in zip/unzip operations instead of ANSI C runtime functions. Index: configure =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/configure,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configure 7 Dec 2004 22:52:50 -0000 1.3 --- configure 25 Dec 2004 16:32:41 -0000 1.4 *************** *** 79,83 **** case `(uname -s || echo unknown) 2>/dev/null` in Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,$LIBNAME.so"};; ! CYGWIN* | Cygwin* | cygwin* ) EXE='.exe';; QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 --- 79,83 ---- case `(uname -s || echo unknown) 2>/dev/null` in Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,$LIBNAME.so"};; ! CYGWIN* | Cygwin* | cygwin* | OS/2* ) EXE='.exe';; QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 *************** *** 91,97 **** SHAREDLIBV=$LIBNAME.$VER$shared_ext SHAREDLIBM=$LIBNAME.$VER1$shared_ext ! LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name /usr/lib/$SHAREDLIBV -compatibility_version $VER2 -current_version $VER"} ! libdir='/usr/lib' ! includedir='/usr/include';; *) LDSHARED=${LDSHARED-"$cc -shared"};; esac --- 91,95 ---- SHAREDLIBV=$LIBNAME.$VER$shared_ext SHAREDLIBM=$LIBNAME.$VER1$shared_ext ! LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBV -compatibility_version $VER2 -current_version $VER"};; *) LDSHARED=${LDSHARED-"$cc -shared"};; esac Index: macbin.c =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/macbin.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** macbin.c 11 Sep 2003 22:33:15 -0000 1.6 --- macbin.c 25 Dec 2004 16:32:41 -0000 1.7 *************** *** 2,5 **** --- 2,7 ---- #include "zlib.h" + #include "ioapi.h" + #include "iowin32.h" #include "macbin.h" *************** *** 289,292 **** --- 291,309 ---- } + extern long ZEXPORT InitializeFileFuncs OF((zlib_filefunc_def* pzlib_filefunc_def)) + { + if (pzlib_filefunc_def) + { + #if Win32 + fill_win32_filefunc(pzlib_filefunc_def); + #else + fill_fopen_filefunc(pzlib_filefunc_def); + #endif + return noErr; + } + else + return sizeof(zlib_filefunc_def); + } + #if Mac static OSErr MakeFSpec(PStr path, FSSpec *fss) { Index: macbin.h =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/macbin.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** macbin.h 11 Sep 2003 22:33:15 -0000 1.4 --- macbin.h 25 Dec 2004 16:32:41 -0000 1.5 *************** *** 10,13 **** --- 10,17 ---- #endif + #ifndef _ZLIBIOAPI_H + #include "ioapi.h" + #endif + #if defined(macintosh) || defined(__PPCC__) || defined(THINK_C) || defined(__SC__) || defined(__MWERKS__) #define Mac 1 *************** *** 160,163 **** --- 164,170 ---- uInt32 openMode, uInt32 denyMode)); + + extern long ZEXPORT InitializeFileFuncs OF((zlib_filefunc_def* pzlib_filefunc_def)); + #ifdef __cplusplus } Index: zlibvc.dsp =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/zlibvc.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** zlibvc.dsp 7 Dec 2004 22:52:50 -0000 1.3 --- zlibvc.dsp 25 Dec 2004 16:32:41 -0000 1.4 *************** *** 449,452 **** --- 449,469 ---- # Begin Source File + SOURCE=.\iowin32.c + + !IF "$(CFG)" == "zlibvc - Win32 Release" + + !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" + + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseAxp" + + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" + + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" + + !ENDIF + + # End Source File + # Begin Source File + SOURCE=.\macbin.c Index: zlibvc.def =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/zlibvc.def,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** zlibvc.def 7 Dec 2004 22:52:50 -0000 1.5 --- zlibvc.def 25 Dec 2004 16:32:41 -0000 1.6 *************** *** 97,98 **** --- 97,99 ---- OpenResFork UtilFileInfo + InitializeFileFuncs |