Update of /cvsroot/monetdb/MonetDB/src/common
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17503/src/common

Modified Files:
        stream.mx 
Log Message:
Updates to the .spec files to be ever so slightly more compatible with
the Fedora packaging guidelines.

Use %configure instead of ./configure.  This implies removing the
--prefix, --bindir, etc. options.  This also implies that the compiler
will be called with -D_FORTIFY_SOURCE=2 which makes that the compiler
is even stricter than before.  So we do that now as well.

Some fixes to get things compiled with -D_FORTIFY_SOURCE=2.  Mostly,
we need to do something with the result of functions such as fwrite,
fread, ftruncate, system.

Added descriptions to all packages.

Created a MonetDB-testing package.

Enabled the MonetDB-SQL-devel package.

When creating the tar balls, remove extraneous execute bits, and don't
include files that are generated by configure (i.e. files for which
there is a corresponding .in file).


Index: stream.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/common/stream.mx,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- stream.mx   17 Apr 2007 13:43:17 -0000      1.147
+++ stream.mx   5 Sep 2007 17:05:57 -0000       1.148
@@ -1085,8 +1085,8 @@
                return NULL;
        s->type = ST_BIN;
        if (s->errnr == NO__ERROR) {
-               fread((void *) &s->byteorder, sizeof(s->byteorder), 1, (FILE *) 
s->stream_data.p);
-               if (ferror((FILE *) s->stream_data.p))
+               if (fread((void *) &s->byteorder, sizeof(s->byteorder), 1, 
(FILE *) s->stream_data.p) < 1 ||
+                   ferror((FILE *) s->stream_data.p))
                        s->errnr = OPEN_ERROR;
        }
        return s;
@@ -1125,8 +1125,9 @@
                return NULL;
        s->access = ST_WRITE;
        s->type = ST_BIN;
-       if (s->errnr == NO__ERROR)
-               fwrite((void *) &s->byteorder, sizeof(s->byteorder), 1, (FILE 
*) s->stream_data.p);
+       if (s->errnr == NO__ERROR &&
+           fwrite((void *) &s->byteorder, sizeof(s->byteorder), 1, (FILE *) 
s->stream_data.p) < 1)
+               s->errnr = OPEN_ERROR;
        return s;
 }
 
@@ -2123,8 +2124,8 @@
        s->stream_data.p = (void *) fp;
 
        if (s->errnr == NO__ERROR) {
-               fread((void *) &s->byteorder, sizeof(s->byteorder), 1, fp);
-               if (ferror(fp))
+               if (fread((void *) &s->byteorder, sizeof(s->byteorder), 1, fp) 
< 1 ||
+                   ferror(fp))
                        s->errnr = OPEN_ERROR;
        }
        return s;
@@ -2147,8 +2148,8 @@
        s->stream_data.p = (void *) fp;
 
        if (s->errnr == NO__ERROR) {
-               fwrite((void *) &s->byteorder, sizeof(s->byteorder), 1, fp);
-               if (ferror(fp))
+               if (fwrite((void *) &s->byteorder, sizeof(s->byteorder), 1, fp) 
< 1 ||
+                   ferror(fp))
                        s->errnr = OPEN_ERROR;
        }
        return s;


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to