From 0df44d5d0d4b40339a31b90ef309c5f61b58be31 Mon Sep 17 00:00:00 2001 From: Peter Avalos Date: Fri, 2 Jan 2009 12:39:16 -0500 Subject: [PATCH] Hide some of the new _r functions. This is a temporary hack around some issues with our libc and pkgsrc programs. This should be probably be reverted after the next release. Requested-by: hasso --- include/grp.h | 5 ++++- include/pwd.h | 4 +++- lib/libc/gen/Makefile.inc | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/grp.h b/include/grp.h index e6feac5..be76f6f 100644 --- a/include/grp.h +++ b/include/grp.h @@ -74,13 +74,16 @@ const char *group_from_gid(gid_t, int); #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE /* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ int setgrent(void); +#if 0 int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); #endif +#endif + #if __BSD_VISIBLE -int getgrent_r(struct group *, char *, size_t, struct group **); +/* int getgrent_r(struct group *, char *, size_t, struct group **); */ int setgroupent(int); #endif __END_DECLS diff --git a/include/pwd.h b/include/pwd.h index 148b8b8..bee63ad 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -148,14 +148,16 @@ struct passwd *getpwuid(uid_t); void endpwent(void); struct passwd *getpwent(void); void setpwent(void); +#if 0 int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **); int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); #endif +#endif #if __BSD_VISIBLE -int getpwent_r(struct passwd *, char *, size_t, struct passwd **); +/* int getpwent_r(struct passwd *, char *, size_t, struct passwd **); */ int setpassent(int); const char *user_from_uid(uid_t, int); #endif diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index b410bc1..de49860 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -37,6 +37,11 @@ SRCS+= _pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \ ualarm.c ucontext.c ulimit.c uname.c unvis.c usleep.c utime.c \ valloc.c vis.c wait.c wait3.c waitpid.c wordexp.c +# Temporary hack to hide these symbols until we get a full implementation. +CFLAGS+= -Dgetgrent_r=GETGRENT_R -Dgetgrnam_r=GETGRNAM_R \ + -Dgetgrgid_r=GETGRGID_R -Dgetpwent_r=GETPWENT_R \ + -Dgetpwnam_r=GETPWNAM_R -Dgetpwuid_r=GETPWUID_R + .if ${LIB} != {c_rtld} SRCS+= tls.c .endif -- 1.6.0.2