Your message dated Wed, 08 Jan 2003 23:33:15 +0900 with message-id <[EMAIL PROTECTED]> and subject line Bug#175755: fopen does not positions the stream at the end of the file in mode a+ has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) -------------------------------------- Received: (at submit) by bugs.debian.org; 7 Jan 2003 22:05:53 +0000 >From [EMAIL PROTECTED] Tue Jan 07 16:05:53 2003 Return-path: <[EMAIL PROTECTED]> Received: from (smtpauth3.wanadoo.es) [62.37.236.135] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18W1r6-0004Aj-00; Tue, 07 Jan 2003 16:05:53 -0600 Received: from localhost.localdomain (171.Red-80-35-98.pooles.rima-tde.net [80.35.98.171]) (authenticated) by smtpauth3.wanadoo.es (8.11.3/8.11.3) with ESMTP id h07MHkx16211 for <[EMAIL PROTECTED]>; Tue, 7 Jan 2003 23:17:47 +0100 (MET) Subject: fopen does not positions the stream at the end of the file in mode a+ From: Ander <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-zhvBCtpncWq+qMWJcMTM" X-Mailer: Ximian Evolution 1.0.5 Date: 07 Jan 2003 23:02:03 +0100 Message-Id: <1041976925.2548.19.camel@agaliaretph> Mime-Version: 1.0 Delivered-To: [EMAIL PROTECTED] X-Spam-Status: No, hits=-1.2 required=5.0 tests=PGP_SIGNATURE_2,SPAM_PHRASE_00_01 version=2.41 X-Spam-Level: --=-zhvBCtpncWq+qMWJcMTM Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Package: libc6 Version: 2.3.1-8 Severity: critical Opening a file with fopen in mode a+ will position the stream at the begining of the file and not at the end. I am using Debian GNU/Linux testing/unstable, kernel 2.4.19 and libc6 2.3.1-8 --=-zhvBCtpncWq+qMWJcMTM Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje esta firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) iD8DBQA+G05adimE5KRZnVsRApYFAJ0SPH0YJKzGH9ujfG0XgROrAKwB5QCeLdvR Z1FuSvGWo8bZA1Ed4CErWRQ= =k1Gh -----END PGP SIGNATURE----- --=-zhvBCtpncWq+qMWJcMTM-- --------------------------------------- Received: (at 175755-done) by bugs.debian.org; 8 Jan 2003 14:33:23 +0000 >From [EMAIL PROTECTED] Wed Jan 08 08:33:22 2003 Return-path: <[EMAIL PROTECTED]> Received: from oris.opensource.jp (oris.opensource.gr.jp) [218.44.239.73] (postfix) by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18WHGj-0008TA-00; Wed, 08 Jan 2003 08:33:22 -0600 Received: from oris.opensource.jp (oris.opensource.jp [218.44.239.73]) by oris.opensource.gr.jp (Postfix) with ESMTP id 0D069C351C; Wed, 8 Jan 2003 23:33:15 +0900 (JST) Date: Wed, 08 Jan 2003 23:33:15 +0900 Message-ID: <[EMAIL PROTECTED]> From: GOTO Masanori <[EMAIL PROTECTED]> To: Ander <[EMAIL PROTECTED]> Cc: GOTO Masanori <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Bug#175755: fopen does not positions the stream at the end of the file in mode a+ In-Reply-To: <1042026974.427.7.camel@agaliaretph> References: <1041976925.2548.19.camel@agaliaretph> <[EMAIL PROTECTED]> <1042026974.427.7.camel@agaliaretph> User-Agent: Wanderlust/2.9.9 (Unchained Melody) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Delivered-To: [EMAIL PROTECTED] X-Spam-Status: No, hits=-5.1 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01, SUBJ_HAS_SPACES,USER_AGENT version=2.41 X-Spam-Level: At 08 Jan 2003 12:56:10 +0100, Ander wrote: > [1 <text/plain; ISO-8859-15 (quoted-printable)>] > El mi=EF=BF=BD, 08-01-2003 a las 05:10, GOTO Masanori escribi=EF=BF=BD: > > At 07 Jan 2003 23:02:03 +0100, > > Ander wrote: > > > Package: libc6 > > > Version: 2.3.1-8 > > > Severity: critical > > >=20 > > > Opening a file with fopen in mode a+ will position the stream at the > > > begining of the file and not at the end. > > >=20 > > > I am using Debian GNU/Linux testing/unstable, kernel 2.4.19 and libc6 > > > 2.3.1-8 > > >=20 > >=20 > > Send us minimal test program. > > You have to check below test. You find it works fine. > >=20 > I have check your test and it works, but check this one: >=20 > #include <stdio.h> >=20 > int main(void) > { > FILE *archivo; > int pos; >=20 > archivo=3Dfopen("main.c","a+"); > pos=3Dftell(archivo); > printf("file pos after opening: %i\n",pos); > fseek(archivo,0,SEEK_SET); > pos=3Dftell(archivo); > printf("file pos after SEEK_SET: %i\n",pos); > fseek(archivo,0,SEEK_END); > pos=3Dftell(archivo); > printf("file pos after SEEK_END: %i\n",pos); > fclose(archivo); >=20 > return 0; > } Read the standard. XPG6 says: a+ or ab+ or a+b Append; open or create file for update, writing at end-of-file. Opening a file with append mode (a as the first character in the mode argument) shall cause all subsequent writes to the file to be forced to the then current end-of-file, regardless of intervening calls to fseek( ). ISO C99: a+ append; open or create text file for update, writing at end-of-file Opening a file with append mode (theathe as the first character in the mode argument) causes all subsequent writes to the file to be forced to the then current end-of-file, regardless of intervening calls to the fseek function. In some implementations, opening a binary file with append mode (thebthe as the second or third character in the above list of mode argument values) may initially position the file position indicator for the stream beyond the last data written, because of null character padding. When a file is opened with update mode (the+the as the second or third character in the above list of mode argument values), both input and output may be performed on the associated stream. However, output shall not be directly followed by input without an intervening call to the fflush function or to a file positioning function (fseek, fsetpos,orrewind), and input shall not be directly followed by output without an intervening call to a file positioning function, unless the input operation encounters end-of- file. Opening (or creating) a text file with update mode may instead open (or create) a binary stream in some implementations. I guess you argue "opening a file with fopen in mode a+ will move file position indicator in a stream at the end", but it's not true. It's not bug. I close this report. -- gotom -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]