diff options
author | Jim Meyering <jim@meyering.net> | 1998-05-03 20:38:44 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-05-03 20:38:44 +0000 |
commit | b711cb4f13e3ccb2855f0b53a1a71e3157650b88 (patch) | |
tree | 4d7bf3fb65ab78f6ab1c1392b80c4901473b0501 /intl/textdomain.c | |
parent | 2226c329f20f3e8fee1329f147a52e5b80c23a18 (diff) | |
download | idutils-b711cb4f13e3ccb2855f0b53a1a71e3157650b88.tar.gz idutils-b711cb4f13e3ccb2855f0b53a1a71e3157650b88.tar.bz2 idutils-b711cb4f13e3ccb2855f0b53a1a71e3157650b88.zip |
update from gettext-0.10.35
Diffstat (limited to 'intl/textdomain.c')
-rw-r--r-- | intl/textdomain.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/intl/textdomain.c b/intl/textdomain.c index 2f077a0..8855746 100644 --- a/intl/textdomain.c +++ b/intl/textdomain.c @@ -1,5 +1,5 @@ -/* Implementation of the textdomain(3) function - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Implementation of the textdomain(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. This program is free software; you can redistribute it and/or modify @@ -54,6 +54,9 @@ extern const char *_nl_current_default_domain; prefix. So we have to make a difference here. */ #ifdef _LIBC # define TEXTDOMAIN __textdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif #else # define TEXTDOMAIN textdomain__ #endif @@ -82,11 +85,15 @@ TEXTDOMAIN (domainname) /* If the following malloc fails `_nl_current_default_domain' will be NULL. This value will be returned and so signals we are out of core. */ +#if defined _LIBC || defined HAVE_STRDUP + _nl_current_default_domain = strdup (domainname); +#else size_t len = strlen (domainname) + 1; char *cp = (char *) malloc (len); if (cp != NULL) memcpy (cp, domainname, len); _nl_current_default_domain = cp; +#endif } if (old != _nl_default_default_domain) |