autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: configure speedup proposal: add --assume-c99 and --assume-posix2008


From: Russ Allbery
Subject: Re: configure speedup proposal: add --assume-c99 and --assume-posix2008 flags
Date: Sun, 23 Mar 2014 11:00:48 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

John Spencer <address@hidden> writes:

> having an option like --assume-c99 could provide a shortcut so all
> checks like

> - have stdint.h
> - have snprintf()
> - etc

These are un-alike, just to mention.  A surprising number of platforms
have an snprintf function that's broken.  To test it properly, you need
something akin to the gnulib snprintf check, and it's broken in enough
places that you may not want to assume the result.

Some of the problems with snprintf are also quite serious.  For example,
Solaris 9 (which I believe is otherwise C99-conforming) would return -1
when given NULL, 0 as the first arguments to snprintf, which makes it
impossible to use snprintf safely in many programs.

See:

    https://www.gnu.org/software/gnulib/manual/html_node/snprintf.html

for more information about the portability mess.

-- 
Russ Allbery (address@hidden)              <http://www.eyrie.org/~eagle/>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]