[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Re: [LIH] Linux or GNU/Linux? a philosophical problem



On Fri, Jun 09, 2000 at 12:39:09PM +0530, Sachin Garg typed:
> Arun Sharma wrote:
> > 
> > Technically - I see gcc specific code being encouraged everywhere just to
> > kill other compilers being used, advocacy of inferior GPL based stuff
> 
> Now, that is wrong! I guess all of us would want that C code be written
> to comply with the ANSI standard. Extensions, if necessary be used only
> in *exceptional* circumstances, and I guess a work-around be there for
> those compilers that d not support the particular extension.
> 

-- Quotes from info pages of libc --

in the description of function getline:

This function is a GNU extension, but it is the recommended way to
read lines from a stream.  The alternative standard functions are
unreliable.

in the description of function rand_r:

If your program requires a reentrant RNG, we recommend you use the
reentrant GNU extensions to the SVID random number generator.  The
POSIX.1 interface should only be used when the GNU extensions are
not available.

-- end of quotes --

I'm not trying to derive any conclusions regarding motives,  but 
it is a fact that there *are* quite a few places where the libc 
reference "recommends" the use of GNU extensions over standard 
functions.  And a lot of programmers who start their programming 
with gcc would certainly pay heed to the "recommendations" without
realizing the portability implications.. 

To be fair to GNU, they have mentioned the portability aspects in 
the info pages itself - but I believe that a rookie programmer will
pay more attention to recommendations than warnings.

Kala