From: anazawa AT hic-soft DOT co DOT jp (ANAZAWA Akio) Subject: Re: BUG: stdin not a constant (fwd) 4 Dec 1997 23:19:47 -0800 Message-ID: <199712050424.NAA25778.cygnus.gnu-win32@mail.hic-soft.co.jp> References: <199712040054 DOT LAA26717 AT rimmer DOT cs DOT mu DOT OZ DOT AU> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII To: gnu-win32 AT cygnus DOT com Cc: fjh AT cs DOT mu DOT OZ DOT AU Hi, Fergus. In message "Re: BUG: stdin not a constant (fwd)" on 97/12/05, Fergus Henderson writes: Fergus> ANAZAWA Akio wrote: >> Anyway, I'm worndering why Cygnus's gcc couldn't accept Peter's >> code. All of other portings of gcc (and others) that I can use >> around here accepted it (gcc 2.7.0 on SPARC, 2.6.3 on FreeBSD, >> Sun's workshop cc, VC++ 4.2 and 5.0). Fergus> The important thing is not the version of gcc you're using, Fergus> it's the C library you're using. Cygwin32 uses Cygnus's Fergus> "newlib" C library. Fergus> Cygnus chose to build a new version of the C library (mostly Fergus> using existing BSD-licence freeware sources), rather than Fergus> using the probably better-quality GNU C library. This was Fergus> apparently for financial reasons. This morning, I checked header files to see what's differ. In FreeBSD 2.1.0 (yes, I'm using this old version), stdout was defined as; #define stdout (&__sF[1]) In this traditional way, stdout could be treated as constant (fixed address) and be assinable by compiler's intializer. In the other hand, in Cygnus', stdout was defined as // in stdio.h #define stdout (_impure_ptr->_stdout) // in sys/reent.h extern struct _reent *_impure_ptr __ATTRIBUTE_IMPURE_PTR__; I haven't seen them so much in detail, but these staff may be orienting to make C library into re-entrant and thread-safe. -- @___ anazawa AT hic-soft DOT co DOT jp c>//_ --- Human Interface Communications Co.,Ltd.(H.I.C.) (_)\(_) --- Phone +81 3 5467 2401 / Fax +81 3 5467 2402 ------------------------------------------------------------------------ - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".