diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-01-17 14:54:31 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-01-17 14:54:31 +0000 |
commit | 93012a1d0df967cb14b627bf2f7917608583e0f0 (patch) | |
tree | 28cbb849401b869fee5cb1ae81fd971845ba3be8 /newlib/libc/include/pwd.h | |
parent | 39f090d0608bd2908b7191a8bb1cca4bc63bcce4 (diff) | |
download | newlib-93012a1d0df967cb14b627bf2f7917608583e0f0.zip newlib-93012a1d0df967cb14b627bf2f7917608583e0f0.tar.gz newlib-93012a1d0df967cb14b627bf2f7917608583e0f0.tar.bz2 |
* libc/include/pwd.h: Use __foo_VISIBLE macros from sys/cdefs.h.
(setpassent): Declare.
Diffstat (limited to 'newlib/libc/include/pwd.h')
-rw-r--r-- | newlib/libc/include/pwd.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/newlib/libc/include/pwd.h b/newlib/libc/include/pwd.h index 1526abf..d849f5f 100644 --- a/newlib/libc/include/pwd.h +++ b/newlib/libc/include/pwd.h @@ -41,7 +41,7 @@ extern "C" { #include <sys/types.h> -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define _PATH_PASSWD "/etc/passwd" #define _PASSWORD_LEN 128 /* max length, not counting NULL */ @@ -61,16 +61,24 @@ struct passwd { #ifndef __INSIDE_CYGWIN__ struct passwd *getpwuid (uid_t); struct passwd *getpwnam (const char *); + +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 int getpwnam_r (const char *, struct passwd *, char *, size_t , struct passwd **); int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **); -#ifndef _POSIX_SOURCE +#endif + +#if __XSI_VISIBLE >= 500 struct passwd *getpwent (void); void setpwent (void); void endpwent (void); #endif + +#if __BSD_VISIBLE +int setpassent (int); #endif +#endif /*!__INSIDE_CYGWIN__*/ #ifdef __cplusplus } |