cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: getpwuid_r on Solaris and _POSIX_PTHREAD_SEMANTICS

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 15 Jul 2014 00:00:17 +0200

On Mon, Jul 14, 2014 at 11:45:06AM +0200, Tor Arntsen wrote:
> I did a very quick scan of the Solaris header files,
> _POSIX_PTHREAD_SEMANTICS has a lot of overlap with _POSIX_C_SOURCE
> but the latter definitely has more impact. From what I could gather
> with the minutes I had available this morning _POSIX_PTHREAD_SEMANTICS
> only affects the following functions:
>
> readdir_r (return value)
> getgrgid_r (number of params)
> getgrnam_r (number of params)
> getpwnam_r (types and numbers of params, return type)
> getpwuid_r (types, and number of params, return type)
> sigwait (number of params)
> ctime_r (number of params - additional 'buflen' parameter in non-POSIX version)
> asctime_r (number of params - as above)
> getlogin_r (size_t vs. int for param)
> ttyname_r (likewise)
>
> (but as Mischa also said - sometimes manpages and headers conflict on
> Solaris. A couple of the above may be affected by this. The number of
> functions seems limited though so we may clear this up quickly as far
> as libcurl is concerned)

I missed your message before I committed the change, but curl isn't using any
of those functions outside getpwuid_r, which confirms that that was the right
approach. And if we start using any of the other ones in the future, we can
rest assured that we'll be using the POSIX conformant versions.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-15