[Gllug] endian.h

rich at annexia.org rich at annexia.org
Fri Feb 7 17:19:18 UTC 2003


On Fri, Feb 07, 2003 at 02:02:18PM +0000, chris.wareham at btopenworld.com wrote:
> Perhaps it's because OpenBSD and Solaris conform to standards, while
> Linux and glibc have god knows how many dubious extensions. setenv is
> often a wrapper around getenv and putenv anyway, so you're not even
> guaranteed the atomicity of setenv when you don't want to overwrite an
> existing variable in a threaded application.

One man's dubious extension is another man's useful feature I s'pose.

Actually putenv is an example of a really evil API, an invitation
for memory corruption bugs, because it's very hard to tell the lifetime
of the string that you pass as a parameter (in real, large programs
anyway).

Rich.

-- 
Richard Jones, Red Hat Inc. (London, UK) http://www.redhat.com/software/ccm
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj
NET::FTPSERVER is a full-featured, secure, configurable, database-backed
FTP server written in Perl: http://www.annexia.org/freeware/netftpserver/

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list