apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Rodrigues <rodr...@attbi.com>
Subject Re: [STATUS] (apr) Wed Jan 22 23:45:34 EST 2003
Date Thu, 23 Jan 2003 05:34:39 GMT
On Wed, Jan 22, 2003 at 11:45:34PM -0500, Rodent of Unusual Size wrote:
>       Some headers with issues: 
>         apr_fnmatch.h         (FNM_foo)
>         apr_general.h         (MAXIMUM_WAIT_OBJECTS)
>         apr_md5.h             (MD5_DIGESTSIZE)
>         apr_network_io.h      (MAX_SECONDS_TO_LINGER)
>         apr.hnw               (READDIR_IS_THREAD_SAFE, ENUM_BITFIELD, 
>                               _POSIX_THREAD_SAFE_FUNCTIONS (?),

Whoa...this not not good.  _POSIX_THREAD_SAFE_FUNCTIONS is a
manifest POSIX constant that should *not* be defined by
the application.  A POSIX conformant application should
include <unistd.h> and *check* the value of this constant only.


Note, that the valid values of any of the POSIX manifest constants
defined in <unistd.h> can be:

- 200112L (or > 0) which means the feature is always supported
- -1, means the feature is not supported at all 
- 0, means the option may be present, and the application must check
  at runtime with sysconf() to see if the feature is supported.

It took me a while to get all this straight, but it is important
to understand in order to write portable and compliant POSIX code.

I recommend the attached patches.

Craig Rodrigues        

View raw message