From: Bruno Haible Date: Wed, 11 Oct 2006 12:48:10 +0000 (+0000) Subject: Make it possible to alias stpcpy and strdup. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5737c732b8641880a25ae59e4f4bb9ee2bcd51c;p=pspp Make it possible to alias stpcpy and strdup. --- diff --git a/ChangeLog b/ChangeLog index 4a246468fd..3859710e97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-10 Bruno Haible + + Make it possible to #define stpcpy, strdup to aliases. + * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine. + * lib/strdup.c (strdup) [!_LIBC]: Don't undefine. + 2006-10-10 Bruno Haible Make it possible to #define gcd to an alias. diff --git a/lib/stpcpy.c b/lib/stpcpy.c index 870fd6d445..4089d3946a 100644 --- a/lib/stpcpy.c +++ b/lib/stpcpy.c @@ -23,7 +23,9 @@ #include #undef __stpcpy -#undef stpcpy +#ifdef _LIBC +# undef stpcpy +#endif #ifndef weak_alias # define __stpcpy stpcpy diff --git a/lib/strdup.c b/lib/strdup.c index 7cff51be09..17d40d622d 100644 --- a/lib/strdup.c +++ b/lib/strdup.c @@ -27,7 +27,9 @@ #include #undef __strdup -#undef strdup +#ifdef _LIBC +# undef strdup +#endif #ifndef weak_alias # define __strdup strdup