* Makerules (distinfo-vars): Don't write constant line to frob sources.
* Make-dist (sources): Append $(elided-routines) and $(extra-libs)
routines.
+Thu Jun 6 02:00:42 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+
+ * Makerules (distinfo-vars): Don't write constant line to frob sources.
+ * Make-dist (sources): Append $(elided-routines) and $(extra-libs)
+ routines.
+
Tue Jun 4 22:03:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Define long double versions of
endif
foo:=$(shell echo 'IS THIS WORKING??? all-headers=$(all-headers)' >&2)
+sources += $(addsuffix .c,$(elided-routines) \
+ $(foreach l,$(extra-libs),$($l-routines)))
+
# Find all sysdep sources and headers.
+maybe-sysdeps := $(sources) $(sources:.c=.s) $(sources:.c=.S) $(all-headers) \
$(filter %.c %.S %.s %.h %.sub,$(distribute))
headers sysdep_headers distribute dont_distribute generated \
others tests extra-libs $(extra-libs:%=%-routines),
echo >> $@.new '$(var) := $($(var))')
-echo >> $@.new 'sources += $$(addsuffix .c,$$(elided-routines))'
endef
\f
ifneq (,$(strip $(gpl2lgpl)))
# 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;
{
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#if defined _LIBC || (defined __ARGZ_COUNT && defined __ARGZ_STRINGIFY)
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined _LIBC && (defined __ARGZ_COUNT || defined __ARGZ_STRINGIFY)
# include <argz.h>
#endif
#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
#include "loadinfo.h"
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ 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
+
/* Define function which are usually not available. */
#if !defined _LIBC && !defined __ARGZ_COUNT
/* Returns the number of strings in ARGZ. */
-static size_t __argz_count __P ((const char *argz, size_t len));
+static size_t __argz_count PARAMS ((const char *argz, size_t len));
static size_t
__argz_count (argz, len)
size_t count = 0;
while (len > 0)
{
- size_t part_len = strlen(argz);
+ size_t part_len = strlen (argz);
argz += part_len + 1;
len -= part_len + 1;
count++;
#if !defined _LIBC && !defined __ARGZ_STRINGIFY
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
except the last into the character SEP. */
-static void __argz_stringify __P ((char *argz, size_t len, int sep));
+static void __argz_stringify PARAMS ((char *argz, size_t len, int sep));
static void
__argz_stringify (argz, len, sep)
{
while (len > 0)
{
- size_t part_len = strlen(argz);
+ size_t part_len = strlen (argz);
argz += part_len;
len -= part_len + 1;
if (len > 0)
#if !defined _LIBC && !defined __ARGZ_NEXT
static char *
-__argz_next (char *argz, size_t argz_len, const char *entry)
+__argz_next (argz, argz_len, entry)
+ char *argz;
+ size_t argz_len;
+ const char *entry;
{
if (entry)
{
/* Return number of bits set in X. */
-static int pop __P ((int x));
+static int pop PARAMS ((int x));
static inline int
pop (x)
return (const char *) retval;
}
+
+
+/* @@ 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
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
/* Encoding of locale name parts. */
#define CEN_REVISION 1
#define CEN_SPONSOR 2
};
-extern const char *_nl_normalize_codeset __P ((const char *codeset,
- size_t name_len));
+extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
+ size_t name_len));
extern struct loaded_l10nfile *
-_nl_make_l10nflist __P ((struct loaded_l10nfile **l10nfile_list,
- const char *dirlist, size_t dirlist_len, int mask,
- const char *language, const char *territory,
- const char *codeset, const char *normalized_codeset,
- const char *modifier, const char *special,
- const char *sponsor, const char *revision,
- const char *filename, int do_allocate));
-
-
-extern const char *_nl_expand_alias __P ((const char *name));
-
-extern int _nl_explode_name __P ((char *name, const char **language,
- const char **modifier,
- const char **territory,
- const char **codeset,
- const char **normalized_codeset,
- const char **special, const char **sponsor,
- const char **revision));
+_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
+ const char *dirlist, size_t dirlist_len, int mask,
+ const char *language, const char *territory,
+ const char *codeset,
+ const char *normalized_codeset,
+ const char *modifier, const char *special,
+ const char *sponsor, const char *revision,
+ const char *filename, int do_allocate));
+
+
+extern const char *_nl_expand_alias PARAMS ((const char *name));
+
+extern int _nl_explode_name PARAMS ((char *name, const char **language,
+ const char **modifier,
+ const char **territory,
+ const char **codeset,
+ const char **normalized_codeset,
+ const char **special,
+ const char **sponsor,
+ const char **revision));