The R Project SVN R

Rev

Rev 55531 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 55531 Rev 55545
Line 1... Line 1...
1
*** NOT CURRENT ***
1
There are a very few to the source code of zlib-1.2.5 used here.
2
 
2
 
3
*** further changes made in November 2006 ***
-
 
4
 
-
 
5
There are a very few to the source code of zlib-1.2.3 used here.
-
 
6
 
-
 
7
- zconf.h includes R's config.h
3
zconf.h includes R's config.h
8
- gzio.c has been amended to allow LFS using fseeko/ftello where these
-
 
9
  are supported, and fseek64o/ftell64o on Windows.
-
 
10
 
4
 
11
Makefile.in is ours, not zlib's, and allows us to use PIC flags so this
5
Makefile.in is ours, not zlib's, and allows us to use PIC flags so this
12
can be included in libR.so.
6
can be included in libR.so.
13
 
7
 
14
As from R 2.12.2, on a Unix-alike we remap all the symbols (not just
8
As from R 2.12.2, on a Unix-alike we remap all the symbols (not just
Line 19... Line 13...
19
Rzlib.dll and symbols are imported from a named DLL.  But Rzlib.def is
13
Rzlib.dll and symbols are imported from a named DLL.  But Rzlib.def is
20
used to confine exports to symbols marked ZEXPORT in zlib.h.
14
used to confine exports to symbols marked ZEXPORT in zlib.h.
21
 
15
 
22
From 2.13.0, Z_PREFIX is defined in zconf.h, except on Windows.
16
From 2.13.0, Z_PREFIX is defined in zconf.h, except on Windows.
23
 
17
 
-
 
18
Visibility does not work on all platforms in gcc >= 3.3.
24
 
19
 
25
diff -u ./gzio.c /data/gannet/ripley/R/svn/R-patched/src/extra/zlib/gzio.c
20
diff -u /Users/ripley/Sources/zlib-1.2.5/zconf.h ./zconf.h
26
--- ./gzio.c	2005-07-11 21:31:48.000000000 +0100
21
--- /Users/ripley/Sources/zlib-1.2.5/zconf.h	2010-04-18 18:58:06.000000000 +0100
27
+++ /data/gannet/ripley/R/svn/R-patched/src/extra/zlib/gzio.c	2006-09-04 15:41:33.998757000 +0100
22
+++ ./zconf.h	2011-04-19 18:49:24.000000000 +0100
28
@@ -7,10 +7,35 @@
23
@@ -8,127 +8,84 @@
29
 
24
 #ifndef ZCONF_H
30
 /* @(#) $Id$ */
25
 #define ZCONF_H
31
 
26
 
32
+#ifdef HAVE_CONFIG_H
27
+#ifdef HAVE_CONFIG_H
33
+#include <config.h>
28
+#include <config.h>
34
+#endif
29
+#endif
35
+
30
+
36
 #include <stdio.h>
31
+/* R change */
37
 
-
 
38
+#if !defined(fdopen) && !defined(HAVE_FDOPEN)
32
+#ifndef WIN32
39
+/* not used in R */
33
+#define Z_PREFIX
40
+static FILE *fdopen(int fildes, const char *mode)
-
 
41
+{
-
 
42
+}
-
 
43
+#endif
34
+#endif
-
 
35
 
-
 
36
plus lots of changes to the defines.
44
+
37
 
-
 
38
diff -u /Users/ripley/Sources/zlib-1.2.5/zlib.h ./zlib.h
-
 
39
--- /Users/ripley/Sources/zlib-1.2.5/zlib.h	2010-04-20 05:12:48.000000000 +0100
-
 
40
+++ ./zlib.h	2011-04-19 22:18:56.000000000 +0100
-
 
41
@@ -1576,8 +1576,15 @@
-
 
42
 #  define gzseek gzseek64
-
 
43
 #  define gztell gztell64
-
 
44
 #  define gzoffset gzoffset64
-
 
45
+#  undef adler32_combine
-
 
46
+#  undef crc32_combine
-
 
47
+# ifdef Z_PREFIX
-
 
48
+#  define adler32_combine Rz_adler32_combine64
-
 
49
+#  define crc32_combine Rz_crc32_combine64
-
 
50
+# else
-
 
51
 #  define adler32_combine adler32_combine64
-
 
52
 #  define crc32_combine crc32_combine64
-
 
53
+# endif
-
 
54
 #  ifdef _LARGEFILE64_SOURCE
-
 
55
      ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-
 
56
      ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
-
 
57
 
-
 
58
diff -u /Users/ripley/Sources/zlib-1.2.5/zutil.h ./zutil.h
-
 
59
--- /Users/ripley/Sources/zlib-1.2.5/zutil.h	2010-04-18 20:29:24.000000000 +0100
-
 
60
+++ ./zutil.h	2011-04-19 19:41:57.000000000 +0100
-
 
61
@@ -13,6 +13,10 @@
45
 #include "zutil.h"
62
 #ifndef ZUTIL_H
-
 
63
 #define ZUTIL_H
46
 
64
 
47
+/* R ADDITION */
-
 
48
+#if defined(HAVE_OFF_T) && defined(HAVE_FSEEKO)
-
 
49
+#define f_seek fseeko
-
 
50
+#define f_tell ftello
-
 
51
+#else
-
 
52
+#ifdef Win32
65
+#ifdef WIN32
53
+#define f_seek fseeko64
-
 
54
+#define f_tell ftello64
-
 
55
+#else
-
 
56
+#define f_seek fseek
-
 
57
+#define f_tell ftell
66
+# define NO_VIZ
58
+#endif
-
 
59
+#endif
67
+#endif
60
+
68
+
61
 #ifdef NO_DEFLATE       /* for compatibility with old definition */
69
 #if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
62
 #  define NO_GZCOMPRESS
-
 
63
 #endif
-
 
64
@@ -196,7 +221,7 @@
-
 
65
          */
-
 
66
     } else {
-
 
67
         check_header(s); /* skip the .gz header */
-
 
68
-        s->start = ftell(s->file) - s->stream.avail_in;
-
 
69
+        s->start = f_tell(s->file) - s->stream.avail_in;
-
 
70
     }
-
 
71
 
-
 
72
     return (gzFile)s;
-
 
73
@@ -592,6 +617,7 @@
-
 
74
 }
-
 
75
 
-
 
76
 
-
 
77
+#ifdef UNUSED
-
 
78
 /* ===========================================================================
-
 
79
      Converts, formats, and writes the args to the compressed file under
-
 
80
    control of the format string, as in fprintf. gzprintf returns the number of
-
 
81
@@ -670,6 +696,7 @@
-
 
82
     return gzwrite(file, buf, len);
-
 
83
 }
-
 
84
 #endif
-
 
85
+#endif /* UNUSED */
-
 
86
 
-
 
87
 /* ===========================================================================
-
 
88
       Writes c, converted to an unsigned char, into the compressed file.
-
 
89
@@ -816,7 +843,7 @@
-
 
90
         s->back = EOF;
-
 
91
         s->stream.avail_in = 0;
-
 
92
         s->stream.next_in = s->inbuf;
-
 
93
-        if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;
-
 
94
+        if (f_seek(s->file, offset, SEEK_SET) < 0) return -1L;
-
 
95
 
-
 
96
         s->in = s->out = offset;
-
 
97
         return offset;
-
 
98
@@ -870,7 +897,7 @@
-
 
99
     if (!s->transparent) (void)inflateReset(&s->stream);
70
 #  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
100
     s->in = 0;
-
 
101
     s->out = 0;
-
 
102
-    return fseek(s->file, s->start, SEEK_SET);
-
 
103
+    return f_seek(s->file, s->start, SEEK_SET);
-
 
104
 }
-
 
105
 
-
 
106
 /* ===========================================================================
-
 
107
diff -u ./zconf.h /data/gannet/ripley/R/svn/R-patched/src/extra/zlib/zconf.h
-
 
108
--- ./zconf.h	2005-05-28 07:40:35.000000000 +0100
-
 
109
+++ /data/gannet/ripley/R/svn/R-patched/src/extra/zlib/zconf.h	2006-09-04 15:41:34.538753000 +0100
-
 
110
@@ -8,6 +8,9 @@
-
 
111
 #ifndef ZCONF_H
-
 
112
 #define ZCONF_H
-
 
113
 
-
 
114
+#ifdef HAVE_CONFIG_H
-
 
115
+#include <config.h>
-
 
116
+#endif
-
 
117
 /*
-
 
118
  * If you *really* need a unique prefix for all types and library functions,
-
 
119
  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
-
 
120
@@ -284,7 +287,7 @@
-
 
121
    typedef Byte       *voidp;
-
 
122
 #endif
71
 #else
123
 
-
 
124
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-
 
125
+#ifdef HAVE_UNISTD_H /* HAVE_UNISTD_H -- this line is updated by ./configure */
-
 
126
 #  include <sys/types.h> /* for off_t */
-
 
127
 #  include <unistd.h>    /* for SEEK_* and off_t */
-
 
128
 #  ifdef VMS
-
 
129
 
-