mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
*** empty log message ***
Mon Feb 19 15:30:26 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * stdio-common/tstscanf.c (main): Add check for "0" as %d. * sysdeps/stub/msync.c: Undo change of Jan 29; just two args. Only some systems have three args; let them define their own stub. * sysdeps/generic/dl-sysdep.c: Declare _dl_secure. * sysdeps/generic/machine-gmon.h: New file. * gmon/Makefile (distribute): Add machine-gmon.h. * gmon/mcount.c: Undo changes of Feb 13. Include "machine-gmon.h". Sun Feb 18 13:24:06 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * sysdeps/unix/sysv/linux/direct.h: File removed, since it is identical to unix/common/direct.h. * sysdeps/unix/Makefile [no_deps]: Don't include s-proto.d. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Don't add ipc. * stdio-common/Makefile (tests): Remove scanf6. * sysdeps/unix/sysv/linux/Makefile (non-lib.a): Append libieee.a. * time/mktime.c (mktime): Move static variable localtime_offset to file scope. * stdio-common/vfscanf.c: Put '0' in buffer before scanning for %i base indicator. Thu Feb 15 16:56:17 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/dl-machine.h (elf_machine_load_address): Corrected. (ELF_MACHINE_BEFORE_RTLD_RELOC): Define. (_dl_runtime_resolve): Save %a1 as well. (ELF_MACHINE_RUNTIME_FIXUP_ARGS): Add second dummy arg. (elf_machine_relplt): Define. * elf/dl-runtime.c: Include possible extra args in declaration of fixup.
This commit is contained in:
parent
1cbca0d93c
commit
be10a86854
44
ChangeLog
44
ChangeLog
@ -1,3 +1,47 @@
|
|||||||
|
Mon Feb 19 15:30:26 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* stdio-common/tstscanf.c (main): Add check for "0" as %d.
|
||||||
|
|
||||||
|
* sysdeps/stub/msync.c: Undo change of Jan 29; just two args.
|
||||||
|
Only some systems have three args; let them define their own stub.
|
||||||
|
|
||||||
|
* sysdeps/generic/dl-sysdep.c: Declare _dl_secure.
|
||||||
|
|
||||||
|
* sysdeps/generic/machine-gmon.h: New file.
|
||||||
|
* gmon/Makefile (distribute): Add machine-gmon.h.
|
||||||
|
* gmon/mcount.c: Undo changes of Feb 13.
|
||||||
|
Include "machine-gmon.h".
|
||||||
|
|
||||||
|
Sun Feb 18 13:24:06 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/direct.h: File removed, since it is
|
||||||
|
identical to unix/common/direct.h.
|
||||||
|
|
||||||
|
* sysdeps/unix/Makefile [no_deps]: Don't include s-proto.d.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Don't add ipc.
|
||||||
|
|
||||||
|
* stdio-common/Makefile (tests): Remove scanf6.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/Makefile (non-lib.a): Append libieee.a.
|
||||||
|
|
||||||
|
* time/mktime.c (mktime): Move static variable localtime_offset to
|
||||||
|
file scope.
|
||||||
|
|
||||||
|
* stdio-common/vfscanf.c: Put '0' in buffer before scanning for %i
|
||||||
|
base indicator.
|
||||||
|
|
||||||
|
Thu Feb 15 16:56:17 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
|
* sysdeps/m68k/dl-machine.h (elf_machine_load_address): Corrected.
|
||||||
|
(ELF_MACHINE_BEFORE_RTLD_RELOC): Define.
|
||||||
|
(_dl_runtime_resolve): Save %a1 as well.
|
||||||
|
(ELF_MACHINE_RUNTIME_FIXUP_ARGS): Add second dummy arg.
|
||||||
|
(elf_machine_relplt): Define.
|
||||||
|
|
||||||
|
* elf/dl-runtime.c: Include possible extra args in declaration of
|
||||||
|
fixup.
|
||||||
|
|
||||||
Fri Feb 16 11:01:59 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
Fri Feb 16 11:01:59 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||||
|
|
||||||
* time/tzset.c: Limit hours to 23, not 12. From jaffer.
|
* time/tzset.c: Limit hours to 23, not 12. From jaffer.
|
||||||
|
38
MakeTAGS
38
MakeTAGS
@ -1,6 +1,6 @@
|
|||||||
# Make the TAGS files.
|
# Make the TAGS files.
|
||||||
|
|
||||||
# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
|
# Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of the GNU C Library.
|
||||||
|
|
||||||
# The GNU C Library is free software; you can redistribute it and/or
|
# The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -98,7 +98,7 @@ ifdef subdir
|
|||||||
ifdef tags_sources
|
ifdef tags_sources
|
||||||
$(ETAGS) -o $@ $^
|
$(ETAGS) -o $@ $^
|
||||||
else
|
else
|
||||||
# No sources. Create a dummy file.
|
# No sources. Create a dummy file.
|
||||||
touch $@
|
touch $@
|
||||||
endif # tags_sources
|
endif # tags_sources
|
||||||
else # parent
|
else # parent
|
||||||
@ -114,3 +114,37 @@ $(subdirs:%=%/TAGS):
|
|||||||
$(MAKE) -C $(@D) no_deps=t $(@F)
|
$(MAKE) -C $(@D) no_deps=t $(@F)
|
||||||
|
|
||||||
endif # subdir
|
endif # subdir
|
||||||
|
|
||||||
|
XGETTEXT = xgettext
|
||||||
|
MSGJOIN = msgjoin
|
||||||
|
|
||||||
|
P = $(..)po
|
||||||
|
|
||||||
|
ifdef subdir
|
||||||
|
domain = $(subdir)
|
||||||
|
else
|
||||||
|
domain = libc-top
|
||||||
|
endif
|
||||||
|
|
||||||
|
define extract
|
||||||
|
@rm -f $@.new
|
||||||
|
$(XGETTEXT) --keyword=_ --keyword=N_ --sort-output -d - \
|
||||||
|
> $@.new /dev/null $^
|
||||||
|
mv -f $@.new $@
|
||||||
|
endef
|
||||||
|
|
||||||
|
$P/$(domain).pot: $(tags_sources); $(extract)
|
||||||
|
|
||||||
|
$P/siglist.pot: $(..)sysdeps/generic/signame.c; $(extract)
|
||||||
|
$P/errlist.pot: $(..)sysdeps/mach/hurd/errlist.c; $(extract)
|
||||||
|
|
||||||
|
ifndef subdir
|
||||||
|
$P/SYS_libc.pot: $P/libc-top.pot $(subdirs:%=$P/%.pot)
|
||||||
|
@rm -f $@.new
|
||||||
|
$(MSGJOIN) $^ > $@.new
|
||||||
|
mv -f $@.new $@
|
||||||
|
|
||||||
|
$(subdirs:%=$P/%.pot): $P/%.pot: FORCE
|
||||||
|
$(MAKE) -C $* no_deps=t ../$@
|
||||||
|
FORCE:
|
||||||
|
endif
|
||||||
|
@ -621,6 +621,10 @@ check: tests
|
|||||||
TAGS: distinfo $(..)MakeTAGS
|
TAGS: distinfo $(..)MakeTAGS
|
||||||
$(MAKE) $(addprefix -f ,$^) $@
|
$(MAKE) $(addprefix -f ,$^) $@
|
||||||
|
|
||||||
|
$(..)po/%.pot: distinfo $(..)MakeTAGS
|
||||||
|
$(MAKE) $(addprefix -f ,$^) $@
|
||||||
|
|
||||||
|
|
||||||
.PHONY: echo-headers
|
.PHONY: echo-headers
|
||||||
echo-headers:
|
echo-headers:
|
||||||
@echo $(headers)
|
@echo $(headers)
|
||||||
|
@ -29,25 +29,8 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
#include <gnu/types.h>
|
#include <gnu/types.h>
|
||||||
|
|
||||||
|
/* This file defines `struct dirent'. */
|
||||||
/* Directory entry structure.
|
#include <direntry.h>
|
||||||
|
|
||||||
This structure is laid out identically to the `struct direct' that
|
|
||||||
represents directory entries in the GNU Hurd and in BSD 4.4 (and
|
|
||||||
incidentally, on disk in the Berkeley fast file system). The `readdir'
|
|
||||||
implementations for GNU and BSD know this; you must change them if you
|
|
||||||
change this structure. */
|
|
||||||
|
|
||||||
struct dirent
|
|
||||||
{
|
|
||||||
__ino_t d_fileno; /* File serial number. */
|
|
||||||
unsigned short int d_reclen; /* Length of the whole `struct dirent'. */
|
|
||||||
unsigned char d_type; /* File type, possibly unknown. */
|
|
||||||
unsigned char d_namlen; /* Length of the file name. */
|
|
||||||
|
|
||||||
/* Only this member is in the POSIX standard. */
|
|
||||||
char d_name[1]; /* File name (actually longer). */
|
|
||||||
};
|
|
||||||
|
|
||||||
#if defined(__USE_BSD) || defined(__USE_MISC)
|
#if defined(__USE_BSD) || defined(__USE_MISC)
|
||||||
#define d_ino d_fileno /* Backward compatibility. */
|
#define d_ino d_fileno /* Backward compatibility. */
|
||||||
|
@ -37,7 +37,11 @@ Cambridge, MA 02139, USA. */
|
|||||||
in the trampoline code will be a local PC-relative call. Tell the
|
in the trampoline code will be a local PC-relative call. Tell the
|
||||||
compiler not to worry that the function appears not to be called. */
|
compiler not to worry that the function appears not to be called. */
|
||||||
|
|
||||||
static Elf32_Addr fixup (struct link_map *l, Elf32_Word reloc_offset)
|
static Elf32_Addr fixup (
|
||||||
|
#ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
|
||||||
|
ELF_MACHINE_RUNTIME_FIXUP_ARGS,
|
||||||
|
#endif
|
||||||
|
struct link_map *l, Elf32_Word reloc_offset)
|
||||||
__attribute__ ((unused));
|
__attribute__ ((unused));
|
||||||
|
|
||||||
/* This function is called through a special trampoline from the PLT the
|
/* This function is called through a special trampoline from the PLT the
|
||||||
|
@ -31,9 +31,9 @@ CPPFLAGS += -D'GNULOCALEDIR="$(localedir)"' \
|
|||||||
|
|
||||||
ifdef gettext-srcdir
|
ifdef gettext-srcdir
|
||||||
|
|
||||||
%:: $(gettext-srcdir)/intl/%.glibc; $(copysrc)
|
%.h:: $(gettext-srcdir)/intl/%.glibc; $(copysrc)
|
||||||
%:: $(gettext-srcdir)/intl/%.c; $(copysrc)
|
%.c:: $(gettext-srcdir)/intl/%.c; $(copysrc)
|
||||||
%:: $(gettext-srcdir)/intl/%.h; $(copysrc)
|
%.h:: $(gettext-srcdir)/intl/%.h; $(copysrc)
|
||||||
|
|
||||||
define copysrc
|
define copysrc
|
||||||
cp -f $< $@.new
|
cp -f $< $@.new
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* dcgettext.c -- implemenatation of the dcgettext(3) function
|
/* dcgettext.c -- implementation of the dcgettext(3) function
|
||||||
Copyright (C) 1995 Software Foundation, Inc.
|
Copyright (C) 1995 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
# define alloca __builtin_alloca
|
# define alloca __builtin_alloca
|
||||||
#else
|
#else
|
||||||
# ifdef HAVE_ALLOCA_H || defined _LIBC
|
# if defined HAVE_ALLOCA_H || defined _LIBC
|
||||||
# include <alloca.h>
|
# include <alloca.h>
|
||||||
# else
|
# else
|
||||||
# ifdef _AIX
|
# ifdef _AIX
|
||||||
@ -151,10 +151,11 @@ const char _nl_default_dirname[] = GNULOCALEDIR;
|
|||||||
struct binding *_nl_domain_bindings;
|
struct binding *_nl_domain_bindings;
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
static char *find_msg __P ((struct loaded_domain *domain, const char *msgid));
|
static char *find_msg PARAMS ((struct loaded_domain *domain,
|
||||||
static const char *category_to_name __P((int category));
|
const char *msgid));
|
||||||
static const char *guess_category_value __P((int category,
|
static const char *category_to_name PARAMS ((int category));
|
||||||
const char *categoryname));
|
static const char *guess_category_value PARAMS ((int category,
|
||||||
|
const char *categoryname));
|
||||||
|
|
||||||
|
|
||||||
/* Names for the libintl functions are a problem. They must not clash
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
@ -182,6 +183,7 @@ DCGETTEXT (domainname, msgid, category)
|
|||||||
char *dirname, *xdomainname;
|
char *dirname, *xdomainname;
|
||||||
char *single_locale;
|
char *single_locale;
|
||||||
char *retval;
|
char *retval;
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
/* If no real MSGID is given return NULL. */
|
/* If no real MSGID is given return NULL. */
|
||||||
if (msgid == NULL)
|
if (msgid == NULL)
|
||||||
@ -233,9 +235,12 @@ DCGETTEXT (domainname, msgid, category)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret == NULL)
|
if (ret == NULL)
|
||||||
/* We cannot get the current working directory. Don't signal an
|
{
|
||||||
error but simply return the default string. */
|
/* We cannot get the current working directory. Don't signal an
|
||||||
return (char *) msgid;
|
error but simply return the default string. */
|
||||||
|
errno = saved_errno;
|
||||||
|
return (char *) msgid;
|
||||||
|
}
|
||||||
|
|
||||||
/* We don't want libintl.a to depend on any other library. So
|
/* We don't want libintl.a to depend on any other library. So
|
||||||
we avoid the non-standard function stpcpy. In GNU C Library
|
we avoid the non-standard function stpcpy. In GNU C Library
|
||||||
@ -302,7 +307,10 @@ DCGETTEXT (domainname, msgid, category)
|
|||||||
domain. Return the MSGID. */
|
domain. Return the MSGID. */
|
||||||
if (strcmp (single_locale, "C") == 0
|
if (strcmp (single_locale, "C") == 0
|
||||||
|| strcmp (single_locale, "POSIX") == 0)
|
|| strcmp (single_locale, "POSIX") == 0)
|
||||||
return (char *) msgid;
|
{
|
||||||
|
errno = saved_errno;
|
||||||
|
return (char *) msgid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Find structure describing the message catalog matching the
|
/* Find structure describing the message catalog matching the
|
||||||
@ -317,7 +325,7 @@ DCGETTEXT (domainname, msgid, category)
|
|||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
|
|
||||||
for (cnt = 0; domain->successor[cnt] != NULL; --cnt)
|
for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
|
||||||
{
|
{
|
||||||
retval = find_msg (domain->successor[cnt], msgid);
|
retval = find_msg (domain->successor[cnt], msgid);
|
||||||
|
|
||||||
@ -327,7 +335,10 @@ DCGETTEXT (domainname, msgid, category)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (retval != NULL)
|
if (retval != NULL)
|
||||||
return retval;
|
{
|
||||||
|
errno = saved_errno;
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
@ -375,8 +386,8 @@ find_msg (domain, msgid)
|
|||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (idx >= W (domain->must_swap, domain->hash_size) - incr)
|
if (idx >= domain->hash_size - incr)
|
||||||
idx -= W (domain->must_swap, domain->hash_size) - incr;
|
idx -= domain->hash_size - incr;
|
||||||
else
|
else
|
||||||
idx += incr;
|
idx += incr;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* finddomain.c -- handle list of needed message catalogs
|
/* finddomain.c -- handle list of needed message catalogs
|
||||||
Copyright (C) 1995 Software Foundation, Inc.
|
Copyright (C) 1995 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@ -83,21 +83,21 @@ void free ();
|
|||||||
static struct loaded_domain *_nl_loaded_domains;
|
static struct loaded_domain *_nl_loaded_domains;
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
static struct loaded_domain *make_entry_rec __P ((const char *dirname,
|
static struct loaded_domain *make_entry_rec PARAMS ((const char *dirname,
|
||||||
int mask,
|
int mask,
|
||||||
const char *language,
|
const char *language,
|
||||||
const char *territory,
|
const char *territory,
|
||||||
const char *codeset,
|
const char *codeset,
|
||||||
const char *modifier,
|
const char *modifier,
|
||||||
const char *special,
|
const char *special,
|
||||||
const char *sponsor,
|
const char *sponsor,
|
||||||
const char *revision,
|
const char *revision,
|
||||||
const char *domainname,
|
const char *domainname,
|
||||||
int do_allocate));
|
int do_allocate));
|
||||||
|
|
||||||
/* Substitution for systems lacking this function in their C library. */
|
/* Substitution for systems lacking this function in their C library. */
|
||||||
#if !_LIBC && !HAVE_STPCPY
|
#if !_LIBC && !HAVE_STPCPY
|
||||||
static char *stpcpy __P ((char *dest, const char *src));
|
static char *stpcpy PARAMS ((char *dest, const char *src));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* gettextP.h -- header describing internals of gettext library
|
/* gettextP.h -- header describing internals of gettext library
|
||||||
Copyright (C) 1995 Software Foundation, Inc.
|
Copyright (C) 1995 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -20,11 +20,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
#ifndef __P
|
#ifndef PARAMS
|
||||||
# if __STDC__
|
# if __STDC__
|
||||||
# define __P(args) args
|
# define PARAMS(args) args
|
||||||
# else
|
# else
|
||||||
# define __P(args) ()
|
# define PARAMS(args) ()
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -32,6 +32,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
# define W(flag, data) ((flag) ? SWAP (data) : (data))
|
# define W(flag, data) ((flag) ? SWAP (data) : (data))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static nls_uint32 SWAP PARAMS ((nls_uint32 i));
|
||||||
|
|
||||||
static inline nls_uint32
|
static inline nls_uint32
|
||||||
SWAP (i)
|
SWAP (i)
|
||||||
nls_uint32 i;
|
nls_uint32 i;
|
||||||
@ -64,12 +67,12 @@ struct binding
|
|||||||
char *dirname;
|
char *dirname;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct loaded_domain *_nl_find_domain __P ((const char *__dirname,
|
struct loaded_domain *_nl_find_domain PARAMS ((const char *__dirname,
|
||||||
char *__locale,
|
char *__locale,
|
||||||
const char *__domainname));
|
const char *__domainname));
|
||||||
void _nl_load_domain __P ((struct loaded_domain *__domain));
|
void _nl_load_domain PARAMS ((struct loaded_domain *__domain));
|
||||||
|
|
||||||
const char *_nl_expand_alias __P ((const char *__name));
|
const char *_nl_expand_alias PARAMS ((const char *__name));
|
||||||
|
|
||||||
/* @@ begin of epilog @@ */
|
/* @@ begin of epilog @@ */
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* hash-string - Implements a string hashing function.
|
/* hash-string - Implements a string hashing function.
|
||||||
Copyright (C) 1995 Software Foundation, Inc.
|
Copyright (C) 1995 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -21,22 +21,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
#ifndef BITSPERBYTE
|
#ifndef PARAMS
|
||||||
# define BITSPERBYTE 8
|
# if __STDC__
|
||||||
|
# define PARAMS(Args) Args
|
||||||
|
# else
|
||||||
|
# define PARAMS(Args) ()
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LONGBITS
|
/* We assume to have `unsigned long int' value with at least 32 bits. */
|
||||||
# define LONGBITS (sizeof (long) * BITSPERBYTE)
|
#define HASHWORDBITS 32
|
||||||
#endif /* LONGBITS */
|
|
||||||
|
|
||||||
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
||||||
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
||||||
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
||||||
|
static unsigned long hash_string PARAMS ((const char *__str_param));
|
||||||
|
|
||||||
static inline unsigned long
|
static inline unsigned long
|
||||||
hash_string (str_param)
|
hash_string (str_param)
|
||||||
const char *str_param;
|
const char *str_param;
|
||||||
{
|
{
|
||||||
unsigned long hval, g;
|
unsigned long int hval, g;
|
||||||
const char *str = str_param;
|
const char *str = str_param;
|
||||||
|
|
||||||
/* Compute the hash value for the given string. */
|
/* Compute the hash value for the given string. */
|
||||||
@ -45,10 +51,10 @@ hash_string (str_param)
|
|||||||
{
|
{
|
||||||
hval <<= 4;
|
hval <<= 4;
|
||||||
hval += (unsigned long) *str++;
|
hval += (unsigned long) *str++;
|
||||||
g = hval & ((unsigned long) 0xf << (LONGBITS - 4));
|
g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
|
||||||
if (g != 0)
|
if (g != 0)
|
||||||
{
|
{
|
||||||
hval ^= g >> (LONGBITS - 8);
|
hval ^= g >> (HASHWORDBITS - 8);
|
||||||
hval ^= g;
|
hval ^= g;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,34 +37,36 @@ __BEGIN_DECLS
|
|||||||
/* Look up MSGID in the current default message catalog for the current
|
/* Look up MSGID in the current default message catalog for the current
|
||||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||||
text). */
|
text). */
|
||||||
extern char *gettext __P ((const char *__msgid));
|
extern char *gettext __P ((__const char *__msgid));
|
||||||
extern char *__gettext __P ((const char *__msgid));
|
extern char *__gettext __P ((__const char *__msgid));
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||||
LC_MESSAGES locale. */
|
LC_MESSAGES locale. */
|
||||||
extern char *dgettext __P ((const char *__domainname, const char *__msgid));
|
extern char *dgettext __P ((__const char *__domainname,
|
||||||
extern char *__dgettext __P ((const char *__domainname, const char *__msgid));
|
__const char *__msgid));
|
||||||
|
extern char *__dgettext __P ((__const char *__domainname,
|
||||||
|
__const char *__msgid));
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||||
locale. */
|
locale. */
|
||||||
extern char *dcgettext __P ((const char *__domainname, const char *__msgid,
|
extern char *dcgettext __P ((__const char *__domainname,
|
||||||
int __category));
|
__const char *__msgid, int __category));
|
||||||
extern char *__dcgettext __P ((const char *__domainname, const char *__msgid,
|
extern char *__dcgettext __P ((__const char *__domainname,
|
||||||
int __category));
|
__const char *__msgid, int __category));
|
||||||
|
|
||||||
|
|
||||||
/* Set the current default message catalog to DOMAINNAME.
|
/* Set the current default message catalog to DOMAINNAME.
|
||||||
If DOMAINNAME is null, return the current default.
|
If DOMAINNAME is null, return the current default.
|
||||||
If DOMAINNAME is "", reset to the default of "messages". */
|
If DOMAINNAME is "", reset to the default of "messages". */
|
||||||
extern char *textdomain __P ((const char *__domainname));
|
extern char *textdomain __P ((__const char *__domainname));
|
||||||
extern char *__textdomain __P ((const char *__domainname));
|
extern char *__textdomain __P ((__const char *__domainname));
|
||||||
|
|
||||||
/* Specify that the DOMAINNAME message catalog will be found
|
/* Specify that the DOMAINNAME message catalog will be found
|
||||||
in DIRNAME rather than in the system locale data base. */
|
in DIRNAME rather than in the system locale data base. */
|
||||||
extern char *bindtextdomain __P ((const char *__domainname,
|
extern char *bindtextdomain __P ((__const char *__domainname,
|
||||||
const char *__dirname));
|
__const char *__dirname));
|
||||||
extern char *__bindtextdomain __P ((const char *__domainname,
|
extern char *__bindtextdomain __P ((__const char *__domainname,
|
||||||
const char *__dirname));
|
__const char *__dirname));
|
||||||
|
|
||||||
|
|
||||||
/* Optimized version of the function above. */
|
/* Optimized version of the function above. */
|
||||||
@ -73,9 +75,9 @@ extern char *__bindtextdomain __P ((const char *__domainname,
|
|||||||
`__builtin_constant_p' predicate in dcgettext would always return
|
`__builtin_constant_p' predicate in dcgettext would always return
|
||||||
false. */
|
false. */
|
||||||
|
|
||||||
# define gettext (msgid) dgettext (NULL, msgid)
|
# define gettext(msgid) dgettext (NULL, msgid)
|
||||||
|
|
||||||
# define dgettext (domainname, msgid) \
|
# define dgettext(domainname, msgid) \
|
||||||
dcgettext (domainname, msgid, LC_MESSAGES)
|
dcgettext (domainname, msgid, LC_MESSAGES)
|
||||||
|
|
||||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* localealias.c -- handle aliases for locale names
|
/* localealias.c -- handle aliases for locale names
|
||||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -86,10 +86,10 @@ static size_t maxmap = 0;
|
|||||||
|
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
static size_t read_alias_file __P ((const char *fname, int fname_len));
|
static size_t read_alias_file PARAMS ((const char *fname, int fname_len));
|
||||||
static void extend_alias_table __P ((void));
|
static void extend_alias_table PARAMS ((void));
|
||||||
static int alias_compare __P ((const struct alias_map *map1,
|
static int alias_compare PARAMS ((const struct alias_map *map1,
|
||||||
const struct alias_map *map2));
|
const struct alias_map *map2));
|
||||||
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
@ -109,9 +109,9 @@ _nl_expand_alias (name)
|
|||||||
if (nmap > 0)
|
if (nmap > 0)
|
||||||
retval = (struct alias_map *) bsearch (&item, map, nmap,
|
retval = (struct alias_map *) bsearch (&item, map, nmap,
|
||||||
sizeof (struct alias_map),
|
sizeof (struct alias_map),
|
||||||
(int (*) (const void *,
|
(int (*) PARAMS ((const void *,
|
||||||
const void *))
|
const void *))
|
||||||
alias_compare);
|
) alias_compare);
|
||||||
else
|
else
|
||||||
retval = NULL;
|
retval = NULL;
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ read_alias_file (fname, fname_len)
|
|||||||
|
|
||||||
if (added > 0)
|
if (added > 0)
|
||||||
qsort (map, nmap, sizeof (struct alias_map),
|
qsort (map, nmap, sizeof (struct alias_map),
|
||||||
(int (*) (const void *, const void *)) alias_compare);
|
(int (*) PARAMS ((const void *, const void *))) alias_compare);
|
||||||
|
|
||||||
return added;
|
return added;
|
||||||
}
|
}
|
||||||
@ -309,6 +309,8 @@ alias_compare (map1, map2)
|
|||||||
c2 = isupper (*p2) ? tolower (*p2) : *p2;
|
c2 = isupper (*p2) ? tolower (*p2) : *p2;
|
||||||
if (c1 == '\0')
|
if (c1 == '\0')
|
||||||
break;
|
break;
|
||||||
|
++p1;
|
||||||
|
++p2;
|
||||||
}
|
}
|
||||||
while (c1 == c2);
|
while (c1 == c2);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Makefile for the GNU C Library manual.
|
# Makefile for the GNU C Library manual.
|
||||||
|
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of the GNU C Library.
|
||||||
|
|
||||||
# The GNU C Library is free software; you can redistribute it and/or
|
# The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -148,7 +148,7 @@ ETAGS = etags -T
|
|||||||
endif
|
endif
|
||||||
TAGS: $(minimal-dist)
|
TAGS: $(minimal-dist)
|
||||||
$(ETAGS) -o $@ $^
|
$(ETAGS) -o $@ $^
|
||||||
|
|
||||||
# These are targets that each glibc subdirectory is expected to understand.
|
# These are targets that each glibc subdirectory is expected to understand.
|
||||||
# ../Rules defines them for code subdirectories; for us, they are no-ops.
|
# ../Rules defines them for code subdirectories; for us, they are no-ops.
|
||||||
glibc-targets := subdir_lib objects objs others tests subdir_lint.out \
|
glibc-targets := subdir_lib objects objs others tests subdir_lint.out \
|
||||||
@ -157,13 +157,13 @@ glibc-targets := subdir_lib objects objs others tests subdir_lint.out \
|
|||||||
$(glibc-targets):
|
$(glibc-targets):
|
||||||
|
|
||||||
stubs: $(common-objpfx)stub-manual
|
stubs: $(common-objpfx)stub-manual
|
||||||
$(common-objpfx)stub-manual:
|
$(common-objpfx)stub-manual ../po/manual.pot:
|
||||||
cp /dev/null $@
|
cp /dev/null $@
|
||||||
|
|
||||||
# The top-level glibc Makefile expects subdir_install to update the stubs file.
|
# The top-level glibc Makefile expects subdir_install to update the stubs file.
|
||||||
subdir_install: stubs
|
subdir_install: stubs
|
||||||
|
|
||||||
|
|
||||||
# Get rid of these variables if they came from the parent.
|
# Get rid of these variables if they came from the parent.
|
||||||
routines =
|
routines =
|
||||||
aux =
|
aux =
|
||||||
|
@ -528,6 +528,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
|
|||||||
if (width > 0)
|
if (width > 0)
|
||||||
--width;
|
--width;
|
||||||
|
|
||||||
|
ADDW (c);
|
||||||
(void) inchar ();
|
(void) inchar ();
|
||||||
|
|
||||||
if (width != 0 && tolower (c) == 'x')
|
if (width != 0 && tolower (c) == 'x')
|
||||||
|
@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
#ifdef MOTOROLA_SYNTAX
|
#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX)
|
||||||
#define d0 %d0
|
#define d0 %d0
|
||||||
#define d1 %d1
|
#define d1 %d1
|
||||||
#define PUSH(reg) move.l reg, -(%sp)
|
#define PUSH(reg) move.l reg, -(%sp)
|
||||||
|
@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
#ifdef MOTOROLA_SYNTAX
|
#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX)
|
||||||
#define d0 %d0
|
#define d0 %d0
|
||||||
#define d1 %d1
|
#define d1 %d1
|
||||||
#define PUSH(reg) move.l reg, -(%sp)
|
#define PUSH(reg) move.l reg, -(%sp)
|
||||||
|
@ -52,9 +52,22 @@ elf_machine_got (void)
|
|||||||
static inline Elf32_Addr
|
static inline Elf32_Addr
|
||||||
elf_machine_load_address (void)
|
elf_machine_load_address (void)
|
||||||
{
|
{
|
||||||
...
|
Elf32_Addr addr;
|
||||||
|
asm ("here: lea here(%%pc), %0\n"
|
||||||
|
" sub.l %#here, %0"
|
||||||
|
: "=a" (addr));
|
||||||
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The `subl' insn above will contain an R_68K_RELATIVE relocation
|
||||||
|
entry intended to insert the run-time address of the label `here'.
|
||||||
|
This will be the first relocation in the text of the dynamic
|
||||||
|
linker; we skip it to avoid trying to modify read-only text in this
|
||||||
|
early stage. */
|
||||||
|
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
|
||||||
|
((dynamic_info)[DT_RELA]->d_un.d_ptr += sizeof (Elf32_Rela), \
|
||||||
|
(dynamic_info)[DT_RELASZ]->d_un.d_val -= sizeof (Elf32_Rela))
|
||||||
|
|
||||||
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
|
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
|
||||||
MAP is the object containing the reloc. */
|
MAP is the object containing the reloc. */
|
||||||
|
|
||||||
@ -158,11 +171,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
|
|||||||
.globl _dl_runtime_resolve
|
.globl _dl_runtime_resolve
|
||||||
.type _dl_runtime_resolve, @function
|
.type _dl_runtime_resolve, @function
|
||||||
_dl_runtime_resolve:
|
_dl_runtime_resolve:
|
||||||
| Save %a0 (struct return address).
|
| Save %a0 (struct return address) and %a1.
|
||||||
move.l %a0, -(%sp)
|
move.l %a0, -(%sp)
|
||||||
|
move.l %a1, -(%sp)
|
||||||
| Call the real address resolver.
|
| Call the real address resolver.
|
||||||
bsr.l fixup
|
jbsr fixup
|
||||||
| Restore register %a0.
|
| Restore register %a0 and %a1.
|
||||||
|
move.l (%sp)+, %a1
|
||||||
move.l (%sp)+, %a0
|
move.l (%sp)+, %a0
|
||||||
| Pop parameters
|
| Pop parameters
|
||||||
addq.l #8, %sp
|
addq.l #8, %sp
|
||||||
@ -170,7 +185,9 @@ _dl_runtime_resolve:
|
|||||||
jmp (%d0)
|
jmp (%d0)
|
||||||
.size _dl_runtime_resolve, . - _dl_runtime_resolve
|
.size _dl_runtime_resolve, . - _dl_runtime_resolve
|
||||||
");
|
");
|
||||||
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0
|
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1
|
||||||
|
/* The PLT uses Elf32_Rela relocs. */
|
||||||
|
#define elf_machine_relplt elf_machine_rela
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -37,9 +37,9 @@ DEFUN(closedir, (dirp), DIR *dirp)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = dirp->__fd;
|
fd = dirp->fd;
|
||||||
|
|
||||||
free ((PTR) dirp->__data);
|
free ((PTR) dirp->data);
|
||||||
free ((PTR) dirp);
|
free ((PTR) dirp);
|
||||||
|
|
||||||
return __close (fd);
|
return __close (fd);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -20,8 +20,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#define _DIRSTREAM_H 1
|
#define _DIRSTREAM_H 1
|
||||||
|
|
||||||
#define __need_size_t
|
#include <sys/types.h>
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
/* Directory stream type.
|
/* Directory stream type.
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ struct __dirstream
|
|||||||
size_t __offset; /* Current offset into the block. */
|
size_t __offset; /* Current offset into the block. */
|
||||||
size_t __size; /* Total valid data in the block. */
|
size_t __size; /* Total valid data in the block. */
|
||||||
|
|
||||||
struct dirent __entry; /* Returned by `readdir'. */
|
off_t pos; /* Position of next entry to read. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define _DIR_dirfd(dirp) ((dirp)->__fd)
|
#define _DIR_dirfd(dirp) ((dirp)->__fd)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
|||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <ansidecl.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@ -28,12 +27,11 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "direct.h" /* This file defines `struct direct'. */
|
|
||||||
#include "dirstream.h"
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Open a directory stream on NAME. */
|
/* Open a directory stream on NAME. */
|
||||||
DIR *
|
DIR *
|
||||||
DEFUN(opendir, (name), CONST char *name)
|
opendir (const char *name)
|
||||||
{
|
{
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
@ -62,7 +60,7 @@ DEFUN(opendir, (name), CONST char *name)
|
|||||||
goto lose;
|
goto lose;
|
||||||
}
|
}
|
||||||
|
|
||||||
dirp = (DIR *) calloc (1, sizeof (DIR) + NAME_MAX); /* Zero-fill. */
|
dirp = (DIR *) calloc (1, sizeof (DIR)); /* Zero-fill. */
|
||||||
if (dirp == NULL)
|
if (dirp == NULL)
|
||||||
lose:
|
lose:
|
||||||
{
|
{
|
||||||
@ -73,24 +71,24 @@ DEFUN(opendir, (name), CONST char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _STATBUF_ST_BLKSIZE
|
#ifdef _STATBUF_ST_BLKSIZE
|
||||||
if (statbuf.st_blksize < sizeof (struct direct))
|
if (statbuf.st_blksize < sizeof (struct dirent))
|
||||||
dirp->__allocation = sizeof (struct direct);
|
dirp->allocation = sizeof (struct dirent);
|
||||||
else
|
else
|
||||||
dirp->__allocation = statbuf.st_blksize;
|
dirp->allocation = statbuf.st_blksize;
|
||||||
#else
|
#else
|
||||||
dirp->__allocation = (BUFSIZ < sizeof (struct direct) ?
|
dirp->allocation = (BUFSIZ < sizeof (struct dirent) ?
|
||||||
sizeof (struct direct) : BUFSIZ);
|
sizeof (struct dirent) : BUFSIZ);
|
||||||
#endif
|
#endif
|
||||||
dirp->__data = (char *) malloc (dirp->__allocation);
|
dirp->data = (char *) malloc (dirp->allocation);
|
||||||
if (dirp->__data == NULL)
|
if (dirp->data == NULL)
|
||||||
{
|
{
|
||||||
int save = errno;
|
int save = errno;
|
||||||
free ((PTR) dirp);
|
free (dirp);
|
||||||
(void) __close (fd);
|
(void) __close (fd);
|
||||||
errno = save;
|
errno = save;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dirp->__fd = fd;
|
dirp->fd = fd;
|
||||||
return dirp;
|
return dirp;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -77,6 +77,8 @@ DEFUN(readdir, (dirp), DIR *dirp)
|
|||||||
p = memchr ((PTR) dp->d_name, '\0', D_NAMLEN (dp) + 1);
|
p = memchr ((PTR) dp->d_name, '\0', D_NAMLEN (dp) + 1);
|
||||||
d->d_namlen = (p != NULL) ? p - dp->d_name : D_NAMLEN (dp);
|
d->d_namlen = (p != NULL) ? p - dp->d_name : D_NAMLEN (dp);
|
||||||
memcpy (d->d_name, dp->d_name, d->d_namlen + 1);
|
memcpy (d->d_name, dp->d_name, d->d_namlen + 1);
|
||||||
|
d->d_type = DT_UNKNOWN;
|
||||||
|
d->d_reclen = &d->d_name[d->d_namlen + 1] - (char *) d;
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
void
|
void
|
||||||
DEFUN(seekdir, (dirp, pos), DIR *dirp AND __off_t pos)
|
DEFUN(seekdir, (dirp, pos), DIR *dirp AND __off_t pos)
|
||||||
{
|
{
|
||||||
(void) __lseek(dirp->__fd, pos, SEEK_SET);
|
(void) __lseek(dirp->fd, pos, SEEK_SET);
|
||||||
dirp->__size = 0;
|
dirp->size = 0;
|
||||||
dirp->__offset = 0;
|
dirp->offset = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,8 @@ DEFUN(telldir, (dirp), DIR *dirp)
|
|||||||
return (off_t) -1;
|
return (off_t) -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = __lseek(dirp->__fd, (off_t) 0, SEEK_CUR);
|
pos = __lseek(dirp->fd, (off_t) 0, SEEK_CUR);
|
||||||
if (pos == (off_t) -1)
|
if (pos == (off_t) -1)
|
||||||
return (off_t) -1;
|
return (off_t) -1;
|
||||||
return pos + dirp->__size - dirp->__offset;
|
return pos + dirp->size - dirp->offset;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||||
Contributed by Paul Eggert (eggert@twinsun.com).
|
Contributed by Paul Eggert (eggert@twinsun.com).
|
||||||
|
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
@ -146,12 +146,13 @@ ydhms_tm_diff (year, yday, hour, min, sec, tp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static time_t localtime_offset;
|
||||||
|
|
||||||
/* Convert *TP to a time_t value. */
|
/* Convert *TP to a time_t value. */
|
||||||
time_t
|
time_t
|
||||||
mktime (tp)
|
mktime (tp)
|
||||||
struct tm *tp;
|
struct tm *tp;
|
||||||
{
|
{
|
||||||
static time_t localtime_offset;
|
|
||||||
return __mktime_internal (tp, localtime_r, &localtime_offset);
|
return __mktime_internal (tp, localtime_r, &localtime_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user