Date: Fri, 27 Feb 1998 11:38:32 -0500 From: "Kaleb S. KEITHLEY" <k.keithley@opengroup.org> To: hackers@FreeBSD.ORG Subject: Re: _POSIX_THREAD_SAFE_FUNCTIONS and *_r functions Message-ID: <34F6EC08.F6@opengroup.org>
next in thread | raw e-mail | index | archive | help
Someone (who I can't cite because I inadvertantly deleted their email) said: POSIX 1003.1 2.9.3 says if _POSIX_THREADS is defined, then _POSIX_THREAD_SAFE_FUNCTIONS must also be defined. It's true that that's what POSIX says, but it's a simplistic answer, and doesn't really address *everything* that POSIX says Table 2.10 in 2.9.3 says "...if _POSIX_THREAD_SAFE_FUNCTIONS is defined then the implementation supports the Thread Safe Functions option. Section 4.2.4.2 says: If _POSIX_THREAD_SAFE_FUNCTIONS is defined: The getlogin_r()... Section 4.7.2.2 says: If _POSIX_THREAD_SAFE_FUNCTIONS is defined: The ttyname_r()... Section 5.1.2.2 says: If _POSIX_THREAD_SAFE_FUNCTIONS is defined: The readdir_r()... Section 8.3.3.2 says: If _POSIX_THREAD_SAFE_FUNCTIONS is defined: The strtok_r()... And so on for getpwnam_r, etc. That means that if you don't have the Thread Safe Functions, then you can't define _POSIX_THREAD_SAFE_FUNCTIONS. (And therefore you can't define _POSIX_THREADS, which is sort of the reverse of the claim that if you define _POSIX_THREADS then you must define _POSIX_THREAD_SAFE_FUNCTIONS.) -- Kaleb To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34F6EC08.F6>