Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1211 - Minor error in stdio.h
Summary: Minor error in stdio.h
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-02-17 01:54 UTC by Bill Pemberton
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-02-17 02:30:45 UTC


Attachments (Terms of Use)

Description Bill Pemberton 1999-02-17 01:54:02 UTC
Using the following C program:


---------CUT HERE----------

#include <stdio.h>

#ifdef BUGTEST
FILE *blah = stderr;
#else
FILE *blah;
#endif

main()
{

#ifndef BUGTEST
  blah = stderr;
#endif

   fprintf(blah, "blah blah blah\n");

}

---------CUT HERE----------

Will yield:

localhost: /tmp (wfp5p) > cc -DBUGTEST temp.c
temp.c:4: initializer element is not constant
localhost: /tmp (wfp5p) > c temp.c


I'm not sure if this is the right way to fix it, but here's
a fix:

*** stdio.h.orig        Tue Feb 16 20:23:22 1999
--- stdio.h     Tue Feb 16 20:27:56 1999
***************
*** 115,120 ****
--- 115,125 ----
  extern FILE *stdout;          /* Standard output stream.
*/
  extern FILE *stderr;          /* Standard error output
stream.  */

+ #define stdin _IO_stdin
+ #define stdout _IO_stdout
+ #define stderr _IO_stderr
+
+

  /* Remove file FILENAME.  */
  extern int remove __P ((__const char *__filename));

Comment 1 Cristian Gafton 1999-02-17 02:30:59 UTC
Please check the FAQ that comes with the new glibc package (in
/usr/doc/glibc-whatever/FAQ)


Note You need to log in before you can comment on or make changes to this bug.