[hdf-forum] minor bug in zip_perf.c

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[hdf-forum] minor bug in zip_perf.c

Richard van Hees
Dear List,

I found a small bug in zip_perf.c, the call to C-function "open" (at
line 552) should include a value for parameter "mode", for example

    output = open(filename, O_RDWR | O_CREAT, 0644);

I noticed this compiling hdf5-1.8.1-snap7 with gcc version 4.3.2 (linux_64)

Best regards,

Richard van Hees

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.




Reply | Threaded
Open this post in threaded view
|

[hdf-forum] minor bug in zip_perf.c

Elena Pourmal
Dear Richard,

"mode" is an optional parameter to the open call. Does compilation of  
zip_perf.c fail on your system?

Thank you!

Elena

On Nov 1, 2008, at 3:12 PM, Richard van Hees wrote:

> Dear List,
>
> I found a small bug in zip_perf.c, the call to C-function "open" (at  
> line 552) should include a value for parameter "mode", for example
>
>   output = open(filename, O_RDWR | O_CREAT, 0644);
>
> I noticed this compiling hdf5-1.8.1-snap7 with gcc version 4.3.2  
> (linux_64)
>
> Best regards,
>
> Richard van Hees
>
> ----------------------------------------------------------------------
> This mailing list is for HDF software users discussion.
> To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org
> .
> To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.
>
>


----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.




Reply | Threaded
Open this post in threaded view
|

[hdf-forum] minor bug in zip_perf.c

Elena Pourmal
In reply to this post by Richard van Hees
Richard,

Unfortunately it is too late for us to fix it in the 1.8.2 release. I  
filed a bug report, and we will try to put the fix in as soon as we  
unfreeze the branch after the release (November 15).

Elena

On Nov 1, 2008, at 3:12 PM, Richard van Hees wrote:

> Dear List,
>
> I found a small bug in zip_perf.c, the call to C-function "open" (at  
> line 552) should include a value for parameter "mode", for example
>
>   output = open(filename, O_RDWR | O_CREAT, 0644);
>
> I noticed this compiling hdf5-1.8.1-snap7 with gcc version 4.3.2  
> (linux_64)
>
> Best regards,
>
> Richard van Hees


----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.




Reply | Threaded
Open this post in threaded view
|

[hdf-forum] minor bug in zip_perf.c

George N. White III
In reply to this post by Elena Pourmal
On Mon, Nov 3, 2008 at 8:21 PM, Elena Pourmal <epourmal at hdfgroup.org> wrote:

> Dear Richard,
>
> "mode" is an optional parameter to the open call. Does compilation of
> zip_perf.c fail on your system?

Solaris 10 has:

    int open(const char *path, int oflag, /* mode_t mode */);

MacOSX (10.5) has:

int open(const char *path, int oflag, ...);

The recent linux systems I have (Fedora 8, Ubuntu 8.10) have:

   int open(const char* pathname, int flags, mode_t mode);

and say "This argument [mode] must be supplied when O_CREAT
is specified in flags".

A few other packages have been caught by this change -- don't
you love it when an interface you have been using for over a decade
is changed!

--
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.