Changeset: 1532c37bab0b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1532c37bab0b
Modified Files:
common/stream/stream.c
Branch: Apr2012
Log Message:
fix compilation of debian 7 (ie properly use gzFile instead of gzFile*)
diffs (66 lines):
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -656,7 +656,7 @@ dupFileStream(stream *s)
static ssize_t
stream_gzread(stream *s, void *buf, size_t elmsize, size_t cnt)
{
- gzFile *fp = (gzFile *) s->stream_data.p;
+ gzFile fp = (gzFile) s->stream_data.p;
int size = (int) (elmsize * cnt);
if (!gzeof(fp)) {
@@ -673,7 +673,7 @@ stream_gzwrite(stream *s, const void *bu
int size = (int) (elmsize * cnt);
if (size) {
- size = gzwrite((gzFile *) s->stream_data.p, buf, size);
+ size = gzwrite((gzFile) s->stream_data.p, buf, size);
return (ssize_t) (size / elmsize);
}
return (ssize_t) cnt;
@@ -683,7 +683,7 @@ static void
stream_gzclose(stream *s)
{
if (s->stream_data.p)
- gzclose((gzFile *) s->stream_data.p);
+ gzclose((gzFile) s->stream_data.p);
s->stream_data.p = NULL;
}
@@ -691,7 +691,7 @@ static int
stream_gzflush(stream *s)
{
if (s->access == ST_WRITE)
- gzflush((gzFile *) s->stream_data.p, Z_SYNC_FLUSH);
+ gzflush((gzFile) s->stream_data.p, Z_SYNC_FLUSH);
return 0;
}
@@ -699,7 +699,7 @@ static stream *
open_gzstream(const char *filename, const char *flags)
{
stream *s;
- gzFile *fp;
+ gzFile fp;
if ((s = create_stream(filename)) == NULL)
return NULL;
@@ -722,7 +722,7 @@ open_gzrstream(const char *filename)
return NULL;
s->type = ST_BIN;
if (s->errnr == MNSTR_NO__ERROR &&
- gzread((gzFile *) s->stream_data.p, (void *) &s->byteorder,
sizeof(s->byteorder)) < (int) sizeof(s->byteorder)) {
+ gzread((gzFile) s->stream_data.p, (void *) &s->byteorder,
sizeof(s->byteorder)) < (int) sizeof(s->byteorder)) {
stream_gzclose(s);
s->errnr = MNSTR_OPEN_ERROR;
}
@@ -739,7 +739,7 @@ open_gzwstream_(const char *filename, co
s->access = ST_WRITE;
s->type = ST_BIN;
if (s->errnr == MNSTR_NO__ERROR)
- gzwrite((gzFile *) s->stream_data.p, (void *) &s->byteorder,
sizeof(s->byteorder));
+ gzwrite((gzFile) s->stream_data.p, (void *) &s->byteorder,
sizeof(s->byteorder));
return s;
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list