[Python-checkins] python/dist/src/Modules bz2module.c,1.16,1.17
niemeyer@users.sourceforge.net
niemeyer@users.sourceforge.net
Sat, 26 Apr 2003 23:25:26 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv29438/Modules
Modified Files:
bz2module.c
Log Message:
Applying patch by Neal Norwitz:
[#727759] get bzip2 to build on Solaris 8 (old bzip library)
Index: bz2module.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** bz2module.c 29 Mar 2003 10:04:54 -0000 1.16
--- bz2module.c 27 Apr 2003 06:25:24 -0000 1.17
***************
*** 32,35 ****
--- 32,38 ----
#define BZ2FileObject_Check(v) ((v)->ob_type == &BZ2File_Type)
+
+ #ifdef BZ_CONFIG_ERROR
+
#if SIZEOF_LONG >= 8
#define BZS_TOTAL_OUT(bzs) \
***************
*** 43,46 ****
--- 46,69 ----
#endif
+ #else /* ! BZ_CONFIG_ERROR */
+
+ #define BZ2_bzRead bzRead
+ #define BZ2_bzReadOpen bzReadOpen
+ #define BZ2_bzReadClose bzReadClose
+ #define BZ2_bzWrite bzWrite
+ #define BZ2_bzWriteOpen bzWriteOpen
+ #define BZ2_bzWriteClose bzWriteClose
+ #define BZ2_bzCompress bzCompress
+ #define BZ2_bzCompressInit bzCompressInit
+ #define BZ2_bzCompressEnd bzCompressEnd
+ #define BZ2_bzDecompress bzDecompress
+ #define BZ2_bzDecompressInit bzDecompressInit
+ #define BZ2_bzDecompressEnd bzDecompressEnd
+
+ #define BZS_TOTAL_OUT(bzs) bzs->total_out
+
+ #endif /* ! BZ_CONFIG_ERROR */
+
+
#ifdef WITH_THREAD
#define ACQUIRE_LOCK(obj) PyThread_acquire_lock(obj->lock, 1)
***************
*** 118,121 ****
--- 141,145 ----
break;
+ #ifdef BZ_CONFIG_ERROR
case BZ_CONFIG_ERROR:
PyErr_SetString(PyExc_SystemError,
***************
*** 124,127 ****
--- 148,152 ----
ret = 1;
break;
+ #endif
case BZ_PARAM_ERROR: