stat fails on SunOS 5.8 for a 4GB file

  • Follow


Hi,
     stat call fails with EOVERFLOW on SunOS 5.8 for a 4.1GB file.  is there
a patch available to fix this problem?.

uname -a for the box is
 SunOS pr01u73 5.8 Generic_108528-23 sun4u sparc SUNW,Ultra-Enterprise-10000

regards
-sarab






0
Reply sarab 2/6/2004 7:34:57 PM

sarab <sarabjeetd@hotmail.com> wrote:
> Hi,
>      stat call fails with EOVERFLOW on SunOS 5.8 for a 4.1GB file.  is there
> a patch available to fix this problem?.

'stat' in the traditional, 32 bit environment returns a structure that
is limited to holding information in particular sizes.

     EOVERFLOW
           A component is too large to  store  in  the  structure
           pointed to by buf.

Assuming you're compiling this program yourself, you most likely want
the -D_FILE_OFFSET_BITS=64 passed to the compiler.  It will use the
64-bit capable structs.  You shouldn't do this if you're expecting the
traditional struct to be returned, complete with the same size
information.

I typed up an example here...

http://mail.gnu.org/archive/html/help-cfengine/2002-11/msg00100.html

-- 
Darren Dunham                                           ddunham@taos.com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >
0
Reply Darren 2/6/2004 7:56:03 PM


>> On Fri, 06 Feb 2004 19:34:57 GMT,
>> "sarab" <sarabjeetd@hotmail.com> said:

> Hi, stat call fails with EOVERFLOW on SunOS 5.8 for a 4.1GB
> file.  is there a patch available to fix this problem?.

It's not a bug.

getconf(1)

and see:

    http://wwws.sun.com/software/whitepapers/wp-largefiles/largefiles.pdf

for more detail.

hth
t
0
Reply Tony 2/7/2004 2:16:29 AM

"sarab" <sarabjeetd@hotmail.com> writes:

>     stat call fails with EOVERFLOW on SunOS 5.8 for a 4.1GB file.  is there
>a patch available to fix this problem?.


You will need to use the largefile interfaces (stat in 32 bit mode
can only represent 32 bit file sizes)

Casper
0
Reply Casper 2/7/2004 3:30:55 PM

3 Replies
470 Views

(page loaded in 0.171 seconds)

Similiar Articles:













7/20/2012 2:52:49 PM


Reply: