delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/04/04/14:33:25

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200104041833.UAA04727@mother.ludd.luth.se>
Subject: Re: Bug00323, final? (LONG)
To: djgpp-workers AT delorie DOT com
Date: Wed, 4 Apr 2001 20:33:15 +0200 (MEST)
In-Reply-To: <200104041458.QAA12665@lws256.lu.erisoft.se> from "Martin Stromberg" at Apr 04, 2001 04:58:09 PM
X-Mailer: ELM [version 2.5 PL2]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Martin Stromberg:
> ; uname -a
> SunOS lws256 5.6 Generic_105181-23 sun4u sparc
> ; l c.c
> -rw-r-----   1 eplmst   erisoft       466 Apr  4 16:44 c.c
> ; ./c
> 1, ftell(f) = 466.
> 2, ftell(f) = 0.

Linux:
nietzsche:/tmp> uname -a
Linux nietzsche 2.0.38 #3 Sat Apr 15 13:57:22 CEST 2000 i586 unknown
nietzsche:/tmp> ldd c
        /lib/nfslock.so.0 => /lib/nfslock.so.0 (0x4000d000)
        libc.so.6 => /lib/libc.so.6 (0x40012000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
nietzsche:/tmp> ./c
1, ftell(f) = 471.
2, ftell(f) = 471.
nietzsche:/tmp> ./d
1, lseek(fd, 0, SEEK_CUR) = 0.
fdopen failed, errno = 0.

After removing calls to fdopen():
nietzsche:/tmp> ./d
1, lseek(fd, 0, SEEK_CUR) = 0.
2, lseek(fd, 0, SEEK_CUR) = 0.

So in Linux fopen() seeks to the end and open does not.


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019