Upgrade to Compress::Zlib 1.40
[p5sagit/p5-mst-13.2.git] / ext / Compress / Zlib / Zlib.xs
index c6fd54d..6f02146 100644 (file)
@@ -1,7 +1,7 @@
 /* Filename: Zlib.xs
  * Author  : Paul Marquess, <pmqs@cpan.org>
  * Created : 30 January 2005
- * Version : 1.35
+ * Version : 1.40
  *
  *   Copyright (c) 1995-2005 Paul Marquess. All rights reserved.
  *   This program is free software; you can redistribute it and/or
@@ -85,7 +85,7 @@ typedef gzType* Compress__Zlib__gzFile ;
 #define crcInitial crc32(0L, Z_NULL, 0)
 
 #if 1
-static char *my_z_errmsg[] = {
+static const char * const my_z_errmsg[] = {
     "need dictionary",     /* Z_NEED_DICT     2 */
     "stream end",          /* Z_STREAM_END    1 */
     "",                    /* Z_OK            0 */
@@ -98,8 +98,20 @@ static char *my_z_errmsg[] = {
     ""};
 #endif
 
+#if defined(__SYMBIAN32__)
+# define NO_WRITEABLE_DATA
+#endif
+
+#define TRACE_DEFAULT 0
+
+#ifdef NO_WRITEABLE_DATA
+#define trace TRACE_DEFAULT
+#else
+static int trace = TRACE_DEFAULT ;
+#endif
 
-static int trace = 0 ;
+/* Dodge PerlIO hiding of these functions. */
+#undef printf
 
 static void
 #ifdef CAN_PROTOTYPE
@@ -109,6 +121,9 @@ SetGzErrorNo(error_no)
 int error_no ;
 #endif
 {
+#ifdef dTHX    
+    dTHX;
+#endif    
     char * errstr ;
     SV * gzerror_sv = perl_get_sv(GZERRNO, FALSE) ;
   
@@ -249,7 +264,9 @@ gzreadline(file, output)
   SV * output ;
 #endif
 {
-
+#ifdef dTHX    
+    dTHX;
+#endif    
     SV * store = file->buffer ;
     char *nl = "\n"; 
     char *p;
@@ -303,6 +320,9 @@ SV * sv ;
 char * string;
 #endif
 {
+#ifdef dTHX    
+    dTHX;
+#endif    
     if (SvROK(sv)) {
        sv = SvRV(sv) ;
        switch(SvTYPE(sv)) {