From 36b4b80587f78561ee7ba9f0198d0da6ce24f998 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 17 Oct 2007 02:20:47 +0200 Subject: [PATCH] Use rpl_ prefix for functions, so as to avoid endless recursions in weird cases. --- ChangeLog | 6 ++++++ lib/getcwd.c | 2 +- lib/getgroups.c | 4 ++-- lib/gettimeofday.c | 6 +++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84ef90fa4..3336f1bfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-10-16 Bruno Haible + * lib/getcwd.c (__getcwd): Define with explicit rpl_ prefix. + * lib/getgroups.c (getgroups): Likewise. + * lib/gettimeofday.c (localtime, gmtime, tzset): Likewise. + +2007-10-16 Bruno Haible + * modules/absolute-header (License): Change from LGPL to LGPLv2+. * modules/malloc-posix (License): Likewise. * modules/realloc-posix (License): Likewise. diff --git a/lib/getcwd.c b/lib/getcwd.c index a185ef3c6..b8e9989b9 100644 --- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -89,7 +89,7 @@ #endif #if !_LIBC -# define __getcwd getcwd +# define __getcwd rpl_getcwd # define __lstat lstat # define __closedir closedir # define __opendir opendir diff --git a/lib/getgroups.c b/lib/getgroups.c index 68a5aa149..a8a225a8f 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c @@ -1,6 +1,6 @@ /* provide consistent interface to getgroups for systems that don't allow N==0 - Copyright (C) 1996, 1999, 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 1996, 1999, 2003, 2006, 2007 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ provided function handle all others. */ int -getgroups (int n, GETGROUPS_T *group) +rpl_getgroups (int n, GETGROUPS_T *group) { int n_groups; GETGROUPS_T *gbuf; diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index bd5576cb0..f190c2dd5 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -48,7 +48,7 @@ static struct tm *localtime_buffer_addr = &tm_zero_buffer; localtime uses for its result. */ struct tm * -localtime (time_t const *timep) +rpl_localtime (time_t const *timep) { #undef localtime extern struct tm *localtime (time_t const *); @@ -62,7 +62,7 @@ localtime (time_t const *timep) /* Same as above, since gmtime and localtime use the same buffer. */ struct tm * -gmtime (time_t const *timep) +rpl_gmtime (time_t const *timep) { #undef gmtime extern struct tm *gmtime (time_t const *); @@ -80,7 +80,7 @@ gmtime (time_t const *timep) /* This is a wrapper for tzset, for systems on which tzset may clobber the static buffer used for localtime's result. */ void -tzset (void) +rpl_tzset (void) { #undef tzset extern void tzset (void); -- 2.11.0