Re: O_EXCL and large files

2005-02-23 Thread Hrvoje Niksic
Maciej W. Rozycki [EMAIL PROTECTED] writes: Is it possible to portably use open() and retain large file support? Try the AC_SYS_LARGEFILE autoconf macro. That's what I thought I was using. I was just afraid that open() wasn't correctly encompassed by the large file API's, a fear that proved

Re: O_EXCL and large files

2005-02-23 Thread Maciej W. Rozycki
On Wed, 23 Feb 2005, Hrvoje Niksic wrote: You may also want AC_FUNC_FSEEKO for fseeko(). I wonder what is the difference between AC_FUNC_FSEEKO and AC_CHECK_FUNCS(seeko). The manual doesn't seem to explain. Well, that's what I have on my local system: - Macro: AC_FUNC_FSEEKO If

Re: O_EXCL and large files

2005-02-23 Thread Hrvoje Niksic
Maciej W. Rozycki [EMAIL PROTECTED] writes: I wonder what is the difference between AC_FUNC_FSEEKO and AC_CHECK_FUNCS(seeko). The manual doesn't seem to explain. Well, that's what I have on my local system: - Macro: AC_FUNC_FSEEKO If the `fseeko' function is available, define

Re: O_EXCL and large files

2005-02-23 Thread Maciej W. Rozycki
On Wed, 23 Feb 2005, Hrvoje Niksic wrote: I see. Now I know why I didn't use AC_FUNC_FSEEKO -- Wget doesn't use fseeko anywhere. The only usage we have is: fseek (fp, 0, SEEK_END); size = ftell (fp); /* replaced with ftello where available */ Is there need to use fseeko

O_EXCL and large files

2005-02-22 Thread Hrvoje Niksic
When opening files, Wget takes care (by default) to not overwrite an existing file, and to tell the user where the file is to be saved. However, the defense against overwriting may fail because Wget determines the file name before attempting the download, but only opens the file when the data

Re: O_EXCL and large files

2005-02-22 Thread Steven M. Schweda
From: Hrvoje Niksic: [...] Solaris, on the other hand, seems to use the open64 function. (But will open be automatically mapped to open64 when _FILE_OFFSET_BITS is 64?) For all I know, other systems may require something different. SunOS 5.9 /usr/include/fcntl.h: [...] /*

Re: O_EXCL and large files

2005-02-22 Thread Hrvoje Niksic
[EMAIL PROTECTED] (Steven M. Schweda) writes: SunOS 5.9 /usr/include/fcntl.h: [...] /* large file compilation environment setup */ #if !defined(_LP64) _FILE_OFFSET_BITS == 64 #ifdef __PRAGMA_REDEFINE_EXTNAME #pragma redefine_extnameopenopen64