Bug 1211 - Minor error in stdio.h
Minor error in stdio.h
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-02-16 20:54 EST by Bill Pemberton
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-02-16 21:30:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Pemberton 1999-02-16 20:54:02 EST
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-16 21:30:59 EST
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.