# else
char *getcwd ();
# endif
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
#endif
/* Amount to increase buffer size by in each try. */
we avoid the non-standard function stpcpy. In GNU C Library
this function is available, though. Also allow the symbol
HAVE_STPCPY to be defined. */
-#if defined _LIBC || defined HAVE_STPCPY
stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
-#else
- strcat (dirname, "/");
- strcat (dirname, binding->dirname);
-#endif
}
/* Now determine the symbolic name of CATEGORY and its value. */
avoid the non-standard function stpcpy. In GNU C Library this
function is available, though. Also allow the symbol HAVE_STPCPY
to be defined. */
-#if defined _LIBC || defined HAVE_STPCPY
stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
domainname),
".mo");
-#else
- strcpy (xdomainname, categoryname);
- strcat (xdomainname, "/");
- strcat (xdomainname, domainname);
- strcat (xdomainname, ".mo");
-#endif
/* Creating working area. */
single_locale = (char *) alloca (strlen (categoryvalue) + 1);
return "C";
#endif
}
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
/* finddomain.c -- handle list of needed message catalogs
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+This file is part of the GNU C Library. Its master source is NOT part of
+the C library, however. The master source lives in /gd/gnu/lib.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define stpcpy(dest, src) __stpcpy(dest, src)
+#else
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
#endif
/* List of already loaded domains. */
static struct loaded_l10nfile *_nl_loaded_domains;
-/* Substitution for systems lacking this function in their C library. */
-#if !_LIBC && !HAVE_STPCPY
-static char *stpcpy__ PARAMS ((char *dest, const char *src));
-# define stpcpy(dest, src) stpcpy__ (dest, src)
-#endif
-
/* Return a data structure describing the message catalog described by
the DOMAINNAME and CATEGORY parameters with respect to the currently
to be defined. */
#if !_LIBC && !HAVE_STPCPY
static char *
-stpcpy__ (dest, src)
+stpcpy (dest, src)
char *dest;
const char *src;
{