poldek: tndb/write.c Newer zlib (>= 1.3.3.7 for example) reject + as it's n...

arekm arekm at pld-linux.org
Sun Feb 14 09:20:57 CET 2010


Author: arekm                        Date: Sun Feb 14 08:20:57 2010 GMT
Module: poldek                        Tag: HEAD
---- Log message:
Newer zlib (>= 1.3.3.7 for example) reject + as it's not possible to do simultaneous read and write.

---- Files affected:
poldek/tndb:
   write.c (1.11 -> 1.12) 

---- Diffs:

================================================================
Index: poldek/tndb/write.c
diff -u poldek/tndb/write.c:1.11 poldek/tndb/write.c:1.12
--- poldek/tndb/write.c:1.11	Fri Jun 22 20:20:58 2007
+++ poldek/tndb/write.c	Sun Feb 14 09:20:52 2010
@@ -45,7 +45,7 @@
 
 struct tndb *tndb_creat(const char *name, int comprlevel, unsigned flags)
 {
-    char                path[PATH_MAX], mode[32] = "w+b";
+    char                path[PATH_MAX], mode[32] = "wb";
     tn_stream           *st;
     struct tndb         *db = NULL;
     int                 fd, n, type = TN_STREAM_STDIO;
@@ -69,7 +69,7 @@
     if (n > 3 && strcmp(&name[n - 3], ".gz") == 0) {
         type = TN_STREAM_GZIO;
         if (comprlevel >= 0 && comprlevel < 10)
-            snprintf(mode, sizeof(mode), "w+b%d", comprlevel);
+            snprintf(mode, sizeof(mode), "wb%d", comprlevel);
     }
     
     if ((st = n_stream_dopen(fd, mode, type)) == NULL)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/tndb/write.c?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list