cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: getpwuid_r on Solaris and _POSIX_PTHREAD_SEMANTICS

From: Tor Arntsen <kspt.tor_at_gmail.com>
Date: Mon, 14 Jul 2014 11:45:06 +0200

On 14 July 2014 10:28, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> I a bit worried that setting
> _POSIX_C_SOURCE automatically on Solaris will cause too many other changes.
> Setting _POSIX_PTHREAD_SEMANTICS sounds like it would be more isolated to
> what's needed in this case, and therefore safer.

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)

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