update from main archive 960105
This commit is contained in:
parent
6f9e7002f3
commit
df4ef2ab9c
9
MakeTAGS
9
MakeTAGS
|
@ -147,14 +147,7 @@ else
|
|||
$(extract)
|
||||
endif
|
||||
|
||||
#$P/siglist.pot: $(common-objpfx)stdio-common/siglist.c; $(extract)
|
||||
$P/siglist.pot: siglist.c; $(extract)
|
||||
|
||||
# Extract all strings from this file; its strings are not marked.
|
||||
# Their surroundings are also not interesting.
|
||||
XGETTEXTFLAGS-siglist.pot = -a --no-location
|
||||
|
||||
all-pot = $P/libc-top.pot $P/subdirs.pot $P/siglist.pot
|
||||
all-pot = $P/libc-top.pot $P/subdirs.pot
|
||||
|
||||
ifndef subdir
|
||||
# Collect all the subdir messages, massaging the file names in comments
|
||||
|
|
9
Makefile
9
Makefile
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||||
|
@ -38,6 +38,7 @@ endef
|
|||
|
||||
configure: configure.in aclocal.m4; $(autoconf-it)
|
||||
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
|
||||
config.status: configure version.h; $(SHELL) ./config.status --recheck
|
||||
|
||||
include Makeconfig
|
||||
|
||||
|
@ -94,6 +95,7 @@ install-others = $(includedir)/gnu/stubs.h
|
|||
ifeq (yes,$(build-shared))
|
||||
install-others += $(includedir)/gnu/lib-names.h
|
||||
endif
|
||||
install-bin = glibcbug
|
||||
|
||||
ifeq (yes,$(gnu-ld))
|
||||
libc-init = set-init
|
||||
|
@ -206,6 +208,11 @@ $(includedir)/gnu/lib-names.h: $(common-objpfx)soversions.mk
|
|||
rm -f $(objpfx)lib-names.h
|
||||
endif
|
||||
|
||||
# The `glibcbug' script contains the version number and it shall be rebuild
|
||||
# whenever this changes or the `glibcbug.in' file.
|
||||
glibcbug: glibcbug.in config.status
|
||||
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
# This makes the Info or DVI file of the documentation from the Texinfo source.
|
||||
.PHONY: info dvi
|
||||
info dvi:
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
|
@ -170,7 +170,7 @@ main (int argc, char *argv[])
|
|||
Copyright (C) %s Free Software Foundation, Inc.\n\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
"), "1996");
|
||||
"), "1996, 1997");
|
||||
printf (_("Written by %s.\n"), "Ulrich Drepper");
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
|
@ -221,7 +221,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
|||
If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n\
|
||||
is -, output is written to standard output.\n"),
|
||||
program_invocation_name, program_invocation_name);
|
||||
fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
|
||||
fputs (gettext ("\
|
||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
|
||||
stdout);
|
||||
}
|
||||
|
||||
|
@ -270,7 +271,7 @@ read_input_file (struct catalog *current, const char *fname)
|
|||
current->last_set = 0;
|
||||
current->current_set = find_set (current, NL_SETD);
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_alloc malloc
|
||||
#define obstack_chunk_free free
|
||||
obstack_init (¤t->mem_pool);
|
||||
}
|
||||
|
|
|
@ -1894,6 +1894,9 @@ else
|
|||
config_makefile=Makefile
|
||||
fi
|
||||
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
|
@ -1995,7 +1998,7 @@ done
|
|||
ac_given_srcdir=$srcdir
|
||||
ac_given_INSTALL="$INSTALL"
|
||||
|
||||
trap 'rm -fr `echo "config.make ${config_makefile} ${config_uname} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "config.make glibcbug ${config_makefile} ${config_uname} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
|
@ -2067,6 +2070,7 @@ s%@shared@%$shared%g
|
|||
s%@profile@%$profile%g
|
||||
s%@omitfp@%$omitfp%g
|
||||
s%@DEFINES@%$DEFINES%g
|
||||
s%@VERSION@%$VERSION%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
@ -2108,7 +2112,7 @@ EOF
|
|||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"config.make ${config_makefile} ${config_uname}"}
|
||||
CONFIG_FILES=\${CONFIG_FILES-"config.make glibcbug ${config_makefile} ${config_uname}"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||
|
|
|
@ -732,5 +732,8 @@ else
|
|||
config_makefile=Makefile
|
||||
fi
|
||||
|
||||
AC_OUTPUT(config.make ${config_makefile} ${config_uname}, ,
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
AC_SUBST(VERSION)
|
||||
|
||||
AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
|
||||
[echo '$config_vars' >> config.make])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* makedb -- create simple DB database from textual input.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
|
@ -121,7 +121,7 @@ main (argc, argv)
|
|||
Copyright (C) %s Free Software Foundation, Inc.\n\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
"), "1996");
|
||||
"), "1996, 1997");
|
||||
printf (_("Written by %s.\n"), "Ulrich Drepper");
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
|
@ -224,7 +224,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
|||
If INPUT-FILE is -, input is read from standard input.\n"),
|
||||
program_invocation_name, program_invocation_name,
|
||||
program_invocation_name);
|
||||
fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
|
||||
fputs (gettext ("\
|
||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
|
||||
stdout);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Load the dependencies of a mapped object.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 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
|
||||
|
@ -32,33 +32,65 @@ _dl_map_object_deps (struct link_map *map,
|
|||
struct link_map *map;
|
||||
struct list *next;
|
||||
};
|
||||
struct list head[1 + npreloads], *tailp, *scanp;
|
||||
struct list head[2 + npreloads], *tailp, *scanp;
|
||||
struct list duphead, *duptailp;
|
||||
unsigned int nlist;
|
||||
unsigned int nduplist;
|
||||
|
||||
/* Start the search list with one element: MAP itself. */
|
||||
head[0].map = map;
|
||||
|
||||
/* We use `l_reserved' as a mark bit to detect objects we have already
|
||||
put in the search list and avoid adding duplicate elements later in
|
||||
the list. */
|
||||
map->l_reserved = 1;
|
||||
|
||||
/* Add the preloaded items after MAP but before any of its dependencies. */
|
||||
for (nlist = 0; nlist < npreloads; ++nlist)
|
||||
unsigned int nlist, naux, i;
|
||||
inline void preload (struct link_map *map)
|
||||
{
|
||||
head[nlist].next = &head[nlist + 1];
|
||||
head[nlist + 1].map = preloads[nlist];
|
||||
preloads[nlist]->l_reserved = 1;
|
||||
head[nlist++].map = map;
|
||||
|
||||
/* We use `l_reserved' as a mark bit to detect objects we have
|
||||
already put in the search list and avoid adding duplicate
|
||||
elements later in the list. */
|
||||
map->l_reserved = 1;
|
||||
}
|
||||
|
||||
naux = nlist = 0;
|
||||
|
||||
#define AUXTAG (DT_NUM + DT_PROCNUM + DT_EXTRATAGIDX (DT_AUXILIARY))
|
||||
|
||||
if (map->l_info[AUXTAG])
|
||||
{
|
||||
/* There is an auxiliary library specified. We try to load it,
|
||||
and if we can, use its symbols in preference to our own.
|
||||
But if we can't load it, we just silently ignore it.
|
||||
XXX support multiple DT_AUXILIARYs?
|
||||
*/
|
||||
struct link_map *aux;
|
||||
void openaux (void)
|
||||
{
|
||||
const char *strtab
|
||||
= ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
|
||||
aux = _dl_map_object (map, strtab + map->l_info[AUXTAG]->d_un.d_val,
|
||||
map->l_type == lt_executable ? lt_library :
|
||||
map->l_type, trace_mode);
|
||||
}
|
||||
char *errstring;
|
||||
const char *objname;
|
||||
if (! _dl_catch_error (&errstring, &objname, &openaux))
|
||||
{
|
||||
/* The auxiliary object is actually there. Use it
|
||||
as the first search element, even before MAP itself. */
|
||||
preload (aux);
|
||||
naux = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Start the search list with one element: MAP itself. */
|
||||
preload (map);
|
||||
|
||||
/* Add the preloaded items after MAP but before any of its dependencies. */
|
||||
for (i = 0; i < npreloads; ++i)
|
||||
preload (preloads[i]);
|
||||
|
||||
/* Terminate the lists. */
|
||||
head[nlist].next = NULL;
|
||||
head[nlist - 1].next = NULL;
|
||||
duphead.next = NULL;
|
||||
|
||||
/* Start here for adding dependencies to the list. */
|
||||
tailp = &head[nlist++];
|
||||
tailp = &head[nlist - 1];
|
||||
|
||||
/* Until now we have the same number of libraries in the normal and
|
||||
the list with duplicates. */
|
||||
|
@ -104,7 +136,7 @@ _dl_map_object_deps (struct link_map *map,
|
|||
dep->l_reserved = 1;
|
||||
}
|
||||
|
||||
/* In any case Append DEP to the duplicates search list. */
|
||||
/* In any case append DEP to the duplicates search list. */
|
||||
duptailp->next = alloca (sizeof *duptailp);
|
||||
duptailp = duptailp->next;
|
||||
duptailp->map = dep;
|
||||
|
@ -117,6 +149,9 @@ _dl_map_object_deps (struct link_map *map,
|
|||
/* Store the search list we built in the object. It will be used for
|
||||
searches in the scope of this object. */
|
||||
map->l_searchlist = malloc (nlist * sizeof (struct link_map *));
|
||||
if (map->l_searchlist == NULL)
|
||||
_dl_signal_error (ENOMEM, map->l_name,
|
||||
"cannot allocate symbol search list");
|
||||
map->l_nsearchlist = nlist;
|
||||
|
||||
nlist = 0;
|
||||
|
@ -130,9 +165,12 @@ _dl_map_object_deps (struct link_map *map,
|
|||
}
|
||||
|
||||
map->l_dupsearchlist = malloc (nduplist * sizeof (struct link_map *));
|
||||
if (map->l_dupsearchlist == NULL)
|
||||
_dl_signal_error (ENOMEM, map->l_name,
|
||||
"cannot allocate symbol search list");
|
||||
map->l_ndupsearchlist = nduplist;
|
||||
|
||||
for (nlist = 0; nlist < npreloads + 1; ++nlist)
|
||||
for (nlist = 0; nlist < naux + 1 + npreloads; ++nlist)
|
||||
map->l_dupsearchlist[nlist] = head[nlist].map;
|
||||
for (scanp = duphead.next; scanp; scanp = scanp->next)
|
||||
map->l_dupsearchlist[nlist++] = scanp->map;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Error handling for runtime dynamic linker.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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
|
||||
|
@ -76,21 +76,22 @@ _dl_catch_error (char **errstring,
|
|||
void (*operate) (void))
|
||||
{
|
||||
int errcode;
|
||||
struct catch c = { errstring: NULL, objname: NULL };
|
||||
struct catch *old, c = { errstring: NULL, objname: NULL };
|
||||
|
||||
old = catch;
|
||||
errcode = setjmp (c.env);
|
||||
if (errcode == 0)
|
||||
{
|
||||
catch = &c;
|
||||
(*operate) ();
|
||||
catch = NULL;
|
||||
catch = old;
|
||||
*errstring = NULL;
|
||||
*objname = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* We get here only if we longjmp'd out of OPERATE. */
|
||||
catch = NULL;
|
||||
catch = old;
|
||||
*errstring = c.errstring;
|
||||
*objname = c.objname;
|
||||
return errcode == -1 ? 0 : errcode;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Inline functions for dynamic linking.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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
|
||||
|
@ -25,11 +25,12 @@
|
|||
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
|
||||
|
||||
static inline void __attribute__ ((unused))
|
||||
elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
|
||||
elf_get_dynamic_info (ElfW(Dyn) *dyn,
|
||||
ElfW(Dyn) *info[DT_NUM + DT_PROCNUM + DT_EXTRANUM])
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < DT_NUM + DT_PROCNUM; ++i)
|
||||
for (i = 0; i < DT_NUM + DT_PROCNUM + DT_EXTRANUM; ++i)
|
||||
info[i] = NULL;
|
||||
|
||||
if (! dyn)
|
||||
|
@ -42,6 +43,8 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
|
|||
else if (dyn->d_tag >= DT_LOPROC &&
|
||||
dyn->d_tag < DT_LOPROC + DT_PROCNUM)
|
||||
info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
|
||||
else if ((Elf32_Word) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
|
||||
info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM] = dyn;
|
||||
else
|
||||
assert (! "bad dynamic tag");
|
||||
dyn++;
|
||||
|
|
10
elf/elf.h
10
elf/elf.h
|
@ -1,5 +1,5 @@
|
|||
/* This file defines standard ELF types, structures, and macros.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
|
@ -464,6 +464,14 @@ typedef struct
|
|||
#define DT_HIPROC 0x7fffffff /* End of processor-specific */
|
||||
#define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */
|
||||
|
||||
/* Sun added these machine-independent extensions in the "processor-specific"
|
||||
range. Be compatible. */
|
||||
#define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */
|
||||
#define DT_FILTER 0x7fffffff /* Shared object to get values from */
|
||||
#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
|
||||
#define DT_EXTRANUM 3
|
||||
|
||||
|
||||
/* Auxiliary vector. */
|
||||
|
||||
/* This vector is normally only used by the program interpreter. The
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! @BASH@
|
||||
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997 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
|
||||
|
@ -34,7 +34,7 @@ while test $# -gt 0; do
|
|||
case "$1" in
|
||||
--v*)
|
||||
echo $"ldd (GNU libc) @VERSION@
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
exit 0 ;;
|
||||
|
@ -42,7 +42,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|||
echo $"ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
Report bugs to <bug-glibc@prep.ai.mit.edu>."
|
||||
Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
exit 0 ;;
|
||||
--) # Stop option processing.
|
||||
shift; break ;;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997 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
|
||||
|
@ -30,15 +30,15 @@ while test $# -gt 0; do
|
|||
case "$1" in
|
||||
--v*)
|
||||
echo 'ldd (GNU libc) @VERSION@
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.'
|
||||
exit 0 ;;
|
||||
--h*)
|
||||
echo 'ldd [OPTION]... FILE...
|
||||
echo "ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
Report bugs to <bug-glibc@prep.ai.mit.edu>.'
|
||||
Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
exit 0 ;;
|
||||
--) # Stop option processing.
|
||||
shift; break ;;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Run-time dynamic linker data structures for loaded ELF shared objects.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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
|
||||
|
@ -97,8 +97,11 @@ struct link_map
|
|||
const char *l_libname; /* Name requested (before search). */
|
||||
/* Indexed pointers to dynamic section.
|
||||
[0,DT_NUM) are indexed by the processor-independent tags.
|
||||
[DT_NUM,DT_NUM+DT_PROCNUM] are indexed by the tag minus DT_LOPROC. */
|
||||
ElfW(Dyn) *l_info[DT_NUM + DT_PROCNUM];
|
||||
[DT_NUM,DT_NUM+DT_PROCNUM) are indexed by the tag minus DT_LOPROC.
|
||||
[DT_NUM+DT_PROCNUM,DT_NUM+DT_PROCNUM+DT_EXTRANUM) are indexed
|
||||
by DT_EXTRATAGIDX(tagvalue) (see <elf.h>). */
|
||||
|
||||
ElfW(Dyn) *l_info[DT_NUM + DT_PROCNUM + DT_EXTRANUM];
|
||||
const ElfW(Phdr) *l_phdr; /* Pointer to program header table in core. */
|
||||
ElfW(Addr) l_entry; /* Entry point location. */
|
||||
ElfW(Half) l_phnum; /* Number of program header entries. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 95, 96, 97 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
|
||||
|
@ -95,7 +95,7 @@
|
|||
/* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */
|
||||
#if defined _BSD_SOURCE && \
|
||||
!(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \
|
||||
defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_DEFINED || \
|
||||
defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \
|
||||
defined _GNU_SOURCE || defined _SVID_SOURCE)
|
||||
# define __FAVOR_BSD 1
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,253 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# glibcbug - create a bug report and mail it to the bug address.
|
||||
#
|
||||
# configuration section:
|
||||
# these variables are filled in by configure
|
||||
#
|
||||
VERSION="@VERSION@"
|
||||
BUGGLIBC="bugs@gnu.ai.mit.edu"
|
||||
ADDONS="@subdirs@"
|
||||
|
||||
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
|
||||
export PATH
|
||||
|
||||
TEMP=/tmp/glibcbug.$$
|
||||
|
||||
BUGADDR=${1-$BUGGLIBC}
|
||||
ENVIRONMENT=`uname -a`
|
||||
|
||||
: ${EDITOR=emacs}
|
||||
|
||||
: ${USER=${LOGNAME-`whoami`}}
|
||||
|
||||
trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15
|
||||
trap 'rm -f $TEMP $TEMP.x' 0
|
||||
|
||||
|
||||
# How to read the passwd database.
|
||||
PASSWD="cat /etc/passwd"
|
||||
|
||||
if [ -f /usr/lib/sendmail ] ; then
|
||||
RMAIL="/usr/lib/sendmail -oi -t"
|
||||
elif [ -f /usr/sbin/sendmail ] ; then
|
||||
RMAIL="/usr/sbin/sendmail -oi -t"
|
||||
else
|
||||
RMAIL=rmail
|
||||
fi
|
||||
|
||||
# Figure out how to echo a string without a trailing newline
|
||||
N=`echo 'hi there\c'`
|
||||
case "$N" in
|
||||
*c) ECHON1='echo -n' ECHON2= ;;
|
||||
*) ECHON1=echo ECHON2='\c' ;;
|
||||
esac
|
||||
|
||||
# Find out the name of the originator of this PR.
|
||||
if [ -n "$NAME" ]; then
|
||||
ORIGINATOR="$NAME"
|
||||
elif [ -f $HOME/.fullname ]; then
|
||||
ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
|
||||
else
|
||||
# Must use temp file due to incompatibilities in quoting behavior
|
||||
# and to protect shell metacharacters in the expansion of $LOGNAME
|
||||
$PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $TEMP
|
||||
ORIGINATOR="`cat $TEMP`"
|
||||
rm -f $TEMP
|
||||
fi
|
||||
|
||||
if [ -n "$ORGANIZATION" ]; then
|
||||
if [ -f "$ORGANIZATION" ]; then
|
||||
ORGANIZATION="`cat $ORGANIZATION`"
|
||||
fi
|
||||
else
|
||||
if [ -f $HOME/.organization ]; then
|
||||
ORGANIZATION="`cat $HOME/.organization`"
|
||||
elif [ -f $HOME/.signature ]; then
|
||||
ORGANIZATION=`sed -e "s/^/ /" $HOME/.signature; echo ">"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# If they don't have a preferred editor set, then use
|
||||
if [ -z "$VISUAL" ]; then
|
||||
if [ -z "$EDITOR" ]; then
|
||||
EDIT=vi
|
||||
else
|
||||
EDIT="$EDITOR"
|
||||
fi
|
||||
else
|
||||
EDIT="$VISUAL"
|
||||
fi
|
||||
|
||||
# Find out some information.
|
||||
SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \
|
||||
( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""`
|
||||
ARCH=`[ -f /bin/arch ] && /bin/arch`
|
||||
MACHINE=`[ -f /bin/machine ] && /bin/machine`
|
||||
|
||||
ORGANIZATION_C='<organization of PR author (multiple lines)>'
|
||||
CONFIDENTIAL_C='<[ yes | no ] (one line)>'
|
||||
SYNOPSIS_C='<synopsis of the problem (one line)>'
|
||||
SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
|
||||
PRIORITY_C='<[ low | medium | high ] (one line)>'
|
||||
CLASS_C='<[ sw-bug | doc-bug | change-request | support ] (one line)>'
|
||||
RELEASE_C='<release number or tag (one line)>'
|
||||
ENVIRONMENT_C='<machine, os, target, libraries (multiple lines)>'
|
||||
DESCRIPTION_C='<precise description of the problem (multiple lines)>'
|
||||
HOW_TO_REPEAT_C='<code/input/activities to reproduce the problem (multiple lines)>'
|
||||
FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
|
||||
|
||||
|
||||
cat > $TEMP <<EOF
|
||||
SEND-PR: -*- send-pr -*-
|
||||
SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as
|
||||
SEND-PR: will all comments (text enclosed in \`<' and \`>').
|
||||
SEND-PR:
|
||||
From: ${USER}
|
||||
To: ${BUGADDR}
|
||||
Subject: [50 character or so descriptive subject here (for reference)]
|
||||
|
||||
>Submitter-Id: <submitter ID>
|
||||
>Originator: ${ORIGINATOR}
|
||||
>Organization:
|
||||
${ORGANIZATION- $ORGANIZATION_C}
|
||||
>Confidential: $CONFIDENTIAL_C
|
||||
>Synopsis: $SYNOPSIS_C
|
||||
>Severity: $SEVERITY_C
|
||||
>Priority: $PRIORITY_C
|
||||
>Category: libc
|
||||
>Class: $CLASS_C
|
||||
>Release: libc-${VERSION}
|
||||
>Environment:
|
||||
<machine, os, target, libraries (multiple lines)>
|
||||
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
|
||||
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
|
||||
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
|
||||
`[ -n "$ADDONS" ] && echo Addons: $ADDONS`
|
||||
|
||||
>Description:
|
||||
$DESCRIPTION_C
|
||||
>How-To-Repeat:
|
||||
$HOW_TO_REPEAT_C
|
||||
>Fix:
|
||||
$FIX_C
|
||||
EOF
|
||||
|
||||
chmod u+w $TEMP
|
||||
cp $TEMP $TEMP.x
|
||||
|
||||
eval $EDIT $TEMP
|
||||
|
||||
if cmp -s $TEMP $TEMP.x; then
|
||||
echo "File not changed, no bug report submitted."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Check the enumeration fields
|
||||
|
||||
# This is a "sed-subroutine" with one keyword parameter
|
||||
# (with workaround for Sun sed bug)
|
||||
#
|
||||
SED_CMD='
|
||||
/$PATTERN/{
|
||||
s|||
|
||||
s|<.*>||
|
||||
s|^[ ]*||
|
||||
s|[ ]*$||
|
||||
p
|
||||
q
|
||||
}'
|
||||
|
||||
|
||||
while :; do
|
||||
CNT=0
|
||||
|
||||
# 1) Confidential
|
||||
#
|
||||
PATTERN=">Confidential:"
|
||||
CONFIDENTIAL=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||||
case "$CONFIDENTIAL" in
|
||||
""|yes|no) CNT=`expr $CNT + 1` ;;
|
||||
*) echo "$COMMAND: \`$CONFIDENTIAL' is not a valid value for \`Confidential'." ;;
|
||||
esac
|
||||
#
|
||||
# 2) Severity
|
||||
#
|
||||
PATTERN=">Severity:"
|
||||
SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||||
case "$SEVERITY" in
|
||||
""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
|
||||
*) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
|
||||
esac
|
||||
#
|
||||
# 3) Priority
|
||||
#
|
||||
PATTERN=">Priority:"
|
||||
PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||||
case "$PRIORITY" in
|
||||
""|low|medium|high) CNT=`expr $CNT + 1` ;;
|
||||
*) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
|
||||
esac
|
||||
#
|
||||
# 4) Class
|
||||
#
|
||||
PATTERN=">Class:"
|
||||
CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||||
case "$CLASS" in
|
||||
""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
|
||||
*) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
|
||||
esac
|
||||
|
||||
[ $CNT -lt 5 ] &&
|
||||
echo "Errors were found with the problem report."
|
||||
|
||||
while :; do
|
||||
$ECHON1 "a)bort, e)dit or s)end? $ECHON2"
|
||||
read input
|
||||
case "$input" in
|
||||
a*)
|
||||
echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
|
||||
cat $TEMP >> $HOME/dead.glibcbug
|
||||
xs=1; exit
|
||||
;;
|
||||
e*)
|
||||
eval $EDIT $TEMP
|
||||
continue 2
|
||||
;;
|
||||
s*)
|
||||
break 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
#
|
||||
# Remove comments and send the problem report
|
||||
# (we have to use patterns, where the comment contains regex chars)
|
||||
#
|
||||
# /^>Originator:/s;$ORIGINATOR;;
|
||||
sed -e "
|
||||
/^SEND-PR:/d
|
||||
/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
|
||||
/^>Confidential:/s;<.*>;;
|
||||
/^>Synopsis:/s;$SYNOPSIS_C;;
|
||||
/^>Severity:/s;<.*>;;
|
||||
/^>Priority:/s;<.*>;;
|
||||
/^>Class:/s;<.*>;;
|
||||
/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
|
||||
/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
|
||||
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
|
||||
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
|
||||
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
|
||||
" $TEMP > $REF
|
||||
|
||||
if $MAIL_AGENT < $REF; then
|
||||
echo "$COMMAND: problem report sent"
|
||||
xs=0; exit
|
||||
else
|
||||
echo "$COMMAND: mysterious mail failure, report not sent."
|
||||
echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
|
||||
cat $TEMP >> $HOME/dead.glibcbug
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||||
|
@ -22,7 +22,7 @@
|
|||
subdir := inet
|
||||
|
||||
headers := netinet/ether.h netinet/in.h netinet/if_ether.h \
|
||||
netinet/tcp.h $(wildcard arpa/*.h protocols/*.h) \
|
||||
netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
|
||||
aliases.h
|
||||
|
||||
distribute := netgroup.h
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ip.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
#include <gnu/types.h>
|
||||
#include <endian.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
/*
|
||||
* Definitions for internet protocol version 4.
|
||||
* Per RFC 791, September 1981.
|
||||
*/
|
||||
#define IPVERSION 4
|
||||
|
||||
/*
|
||||
* Structure of an internet header, naked of options.
|
||||
*/
|
||||
struct ip {
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
__u_char ip_hl:4, /* header length */
|
||||
ip_v:4; /* version */
|
||||
#endif
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
__u_char ip_v:4, /* version */
|
||||
ip_hl:4; /* header length */
|
||||
#endif
|
||||
__u_char ip_tos; /* type of service */
|
||||
__u_short ip_len; /* total length */
|
||||
__u_short ip_id; /* identification */
|
||||
__u_short ip_off; /* fragment offset field */
|
||||
#define IP_RF 0x8000 /* reserved fragment flag */
|
||||
#define IP_DF 0x4000 /* dont fragment flag */
|
||||
#define IP_MF 0x2000 /* more fragments flag */
|
||||
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
|
||||
__u_char ip_ttl; /* time to live */
|
||||
__u_char ip_p; /* protocol */
|
||||
__u_short ip_sum; /* checksum */
|
||||
struct in_addr ip_src, ip_dst; /* source and dest address */
|
||||
};
|
||||
|
||||
#define IP_MAXPACKET 65535 /* maximum packet size */
|
||||
|
||||
/*
|
||||
* Definitions for IP type of service (ip_tos)
|
||||
*/
|
||||
#define IPTOS_LOWDELAY 0x10
|
||||
#define IPTOS_THROUGHPUT 0x08
|
||||
#define IPTOS_RELIABILITY 0x04
|
||||
/* IPTOS_LOWCOST 0x02 XXX */
|
||||
|
||||
/*
|
||||
* Definitions for IP precedence (also in ip_tos) (hopefully unused)
|
||||
*/
|
||||
#define IPTOS_PREC_NETCONTROL 0xe0
|
||||
#define IPTOS_PREC_INTERNETCONTROL 0xc0
|
||||
#define IPTOS_PREC_CRITIC_ECP 0xa0
|
||||
#define IPTOS_PREC_FLASHOVERRIDE 0x80
|
||||
#define IPTOS_PREC_FLASH 0x60
|
||||
#define IPTOS_PREC_IMMEDIATE 0x40
|
||||
#define IPTOS_PREC_PRIORITY 0x20
|
||||
#define IPTOS_PREC_ROUTINE 0x00
|
||||
|
||||
/*
|
||||
* Definitions for options.
|
||||
*/
|
||||
#define IPOPT_COPIED(o) ((o)&0x80)
|
||||
#define IPOPT_CLASS(o) ((o)&0x60)
|
||||
#define IPOPT_NUMBER(o) ((o)&0x1f)
|
||||
|
||||
#define IPOPT_CONTROL 0x00
|
||||
#define IPOPT_RESERVED1 0x20
|
||||
#define IPOPT_DEBMEAS 0x40
|
||||
#define IPOPT_RESERVED2 0x60
|
||||
|
||||
#define IPOPT_EOL 0 /* end of option list */
|
||||
#define IPOPT_NOP 1 /* no operation */
|
||||
|
||||
#define IPOPT_RR 7 /* record packet route */
|
||||
#define IPOPT_TS 68 /* timestamp */
|
||||
#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
|
||||
#define IPOPT_LSRR 131 /* loose source route */
|
||||
#define IPOPT_SATID 136 /* satnet id */
|
||||
#define IPOPT_SSRR 137 /* strict source route */
|
||||
|
||||
/*
|
||||
* Offsets to fields in options other than EOL and NOP.
|
||||
*/
|
||||
#define IPOPT_OPTVAL 0 /* option ID */
|
||||
#define IPOPT_OLEN 1 /* option length */
|
||||
#define IPOPT_OFFSET 2 /* offset within option */
|
||||
#define IPOPT_MINOFF 4 /* min value of above */
|
||||
|
||||
/*
|
||||
* Time stamp option structure.
|
||||
*/
|
||||
struct ip_timestamp {
|
||||
__u_char ipt_code; /* IPOPT_TS */
|
||||
__u_char ipt_len; /* size of structure (variable) */
|
||||
__u_char ipt_ptr; /* index of current entry */
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
__u_char ipt_flg:4, /* flags, see below */
|
||||
ipt_oflw:4; /* overflow counter */
|
||||
#endif
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
__u_char ipt_oflw:4, /* overflow counter */
|
||||
ipt_flg:4; /* flags, see below */
|
||||
#endif
|
||||
__u_long data[9];
|
||||
};
|
||||
|
||||
/* flag bits for ipt_flg */
|
||||
#define IPOPT_TS_TSONLY 0 /* timestamps only */
|
||||
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
|
||||
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
|
||||
|
||||
/* bits for security (not byte swapped) */
|
||||
#define IPOPT_SECUR_UNCLASS 0x0000
|
||||
#define IPOPT_SECUR_CONFID 0xf135
|
||||
#define IPOPT_SECUR_EFTO 0x789a
|
||||
#define IPOPT_SECUR_MMMM 0xbc4d
|
||||
#define IPOPT_SECUR_RESTR 0xaf13
|
||||
#define IPOPT_SECUR_SECRET 0xd788
|
||||
#define IPOPT_SECUR_TOPSECRET 0x6bc5
|
||||
|
||||
/*
|
||||
* Internet implementation parameters.
|
||||
*/
|
||||
#define MAXTTL 255 /* maximum time to live (seconds) */
|
||||
#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
|
||||
#define IPFRAGTTL 60 /* time to live for frags, slowhz */
|
||||
#define IPTTLDEC 1 /* subtracted when forwarding */
|
||||
|
||||
#define IP_MSS 576 /* default maximum segment size */
|
|
@ -1,5 +1,5 @@
|
|||
/* finddomain.c -- handle list of needed message catalogs
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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
|
||||
|
@ -63,18 +63,6 @@ void free ();
|
|||
#endif
|
||||
|
||||
/* @@ 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
|
||||
|
||||
/* List of already loaded domains. */
|
||||
static struct loaded_l10nfile *_nl_loaded_domains;
|
||||
|
||||
|
@ -200,21 +188,3 @@ _nl_find_domain (dirname, locale, domainname)
|
|||
|
||||
return 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Locale name alias data base
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Locale name alias data base.
|
||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,8 +22,9 @@
|
|||
# All entries are case independent.
|
||||
|
||||
# Note: This file is far from being complete. If you have a value for
|
||||
# your own site which you think might be useful for others too, share it
|
||||
# with the rest of us. Send it to bug-gnu-utils@prep.ai.mit.edu.
|
||||
# your own site which you think might be useful for others too, share
|
||||
# it with the rest of us. Send it using the `glibcbug' script to
|
||||
# bugs@gnu.ai.mit.edu.
|
||||
|
||||
czech cs_CZ.ISO-8859-2
|
||||
danish da_DK.ISO-8859-1
|
||||
|
|
6
io/ftw.c
6
io/ftw.c
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ian Lance Taylor (ian@airs.com).
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
|
||||
static int
|
||||
ftw_dir (DIR **dirs, int level, int descriptors, char *dir, size_t len,
|
||||
int (*func) (const char *file, struct stat *status, int flag))
|
||||
int (*func) (const char *file, const struct stat *status, int flag))
|
||||
{
|
||||
int got;
|
||||
struct dirent *entry;
|
||||
|
@ -151,7 +151,7 @@ ftw_dir (DIR **dirs, int level, int descriptors, char *dir, size_t len,
|
|||
|
||||
int
|
||||
ftw (const char *dir,
|
||||
int (*func) (const char *file, struct stat *status, int flag),
|
||||
int (*func) (const char *file, const struct stat *status, int flag),
|
||||
int descriptors)
|
||||
{
|
||||
DIR **dirs;
|
||||
|
|
4
io/ftw.h
4
io/ftw.h
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ian Lance Taylor (ian@airs.com).
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
/* Call a function on every element in a directory tree. */
|
||||
extern int ftw __P ((__const char *__dir,
|
||||
int (*__func) (__const char *__file,
|
||||
struct stat *__status,
|
||||
__const struct stat *__status,
|
||||
int __flag),
|
||||
int __descriptors));
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
|
|||
|
||||
#define _G_HAVE_PRINTF_FP 1
|
||||
#define _G_HAVE_MMAP 1
|
||||
#define _G_HAVE_LONG_DOUBLE_IO 1
|
||||
|
||||
/* This is defined by <statbuf.h> if `st_blksize' exists. */
|
||||
#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
|
@ -23,9 +23,7 @@ This exception does not however invalidate any other reasons why
|
|||
the executable file might be covered by the GNU General Public License. */
|
||||
|
||||
#include "libioP.h"
|
||||
#ifdef __STDC__
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
__fcloseall ()
|
||||
|
|
|
@ -466,7 +466,7 @@ DEFUN(_IO_init, (fp, flags),
|
|||
fp->_markers = NULL;
|
||||
fp->_cur_column = 0;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_init_recursive (*fp->_lock);
|
||||
_IO_lock_init (*fp->_lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 1993, 1994 Free Software Foundation
|
||||
/*
|
||||
Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
|
@ -33,7 +33,7 @@ the executable file might be covered by the GNU General Public License. */
|
|||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
||||
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_init; \
|
||||
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|
||||
struct _IO_FILE_plus NAME \
|
||||
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps}
|
||||
#else
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
|
@ -128,7 +128,7 @@ parse_charmap (const char *filename)
|
|||
/* The default DEFAULT_WIDTH is 1. */
|
||||
result->width_default = 1;
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_alloc malloc
|
||||
#define obstack_chunk_free free
|
||||
obstack_init (&result->mem_pool);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
|
@ -145,7 +145,7 @@ void *xmalloc (size_t __n);
|
|||
void *xrealloc (void *__p, size_t __n);
|
||||
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_alloc malloc
|
||||
#define obstack_chunk_free free
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* locale - Implementation of the locale program according to POSIX 1003.2
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
|
@ -188,7 +188,7 @@ main (int argc, char *argv[])
|
|||
Copyright (C) %s Free Software Foundation, Inc.\n\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
"), "1995, 1996");
|
||||
"), "1995, 1996, 1997");
|
||||
printf (_("Written by %s.\n"), "Ulrich Drepper");
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
|
@ -254,7 +254,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
|||
-c, --category-name write names of selected categories\n\
|
||||
-k, --keyword-name write names of selected keywords\n"),
|
||||
__progname);
|
||||
fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
|
||||
fputs (gettext ("\
|
||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
|
||||
stdout);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
|
@ -178,7 +178,7 @@ main (int argc, char *argv[])
|
|||
Copyright (C) %s Free Software Foundation, Inc.\n\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
"), "1995, 1996");
|
||||
"), "1995, 1996, 1997");
|
||||
printf (_("Written by %s.\n"), "Ulrich Drepper");
|
||||
|
||||
exit (0);
|
||||
|
@ -405,7 +405,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
|||
System's directory for character maps: %s\n\
|
||||
locale files : %s\n"),
|
||||
program_invocation_name, CHARMAP_PATH, LOCALE_PATH);
|
||||
fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
|
||||
fputs (gettext ("\
|
||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
|
||||
stdout);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
/* hash - implement simple hashing table with string based keys.
|
||||
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Implement simple hashing table with string based keys.
|
||||
Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, October 1994.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
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.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
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 General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
|
@ -37,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
|
||||
#include "simple-hash.h"
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_alloc malloc
|
||||
#define obstack_chunk_free free
|
||||
|
||||
#ifndef BITSPERBYTE
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Standard debugging hooks for `malloc'.
|
||||
Copyright (C) 1990,91,92,93,94,95,96 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990,91,92,93,94,95,96,97 Free Software Foundation, Inc.
|
||||
Written May 1989 by Mike Haertel.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
|
@ -49,6 +49,7 @@ struct hdr
|
|||
};
|
||||
|
||||
#if defined(_LIBC) || defined(STDC_HEADERS) || defined(USG)
|
||||
#include <string.h>
|
||||
#define flood memset
|
||||
#else
|
||||
static void flood __P ((__ptr_t, int, __malloc_size_t));
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#ifdef USE_NEW_MALLOC
|
||||
# include <new-malloc/mcheck.h>
|
||||
#else
|
||||
# include <malloc/malloc.h>
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997 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
|
||||
|
@ -34,7 +34,7 @@ libcrypt-routines := crypt-entry md5-crypt md5
|
|||
|
||||
include ../Makeconfig
|
||||
|
||||
rpath-link := $(common-objpfx)crypt:$(rpath-link)
|
||||
rpath-link := $(common-objpfx)md5-crypt:$(rpath-link)
|
||||
|
||||
ifeq ($(crypt-in-libc),yes)
|
||||
routines += $(libcrypt-routines)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||||
|
@ -29,7 +29,7 @@ headers := sys/uio.h iovec.h sys/ioctl.h ioctls.h ioctl-types.h \
|
|||
sys/mman.h sys/param.h fstab.h mntent.h search.h err.h error.h\
|
||||
sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
|
||||
sys/select.h ustat.h sys/ustat.h ustatbits.h sys/sysinfo.h \
|
||||
regexp.h
|
||||
regexp.h selectbits.h
|
||||
|
||||
routines := brk sbrk sstk ioctl \
|
||||
readv writev \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1992,1993,1994,1995,1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992, 93, 94, 95, 96, 97 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
|
||||
|
@ -34,8 +34,8 @@ getpass (prompt)
|
|||
const char *prompt;
|
||||
{
|
||||
FILE *in, *out;
|
||||
struct termios t;
|
||||
int echo_off;
|
||||
struct termios s, t;
|
||||
int tty_changed;
|
||||
static char *buf = NULL;
|
||||
static size_t bufsize = 0;
|
||||
ssize_t nread;
|
||||
|
@ -56,17 +56,16 @@ getpass (prompt)
|
|||
|
||||
if (tcgetattr (fileno (in), &t) == 0)
|
||||
{
|
||||
if (t.c_lflag & ECHO)
|
||||
{
|
||||
t.c_lflag &= ~ECHO;
|
||||
echo_off = tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t) == 0;
|
||||
t.c_lflag |= ECHO;
|
||||
}
|
||||
else
|
||||
echo_off = 0;
|
||||
/* Save the old one. */
|
||||
s = t;
|
||||
/* Tricky, tricky. */
|
||||
t.c_lflag &= ~(ECHO|ISIG|ICANON);
|
||||
t.c_cc[VTIME] = 0;
|
||||
t.c_cc[VMIN] = 1;
|
||||
tty_changed = (tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t) == 0);
|
||||
}
|
||||
else
|
||||
echo_off = 0;
|
||||
tty_changed = 0;
|
||||
|
||||
/* Write the prompt. */
|
||||
fputs (prompt, out);
|
||||
|
@ -81,14 +80,14 @@ getpass (prompt)
|
|||
{
|
||||
/* Remove the newline. */
|
||||
buf[nread - 1] = '\0';
|
||||
if (echo_off)
|
||||
if (tty_changed)
|
||||
/* Write the newline that was not echoed. */
|
||||
putc ('\n', out);
|
||||
}
|
||||
|
||||
/* Restore echoing. */
|
||||
if (echo_off)
|
||||
(void) tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t);
|
||||
/* Restore the original setting. */
|
||||
if (tty_changed)
|
||||
(void) tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &s);
|
||||
|
||||
if (in != stdin)
|
||||
/* We opened the terminal; now close it. */
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/* Utilities for reading/writing fstab, mtab, etc.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1995, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <mntent.h>
|
||||
#include <stdio.h>
|
||||
|
@ -134,6 +134,9 @@ __hasmntopt (const struct mntent *mnt, const char *opt)
|
|||
return p;
|
||||
|
||||
rest = strchr (rest, ',');
|
||||
if (rest == NULL)
|
||||
break;
|
||||
++rest;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* `fd_set' type and related macros, and `select'/`pselect' declarations.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 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
|
||||
|
@ -27,6 +27,9 @@
|
|||
/* Get definition of needed basic types. */
|
||||
#include <gnu/types.h>
|
||||
|
||||
/* Get __FD_* definitions. */
|
||||
#include <selectbits.h>
|
||||
|
||||
/* Get definition of timer specification structures. */
|
||||
#define __need_timespec
|
||||
#include <time.h>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
#include <syscall.h>
|
416
po/libc.pot
416
po/libc.pot
File diff suppressed because it is too large
Load Diff
32
po/sv.po
32
po/sv.po
|
@ -56,7 +56,7 @@ msgstr "\"Zone %s\"-rad och flaggan -l
|
|||
#: time/zic.c:953
|
||||
#, c-format
|
||||
msgid "\"Zone %s\" line and -p option are mutually exclusive"
|
||||
msgstr "\"Zone %s\" rad och -p flagga är ömsesidigt uteslutande"
|
||||
msgstr "\"Zone %s\"-rad och flaggan -p är ömsesidigt uteslutande"
|
||||
|
||||
#: time/zic.c:758
|
||||
#, c-format
|
||||
|
@ -66,7 +66,7 @@ msgstr "%s i zon utan regel"
|
|||
#: assert/assert.c:46
|
||||
#, c-format
|
||||
msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
|
||||
msgstr "%s%s%s:%u: %s%sFörsäkran \"%s\" falskt.\n"
|
||||
msgstr "%s%s%s:%u: %s%sFörsäkran \"%s\" falsk.\n"
|
||||
|
||||
#: assert/assert-perr.c:47
|
||||
#, c-format
|
||||
|
@ -693,7 +693,7 @@ msgstr "Filtyp eller format ol
|
|||
#. TRANS modes on an ordinary file.
|
||||
#: stdio-common/../sysdeps/gnu/errlist.c:176
|
||||
msgid "Inappropriate ioctl for device"
|
||||
msgstr "Ioctl för enhet olämplig"
|
||||
msgstr "Olämplig \"ioctl\" för enhet"
|
||||
|
||||
#. TRANS In the GNU system, servers supporting the @code{term} protocol return
|
||||
#. TRANS this error for certain operations when the caller is not in the
|
||||
|
@ -1902,16 +1902,16 @@ msgstr "kategoridata beg
|
|||
#: locale/programs/ld-ctype.c:265
|
||||
#, c-format
|
||||
msgid "character %s'%s' in class `%s' must be in class `%s'"
|
||||
msgstr "tecken %s\"%s\" i klass \"%s\" måste vara i klass \"%s\""
|
||||
msgstr "tecknet %s\"%s\" i klass \"%s\" måste vara i klass \"%s\""
|
||||
|
||||
#: locale/programs/ld-ctype.c:289
|
||||
#, c-format
|
||||
msgid "character %s'%s' in class `%s' must not be in class `%s'"
|
||||
msgstr "tecken %s\"%s\" i klass \"%s\" kan inte vara i klass \"%s\""
|
||||
msgstr "tecknet %s\"%s\" i klass \"%s\" kan inte vara i klass \"%s\""
|
||||
|
||||
#: locale/programs/ld-ctype.c:310
|
||||
msgid "character <SP> not defined in character map"
|
||||
msgstr "tecken <SP> inte definierat i teckenuppsättning"
|
||||
msgstr "tecknet <SP> inte definierat i teckenuppsättning"
|
||||
|
||||
#: locale/programs/ld-ctype.c:939 locale/programs/ld-ctype.c:1002
|
||||
#: locale/programs/ld-ctype.c:1010 locale/programs/ld-ctype.c:1018
|
||||
|
@ -1921,7 +1921,7 @@ msgstr "tecken <SP> inte definierat i teckenupps
|
|||
#: locale/programs/ld-ctype.c:1141 locale/programs/ld-ctype.c:1152
|
||||
#, c-format
|
||||
msgid "character `%s' not defined while needed as default value"
|
||||
msgstr "tecken \"%s\" inte definierad men behövs som standardvärde"
|
||||
msgstr "tecknet \"%s\" inte definierat men behövs som standardvärde"
|
||||
|
||||
#: locale/programs/ld-ctype.c:801
|
||||
#, c-format
|
||||
|
@ -1992,7 +1992,7 @@ msgid ""
|
|||
"character"
|
||||
msgstr ""
|
||||
"riktningsflagga i sträng %d i \"era\"-fält i kategori \"%s\" är inte ett "
|
||||
"tecken"
|
||||
"enskilt tecken"
|
||||
|
||||
#: locale/programs/charset.c:87 locale/programs/charset.c:132
|
||||
#, c-format
|
||||
|
@ -2251,7 +2251,7 @@ msgstr "ogiltigt veckodagsnamn"
|
|||
|
||||
#: locale/programs/ld-collate.c:1412
|
||||
msgid "line after ellipsis must contain character definition"
|
||||
msgstr "rad efter ... får inte innehålla teckendefinition"
|
||||
msgstr "rad efter ... måste innehålla teckendefinition"
|
||||
|
||||
#: locale/programs/ld-collate.c:1391
|
||||
msgid "line before ellipsis does not contain definition for character constant"
|
||||
|
@ -2296,12 +2296,12 @@ msgstr "minnet
|
|||
#: locale/programs/ld-time.c:348
|
||||
#, c-format
|
||||
msgid "missing era format in string %d in `era' field in category `%s'"
|
||||
msgstr "saknar eraformat i sträng %d i \"era\"-fält i kategori \"%s\""
|
||||
msgstr "eraformat i sträng %d i \"era\"-fält i kategori \"%s\" saknas"
|
||||
|
||||
#: locale/programs/ld-time.c:337
|
||||
#, c-format
|
||||
msgid "missing era name in string %d in `era' fieldin category `%s'"
|
||||
msgstr "saknar eranamn i sträng %d i \"era\"-fält i kategori \"%s\""
|
||||
msgstr "eranamn i sträng %d i \"era\"-fält i kategori \"%s\" saknas"
|
||||
|
||||
#: time/zic.c:915
|
||||
msgid "nameless rule"
|
||||
|
@ -2393,7 +2393,7 @@ msgstr "registerrpc: minnet slut\n"
|
|||
|
||||
#: time/zic.c:1794
|
||||
msgid "repeated leap second moment"
|
||||
msgstr "upprepad skottsekundstillfälle"
|
||||
msgstr "upprepat skottsekundstillfälle"
|
||||
|
||||
#: sunrpc/rpcinfo.c:659
|
||||
#, c-format
|
||||
|
@ -2408,7 +2408,7 @@ msgstr "rpcinfo: %s
|
|||
#: sunrpc/rpcinfo.c:600
|
||||
#, c-format
|
||||
msgid "rpcinfo: Could not delete registration for prog %s version %s\n"
|
||||
msgstr "rpcinfo: Kunde inte ta bort registrering för prog %s version %s\n"
|
||||
msgstr "rpcinfo: Kunde inte ta bort registrering av prog %s version %s\n"
|
||||
|
||||
#: sunrpc/rpcinfo.c:576
|
||||
#, c-format
|
||||
|
@ -2735,17 +2735,17 @@ msgstr "anv
|
|||
#: locale/programs/charmap.c:438 locale/programs/charmap.c:492
|
||||
#, c-format
|
||||
msgid "value for %s must be an integer"
|
||||
msgstr "värdet för %s måste vara heltal"
|
||||
msgstr "värdet på %s måste vara heltal"
|
||||
|
||||
#: locale/programs/charmap.c:233
|
||||
#, c-format
|
||||
msgid "value for <%s> must lie between 1 and 4"
|
||||
msgstr "värde för <%s> måste vara mellan 1 och 4"
|
||||
msgstr "värde på <%s> måste vara mellan 1 och 4"
|
||||
|
||||
#: locale/programs/ld-monetary.c:148 locale/programs/ld-numeric.c:89
|
||||
#, c-format
|
||||
msgid "value for field `%s' in category `%s' must not be the empty string"
|
||||
msgstr "värde för fält \"%s\" i kategori \"%s\" får inte vara tom sträng"
|
||||
msgstr "värde på fält \"%s\" i kategori \"%s\" får inte vara tom sträng"
|
||||
|
||||
#: locale/programs/charmap.c:245
|
||||
msgid "value of <mb_cur_max> must be greater than the value of <mb_cur_min>"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
|
||||
before changing it!
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1996
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
|
@ -249,12 +249,31 @@ extern int strlen (const char *);
|
|||
static int first_nonopt;
|
||||
static int last_nonopt;
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Bash 2.0 gives us an environment variable containing flags
|
||||
indicating ARGV elements that should not be considered arguments. */
|
||||
|
||||
static const char *nonoption_flags;
|
||||
static int nonoption_flags_len;
|
||||
|
||||
static int original_argc;
|
||||
static char *const *original_argv;
|
||||
|
||||
/* Make sure the environment variable bash 2.0 puts in the environment
|
||||
is valid for the getopt call we must make sure that the ARGV passed
|
||||
to getopt is that one passed to the process. */
|
||||
static void store_args (int argc, char *const *argv) __attribute__ ((unused));
|
||||
static void
|
||||
store_args (int argc, char *const *argv)
|
||||
{
|
||||
/* XXX This is no good solution. We should rather copy the args so
|
||||
that we can compare them later. But we must not use malloc(3). */
|
||||
original_argc = argc;
|
||||
original_argv = argv;
|
||||
}
|
||||
text_set_element (__libc_subinit, store_args);
|
||||
#endif
|
||||
|
||||
/* Exchange two adjacent subsequences of ARGV.
|
||||
One subsequence is elements [first_nonopt,last_nonopt)
|
||||
which contains all the non-options that have been skipped so far.
|
||||
|
@ -327,10 +346,12 @@ exchange (argv)
|
|||
/* Initialize the internal data when the first call is made. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
static const char *_getopt_initialize (const char *);
|
||||
static const char *_getopt_initialize (int, char *const *, const char *);
|
||||
#endif
|
||||
static const char *
|
||||
_getopt_initialize (optstring)
|
||||
_getopt_initialize (argc, argv, optstring)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *optstring;
|
||||
{
|
||||
/* Start processing options with ARGV-element 1 (since ARGV-element 0
|
||||
|
@ -360,7 +381,9 @@ _getopt_initialize (optstring)
|
|||
else
|
||||
ordering = PERMUTE;
|
||||
|
||||
if (posixly_correct == NULL)
|
||||
#ifdef _LIBC
|
||||
if (posixly_correct == NULL
|
||||
&& argc == original_argc && argv == original_argv)
|
||||
{
|
||||
/* Bash 2.0 puts a special variable in the environment for each
|
||||
command it runs, specifying which ARGV elements are the results of
|
||||
|
@ -374,6 +397,9 @@ _getopt_initialize (optstring)
|
|||
else
|
||||
nonoption_flags_len = strlen (nonoption_flags);
|
||||
}
|
||||
else
|
||||
nonoption_flags_len = 0;
|
||||
#endif
|
||||
|
||||
return optstring;
|
||||
}
|
||||
|
@ -445,19 +471,24 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||
{
|
||||
optarg = NULL;
|
||||
|
||||
if (!__getopt_initialized)
|
||||
if (!__getopt_initialized || optind == 0)
|
||||
{
|
||||
optstring = _getopt_initialize (optstring);
|
||||
optstring = _getopt_initialize (argc, argv, optstring);
|
||||
optind = 1; /* Don't scan ARGV[0], the program name. */
|
||||
__getopt_initialized = 1;
|
||||
}
|
||||
|
||||
/* Test whether ARGV[optind] points to a non-option argument.
|
||||
Either it does not have option syntax, or there is an environment flag
|
||||
from the shell indicating it is not an option. */
|
||||
from the shell indicating it is not an option. The later information
|
||||
is only used when the used in the GNU libc. */
|
||||
#ifdef _LIBC
|
||||
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|
||||
|| (optind < nonoption_flags_len \
|
||||
&& nonoption_flags[optind] == '1'))
|
||||
#else
|
||||
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
|
||||
#endif
|
||||
|
||||
if (nextchar == NULL || *nextchar == '\0')
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ typedef __daddr_t daddr_t;
|
|||
typedef __caddr_t caddr_t;
|
||||
#endif
|
||||
|
||||
#ifdef __USE_SVID
|
||||
#if defined __USE_SVID || defined __USE_XOPEN
|
||||
typedef __key_t key_t;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||||
|
@ -333,6 +333,9 @@ extern int dup2 __P ((int __fd, int __fd2));
|
|||
|
||||
/* NULL-terminated array of "NAME=VALUE" environment variables. */
|
||||
extern char **__environ;
|
||||
#ifdef __USE_GNU
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
|
||||
/* Replace the current process, executing PATH with arguments ARGV and
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
|
@ -119,12 +119,12 @@ typedef union querybuf
|
|||
|
||||
static enum nss_status getanswer_r (const querybuf *answer, int anslen,
|
||||
const char *qname, int qtype,
|
||||
struct hostent *result,
|
||||
char *buffer, int buflen, int *h_errnop);
|
||||
struct hostent *result, char *buffer,
|
||||
size_t buflen, int *h_errnop);
|
||||
|
||||
enum nss_status
|
||||
_nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
|
||||
char *buffer, int buflen, int *h_errnop)
|
||||
char *buffer, size_t buflen, int *h_errnop)
|
||||
{
|
||||
struct host_data
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
|
|||
|
||||
enum nss_status
|
||||
_nss_dns_gethostbyname_r (const char *name, struct hostent *result,
|
||||
char *buffer, int buflen, int *h_errnop)
|
||||
char *buffer, size_t buflen, int *h_errnop)
|
||||
{
|
||||
enum nss_status status = NSS_STATUS_NOTFOUND;
|
||||
|
||||
|
@ -270,7 +270,7 @@ _nss_dns_gethostbyname_r (const char *name, struct hostent *result,
|
|||
|
||||
enum nss_status
|
||||
_nss_dns_gethostbyaddr_r (const char *addr, int len, int af,
|
||||
struct hostent *result, char *buffer, int buflen,
|
||||
struct hostent *result, char *buffer, size_t buflen,
|
||||
int *h_errnop)
|
||||
{
|
||||
static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
|
||||
|
@ -368,7 +368,8 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af,
|
|||
|
||||
static enum nss_status
|
||||
getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
|
||||
struct hostent *result, char *buffer, int buflen, int *h_errnop)
|
||||
struct hostent *result, char *buffer, size_t buflen,
|
||||
int *h_errnop)
|
||||
{
|
||||
struct host_data
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
|
@ -99,12 +99,12 @@ typedef union querybuf
|
|||
/* Prototypes for local functions. */
|
||||
static enum nss_status getanswer_r (const querybuf *answer, int anslen,
|
||||
struct netent *result, char *buffer,
|
||||
int buflen, lookup_method net_i);
|
||||
size_t buflen, lookup_method net_i);
|
||||
|
||||
|
||||
enum nss_status
|
||||
_nss_dns_getnetbyname_r (const char *name, struct netent *result,
|
||||
char *buffer, int buflen)
|
||||
char *buffer, size_t buflen)
|
||||
{
|
||||
/* Return entry for network with NAME. */
|
||||
querybuf net_buffer;
|
||||
|
@ -127,7 +127,7 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result,
|
|||
|
||||
enum nss_status
|
||||
_nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
|
||||
char *buffer, int buflen)
|
||||
char *buffer, size_t buflen)
|
||||
{
|
||||
/* Return entry for network with NAME. */
|
||||
enum nss_status status;
|
||||
|
@ -196,7 +196,7 @@ _nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
|
|||
|
||||
static enum nss_status
|
||||
getanswer_r (const querybuf *answer, int anslen, struct netent *result,
|
||||
char *buffer, int buflen, lookup_method net_i)
|
||||
char *buffer, size_t buflen, lookup_method net_i)
|
||||
{
|
||||
/*
|
||||
* Find first satisfactory answer
|
||||
|
|
|
@ -805,7 +805,7 @@ __p_rr(cp, msg, file)
|
|||
n, c);
|
||||
/* orig ttl */
|
||||
n = _getlong((u_char*)cp);
|
||||
if (n != tmpttl)
|
||||
if ((u_int32_t) n != tmpttl)
|
||||
fprintf(file, " %u", n);
|
||||
cp += INT32SZ;
|
||||
/* sig expire */
|
||||
|
@ -1434,7 +1434,7 @@ loc_ntoa(binary, ascii)
|
|||
longval = (templ - ((unsigned)1<<31));
|
||||
|
||||
GETLONG(templ, cp);
|
||||
if (templ < referencealt) { /* below WGS 84 spheroid */
|
||||
if (templ < (u_int32_t) referencealt) { /* below WGS 84 spheroid */
|
||||
altval = referencealt - templ;
|
||||
altsign = -1;
|
||||
} else {
|
||||
|
|
|
@ -340,7 +340,8 @@ res_querydomain(name, domain, class, type, answer, anslen)
|
|||
* copy without '.' if present.
|
||||
*/
|
||||
n = strlen(name) - 1;
|
||||
if (n != (0 - 1) && name[n] == '.' && n < sizeof(nbuf) - 1) {
|
||||
if (n != (0 - 1) && name[n] == '.'
|
||||
&& n < (int) (sizeof(nbuf) - 1)) {
|
||||
bcopy(name, nbuf, n);
|
||||
nbuf[n] = '\0';
|
||||
} else
|
||||
|
|
28
set-init.c
28
set-init.c
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1994, 1995, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <stdlib.h>
|
||||
#include "set-hooks.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||||
|
@ -30,7 +30,7 @@ routines := signal raise killpg \
|
|||
sigstack sigaltstack sigintr \
|
||||
sigsetops sigempty sigfillset sigaddset sigdelset sigismem \
|
||||
sigreturn \
|
||||
siggetmask bsd_signal
|
||||
siggetmask sysv_signal
|
||||
|
||||
tests := tst-signal
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 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
|
||||
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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 "sigsetops.h"
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 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
|
||||
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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 "sigsetops.h"
|
||||
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 "sigsetops.h"
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Clear all signals from SET. */
|
||||
int
|
||||
|
@ -29,5 +31,7 @@ sigemptyset (set)
|
|||
return -1;
|
||||
}
|
||||
|
||||
return __sigemptyset (set);
|
||||
memset (set, 0xff, sizeof (sigset_t));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 "sigsetops.h"
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* Set all signals in SET. */
|
||||
int
|
||||
|
@ -29,5 +30,7 @@ sigfillset (set)
|
|||
return -1;
|
||||
}
|
||||
|
||||
return __sigfillset (set);
|
||||
memset (set, 0xff, sizeof (sigset_t));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/* siggetmask -- useless alias for `sigblock (0)' for old Linux compatibility.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <signal.h>
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 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
|
||||
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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 "sigsetops.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||||
|
@ -47,20 +47,28 @@ typedef __sig_atomic_t sig_atomic_t;
|
|||
/* Type of a signal handler. */
|
||||
typedef void (*__sighandler_t) __P ((int));
|
||||
|
||||
/* Set the handler for the signal SIG to HANDLER,
|
||||
returning the old handler, or SIG_ERR on error. */
|
||||
/* Set the handler for the signal SIG to HANDLER, returning the old
|
||||
handler, or SIG_ERR on error.
|
||||
By default `signal' has the BSD semantic. */
|
||||
extern __sighandler_t signal __P ((int __sig, __sighandler_t __handler));
|
||||
|
||||
#if defined __FAVOR_BSD || defined __USE_XOPEN
|
||||
/* The X/Open definition of `signal' conflicts with the BSD version.
|
||||
So they defined another function `bsd_signal'. We will use this
|
||||
implementation as the official `signal' function if the BSD
|
||||
interface is preferred. */
|
||||
extern __sighandler_t bsd_signal __P ((int __sig, __sighandler_t __handler));
|
||||
#if defined __USE_XOPEN && !defined __USE_GNU
|
||||
/* The X/Open definition of `signal' specifies the SVID semantic. Use
|
||||
the additional function `sysv_signal' when X/Open compatibility is
|
||||
requested. */
|
||||
extern __sighandler_t __sysv_signal __P ((int __sig,
|
||||
__sighandler_t __handler));
|
||||
extern __sighandler_t sysv_signal __P ((int __sig, __sighandler_t __handler));
|
||||
|
||||
#ifdef __FAVOR_BSD
|
||||
#define signal(sig, handler) bsd_signal ((sig), (handler))
|
||||
/* Make sure the used `signal' implementation is the SVID version. */
|
||||
#define signal(sig, handler) __sysv_signal ((sig), (handler))
|
||||
#endif
|
||||
|
||||
#ifdef __USE_XOPEN
|
||||
/* The X/Open definition of `signal' conflicts with the BSD version.
|
||||
So they defined another function `bsd_signal'. */
|
||||
extern __sighandler_t __bsd_signal __P ((int __sig, __sighandler_t __handler));
|
||||
extern __sighandler_t bsd_signal __P ((int __sig, __sighandler_t __handler));
|
||||
#endif
|
||||
|
||||
/* Send signal SIG to process number PID. If PID is zero,
|
||||
|
@ -103,13 +111,14 @@ extern int __sigsetmask __P ((int __mask));
|
|||
/* The `sigpause' function has two different interfaces. The original
|
||||
BSD definition defines the argument as a mask of the signal, while
|
||||
the more modern interface in X/Open defines it as the signal
|
||||
number. We go with the more modern version unless the user
|
||||
explitcly selects the BSD version. */
|
||||
number. We go with the BSD version unless the user explicitly
|
||||
selects the X/Open version. */
|
||||
extern int __sigpause __P ((int __sig_or_mask, int __is_sig));
|
||||
|
||||
#if defined __USE_BSD && !defined __USE_XOPEN
|
||||
#if defined __USE_BSD || defined __USE_GNU
|
||||
/* Set the mask of blocked signals to MASK,
|
||||
wait for a signal to arrive, and then restore the mask. */
|
||||
extern int sigpause __P ((int __mask));
|
||||
#define sigpause(mask) __sigpause ((mask), 0)
|
||||
#else
|
||||
#ifdef __USE_XOPEN
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 95, 96, 97 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
|
||||
|
@ -164,7 +164,7 @@ extern size_t strnlen __P ((__const char *__string, size_t __maxlen));
|
|||
extern __inline size_t
|
||||
strnlen (__const char *__string, size_t __maxlen)
|
||||
{
|
||||
__const char *__end = memchr (__string, '\0', __maxlen);
|
||||
__const char *__end = (__const char *) memchr (__string, '\0', __maxlen);
|
||||
return __end ? __end - __string : __maxlen;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson <rth@tamu.edu>.
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
|||
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. */
|
||||
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. */
|
||||
|
||||
/* This was written in the absence of an ABI -- don't expect
|
||||
it to remain unchanged. */
|
||||
|
@ -43,7 +43,12 @@ elf_machine_matches_host (Elf64_Word e_machine)
|
|||
static inline Elf64_Addr
|
||||
elf_machine_dynamic (void)
|
||||
{
|
||||
#ifdef AXP_MULTI_GOT_LD
|
||||
return (Elf64_Addr) &_DYNAMIC;
|
||||
#else
|
||||
register Elf64_Addr *gp __asm__ ("$29");
|
||||
return gp[-4096];
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Return the run-time load address of the shared object. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1993, 1995, 1996, 1997 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
|
||||
|
@ -20,11 +20,12 @@
|
|||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Try to get a machine dependent instruction which will make the
|
||||
program crash. This is used in case everything else fails. */
|
||||
#include "abort-instr.h"
|
||||
#include <abort-instr.h>
|
||||
#ifndef ABORT_INSTRUCTION
|
||||
/* No such instruction is available. */
|
||||
# define ABORT_INSTRUCTION
|
||||
|
@ -46,7 +47,7 @@ abort (void)
|
|||
sigset_t sigs;
|
||||
|
||||
/* First acquire the lock. */
|
||||
__libc_lock_lock (lock);
|
||||
__libc_lock_lock_recursive (lock);
|
||||
|
||||
/* Now it's for sure we are alone. But recursive calls are possible. */
|
||||
|
||||
|
@ -70,8 +71,19 @@ abort (void)
|
|||
/* Send signal which possibly calls a user handler. */
|
||||
if (stage == 2)
|
||||
{
|
||||
++stage;
|
||||
/* This stage is special: we must allow repeated calls of
|
||||
`abort' when a user defined handler for SIGABRT is installed.
|
||||
This is risky since the `raise' implementation might also
|
||||
fail but I don't see another possiblity. */
|
||||
int save_stage = stage;
|
||||
|
||||
stage = 0;
|
||||
__libc_lock_unlock_recursive (lock);
|
||||
|
||||
raise (SIGABRT);
|
||||
|
||||
__libc_lock_lock_recursive (lock);
|
||||
stage = save_stage + 1;
|
||||
}
|
||||
|
||||
/* There was a handler installed. Now remove it. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 94, 95, 96, 97 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
|
||||
|
@ -29,17 +29,17 @@ typedef unsigned long __u_long;
|
|||
#ifdef __GNUC__
|
||||
typedef unsigned long long int __u_quad_t;
|
||||
typedef long long int __quad_t;
|
||||
typedef __quad_t *__qaddr_t;
|
||||
#else
|
||||
typedef struct
|
||||
{
|
||||
long val[2];
|
||||
long __val[2];
|
||||
} __quad_t;
|
||||
typedef struct
|
||||
{
|
||||
__u_long val[2];
|
||||
__u_long __val[2];
|
||||
} __u_quad_t;
|
||||
#endif
|
||||
typedef __quad_t *__qaddr_t;
|
||||
typedef int __dev_t; /* Type of device numbers. */
|
||||
typedef unsigned int __uid_t; /* Type of user identifications. */
|
||||
typedef unsigned int __gid_t; /* Type of group identifications. */
|
||||
|
@ -72,17 +72,10 @@ typedef long int __key_t; /* Type of an IPC key */
|
|||
|
||||
typedef struct
|
||||
{
|
||||
/* Some braindead old software uses this member name. */
|
||||
/* XPG4.2 requires this member name. */
|
||||
unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
|
||||
} __fd_set;
|
||||
|
||||
typedef unsigned long __fd_mask;
|
||||
|
||||
/* This line MUST be split! Otherwise m4 will not change it. */
|
||||
#define __FD_ZERO(set) \
|
||||
((void) memset ((__ptr_t) (set), 0, sizeof (fd_set)))
|
||||
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
|
||||
#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
|
||||
#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
|
||||
typedef unsigned long int __fd_mask;
|
||||
|
||||
#endif /* gnu/types.h */
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* Copyright (C) 1997 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. */
|
||||
|
||||
#ifndef _SELECTBITS_H
|
||||
#define _SELECTBITS_H 1
|
||||
|
||||
/* This line MUST be split! Otherwise m4 will not change it. */
|
||||
#define __FD_ZERO(set) \
|
||||
((void) memset ((__ptr_t) (set), 0, sizeof (fd_set)))
|
||||
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
|
||||
#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
|
||||
#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
|
||||
|
||||
#endif /* selectbits.h */
|
|
@ -1,45 +1,47 @@
|
|||
/* `struct termios' speed frobnication functions. 4.4 BSD/generic GNU version.
|
||||
Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1991, 1992, 1993, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <ansidecl.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
|
||||
/* Return the output baud rate stored in *TERMIOS_P. */
|
||||
speed_t
|
||||
DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p)
|
||||
cfgetospeed (termios_p)
|
||||
const struct termios *termios_p;
|
||||
{
|
||||
return termios_p->__ospeed;
|
||||
}
|
||||
|
||||
/* Return the input baud rate stored in *TERMIOS_P. */
|
||||
speed_t
|
||||
DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p)
|
||||
cfgetispeed (termios_p)
|
||||
const struct termios *termios_p;
|
||||
{
|
||||
return termios_p->__ispeed;
|
||||
}
|
||||
|
||||
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
|
||||
int
|
||||
DEFUN(cfsetospeed, (termios_p, speed),
|
||||
struct termios *termios_p AND speed_t speed)
|
||||
cfsetospeed (termios_p, speed)
|
||||
struct termios *termios_p;
|
||||
speed_t speed;
|
||||
{
|
||||
if (termios_p == NULL)
|
||||
{
|
||||
|
@ -53,8 +55,9 @@ DEFUN(cfsetospeed, (termios_p, speed),
|
|||
|
||||
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
|
||||
int
|
||||
DEFUN(cfsetispeed, (termios_p, speed),
|
||||
struct termios *termios_p AND speed_t speed)
|
||||
cfsetispeed (termios_p, speed)
|
||||
struct termios *termios_p;
|
||||
speed_t speed;
|
||||
{
|
||||
if (termios_p == NULL)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
/* Copyright (C) 1997 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. */
|
||||
|
||||
#ifndef _SELECTBITS_H
|
||||
#define _SELECTBITS_H 1
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
|
||||
#define __FD_ZERO(fdsetp) \
|
||||
__asm__ __volatile__ ("cld ; rep ; stosl" \
|
||||
: "=m" (*(__fd_set *) (fdsetp)) \
|
||||
: "a" (0), "c" (sizeof (__fd_set) \
|
||||
/ sizeof (__fd_mask)), \
|
||||
"D" ((__fd_set *) (fdsetp)) \
|
||||
:"cx","di")
|
||||
#define __FD_SET(fd, fdsetp) \
|
||||
__asm__ __volatile__ ("btsl %1,%0" \
|
||||
: "=m" (*(__fd_set *) (fdsetp)) \
|
||||
: "r" ((int) (fd)))
|
||||
#define __FD_CLR(fd, fdsetp) \
|
||||
__asm__ __volatile__ ("btrl %1,%0" \
|
||||
: "=m" (*(__fd_set *) (fdsetp)) \
|
||||
: "r" ((int) (fd)))
|
||||
#define __FD_ISSET(fd, fdsetp) \
|
||||
(__extension__ \
|
||||
({unsigned char __result; \
|
||||
__asm__ __volatile__ ("btl %1,%2 ; setb %0" \
|
||||
: "=q" (__result) \
|
||||
: "r" ((int) (fd)), "m" (*(__fd_set *) (fdsetp))); \
|
||||
__result; }))
|
||||
|
||||
#else /* ! GNU CC */
|
||||
|
||||
#define __FD_ZERO(set) \
|
||||
((void) memset ((__ptr_t) (set), 0, sizeof (fd_set)))
|
||||
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
|
||||
#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
|
||||
#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
|
||||
|
||||
#endif /* GNU CC */
|
||||
|
||||
#endif /* selectbits.h */
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
/* BSD-like signal function.
|
||||
Copyright (C) 1991, 1992, 1996, 1997 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
|
||||
|
@ -20,10 +21,12 @@
|
|||
#include <signal.h>
|
||||
|
||||
|
||||
sigset_t _sigintr; /* Set by siginterrupt. */
|
||||
|
||||
/* Set the handler for the signal SIG to HANDLER,
|
||||
returning the old handler, or SIG_ERR on error. */
|
||||
__sighandler_t
|
||||
signal (sig, handler)
|
||||
__bsd_signal (sig, handler)
|
||||
int sig;
|
||||
__sighandler_t handler;
|
||||
{
|
||||
|
@ -39,12 +42,12 @@ signal (sig, handler)
|
|||
act.sa_handler = handler;
|
||||
if (__sigemptyset (&act.sa_mask) < 0)
|
||||
return SIG_ERR;
|
||||
act.sa_flags = SA_ONESHOT | SA_NOMASK | SA_INTERRUPT;
|
||||
act.sa_flags &= ~SA_RESTART;
|
||||
act.sa_flags = __sigismember (&_sigintr, sig) ? 0 : SA_RESTART;
|
||||
if (__sigaction (sig, &act, &oact) < 0)
|
||||
return SIG_ERR;
|
||||
|
||||
return oact.sa_handler;
|
||||
}
|
||||
|
||||
weak_alias (signal, ssignal)
|
||||
weak_alias (__bsd_signal, bsd_signal)
|
||||
weak_alias (__bsd_signal, signal)
|
||||
weak_alias (__bsd_signal, ssignal)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 94, 95, 96, 97 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
|
||||
|
@ -33,7 +33,7 @@ __sigpause (sig_or_mask, is_sig)
|
|||
{
|
||||
/* The modern X/Open implementation is requested. */
|
||||
if (sigprocmask (0, NULL, &set) < 0
|
||||
/* Yes, we call `sigaddset' and not `__sigaddset'. */
|
||||
/* Yes, we call `sigdelset' and not `__sigdelset'. */
|
||||
|| sigdelset (&set, sig_or_mask) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
@ -66,4 +66,5 @@ __default_sigpause (mask)
|
|||
{
|
||||
return __sigpause (mask, 0);
|
||||
}
|
||||
#undef sigpause
|
||||
weak_alias (__default_sigpause, sigpause)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* X/Open compatibility function.
|
||||
Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1996, 1997 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
|
||||
|
@ -20,13 +19,21 @@
|
|||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
sigset_t _sigintr; /* Set by siginterrupt. */
|
||||
/* Tolerate non-threads versions of Posix */
|
||||
#ifndef SA_ONESHOT
|
||||
#define SA_ONESHOT 0
|
||||
#endif
|
||||
#ifndef SA_NOMASK
|
||||
#define SA_NOMASK 0
|
||||
#endif
|
||||
#ifndef SA_INTERRUPT
|
||||
#define SA_INTERRUPT 0
|
||||
#endif
|
||||
|
||||
/* Set the handler for the signal SIG to HANDLER,
|
||||
returning the old handler, or SIG_ERR on error. */
|
||||
__sighandler_t
|
||||
bsd_signal (sig, handler)
|
||||
__sysv_signal (sig, handler)
|
||||
int sig;
|
||||
__sighandler_t handler;
|
||||
{
|
||||
|
@ -42,7 +49,8 @@ bsd_signal (sig, handler)
|
|||
act.sa_handler = handler;
|
||||
if (__sigemptyset (&act.sa_mask) < 0)
|
||||
return SIG_ERR;
|
||||
act.sa_flags = __sigismember (&_sigintr, sig) ? 0 : SA_RESTART;
|
||||
act.sa_flags = SA_ONESHOT | SA_NOMASK | SA_INTERRUPT;
|
||||
act.sa_flags &= ~SA_RESTART;
|
||||
if (__sigaction (sig, &act, &oact) < 0)
|
||||
return SIG_ERR;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/* libc-internal interface for mutex locks. Stub version.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 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
|
||||
|
@ -33,6 +33,10 @@
|
|||
/* Define an initialized lock variable NAME with storage class CLASS. */
|
||||
#define __libc_lock_define_initialized(CLASS,NAME)
|
||||
|
||||
/* Define an initialized recursive lock variable NAME with storage
|
||||
class CLASS. */
|
||||
#define __libc_lock_define_initialized_recursive(CLASS,NAME)
|
||||
|
||||
/* Initialize the named lock variable, leaving it in a consistent, unlocked
|
||||
state. */
|
||||
#define __libc_lock_init(NAME)
|
||||
|
@ -45,15 +49,27 @@
|
|||
called on a lock variable before the containing storage is reused. */
|
||||
#define __libc_lock_fini(NAME)
|
||||
|
||||
/* Finalize recursive named lock. */
|
||||
#define __libc_lock_fini_recursive(NAME)
|
||||
|
||||
/* Lock the named lock variable. */
|
||||
#define __libc_lock_lock(NAME)
|
||||
|
||||
/* Try tp lock the named lock variable. */
|
||||
/* Lock the recursive named lock variable. */
|
||||
#define __libc_lock_lock_recursive(NAME)
|
||||
|
||||
/* Try to lock the named lock variable. */
|
||||
#define __libc_lock_trylock(NAME) 0
|
||||
|
||||
/* Try to lock the recursive named lock variable. */
|
||||
#define __libc_lock_trylock_recursive(NAME) 0
|
||||
|
||||
/* Unlock the named lock variable. */
|
||||
#define __libc_lock_unlock(NAME)
|
||||
|
||||
/* Unlock the recursive named lock variable. */
|
||||
#define __libc_lock_unlock_recursive(NAME)
|
||||
|
||||
/* Start critical region with cleanup. */
|
||||
#define __libc_cleanup_region_start(FCT, ARG)
|
||||
|
||||
|
|
|
@ -28,3 +28,15 @@ __sigpause (sig_or_mask, is_sig)
|
|||
return -1;
|
||||
}
|
||||
stub_warning (__sigpause)
|
||||
|
||||
|
||||
int __default_sigpause __P ((int mask));
|
||||
int
|
||||
__default_sigpause (mask)
|
||||
int mask;
|
||||
{
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
weak_alias (__default_sigpause, sigpause)
|
||||
stub_warning (sigpause)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||||
|
@ -12,9 +12,9 @@
|
|||
# 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., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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.
|
||||
|
||||
# The unix-specific configure fragment writes `unix-generated' in config.make.
|
||||
config-generated := $(config-generated) $(unix-generated)
|
||||
|
@ -227,9 +227,9 @@ endif
|
|||
endif # stdio-common
|
||||
|
||||
ifeq (,$(filter-out $(sysdep_dir)/stub/ $(common-objpfx),\
|
||||
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/syscall.h))))))
|
||||
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/sys/syscall.h))))))
|
||||
|
||||
# The syscall code assumes a file <syscall.h> that defines macros
|
||||
# The syscall code assumes a file <sys/syscall.h> that defines macros
|
||||
# `SYS_call' for syscall `call'. Variations on this I have seen include:
|
||||
# it's in <sys/syscall.h>;
|
||||
# it's in <sys.s>;
|
||||
|
@ -246,7 +246,8 @@ syscall.h := $(firstword $(wildcard $(addprefix $(sysincludedir)/, \
|
|||
ifdef syscall.h
|
||||
|
||||
# Transmogrify any of several formats of the file into the one we want.
|
||||
$(common-objpfx)syscall.h: $(syscall.h)
|
||||
$(common-objpfx)sys/syscall.h: $(syscall.h)
|
||||
-mkdir $(common-objpfx)sys
|
||||
tr '[A-Z]' '[a-z]' < $< | \
|
||||
sed -e 's/[ ]sys_/ /' \
|
||||
-e 's/^#define[ ]*\([a-z0-9_]*\)[ ]*/#define SYS_\1 /' \
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1994, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <sys/poll.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1993, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <errno.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <errno.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <errno.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <ansidecl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
@ -24,10 +23,12 @@ Cambridge, MA 02139, USA. */
|
|||
|
||||
/* Return the foreground process group ID of FD. */
|
||||
pid_t
|
||||
DEFUN(tcgetpgrp, (fd), int fd)
|
||||
tcgetpgrp (fd)
|
||||
int fd;
|
||||
{
|
||||
int pgrp;
|
||||
if (__ioctl(fd, TIOCGPGRP, &pgrp) < 0)
|
||||
|
||||
if (__ioctl (fd, TIOCGPGRP, &pgrp) < 0)
|
||||
return (pid_t) -1;
|
||||
return (pid_t) pgrp;
|
||||
}
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <ansidecl.h>
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <signal.h>
|
||||
|
@ -29,7 +28,9 @@ Cambridge, MA 02139, USA. */
|
|||
|
||||
/* Send zero bits on FD. */
|
||||
int
|
||||
DEFUN(tcsendbreak, (fd, duration), int fd AND int duration)
|
||||
tcsendbreak (fd, duration)
|
||||
int fd;
|
||||
int duration;
|
||||
{
|
||||
struct timeval delay;
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <ansidecl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
|
@ -24,7 +23,9 @@ Cambridge, MA 02139, USA. */
|
|||
|
||||
/* Set the foreground process group ID of FD set PGRP_ID. */
|
||||
int
|
||||
DEFUN(tcsetpgrp, (fd, pgrp_id), int fd AND pid_t pgrp_id)
|
||||
tcsetpgrp (fd, pgrp_id)
|
||||
int fd;
|
||||
pid_t pgrp_id;
|
||||
{
|
||||
return __ioctl(fd, TIOCSPGRP, &pgrp_id);
|
||||
return __ioctl (fd, TIOCSPGRP, &pgrp_id);
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1993, 1995, 1996, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
#include <ansidecl.h>
|
||||
/* Copyright (C) 1996, 1997 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 <stddef.h>
|
||||
|
||||
#ifndef HAVE_GNU_LD
|
||||
|
@ -7,40 +24,39 @@
|
|||
|
||||
/* This is a list of all known signal numbers. */
|
||||
|
||||
CONST char *CONST _sys_siglist[] =
|
||||
const char *const _sys_siglist[] =
|
||||
{
|
||||
"Signal 0",
|
||||
"Hangup",
|
||||
"Interrupt",
|
||||
"Quit",
|
||||
"Illegal instruction",
|
||||
"Trace/BPT trap",
|
||||
"IOT trap",
|
||||
"EMT trap",
|
||||
"Floating point exception",
|
||||
"Killed",
|
||||
"Bus error",
|
||||
"Segmentation fault",
|
||||
"Bad system call",
|
||||
"Broken pipe",
|
||||
"Alarm clock",
|
||||
"Terminated",
|
||||
"Urgent I/O condition",
|
||||
"Stopped (signal)",
|
||||
"Stopped",
|
||||
"Continued",
|
||||
"Child exited",
|
||||
"Stopped (tty input)",
|
||||
"Stopped (tty output)",
|
||||
"I/O possible",
|
||||
"Cputime limit exceeded",
|
||||
"Filesize limit exceeded",
|
||||
"Virtual timer expired",
|
||||
"Profiling timer expired",
|
||||
"Window changed",
|
||||
"Resource lost",
|
||||
"User defined signal 1",
|
||||
"User defined signal 2",
|
||||
N_("Signal 0"),
|
||||
N_("Hangup"),
|
||||
N_("Interrupt"),
|
||||
N_("Quit"),
|
||||
N_("Illegal instruction"),
|
||||
N_("Trace/BPT trap"),
|
||||
N_("IOT trap"),
|
||||
N_("EMT trap"),
|
||||
N_("Floating point exception"),
|
||||
N_("Killed"),
|
||||
N_("Bus error"),
|
||||
N_("Segmentation fault"),
|
||||
N_("Bad system call"),
|
||||
N_("Broken pipe"),
|
||||
N_("Alarm clock"),
|
||||
N_("Terminated"),
|
||||
N_("Urgent I/O condition"),
|
||||
N_("Stopped (signal)"),
|
||||
N_("Stopped"),
|
||||
N_("Continued"),
|
||||
N_("Child exited"),
|
||||
N_("Stopped (tty input)"),
|
||||
N_("Stopped (tty output)"),
|
||||
N_("I/O possible"),
|
||||
N_("Cputime limit exceeded"),
|
||||
N_("Filesize limit exceeded"),
|
||||
N_("Virtual timer expired"),
|
||||
N_("Profiling timer expired"),
|
||||
N_("Window changed"),
|
||||
N_("Resource lost"),
|
||||
N_("User defined signal 1"),
|
||||
N_("User defined signal 2"),
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <sysdeps/generic/sysdep.h>
|
||||
|
||||
#include <syscall.h>
|
||||
#include <sys/syscall.h>
|
||||
#define HAVE_SYSCALLS
|
||||
|
||||
/* Note that using a `PASTE' macro loses. */
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1993, 1995, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <ansidecl.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -25,8 +24,11 @@ Cambridge, MA 02139, USA. */
|
|||
extern int __getdents __P ((int fd, char *buf, size_t nbytes));
|
||||
|
||||
int
|
||||
DEFUN(__getdirentries, (fd, buf, nbytes, basep),
|
||||
int fd AND char *buf AND size_t nbytes AND off_t *basep)
|
||||
__getdirentries (fd, buf, nbytes, basep)
|
||||
int fd;
|
||||
char *buf;
|
||||
size_t nbytes;
|
||||
off_t *basep;
|
||||
{
|
||||
if (basep)
|
||||
*basep = __lseek (fd, (off_t) 0, SEEK_CUR);
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1994, 1995, 1997 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 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.
|
||||
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., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
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 <sysdep.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
init-first.h
|
||||
kernel_termios.h
|
||||
llseek.c
|
||||
siglist.h
|
||||
sysctl.c
|
||||
|
|
|
@ -13,7 +13,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
|
|||
sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h
|
||||
|
||||
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
|
||||
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/syscall.h
|
||||
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
|
||||
rm -f $(@:.h=.d)
|
||||
echo > $(@:.d=.h).new \
|
||||
'/* Generated at libc build time from kernel syscall list. */'
|
||||
|
|
|
@ -4,3 +4,5 @@ ioperm.c
|
|||
init-first.h
|
||||
clone.S
|
||||
sys/io.h
|
||||
kernel_termios.h
|
||||
sys/acct.h
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
/* Copyright (C) 1991, 92, 94, 95, 96, 97 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. */
|
||||
|
||||
#ifndef _GNU_TYPES_H
|
||||
#define _GNU_TYPES_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
/* Convenience types. */
|
||||
typedef unsigned char __u_char;
|
||||
typedef unsigned short __u_short;
|
||||
typedef unsigned int __u_int;
|
||||
typedef unsigned long __u_long;
|
||||
#ifdef __GNUC__
|
||||
typedef unsigned long long int __u_quad_t;
|
||||
typedef long long int __quad_t;
|
||||
#else
|
||||
typedef struct
|
||||
{
|
||||
long int __val[2];
|
||||
} __quad_t;
|
||||
typedef struct
|
||||
{
|
||||
__u_long __val[2];
|
||||
} __u_quad_t;
|
||||
#endif
|
||||
typedef __quad_t *__qaddr_t;
|
||||
|
||||
typedef __u_long __dev_t; /* Type of device numbers. */
|
||||
typedef __u_int __uid_t; /* Type of user identifications. */
|
||||
typedef __u_int __gid_t; /* Type of group identifications. */
|
||||
typedef __u_int __ino_t; /* Type of file serial numbers. */
|
||||
typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
|
||||
typedef __u_int __nlink_t; /* Type of file link counts. */
|
||||
typedef long int __off_t; /* Type of file sizes and offsets. */
|
||||
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
|
||||
typedef int __pid_t; /* Type of process identifications. */
|
||||
typedef long int __ssize_t; /* Type of a byte count, or error. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int __val[2];
|
||||
} __fsid_t; /* Type of file system IDs. */
|
||||
|
||||
/* Everythin' else. */
|
||||
typedef int __daddr_t; /* The type of a disk address. */
|
||||
typedef char *__caddr_t;
|
||||
typedef long int __time_t;
|
||||
typedef long int __swblk_t; /* Type of a swap block maybe? */
|
||||
|
||||
typedef long int __clock_t;
|
||||
|
||||
/* One element in the file descriptor mask array. */
|
||||
typedef unsigned int __fd_mask;
|
||||
|
||||
/* Number of descriptors that can fit in an `fd_set'. */
|
||||
#define __FD_SETSIZE 1024
|
||||
|
||||
/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
|
||||
#define __NFDBITS (8 * sizeof (__fd_mask))
|
||||
#define __FDELT(d) ((d) / __NFDBITS)
|
||||
#define __FDMASK(d) (1 << ((d) % __NFDBITS))
|
||||
|
||||
/* fd_set for select and pselect. */
|
||||
typedef struct
|
||||
{
|
||||
/* XPG4.2 requires this member name. */
|
||||
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
|
||||
} __fd_set;
|
||||
|
||||
|
||||
typedef int __key_t;
|
||||
|
||||
#endif /* gnu/types.h */
|
|
@ -0,0 +1,123 @@
|
|||
/* Structure types for pre-termios terminal ioctls. Linux version.
|
||||
Copyright (C) 1996, 1997 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. */
|
||||
|
||||
#ifndef _IOCTL_TYPES_H
|
||||
#define _IOCTL_TYPES_H 1
|
||||
|
||||
/* Get definition of constants for use with `ioctl'. */
|
||||
#include <asm/ioctl.h>
|
||||
|
||||
|
||||
#define FIOCLEX _IO('f', 1)
|
||||
#define FIONCLEX _IO('f', 2)
|
||||
#define FIOASYNC _IOW('f', 125, int)
|
||||
#define FIONBIO _IOW('f', 126, int)
|
||||
#define FIONREAD _IOR('f', 127, int)
|
||||
#define TIOCINQ FIONREAD
|
||||
|
||||
#define TIOCGETP _IOR('t', 8, struct sgttyb)
|
||||
#define TIOCSETP _IOW('t', 9, struct sgttyb)
|
||||
#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */
|
||||
|
||||
#define TIOCSETC _IOW('t', 17, struct tchars)
|
||||
#define TIOCGETC _IOR('t', 18, struct tchars)
|
||||
#define TCGETS _IOR('t', 19, struct termios)
|
||||
#define TCSETS _IOW('t', 20, struct termios)
|
||||
#define TCSETSW _IOW('t', 21, struct termios)
|
||||
#define TCSETSF _IOW('t', 22, struct termios)
|
||||
|
||||
#define TCGETA _IOR('t', 23, struct termio)
|
||||
#define TCSETA _IOW('t', 24, struct termio)
|
||||
#define TCSETAW _IOW('t', 25, struct termio)
|
||||
#define TCSETAF _IOW('t', 28, struct termio)
|
||||
|
||||
#define TCSBRK _IO('t', 29)
|
||||
#define TCXONC _IO('t', 30)
|
||||
#define TCFLSH _IO('t', 31)
|
||||
|
||||
#define TIOCSWINSZ _IOW('t', 103, struct winsize)
|
||||
#define TIOCGWINSZ _IOR('t', 104, struct winsize)
|
||||
#define TIOCSTART _IO('t', 110) /* start output, like ^Q */
|
||||
#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
|
||||
#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
|
||||
|
||||
#define TIOCGLTC _IOR('t', 116, struct ltchars)
|
||||
#define TIOCSLTC _IOW('t', 117, struct ltchars)
|
||||
#define TIOCSPGRP _IOW('t', 118, int)
|
||||
#define TIOCGPGRP _IOR('t', 119, int)
|
||||
|
||||
#define TIOCEXCL 0x540C
|
||||
#define TIOCNXCL 0x540D
|
||||
#define TIOCSCTTY 0x540E
|
||||
|
||||
#define TIOCSTI 0x5412
|
||||
#define TIOCMGET 0x5415
|
||||
#define TIOCMBIS 0x5416
|
||||
#define TIOCMBIC 0x5417
|
||||
#define TIOCMSET 0x5418
|
||||
# define TIOCM_LE 0x001
|
||||
# define TIOCM_DTR 0x002
|
||||
# define TIOCM_RTS 0x004
|
||||
# define TIOCM_ST 0x008
|
||||
# define TIOCM_SR 0x010
|
||||
# define TIOCM_CTS 0x020
|
||||
# define TIOCM_CAR 0x040
|
||||
# define TIOCM_RNG 0x080
|
||||
# define TIOCM_DSR 0x100
|
||||
# define TIOCM_CD TIOCM_CAR
|
||||
# define TIOCM_RI TIOCM_RNG
|
||||
|
||||
#define TIOCGSOFTCAR 0x5419
|
||||
#define TIOCSSOFTCAR 0x541A
|
||||
#define TIOCLINUX 0x541C
|
||||
#define TIOCCONS 0x541D
|
||||
#define TIOCGSERIAL 0x541E
|
||||
#define TIOCSSERIAL 0x541F
|
||||
#define TIOCPKT 0x5420
|
||||
# define TIOCPKT_DATA 0
|
||||
# define TIOCPKT_FLUSHREAD 1
|
||||
# define TIOCPKT_FLUSHWRITE 2
|
||||
# define TIOCPKT_STOP 4
|
||||
# define TIOCPKT_START 8
|
||||
# define TIOCPKT_NOSTOP 16
|
||||
# define TIOCPKT_DOSTOP 32
|
||||
|
||||
|
||||
#define TIOCNOTTY 0x5422
|
||||
#define TIOCSETD 0x5423
|
||||
#define TIOCGETD 0x5424
|
||||
#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
|
||||
#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
|
||||
|
||||
#define TIOCSERCONFIG 0x5453
|
||||
#define TIOCSERGWILD 0x5454
|
||||
#define TIOCSERSWILD 0x5455
|
||||
#define TIOCGLCKTRMIOS 0x5456
|
||||
#define TIOCSLCKTRMIOS 0x5457
|
||||
#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
|
||||
#define TIOCSERGETLSR 0x5459 /* Get line status register */
|
||||
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
|
||||
# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
|
||||
#define TIOCSERGETMULTI 0x545A /* Get multiport config */
|
||||
#define TIOCSERSETMULTI 0x545B /* Set multiport config */
|
||||
|
||||
#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
|
||||
#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
|
||||
|
||||
#endif /* ioctl-types.h */
|
|
@ -0,0 +1,18 @@
|
|||
/* The following corresponds to the values from the Linux 2.1.20 kernel. */
|
||||
|
||||
#define KERNEL_NCCS 19
|
||||
|
||||
struct kernel_termios
|
||||
{
|
||||
tcflag_t c_iflag; /* input mode flags */
|
||||
tcflag_t c_oflag; /* output mode flags */
|
||||
tcflag_t c_cflag; /* control mode flags */
|
||||
tcflag_t c_lflag; /* local mode flags */
|
||||
cc_t c_cc[KERNEL_NCCS]; /* control characters */
|
||||
cc_t c_line; /* line discipline */
|
||||
speed_t c_ispeed; /* input speed */
|
||||
speed_t c_ospeed; /* output speed */
|
||||
};
|
||||
|
||||
#define _HAVE_C_ISPEED 1
|
||||
#define _HAVE_C_OSPEED 1
|
|
@ -0,0 +1,66 @@
|
|||
/* Copyright (C) 1996, 1997 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. */
|
||||
|
||||
#ifndef _SYS_ACCT_H
|
||||
|
||||
#define _SYS_ACCT_H 1
|
||||
#include <features.h>
|
||||
|
||||
#define __need_time_t
|
||||
#include <time.h>
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define ACCT_COMM 16
|
||||
|
||||
struct acct
|
||||
{
|
||||
char ac_comm[ACCT_COMM]; /* Accounting command name. */
|
||||
time_t ac_utime; /* Accounting user time. */
|
||||
time_t ac_stime; /* Accounting system time. */
|
||||
time_t ac_etime; /* Accounting elapsed time. */
|
||||
time_t ac_btime; /* Beginning time. */
|
||||
unsigned int ac_uid; /* Accounting user ID. */
|
||||
unsigned int ac_gid; /* Accounting group ID. */
|
||||
unsigned int ac_tty; /* Controlling tty. */
|
||||
/* Please note that the value of the `ac_tty' field, a device number,
|
||||
is encoded differently in the kernel and for the libc dev_t type. */
|
||||
char ac_flag; /* Accounting flag. */
|
||||
long int ac_minflt; /* Accounting minor pagefaults. */
|
||||
long int ac_majflt; /* Accounting major pagefaults. */
|
||||
long int ac_exitcode; /* Accounting process exitcode. */
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
AFORK = 0001, /* Has executed fork, but no exec. */
|
||||
ASU = 0002, /* Used super-user privileges. */
|
||||
ACORE = 0004, /* Dumped core. */
|
||||
AXSIG = 0010 /* Killed by a signal. */
|
||||
};
|
||||
|
||||
#define AHZ 100
|
||||
|
||||
|
||||
/* Switch process accounting on and off. */
|
||||
extern int acct __P ((__const char *__filename));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* sys/acct.h */
|
|
@ -0,0 +1,188 @@
|
|||
/* termios type and macro definitions. Linux version.
|
||||
Copyright (C) 1993, 1994, 1995, 1996, 1997 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. */
|
||||
|
||||
typedef unsigned char cc_t;
|
||||
typedef unsigned int speed_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
|
||||
#define NCCS 32
|
||||
struct termios
|
||||
{
|
||||
tcflag_t c_iflag; /* input mode flags */
|
||||
tcflag_t c_oflag; /* output mode flags */
|
||||
tcflag_t c_cflag; /* control mode flags */
|
||||
tcflag_t c_lflag; /* local mode flags */
|
||||
cc_t c_cc[NCCS]; /* control characters */
|
||||
cc_t c_line; /* line discipline (== c_cc[19]) */
|
||||
speed_t c_ispeed; /* input speed */
|
||||
speed_t c_ospeed; /* output speed */
|
||||
};
|
||||
|
||||
/* c_cc characters */
|
||||
#define VEOF 0
|
||||
#define VEOL 1
|
||||
#define VEOL2 2
|
||||
#define VERASE 3
|
||||
#define VWERASE 4
|
||||
#define VKILL 5
|
||||
#define VREPRINT 6
|
||||
#define VSWTC 7
|
||||
#define VINTR 8
|
||||
#define VQUIT 9
|
||||
#define VSUSP 10
|
||||
#define VSTART 12
|
||||
#define VSTOP 13
|
||||
#define VLNEXT 14
|
||||
#define VDISCARD 15
|
||||
#define VMIN 16
|
||||
#define VTIME 17
|
||||
|
||||
/* c_iflag bits */
|
||||
#define IGNBRK 0000001
|
||||
#define BRKINT 0000002
|
||||
#define IGNPAR 0000004
|
||||
#define PARMRK 0000010
|
||||
#define INPCK 0000020
|
||||
#define ISTRIP 0000040
|
||||
#define INLCR 0000100
|
||||
#define IGNCR 0000200
|
||||
#define ICRNL 0000400
|
||||
#define IXON 0001000
|
||||
#define IXOFF 0002000
|
||||
#ifdef __USE_BSD
|
||||
/* POSIX.1 doesn't want these... */
|
||||
# define IXANY 0004000
|
||||
# define IUCLC 0010000
|
||||
# define IMAXBEL 0020000
|
||||
#endif
|
||||
|
||||
/* c_oflag bits */
|
||||
#define OPOST 0000001
|
||||
#define ONLCR 0000002
|
||||
#define OLCUC 0000004
|
||||
|
||||
#define OCRNL 0000010
|
||||
#define ONOCR 0000020
|
||||
#define ONLRET 0000040
|
||||
|
||||
#define OFILL 00000100
|
||||
#define OFDEL 00000200
|
||||
#define NLDLY 00001400
|
||||
#define NL0 00000000
|
||||
#define NL1 00000400
|
||||
#define NL2 00001000
|
||||
#define NL3 00001400
|
||||
#define TABDLY 00006000
|
||||
#define TAB0 00000000
|
||||
#define TAB1 00002000
|
||||
#define TAB2 00004000
|
||||
#define TAB3 00006000
|
||||
#define CRDLY 00030000
|
||||
#define CR0 00000000
|
||||
#define CR1 00010000
|
||||
#define CR2 00020000
|
||||
#define CR3 00030000
|
||||
#define FFDLY 00040000
|
||||
#define FF0 00000000
|
||||
#define FF1 00040000
|
||||
#define BSDLY 00100000
|
||||
#define BS0 00000000
|
||||
#define BS1 00100000
|
||||
#define VTDLY 00200000
|
||||
#define VT0 00000000
|
||||
#define VT1 00200000
|
||||
#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
|
||||
|
||||
/* c_cflag bit meaning */
|
||||
#define CBAUD 0000037
|
||||
#define B0 0000000 /* hang up */
|
||||
#define B50 0000001
|
||||
#define B75 0000002
|
||||
#define B110 0000003
|
||||
#define B134 0000004
|
||||
#define B150 0000005
|
||||
#define B200 0000006
|
||||
#define B300 0000007
|
||||
#define B600 0000010
|
||||
#define B1200 0000011
|
||||
#define B1800 0000012
|
||||
#define B2400 0000013
|
||||
#define B4800 0000014
|
||||
#define B9600 0000015
|
||||
#define B19200 0000016
|
||||
#define B38400 0000017
|
||||
#define EXTA B19200
|
||||
#define EXTB B38400
|
||||
#define CBAUDEX 0000000
|
||||
#define B57600 00020
|
||||
#define B115200 00021
|
||||
#define B230400 00022
|
||||
#define B460800 00023
|
||||
|
||||
#define CSIZE 00001400
|
||||
#define CS5 00000000
|
||||
#define CS6 00000400
|
||||
#define CS7 00001000
|
||||
#define CS8 00001400
|
||||
|
||||
#define CSTOPB 00002000
|
||||
#define CREAD 00004000
|
||||
#define PARENB 00010000
|
||||
#define PARODD 00020000
|
||||
#define HUPCL 00040000
|
||||
|
||||
#define CLOCAL 00100000
|
||||
#define CRTSCTS 020000000000 /* flow control */
|
||||
|
||||
/* c_lflag bits */
|
||||
#define ISIG 0x00000080
|
||||
#define ICANON 0x00000100
|
||||
#define XCASE 0x00004000
|
||||
#define ECHO 0x00000008
|
||||
#define ECHOE 0x00000002
|
||||
#define ECHOK 0x00000004
|
||||
#define ECHONL 0x00000010
|
||||
#define NOFLSH 0x80000000
|
||||
#define TOSTOP 0x00400000
|
||||
#define ECHOCTL 0x00000040
|
||||
#define ECHOPRT 0x00000020
|
||||
#define ECHOKE 0x00000001
|
||||
#define FLUSHO 0x00800000
|
||||
#define PENDIN 0x20000000
|
||||
#define IEXTEN 0x00000400
|
||||
|
||||
/* Values for the ACTION argument to `tcflow'. */
|
||||
#define TCOOFF 0
|
||||
#define TCOON 1
|
||||
#define TCIOFF 2
|
||||
#define TCION 3
|
||||
|
||||
/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
|
||||
#define TCIFLUSH 0
|
||||
#define TCOFLUSH 1
|
||||
#define TCIOFLUSH 2
|
||||
|
||||
/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
|
||||
#define TCSANOW 0
|
||||
#define TCSADRAIN 1
|
||||
#define TCSAFLUSH 2
|
||||
|
||||
|
||||
#define _IOT_termios /* Hurd ioctl type field. */ \
|
||||
_IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
|
|
@ -0,0 +1,32 @@
|
|||
/* Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||
|
||||
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 <sys/ustat.h>
|
||||
#include <sys/sysmacros.h>
|
||||
|
||||
int
|
||||
ustat (dev_t dev, struct ustat *ubuf)
|
||||
{
|
||||
unsigned int k_dev;
|
||||
|
||||
/* We must convert the value to dev_t type used by the kernel. */
|
||||
k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
|
||||
|
||||
return __syscall_ustat (k_dev, ubuf);
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/* xmknod call using old-style Unix mknod system call.
|
||||
Copyright (C) 1991, 1993, 1995, 1996, 1997 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 <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern int __syscall_mknod (const char *, unsigned int, unsigned int);
|
||||
|
||||
/* Create a device file named PATH, with permission and special bits MODE
|
||||
and device number DEV (which can be constructed from major and minor
|
||||
device numbers with the `makedev' macro above). */
|
||||
int
|
||||
__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
|
||||
{
|
||||
unsigned int k_dev;
|
||||
|
||||
if (vers != _MKNOD_VER)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* We must convert the value to dev_t type used by the kernel. */
|
||||
k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
|
||||
|
||||
return __syscall_mknod (path, mode, k_dev);
|
||||
}
|
||||
|
||||
weak_alias (__xmknod, _xmknod)
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 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
|
||||
|
@ -19,14 +19,19 @@
|
|||
#ifndef _DIRENTRY_H
|
||||
#define _DIRENTRY_H 1
|
||||
|
||||
/* Get `struct dirent' from the Linux kernel header file. */
|
||||
#include <asm/posix_types.h>
|
||||
#include <linux/dirent.h>
|
||||
|
||||
#define d_fileno d_ino /* backwards compatibility */
|
||||
struct dirent
|
||||
{
|
||||
long int d_ino;
|
||||
__off_t d_off;
|
||||
unsigned short int d_reclen;
|
||||
unsigned char d_type;
|
||||
char d_name[256]; /* We must not include limits.h! */
|
||||
};
|
||||
#define d_fileno d_ino /* Backwards compatibility. */
|
||||
|
||||
#undef _DIRENT_HAVE_D_NAMLEN
|
||||
#define _DIRENT_HAVE_D_RECLEN
|
||||
#define _DIRENT_HAVE_D_OFF
|
||||
#define _DIRENT_HAVE_D_TYPE
|
||||
|
||||
#endif /* _DIRENTRY_H */
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
/* Copyright (C) 1993, 1995, 1996, 1997 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 <dirent.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
|
||||
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
||||
|
||||
|
||||
extern int __getdents __P ((int fd, char *buf, size_t nbytes));
|
||||
|
||||
/* For Linux we need a special version of this file since the
|
||||
definition of `struct dirent' is not the same for the kernel and
|
||||
the libc. There is one additional field which might be introduced
|
||||
in the kernel structure in the future.
|
||||
|
||||
He is the kernel definition of `struct dirent' as of 2.1.20: */
|
||||
|
||||
struct kernel_dirent
|
||||
{
|
||||
long int d_ino;
|
||||
__kernel_off_t d_off;
|
||||
unsigned short int d_reclen;
|
||||
char d_name[256];
|
||||
};
|
||||
|
||||
|
||||
/* The problem here is that we cannot simply read the next NBYTES
|
||||
bytes. We need to take the additional field into account. We use
|
||||
some heuristic. Assume the directory contains names with at least
|
||||
3 characters we can compute a maximum number of entries which fit
|
||||
in the buffer. Taking this number allows us to specify a correct
|
||||
number of bytes to read. If we should be wrong, we can reset the
|
||||
file descriptor. */
|
||||
int __getdirentries __P ((int fd, char *buf, size_t nbytes, off_t *basep));
|
||||
int
|
||||
__getdirentries (fd, buf, nbytes, basep)
|
||||
int fd;
|
||||
char *buf;
|
||||
size_t nbytes;
|
||||
off_t *basep;
|
||||
{
|
||||
off_t base = __lseek (fd, (off_t) 0, SEEK_CUR);
|
||||
size_t red_nbytes;
|
||||
struct kernel_dirent *kdp;
|
||||
struct dirent *dp;
|
||||
int retval;
|
||||
|
||||
red_nbytes = nbytes - (nbytes / (offsetof (struct dirent, d_name) + 3));
|
||||
|
||||
dp = (struct dirent *) buf;
|
||||
kdp = (struct kernel_dirent *) (buf + (nbytes - red_nbytes));
|
||||
|
||||
retval = __getdents (fd, (char *) kdp, red_nbytes);
|
||||
|
||||
while ((char *) kdp < buf + (nbytes - red_nbytes) + retval)
|
||||
{
|
||||
dp->d_ino = kdp->d_ino;
|
||||
dp->d_off = kdp->d_off;
|
||||
dp->d_reclen = (kdp->d_reclen
|
||||
+ (offsetof (struct dirent, d_name)
|
||||
- offsetof (struct kernel_dirent, d_name)));
|
||||
dp->d_type = DT_UNKNOWN;
|
||||
memmove (dp->d_name, kdp->d_name,
|
||||
kdp->d_reclen - offsetof (struct kernel_dirent, d_name));
|
||||
|
||||
dp = (struct dirent *) (((char *) dp) + dp->d_reclen);
|
||||
kdp = (struct kernel_dirent *) (((char *) kdp) + kdp->d_reclen);
|
||||
|
||||
if ((char *) dp >= (char *) kdp)
|
||||
{
|
||||
/* Our heuristic failed. We read too many entries. Reset
|
||||
the stream. */
|
||||
off_t used = ((char *) kdp - (char *) buf) - (nbytes - red_nbytes);
|
||||
base = __lseek (fd, retval - used, SEEK_CUR);
|
||||
}
|
||||
}
|
||||
|
||||
if (basep)
|
||||
*basep = base;
|
||||
|
||||
return (char *) dp - (char *) buf;
|
||||
}
|
||||
|
||||
weak_alias (__getdirentries, getdirentries)
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 94, 95, 96, 97 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
|
||||
|
@ -21,9 +21,6 @@
|
|||
|
||||
#include <features.h>
|
||||
|
||||
/* Get actual type definitions for architecture from kernel headers. */
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Convenience types. */
|
||||
typedef unsigned char __u_char;
|
||||
typedef unsigned short __u_short;
|
||||
|
@ -32,46 +29,61 @@ typedef unsigned long __u_long;
|
|||
#ifdef __GNUC__
|
||||
typedef unsigned long long int __u_quad_t;
|
||||
typedef long long int __quad_t;
|
||||
typedef __quad_t *__qaddr_t;
|
||||
#else
|
||||
typedef struct
|
||||
{
|
||||
long val[2];
|
||||
} __quad_t;
|
||||
{
|
||||
long int __val[2];
|
||||
} __quad_t;
|
||||
typedef struct
|
||||
{
|
||||
__u_long val[2];
|
||||
} __u_quad_t;
|
||||
{
|
||||
__u_long __val[2];
|
||||
} __u_quad_t;
|
||||
#endif
|
||||
typedef __quad_t *__qaddr_t;
|
||||
|
||||
typedef __kernel_dev_t __dev_t; /* Type of device numbers. */
|
||||
typedef __kernel_uid_t __uid_t; /* Type of user identifications. */
|
||||
typedef __kernel_gid_t __gid_t; /* Type of group identifications. */
|
||||
typedef __kernel_ino_t __ino_t; /* Type of file serial numbers. */
|
||||
typedef __kernel_mode_t __mode_t; /* Type of file attribute bitmasks. */
|
||||
typedef __kernel_nlink_t __nlink_t; /* Type of file link counts. */
|
||||
typedef __kernel_off_t __off_t; /* Type of file sizes and offsets. */
|
||||
typedef __kernel_loff_t __loff_t; /* Type of file sizes and offsets. */
|
||||
typedef __kernel_pid_t __pid_t; /* Type of process identifications. */
|
||||
typedef __kernel_ssize_t __ssize_t; /* Type of a byte count, or error. */
|
||||
typedef __kernel_fsid_t __fsid_t; /* Type of file system IDs. */
|
||||
typedef __u_quad_t __dev_t; /* Type of device numbers. */
|
||||
typedef __u_int __uid_t; /* Type of user identifications. */
|
||||
typedef __u_int __gid_t; /* Type of group identifications. */
|
||||
typedef __u_long __ino_t; /* Type of file serial numbers. */
|
||||
typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
|
||||
typedef __u_int __nlink_t; /* Type of file link counts. */
|
||||
typedef long int __off_t; /* Type of file sizes and offsets. */
|
||||
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
|
||||
typedef int __pid_t; /* Type of process identifications. */
|
||||
typedef int __ssize_t; /* Type of a byte count, or error. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int __val[2];
|
||||
} __fsid_t; /* Type of file system IDs. */
|
||||
|
||||
/* Everythin' else. */
|
||||
typedef __kernel_daddr_t __daddr_t; /* The type of a disk address. */
|
||||
typedef __kernel_caddr_t __caddr_t;
|
||||
typedef __kernel_time_t __time_t;
|
||||
typedef int __daddr_t; /* The type of a disk address. */
|
||||
typedef char *__caddr_t;
|
||||
typedef long int __time_t;
|
||||
typedef long int __swblk_t; /* Type of a swap block maybe? */
|
||||
|
||||
/* fd_set for select. */
|
||||
typedef __kernel_fd_set __fd_set;
|
||||
typedef __kernel_clock_t __clock_t;
|
||||
typedef long int __clock_t;
|
||||
|
||||
/* One element in the file descriptor mask array. */
|
||||
typedef unsigned long int __fd_mask;
|
||||
|
||||
/* Number of descriptors that can fit in an `fd_set'. */
|
||||
#define __FD_SETSIZE 1024
|
||||
|
||||
/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
|
||||
#define __NFDBITS (8 * sizeof (__fd_mask))
|
||||
#define __FDELT(d) ((d) / __NFDBITS)
|
||||
#define __FDMASK(d) (1 << ((d) % __NFDBITS))
|
||||
|
||||
/* fd_set for select and pselect. */
|
||||
typedef struct
|
||||
{
|
||||
/* XPG4.2 requires this member name. */
|
||||
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
|
||||
} __fd_set;
|
||||
|
||||
/* Linus doesn't want __kernel_fd_mask in <linux/posix_types.h> since
|
||||
XPG4 seems to require `unsigned long'. */
|
||||
typedef unsigned long __fd_mask;
|
||||
|
||||
#ifdef __USE_SVID
|
||||
typedef int __key_t;
|
||||
#endif
|
||||
|
||||
#endif /* gnu/types.h */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue