Mail Archives: cygwin/1997/12/04/23:19:47
Hi, Fergus.
In message "Re: BUG: stdin not a constant (fwd)"
on 97/12/05, Fergus Henderson <fjh AT cs DOT mu DOT OZ DOT AU> writes:
Fergus> ANAZAWA Akio <anazawa AT hic-soft DOT co DOT jp> 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".
- Raw text -