mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Mon Mar 25 03:35:16 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* malloc/malloc.c (morecore): Don't attempt recursive realloc of info table when _heaplimit==0 during realloc growing large block. * MakeTAGS (extract): Remove /dev/null from xgettext command line. (text-srcs): New variable: extract only C sources from $(tags_sources). (po/$(domain).pot): Depend on that. If it's empty, cp /dev/null $@ instead of $(extract). * misc/Makefile (headers): Add iovec.h. * sysdeps/unix/sysv/linux/iovec.h: New file. * sysdeps/generic/iovec.h: New file. * misc/sys/uio.h (struct iovec): Type replaced with #include <iovec.h>. * configure.in (NO_UNDERSCORES check): Use AC_TRY_LINK instead of AC_TRY_COMPILE. * misc/sys/cdefs.h [__USE_BSD] (const, signed, volatile): Move these macros inside [! __STDC__]. * stdlib/rpmatch.c: New file. * stdlib/Makefile (routines): Add rpmatch. * stdlib/stdlib.h [__USE_SVID]: Declare rpmatch. * MakeTAGS (MSGJOIN): Variable removed. (po/SYS_libc.pot): Use $(XGETTEXT) instead of $(MSGJOIN). Wed Mar 20 20:08:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysdep.h: Don't define C_SYMBOL_NAME. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't define NO_UNDERSCORES.
This commit is contained in:
35
ChangeLog
35
ChangeLog
@ -1,3 +1,38 @@
|
|||||||
|
Mon Mar 25 03:35:16 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* malloc/malloc.c (morecore): Don't attempt recursive realloc of info
|
||||||
|
table when _heaplimit==0 during realloc growing large block.
|
||||||
|
|
||||||
|
* MakeTAGS (extract): Remove /dev/null from xgettext command line.
|
||||||
|
(text-srcs): New variable: extract only C sources from $(tags_sources).
|
||||||
|
(po/$(domain).pot): Depend on that.
|
||||||
|
If it's empty, cp /dev/null $@ instead of $(extract).
|
||||||
|
|
||||||
|
* misc/Makefile (headers): Add iovec.h.
|
||||||
|
* sysdeps/unix/sysv/linux/iovec.h: New file.
|
||||||
|
* sysdeps/generic/iovec.h: New file.
|
||||||
|
* misc/sys/uio.h (struct iovec): Type replaced with #include <iovec.h>.
|
||||||
|
|
||||||
|
* configure.in (NO_UNDERSCORES check): Use AC_TRY_LINK instead of
|
||||||
|
AC_TRY_COMPILE.
|
||||||
|
|
||||||
|
* misc/sys/cdefs.h [__USE_BSD] (const, signed, volatile): Move these
|
||||||
|
macros inside [! __STDC__].
|
||||||
|
|
||||||
|
* stdlib/rpmatch.c: New file.
|
||||||
|
* stdlib/Makefile (routines): Add rpmatch.
|
||||||
|
* stdlib/stdlib.h [__USE_SVID]: Declare rpmatch.
|
||||||
|
|
||||||
|
* MakeTAGS (MSGJOIN): Variable removed.
|
||||||
|
(po/SYS_libc.pot): Use $(XGETTEXT) instead of $(MSGJOIN).
|
||||||
|
|
||||||
|
Wed Mar 20 20:08:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysdep.h: Don't define C_SYMBOL_NAME.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't define
|
||||||
|
NO_UNDERSCORES.
|
||||||
|
|
||||||
Thu Mar 21 11:19:15 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
Thu Mar 21 11:19:15 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||||
|
|
||||||
* mach/devstream.c (input): Translate \r to \n on input.
|
* mach/devstream.c (input): Translate \r to \n on input.
|
||||||
|
15
MakeTAGS
15
MakeTAGS
@ -118,9 +118,6 @@ endif # subdir
|
|||||||
ifndef XGETTEXT
|
ifndef XGETTEXT
|
||||||
XGETTEXT = xgettext
|
XGETTEXT = xgettext
|
||||||
endif
|
endif
|
||||||
ifndef MSGJOIN
|
|
||||||
MSGJOIN = msgjoin
|
|
||||||
endif
|
|
||||||
|
|
||||||
P = $(..)po
|
P = $(..)po
|
||||||
|
|
||||||
@ -133,11 +130,17 @@ endif
|
|||||||
define extract
|
define extract
|
||||||
@rm -f $@.new
|
@rm -f $@.new
|
||||||
$(XGETTEXT) --keyword=_ --keyword=N_ --sort-output -d - \
|
$(XGETTEXT) --keyword=_ --keyword=N_ --sort-output -d - \
|
||||||
$(XGETTEXTFLAGS-$(@F)) > $@.new /dev/null $^
|
$(XGETTEXTFLAGS-$(@F)) > $@.new $^
|
||||||
mv -f $@.new $@
|
mv -f $@.new $@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$P/$(domain).pot: $(tags_sources); $(extract)
|
text-srcs := $(filter %.c %.h %.cc %.C,$(tags_sources))
|
||||||
|
$P/$(domain).pot: $(text-srcs)
|
||||||
|
ifeq (,$(text-srcs))
|
||||||
|
cp /dev/null $@
|
||||||
|
else
|
||||||
|
$(extract)
|
||||||
|
endif
|
||||||
|
|
||||||
$P/siglist.pot: $(common-objpfx)siglist.c; $(extract)
|
$P/siglist.pot: $(common-objpfx)siglist.c; $(extract)
|
||||||
$P/errlist.pot: $(..)sysdeps/mach/hurd/errlist.c; $(extract)
|
$P/errlist.pot: $(..)sysdeps/mach/hurd/errlist.c; $(extract)
|
||||||
@ -152,7 +155,7 @@ all-pot = $P/libc-top.pot $(subdirs:%=$P/%.pot) \
|
|||||||
ifndef subdir
|
ifndef subdir
|
||||||
$P/SYS_libc.pot: $(all-pot)
|
$P/SYS_libc.pot: $(all-pot)
|
||||||
@rm -f $@.new
|
@rm -f $@.new
|
||||||
$(MSGJOIN) $^ > $@.new
|
$(XGETTEXT) -d - --omit-header $^ > $@.new
|
||||||
mv -f $@.new $@
|
mv -f $@.new $@
|
||||||
test ! -d CVS || cvs ci -m'Regenerated from source files' $@
|
test ! -d CVS || cvs ci -m'Regenerated from source files' $@
|
||||||
|
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -1381,7 +1381,7 @@ int t() {
|
|||||||
glibc_foobar ();
|
glibc_foobar ();
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_asm_underscores=yes
|
libc_cv_asm_underscores=yes
|
||||||
else
|
else
|
||||||
|
@ -413,9 +413,9 @@ if test $elf = yes; then
|
|||||||
libc_cv_asm_underscores=no
|
libc_cv_asm_underscores=no
|
||||||
else
|
else
|
||||||
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
|
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
|
||||||
[AC_TRY_COMPILE([asm ("_glibc_foobar:");], [glibc_foobar ();],
|
[AC_TRY_LINK([asm ("_glibc_foobar:");], [glibc_foobar ();],
|
||||||
libc_cv_asm_underscores=yes,
|
libc_cv_asm_underscores=yes,
|
||||||
libc_cv_asm_underscores=no)])
|
libc_cv_asm_underscores=no)])
|
||||||
fi
|
fi
|
||||||
if test $libc_cv_asm_underscores = no; then
|
if test $libc_cv_asm_underscores = no; then
|
||||||
AC_DEFINE(NO_UNDERSCORES)
|
AC_DEFINE(NO_UNDERSCORES)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* finddomain.c -- handle list of needed message catalogs
|
/* finddomain.c -- handle list of needed message catalogs
|
||||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@ -63,20 +63,21 @@ void free ();
|
|||||||
/* Rename the non ANSI C functions. This is required by the standard
|
/* Rename the non ANSI C functions. This is required by the standard
|
||||||
because some ANSI C functions will require linking with this object
|
because some ANSI C functions will require linking with this object
|
||||||
file and the name space must not be polluted. */
|
file and the name space must not be polluted. */
|
||||||
# define stpcpy __stpcpy
|
# define stpcpy(dest, src) __stpcpy(dest, src)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Encoding of locale name parts. */
|
/* Encoding of locale name parts. */
|
||||||
#define CEN_REVISION 1
|
#define CEN_REVISION 1
|
||||||
#define CEN_SPONSOR 2
|
#define CEN_SPONSOR 2
|
||||||
#define CEN_SPECIAL 4
|
#define CEN_SPECIAL 4
|
||||||
#define XPG_CODESET 8
|
#define XPG_NORM_CODESET 8
|
||||||
#define TERRITORY 16
|
#define XPG_CODESET 16
|
||||||
#define CEN_AUDIENCE 32
|
#define TERRITORY 32
|
||||||
#define XPG_MODIFIER 64
|
#define CEN_AUDIENCE 64
|
||||||
|
#define XPG_MODIFIER 128
|
||||||
|
|
||||||
#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
|
#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
|
||||||
#define XPG_SPECIFIC (XPG_CODESET|XPG_MODIFIER)
|
#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
|
||||||
|
|
||||||
|
|
||||||
/* List of already loaded domains. */
|
/* List of already loaded domains. */
|
||||||
@ -88,6 +89,7 @@ static struct loaded_domain *make_entry_rec PARAMS ((const char *dirname,
|
|||||||
const char *language,
|
const char *language,
|
||||||
const char *territory,
|
const char *territory,
|
||||||
const char *codeset,
|
const char *codeset,
|
||||||
|
const char *normalized_codeset,
|
||||||
const char *modifier,
|
const char *modifier,
|
||||||
const char *special,
|
const char *special,
|
||||||
const char *sponsor,
|
const char *sponsor,
|
||||||
@ -95,9 +97,13 @@ static struct loaded_domain *make_entry_rec PARAMS ((const char *dirname,
|
|||||||
const char *domainname,
|
const char *domainname,
|
||||||
int do_allocate));
|
int do_allocate));
|
||||||
|
|
||||||
|
/* Normalize name of selected codeset. */
|
||||||
|
static const char *normalize_codeset PARAMS ((const char *codeset));
|
||||||
|
|
||||||
/* Substitution for systems lacking this function in their C library. */
|
/* Substitution for systems lacking this function in their C library. */
|
||||||
#if !_LIBC && !HAVE_STPCPY
|
#if !_LIBC && !HAVE_STPCPY
|
||||||
static char *stpcpy PARAMS ((char *dest, const char *src));
|
static char *stpcpy__ PARAMS ((char *dest, const char *src));
|
||||||
|
# define stpcpy(dest, src) stpcpy__ (dest, src)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -116,6 +122,7 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
const char *modifier = NULL;
|
const char *modifier = NULL;
|
||||||
const char *territory = NULL;
|
const char *territory = NULL;
|
||||||
const char *codeset = NULL;
|
const char *codeset = NULL;
|
||||||
|
const char *normalized_codeset = NULL;
|
||||||
const char *special = NULL;
|
const char *special = NULL;
|
||||||
const char *sponsor = NULL;
|
const char *sponsor = NULL;
|
||||||
const char *revision = NULL;
|
const char *revision = NULL;
|
||||||
@ -141,13 +148,14 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
(2) sponsor
|
(2) sponsor
|
||||||
(3) special
|
(3) special
|
||||||
(4) codeset
|
(4) codeset
|
||||||
(5) territory
|
(5) normalized codeset
|
||||||
(6) audience/modifier
|
(6) territory
|
||||||
|
(7) audience/modifier
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* If we have already tested for this locale entry there has to
|
/* If we have already tested for this locale entry there has to
|
||||||
be one data set in the list of loaded domains. */
|
be one data set in the list of loaded domains. */
|
||||||
retval = make_entry_rec (dirname, 0, locale, NULL, NULL, NULL,
|
retval = make_entry_rec (dirname, 0, locale, NULL, NULL, NULL, NULL,
|
||||||
NULL, NULL, NULL, domainname, 0);
|
NULL, NULL, NULL, domainname, 0);
|
||||||
if (retval != NULL)
|
if (retval != NULL)
|
||||||
{
|
{
|
||||||
@ -225,6 +233,15 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
++cp;
|
++cp;
|
||||||
|
|
||||||
mask |= XPG_CODESET;
|
mask |= XPG_CODESET;
|
||||||
|
|
||||||
|
if (codeset != cp && codeset[0] != '\0')
|
||||||
|
{
|
||||||
|
normalized_codeset = normalize_codeset (codeset);
|
||||||
|
if (strcmp (codeset, normalized_codeset) == 0)
|
||||||
|
free ((char *) normalized_codeset);
|
||||||
|
else
|
||||||
|
mask |= XPG_NORM_CODESET;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,8 +314,8 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
/* Create all possible locale entries which might be interested in
|
/* Create all possible locale entries which might be interested in
|
||||||
generalzation. */
|
generalzation. */
|
||||||
retval = make_entry_rec (dirname, mask, language, territory, codeset,
|
retval = make_entry_rec (dirname, mask, language, territory, codeset,
|
||||||
modifier, special, sponsor, revision,
|
normalized_codeset, modifier, special, sponsor,
|
||||||
domainname, 1);
|
revision, domainname, 1);
|
||||||
if (retval == NULL)
|
if (retval == NULL)
|
||||||
/* This means we are out of core. */
|
/* This means we are out of core. */
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -331,13 +348,15 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
|
|
||||||
|
|
||||||
static struct loaded_domain *
|
static struct loaded_domain *
|
||||||
make_entry_rec (dirname, mask, language, territory, codeset, modifier,
|
make_entry_rec (dirname, mask, language, territory, codeset,
|
||||||
special, sponsor, revision, domain, do_allocate)
|
normalized_codeset, modifier, special, sponsor, revision,
|
||||||
|
domain, do_allocate)
|
||||||
const char *dirname;
|
const char *dirname;
|
||||||
int mask;
|
int mask;
|
||||||
const char *language;
|
const char *language;
|
||||||
const char *territory;
|
const char *territory;
|
||||||
const char *codeset;
|
const char *codeset;
|
||||||
|
const char *normalized_codeset;
|
||||||
const char *modifier;
|
const char *modifier;
|
||||||
const char *special;
|
const char *special;
|
||||||
const char *sponsor;
|
const char *sponsor;
|
||||||
@ -358,23 +377,26 @@ make_entry_rec (dirname, mask, language, territory, codeset, modifier,
|
|||||||
both syntaces set this is necessary to prevent constructing
|
both syntaces set this is necessary to prevent constructing
|
||||||
illegal local names. */
|
illegal local names. */
|
||||||
/* FIXME: Rewrite because test is necessary only in first round. */
|
/* FIXME: Rewrite because test is necessary only in first round. */
|
||||||
if ((mask & CEN_SPECIFIC) == 0 || (mask & XPG_SPECIFIC) == 0)
|
if ((mask & CEN_SPECIFIC) == 0 || (mask & XPG_SPECIFIC) == 0
|
||||||
|
|| ((mask & XPG_CODESET) != 0 && (mask & XPG_NORM_CODESET) != 0))
|
||||||
{
|
{
|
||||||
/* Allocate room for the full file name. */
|
/* Allocate room for the full file name. */
|
||||||
filename = (char *) malloc (strlen (dirname) + 1
|
filename = (char *) malloc (strlen (dirname) + 1
|
||||||
+ strlen (language)
|
+ strlen (language)
|
||||||
+ ((mask & TERRITORY) != 0
|
+ ((mask & TERRITORY) != 0
|
||||||
? strlen (territory) : 0)
|
? strlen (territory) + 1 : 0)
|
||||||
+ ((mask & XPG_CODESET) != 0
|
+ ((mask & XPG_CODESET) != 0
|
||||||
? strlen (codeset) : 0)
|
? strlen (codeset) + 1 : 0)
|
||||||
|
+ ((mask & XPG_NORM_CODESET) != 0
|
||||||
|
? strlen (normalized_codeset) + 1 : 0)
|
||||||
+ ((mask & XPG_MODIFIER) != 0 ?
|
+ ((mask & XPG_MODIFIER) != 0 ?
|
||||||
strlen (modifier) : 0)
|
strlen (modifier) + 1 : 0)
|
||||||
+ ((mask & CEN_SPECIAL) != 0
|
+ ((mask & CEN_SPECIAL) != 0
|
||||||
? strlen (special) : 0)
|
? strlen (special) + 1 : 0)
|
||||||
+ ((mask & CEN_SPONSOR) != 0
|
+ ((mask & CEN_SPONSOR) != 0
|
||||||
? strlen (sponsor) : 0)
|
? strlen (sponsor) + 1 : 0)
|
||||||
+ ((mask & CEN_REVISION) != 0
|
+ ((mask & CEN_REVISION) != 0
|
||||||
? strlen (revision) : 0) + 1
|
? strlen (revision) + 1 : 0) + 1
|
||||||
+ strlen (domain) + 1);
|
+ strlen (domain) + 1);
|
||||||
|
|
||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
@ -396,7 +418,12 @@ make_entry_rec (dirname, mask, language, territory, codeset, modifier,
|
|||||||
if ((mask & XPG_CODESET) != 0)
|
if ((mask & XPG_CODESET) != 0)
|
||||||
{
|
{
|
||||||
*cp++ = '.';
|
*cp++ = '.';
|
||||||
cp = stpcpy (cp, codeset);
|
cp = stpcpy (cp, codeset);
|
||||||
|
}
|
||||||
|
if ((mask & XPG_NORM_CODESET) != 0)
|
||||||
|
{
|
||||||
|
*cp++ = '.';
|
||||||
|
cp = stpcpy (cp, normalized_codeset);
|
||||||
}
|
}
|
||||||
if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
|
if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
|
||||||
{
|
{
|
||||||
@ -470,20 +497,64 @@ make_entry_rec (dirname, mask, language, territory, codeset, modifier,
|
|||||||
}
|
}
|
||||||
|
|
||||||
entries = 0;
|
entries = 0;
|
||||||
for (cnt = 126; cnt >= 0; --cnt)
|
for (cnt = 254; cnt >= 0; --cnt)
|
||||||
if (cnt < mask && (cnt & ~mask) == 0
|
if (cnt < mask && (cnt & ~mask) == 0
|
||||||
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0))
|
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
|
||||||
|
&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
|
||||||
retval->successor[entries++] = make_entry_rec (dirname, cnt,
|
retval->successor[entries++] = make_entry_rec (dirname, cnt,
|
||||||
language, territory,
|
language, territory,
|
||||||
codeset, modifier,
|
codeset,
|
||||||
special, sponsor,
|
normalized_codeset,
|
||||||
revision, domain, 1);
|
modifier, special,
|
||||||
|
sponsor, revision,
|
||||||
|
domain, 1);
|
||||||
retval->successor[entries] = NULL;
|
retval->successor[entries] = NULL;
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
normalize_codeset (codeset)
|
||||||
|
const char *codeset;
|
||||||
|
{
|
||||||
|
int len = 0;
|
||||||
|
int only_digit = 1;
|
||||||
|
const char *cp;
|
||||||
|
char *retval;
|
||||||
|
char *wp;
|
||||||
|
|
||||||
|
for (cp = codeset; cp[0] != '\0'; ++cp)
|
||||||
|
if (isalnum (cp[0]))
|
||||||
|
{
|
||||||
|
++len;
|
||||||
|
|
||||||
|
if (isalpha (cp[0]))
|
||||||
|
only_digit = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
|
||||||
|
|
||||||
|
if (retval != NULL)
|
||||||
|
{
|
||||||
|
if (only_digit)
|
||||||
|
wp = stpcpy (retval, "ISO");
|
||||||
|
else
|
||||||
|
wp = retval;
|
||||||
|
|
||||||
|
for (cp = codeset; cp[0] != '\0'; ++cp)
|
||||||
|
if (isalpha (cp[0]))
|
||||||
|
*wp++ = toupper (cp[0]);
|
||||||
|
else if (isdigit (cp[0]))
|
||||||
|
*wp++ = cp[0];
|
||||||
|
|
||||||
|
*wp = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return (const char *) retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* @@ begin of epilog @@ */
|
/* @@ begin of epilog @@ */
|
||||||
|
|
||||||
/* We don't want libintl.a to depend on any other library. So we
|
/* We don't want libintl.a to depend on any other library. So we
|
||||||
@ -492,7 +563,7 @@ make_entry_rec (dirname, mask, language, territory, codeset, modifier,
|
|||||||
to be defined. */
|
to be defined. */
|
||||||
#if !_LIBC && !HAVE_STPCPY
|
#if !_LIBC && !HAVE_STPCPY
|
||||||
static char *
|
static char *
|
||||||
stpcpy (dest, src)
|
stpcpy__ (dest, src)
|
||||||
char *dest;
|
char *dest;
|
||||||
const char *src;
|
const char *src;
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
subdir := misc
|
subdir := misc
|
||||||
|
|
||||||
headers := sys/uio.h sys/ioctl.h sys/ptrace.h ioctls.h sys/file.h \
|
headers := sys/uio.h iovec.h sys/ioctl.h sys/ptrace.h ioctls.h sys/file.h\
|
||||||
a.out.h nlist.h stab.h stab.def sgtty.h sys/dir.h sys/cdefs.h \
|
a.out.h nlist.h stab.h stab.def sgtty.h sys/dir.h sys/cdefs.h \
|
||||||
ttyent.h syscall.h syslog.h sys/syslog.h paths.h sys/reboot.h \
|
ttyent.h syscall.h syslog.h sys/syslog.h paths.h sys/reboot.h \
|
||||||
sys/mman.h sys/param.h fstab.h mntent.h search.h utmp.h \
|
sys/mman.h sys/param.h fstab.h mntent.h search.h utmp.h \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -73,18 +73,19 @@ typedef long double __long_double_t;
|
|||||||
#define __ptr_t char *
|
#define __ptr_t char *
|
||||||
typedef double __long_double_t;
|
typedef double __long_double_t;
|
||||||
|
|
||||||
#endif
|
/* The BSD header files use the ANSI keywords unmodified (this means that
|
||||||
|
old programs may lose if they use the new keywords as identifiers), but
|
||||||
/* The BSD header files use the ANSI keywords unmodified. (This means that
|
those names are not available under -traditional. We define them to
|
||||||
old programs may lose if they use the new keywords as identifiers.) We
|
their __ versions, which are taken care of above. */
|
||||||
define them to their __ versions, which are taken care of above. */
|
|
||||||
|
|
||||||
#ifdef __USE_BSD
|
#ifdef __USE_BSD
|
||||||
#define const __const
|
#define const __const
|
||||||
#define signed __signed
|
#define signed __signed
|
||||||
#define volatile __volatile
|
#define volatile __volatile
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STDC__ */
|
||||||
|
|
||||||
|
|
||||||
/* C++ needs to know that types and declarations are C, not C++. */
|
/* C++ needs to know that types and declarations are C, not C++. */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define __BEGIN_DECLS extern "C" {
|
#define __BEGIN_DECLS extern "C" {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -26,16 +26,8 @@ __BEGIN_DECLS
|
|||||||
#define __need_size_t
|
#define __need_size_t
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
/* This file defines `struct iovec'. */
|
||||||
/* Structure describing a section of memory. */
|
#include <iovec.h>
|
||||||
|
|
||||||
struct iovec
|
|
||||||
{
|
|
||||||
/* Starting address. */
|
|
||||||
__ptr_t iov_base;
|
|
||||||
/* Length in bytes. */
|
|
||||||
size_t iov_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Read data from file descriptor FD, and put the result in the
|
/* Read data from file descriptor FD, and put the result in the
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of the GNU C Library.
|
||||||
|
|
||||||
# The GNU C Library is free software; you can redistribute it and/or
|
# The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -41,7 +41,8 @@ routines := \
|
|||||||
strtol strtoul strtoq strtouq \
|
strtol strtoul strtoq strtouq \
|
||||||
strtof strtod strtold \
|
strtof strtod strtold \
|
||||||
system \
|
system \
|
||||||
a64l l64a
|
a64l l64a \
|
||||||
|
rpmatch
|
||||||
|
|
||||||
distribute := exit.h grouping.h
|
distribute := exit.h grouping.h
|
||||||
tests := tst-strtol tst-strtod testmb testrand testsort testdiv
|
tests := tst-strtol tst-strtod testmb testrand testsort testdiv
|
||||||
|
62
stdlib/rpmatch.c
Normal file
62
stdlib/rpmatch.c
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/* rpmatch - determine whether string value is affirmation or negative
|
||||||
|
response according to current locale's data
|
||||||
|
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
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
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
#include <langinfo.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <regex.h>
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
rpmatch (response)
|
||||||
|
const char *response;
|
||||||
|
{
|
||||||
|
/* Match against one of the response patterns, compiling the pattern
|
||||||
|
first if necessary. */
|
||||||
|
inline int try (const int tag, const int match,
|
||||||
|
const char **lastp, regex_t *re)
|
||||||
|
{
|
||||||
|
const char *pattern = nl_langinfo (tag);
|
||||||
|
if (pattern != *lastp)
|
||||||
|
{
|
||||||
|
/* The pattern has changed. */
|
||||||
|
if (*lastp)
|
||||||
|
{
|
||||||
|
/* Free the old compiled pattern. */
|
||||||
|
regfree (re);
|
||||||
|
*lastp = NULL;
|
||||||
|
}
|
||||||
|
/* Compile the pattern and cache it for future runs. */
|
||||||
|
if (regcomp (re, pattern, REG_EXTENDED) != 0)
|
||||||
|
return -1;
|
||||||
|
*lastp = pattern;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Try the pattern. */
|
||||||
|
return regexec (re, response, 0, NULL, 0) == 0 ? match : !match;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We cache the response patterns and compiled regexps here. */
|
||||||
|
static const char *yesexpr, *noexpr;
|
||||||
|
static regex_t yesre, nore;
|
||||||
|
|
||||||
|
return (try (YESEXPR, 1, &yesexpr, &yesre) ?:
|
||||||
|
try (NOEXPR, 0, &noexpr, &nore));
|
||||||
|
}
|
@ -444,6 +444,15 @@ extern size_t mbstowcs __P ((wchar_t * __pwcs, __const char *__s, size_t __n));
|
|||||||
extern size_t wcstombs __P ((char *__s, __const wchar_t * __pwcs, size_t __n));
|
extern size_t wcstombs __P ((char *__s, __const wchar_t * __pwcs, size_t __n));
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __USE_SVID
|
||||||
|
/* Determine whether the string value of RESPONSE matches the affirmation
|
||||||
|
or negative response expression as specified by the LC_MESSAGES category
|
||||||
|
in the program's current locale. Returns 1 if affirmative, 0 if
|
||||||
|
negative, and -1 if not matching. */
|
||||||
|
extern int rpmatch __P ((__const char *__response));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* stdlib.h */
|
#endif /* stdlib.h */
|
||||||
|
9
sysdeps/generic/iovec.h
Normal file
9
sysdeps/generic/iovec.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/* `struct iovec' -- Structure describing a section of memory. */
|
||||||
|
|
||||||
|
struct iovec
|
||||||
|
{
|
||||||
|
/* Starting address. */
|
||||||
|
__ptr_t iov_base;
|
||||||
|
/* Length in bytes. */
|
||||||
|
size_t iov_len;
|
||||||
|
};
|
@ -52,11 +52,12 @@ readdir (DIR *dirp)
|
|||||||
off_t base;
|
off_t base;
|
||||||
ssize_t bytes;
|
ssize_t bytes;
|
||||||
|
|
||||||
if (sizeof (dp->d_name) > 1)
|
#ifndef _DIRENT_HAVE_D_RECLEN
|
||||||
/* Fixed-size struct; must read one at a time (see below). */
|
/* Fixed-size struct; must read one at a time (see below). */
|
||||||
maxread = sizeof *dp;
|
maxread = sizeof *dp;
|
||||||
else
|
#else
|
||||||
maxread = dirp->allocation;
|
maxread = dirp->allocation;
|
||||||
|
#endif
|
||||||
|
|
||||||
base = dirp->filepos;
|
base = dirp->filepos;
|
||||||
bytes = __getdirentries (dirp->fd, dirp->data, maxread, &base);
|
bytes = __getdirentries (dirp->fd, dirp->data, maxread, &base);
|
||||||
|
@ -36,7 +36,6 @@ Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
/* Define a macro we can use to construct the asm name for a C symbol. */
|
/* Define a macro we can use to construct the asm name for a C symbol. */
|
||||||
#ifdef NO_UNDERSCORES
|
#ifdef NO_UNDERSCORES
|
||||||
#define C_SYMBOL_NAME(name) name
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#define C_LABEL(name) name##:
|
#define C_LABEL(name) name##:
|
||||||
#else
|
#else
|
||||||
@ -44,10 +43,8 @@ Cambridge, MA 02139, USA. */
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#define C_SYMBOL_NAME(name) _##name
|
|
||||||
#define C_LABEL(name) _##name##:
|
#define C_LABEL(name) _##name##:
|
||||||
#else
|
#else
|
||||||
#define C_SYMBOL_NAME(name) _/**/name
|
|
||||||
#define C_LABEL(name) _/**/name/**/:
|
#define C_LABEL(name) _/**/name/**/:
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
3
sysdeps/unix/sysv/linux/iovec.h
Normal file
3
sysdeps/unix/sysv/linux/iovec.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/* The Linux kernel header defines `struct iovec' for us. */
|
||||||
|
|
||||||
|
#include <linux/uio.h>
|
@ -18,9 +18,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
|||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
/* In the Linux/ELF world, C symbols are asm symbols. */
|
|
||||||
#define NO_UNDERSCORES
|
|
||||||
|
|
||||||
#include <sysdeps/unix/sysdep.h>
|
#include <sysdeps/unix/sysdep.h>
|
||||||
|
|
||||||
/* For Linux we can use the system call table in the header file
|
/* For Linux we can use the system call table in the header file
|
||||||
|
Reference in New Issue
Block a user