R17.0-rc1 patch for gzio.c compile breakage.
Daniel Goertzen <[email protected]> Mon, 3 Feb 2014 11:35:36 -0600
| Newsgroups | gmane.comp.lang.erlang.patches |
|---|---|
| Message-ID | <CAJCf5RyO7EzOPHHDSG-O6i+=saDfkvX6Ymgyy6P+7ewWNNrCnA@mail.gmail.com> |
A dependency on zlib.h was recently removed (commit 8a147a7365). This also removes the definition of the macro "OF" which is required by gzio.c. Now "OF" is evidently defined by other headers on some systems, but on at least Gentoo Linux this is not the case. OF was needed to support compilation on now ancient C compilers. I assume R17 and newer doesn't need to support ancient C compilers. See details at http://stackoverflow.com/questions/7299310/of-macro-in-iowin32-h The attached patch removes usage of OF in gzio.c Regards, Dan. _______________________________________________ erlang-patches mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-patches
gzio_OF.patch
(text/x-patch, 1.1 KB)
diff --git a/erts/emulator/drivers/common/gzio.c b/erts/emulator/drivers/common/gzio.c
index 653f395..8ec2c3f 100644
--- a/erts/emulator/drivers/common/gzio.c
+++ b/erts/emulator/drivers/common/gzio.c
@@ -73,15 +73,15 @@ typedef struct gz_stream {
int transparent; /* 1 if input file is not a .gz file */
char mode; /* 'w' or 'r' */
int position; /* Position (for seek) */
- int (*destroy)OF((struct gz_stream*)); /* Function to destroy
+ int (*destroy)(struct gz_stream*); /* Function to destroy
* this structure. */
} gz_stream;
-local ErtsGzFile gz_open OF((const char *path, const char *mode));
-local int get_byte OF((gz_stream *s));
-local void check_header OF((gz_stream *s));
-local int destroy OF((gz_stream *s));
-local uLong getLong OF((gz_stream *s));
+local ErtsGzFile gz_open (const char *path, const char *mode);
+local int get_byte (gz_stream *s);
+local void check_header (gz_stream *s);
+local int destroy (gz_stream *s);
+local uLong getLong (gz_stream *s);
#ifdef UNIX
/*