Print this page
remove support for non-ANSI compilation

*** 22,40 **** /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _GRP_H #define _GRP_H - #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3.3.1 */ - #include <sys/feature_tests.h> #include <sys/types.h> #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) --- 22,40 ---- /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _GRP_H #define _GRP_H #include <sys/feature_tests.h> #include <sys/types.h> #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
*** 50,61 **** char *gr_passwd; gid_t gr_gid; char **gr_mem; }; - #if defined(__STDC__) - extern struct group *getgrgid(gid_t); /* MT-unsafe */ extern struct group *getgrnam(const char *); /* MT-unsafe */ #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) extern struct group *getgrent_r(struct group *, char *, int); --- 50,59 ----
*** 70,101 **** extern void endgrent(void); extern void setgrent(void); extern struct group *getgrent(void); /* MT-unsafe */ #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)... */ - #else - - extern struct group *getgrgid(); /* MT-unsafe */ - extern struct group *getgrnam(); /* MT-unsafe */ - - #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) - extern struct group *getgrent_r(); - extern struct group *fgetgrent_r(); - - extern struct group *fgetgrent(); /* MT-unsafe */ - extern int initgroups(); - #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) */ - - #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) - extern void endgrent(); - extern void setgrent(); - extern struct group *getgrent(); /* MT-unsafe */ - #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)... */ - - #endif /* __STDC__ */ - - /* * getgrgid_r() & getgrnam_r() prototypes are defined here. */ /* --- 68,77 ----
*** 131,142 **** */ #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) - #if defined(__STDC__) - #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) #ifdef __PRAGMA_REDEFINE_EXTNAME #pragma redefine_extname getgrgid_r __posix_getgrgid_r #pragma redefine_extname getgrnam_r __posix_getgrnam_r --- 107,116 ----
*** 178,241 **** extern struct group *getgrgid_r(gid_t, struct group *, char *, int); extern struct group *getgrnam_r(const char *, struct group *, char *, int); #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - #else /* __STDC__ */ - - #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) - - #ifdef __PRAGMA_REDEFINE_EXTNAME - #pragma redefine_extname getgrgid_r __posix_getgrgid_r - #pragma redefine_extname getgrnam_r __posix_getgrnam_r - extern int getgrgid_r(); - extern int getgrnam_r(); - #else /* __PRAGMA_REDEFINE_EXTNAME */ - - extern int __posix_getgrgid_r(); - extern int __posix_getgrnam_r(); - - #ifdef __lint - - #define getgrgid_r __posix_getgrgid_r - #define getgrnam_r __posix_getgrnam_r - - #else /* !__lint */ - - static int - getgrgid_r(__gid, __grp, __buf, __len, __res) - gid_t __gid; - struct group *__grp; - char *__buf; - int __len; - struct group **__res; - { - return (__posix_getgrgid_r(__gid, __grp, __buf, __len, __res)); - } - static int - getgrnam_r(__cb, __grp, __buf, __len, __res) - char *__cb; - struct group *__grp; - char *__buf; - int __len; - struct group **__res; - { - return (__posix_getgrnam_r(__cb, __grp, __buf, __len, __res)); - } - - #endif /* !__lint */ - #endif /* __PRAGMA_REDEFINE_EXTNAME */ - - #else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - - extern struct group *getgrgid_r(); - extern struct group *getgrnam_r(); - - #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - - #endif /* __STDC__ */ - #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)... */ #ifdef __cplusplus } #endif --- 152,161 ----