aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-08-29 00:31:18 +0000
committerUlrich Drepper <drepper@redhat.com>1996-08-29 00:31:18 +0000
commit14bab8de31e04b990c2ce83d844f634ec57a6cc6 (patch)
treef6a25bd165f8997c08e58f6f2de69e9d34e0fda0
parentb236e99d90748f6caf77994e96dc5aaa48ce2993 (diff)
downloadglibc-14bab8de31e04b990c2ce83d844f634ec57a6cc6.zip
glibc-14bab8de31e04b990c2ce83d844f634ec57a6cc6.tar.gz
glibc-14bab8de31e04b990c2ce83d844f634ec57a6cc6.tar.bz2
update from main archive 960828glibc-1.93cvs/libc-960829cvs/libc-1-93
Thu Aug 29 00:28:08 1996 Ulrich Drepper <drepper@cygnus.com> * stdio-common/printf_fp.c (__printf_fp): Use default value `.` if `decimal' char is 0. * C-numeric.c (not_available): New constant. (_nl_C_LC_NUMERIC): Use `not_available' for grouping value. * nss/nsswitch.conf: Example configuration file. * nss/db-Makefile: Example Makefile for generation of databases for nss_db. * nss/Makefile (distribute): Add nsswitch.conf and db-Makefile. 1996-08-28 Paul Eggert <eggert@twinsun.com> * C-messages.c (_nl_C_LC_MESSAGES): Set yesexpr to "^[yY]" and noexpr to "^[nN]"; this conforms to POSIX.2. * C-time.c (_nl_C_LC_TIME): Change %d to %e in d_t_format, to conform to POSIX.2. 1996-08-28 Paul Eggert <eggert@twinsun.com> * C-monetary.c (not_available): New constant. (_nl_C_LC_MONETARY): Set mon_decimal_point to "", and set mon_grouping, int_frac_digits, frac_digits, p_cs_precedes, p_sep_by_space, n_cs_precedes, n_sep_by_space, p_sign_posn, and n_sign_posn to CHAR_MAX, as required by the POSIX Standard. Wed Aug 28 23:12:28 1996 Ulrich Drepper <drepper@cygnus.com> * nss/nss_db/db-XXX.c: Correct function names. They must be `_nss_db_*' instead of `_nss_files_*'. (lookup): `parse_line' returns 1 if succesful. * nss/nss_files/files-service.c (servbyname): Key for database must also contain protocol names. (servbypt): Likewise. Test must also check for protocol. Add `proto' argument. Tue Aug 27 09:56:13 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * MakeTAGS ($P/subdirs.pot): Prefix all file names, not only the first one. Fri Aug 16 16:11:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * nss/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Treat EPFNOSUPPORT and EAFNOSUPPORT as implying NSS_STATUS_UNAVAIL just like ECONNREFUSED already does. (_nss_dns_gethostbyaddr_r): Likewise. * nss/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise. (_nss_dns_getnetbyaddr_r): Likewise. * sysdeps/mach/hurd/socket.c (socket): For message transmission and RPC errors that indicate that the socket server is not really present and able to do its job, turn the error into EPFNOSUPPORT. * sysdeps/generic/sbrk.c (__sbrk): Get kernel brk address always only if in static libc or if statically linked program uses libc.so.
-rw-r--r--ChangeLog61
-rw-r--r--MakeTAGS2
-rw-r--r--Makerules7
-rw-r--r--NEWS2
-rw-r--r--PROJECTS42
-rw-r--r--db/Makefile5
-rw-r--r--db/makedb.c28
-rw-r--r--elf/dl-error.c9
-rw-r--r--elf/dl-load.c7
-rw-r--r--elf/dlerror.c2
-rw-r--r--elf/link.h5
-rw-r--r--elf/rtld.c115
-rw-r--r--io/fcntl.h10
-rw-r--r--locale/C-collate.c3
-rw-r--r--locale/C-ctype.c8
-rw-r--r--locale/C-messages.c9
-rw-r--r--locale/C-monetary.c28
-rw-r--r--locale/C-numeric.c10
-rw-r--r--locale/C-time.c5
-rw-r--r--nss/Makefile3
-rw-r--r--nss/nss_db/db-XXX.c22
-rw-r--r--nss/nss_files/files-service.c10
-rw-r--r--po/SYS_libc.pot186
-rw-r--r--posix/sys/types.h1
-rw-r--r--resolv/arpa/nameser.h32
-rw-r--r--resolv/res_debug.c43
-rw-r--r--resolv/res_init.c6
-rw-r--r--resolv/res_mkquery.c60
-rw-r--r--resolv/resolv.h8
-rw-r--r--stdio-common/printf_fp.c7
-rw-r--r--sysdeps/generic/dl-sysdep.c25
-rw-r--r--sysdeps/generic/sbrk.c18
-rw-r--r--sysdeps/unix/sysv/linux/fcntlbits.h11
-rw-r--r--sysdeps/unix/sysv/linux/gnu/types.h1
34 files changed, 494 insertions, 297 deletions
diff --git a/ChangeLog b/ChangeLog
index 875cabc..1f9be81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,47 @@
+Thu Aug 29 00:28:08 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * stdio-common/printf_fp.c (__printf_fp): Use default value `.` if
+ `decimal' char is 0.
+
+ * C-numeric.c (not_available): New constant.
+ (_nl_C_LC_NUMERIC): Use `not_available' for grouping value.
+
+ * nss/nsswitch.conf: Example configuration file.
+ * nss/db-Makefile: Example Makefile for generation of databases
+ for nss_db.
+ * nss/Makefile (distribute): Add nsswitch.conf and db-Makefile.
+
+1996-08-28 Paul Eggert <eggert@twinsun.com>
+
+ * C-messages.c (_nl_C_LC_MESSAGES): Set yesexpr to "^[yY]" and
+ noexpr to "^[nN]"; this conforms to POSIX.2.
+
+ * C-time.c (_nl_C_LC_TIME): Change %d to %e in d_t_format, to
+ conform to POSIX.2.
+
+1996-08-28 Paul Eggert <eggert@twinsun.com>
+
+ * C-monetary.c (not_available): New constant.
+ (_nl_C_LC_MONETARY): Set mon_decimal_point to "", and set
+ mon_grouping, int_frac_digits, frac_digits, p_cs_precedes,
+ p_sep_by_space, n_cs_precedes, n_sep_by_space, p_sign_posn, and
+ n_sign_posn to CHAR_MAX, as required by the POSIX Standard.
+
+Wed Aug 28 23:12:28 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * nss/nss_db/db-XXX.c: Correct function names. They must be
+ `_nss_db_*' instead of `_nss_files_*'.
+ (lookup): `parse_line' returns 1 if succesful.
+ * nss/nss_files/files-service.c (servbyname): Key for database
+ must also contain protocol names.
+ (servbypt): Likewise.
+ Test must also check for protocol. Add `proto' argument.
+
+Tue Aug 27 09:56:13 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * MakeTAGS ($P/subdirs.pot): Prefix all file names, not only the
+ first one.
+
Tue Aug 27 17:45:21 1996 Ulrich Drepper <drepper@cygnus.com>
* Makerules: Add some test for correct version of GNU Make.
@@ -207,6 +251,19 @@ Fri Aug 16 04:59:01 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/Makefile [$(subdir) = csu]: Use
-fkeep-inline-functions flag instead.
+Fri Aug 16 16:11:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * nss/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Treat
+ EPFNOSUPPORT and EAFNOSUPPORT as implying NSS_STATUS_UNAVAIL just
+ like ECONNREFUSED already does.
+ (_nss_dns_gethostbyaddr_r): Likewise.
+ * nss/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise.
+ (_nss_dns_getnetbyaddr_r): Likewise.
+
+ * sysdeps/mach/hurd/socket.c (socket): For message transmission
+ and RPC errors that indicate that the socket server is not really
+ present and able to do its job, turn the error into EPFNOSUPPORT.
+
Fri Aug 16 01:24:33 1996 Ulrich Drepper <drepper@cygnus.com>
* inet/ruserpass.c (userpass): Allocate buffer for .netrc file
@@ -437,6 +494,10 @@ Sun Aug 11 16:19:42 1996 Ulrich Drepper <drepper@cygnus.com>
always only if in static libc or if statically linked program
uses libc.so.
+ * sysdeps/generic/sbrk.c (__sbrk): Get kernel brk address
+ always only if in static libc or if statically linked program
+ uses libc.so.
+
Sun Aug 11 01:12:38 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt): Optimize LD_BIND_NOW
diff --git a/MakeTAGS b/MakeTAGS
index 0416493..bd52497 100644
--- a/MakeTAGS
+++ b/MakeTAGS
@@ -159,7 +159,7 @@ ifndef subdir
$P/subdirs.pot: $(subdirs:%=$P/%.pot)
@rm -f $@.new
(for d in $(subdirs); \
- do sed "s%^#: %&$$d/%" $P/$$d.pot; done) > $@.new
+ do sed "/^#:/s% % $$d/%g" $P/$$d.pot; done) > $@.new
mv -f $@.new $@
# Get $(version) defined.
diff --git a/Makerules b/Makerules
index 2cc5b9c..ede97c8 100644
--- a/Makerules
+++ b/Makerules
@@ -25,6 +25,13 @@ ifneq (,)
This makefile requires GNU Make.
endif
+REQUIRED_MAKE_VERSION = 3.74
+
+ifneq ($(REQUIRED_MAKE_VERSION), \
+ $(firstword $(sort $(MAKE_VERSION) $(REQUIRED_MAKE_VERSION))))
+Wrong GNU Make version. See above for the version needed.
+endif
+
ifdef subdir
.. := ../
diff --git a/NEWS b/NEWS
index 76a4272..163ba72 100644
--- a/NEWS
+++ b/NEWS
@@ -104,7 +104,7 @@ Version 2.0
* The new header file <fts.h> and suite of functions simplify programs that
operate on directory trees. This code comes from 4.4 BSD.
-* The resolver code has been updated from the BIND 4.9.5-T1A release.
+* The resolver code has been updated from the BIND 4.9.5-T3A release.
* The new function `malloc_find_object_address' finds the starting address
of a malloc'd block, given any address within the block;
diff --git a/PROJECTS b/PROJECTS
index 893d1ef..bf29541 100644
--- a/PROJECTS
+++ b/PROJECTS
@@ -1,6 +1,6 @@
Open jobs for finishing GNU libc:
---------------------------------
-Status: July 1996
+Status: August 1996
If you have time and talent to take over any of the jobs below please
contact <bug-glibc@prep.ai.mit.edu>
@@ -32,33 +32,7 @@ contact <bug-glibc@prep.ai.mit.edu>
Implementation idea: use some functions from bash.
-[ 5] Write reentrant versions of crypt() et.al.
-
- Implementation idea: Define in <crypt.h>
-
- struct crypt_data
- {
- <... all the needed data ...>
- };
-
- and define additional functions
-
- char *crypt_r (__const char *__key, __const char *__salt,
- struct crypt_data *__data);
-
- void setkey_r (__const char *__key, struct crypt_data *__data);
-
- void encrypt_r (char *__block, int __edflag,
- struct crypt_data *__data);
-
- If possible the non-reentrant functions should use the reentrant
- ones.
-
- Because of the US export restrictions it might be a good idea if
- some non-american person does this job.
-
-
-[ 6] Write `long double' versions of the math functions. This should be
+[ 5] Write `long double' versions of the math functions. This should be
done in collaboration with the NetBSD and FreeBSD people.
The libm is in fact fdlibm (not the same as in Linux libc).
@@ -66,7 +40,7 @@ contact <bug-glibc@prep.ai.mit.edu>
**** Partly done.
-[ 7] If you enjoy assembler programming (as I do --drepper :-) you might
+[ 6] If you enjoy assembler programming (as I do --drepper :-) you might
be interested in writing optimized versions for some functions.
Especially the string handling functions can be optimized a lot.
@@ -81,21 +55,21 @@ contact <bug-glibc@prep.ai.mit.edu>
on this.
-[ 8] Write nftw() function. Perhaps it might be good to reimplement the
+[ 7] Write nftw() function. Perhaps it might be good to reimplement the
ftw() function as well to share most of the code.
**** Almost done!
-[ 9] Write AVL-tree based tsearch() et.al. functions. Currently only
+[ 8] Write AVL-tree based tsearch() et.al. functions. Currently only
a very simple algorithm is used.
There is a public domain version but using this would cause problems
with the assignment.
-[10] Extend regex and/or rx to work with wide characters.
+[ 9] Extend regex and/or rx to work with wide characters.
-[11] Add mmap() support to malloc().
+[10] Add mmap() support to malloc().
Doug Lea's malloc implementation might give some ideas. Perhaps
switching completly to his implementation is an option if it
a) can work without mmap() support (not all system GNU libc
@@ -107,7 +81,7 @@ contact <bug-glibc@prep.ai.mit.edu>
Please contact bug-glibc@prep.ai.mit.edu before starting to avoid
duplicated work.
-[12] Write access function for netmasks, bootparams, netgroup, publickey,
+[11] Write access function for netmasks, bootparams, netgroup, publickey,
automount, aliases databases for nss_files and nss_db module.
The functions should be embedded in the nss scheme. This is not
hard and not all services must be supported at once.
diff --git a/db/Makefile b/db/Makefile
index 2c678df..e5a6055 100644
--- a/db/Makefile
+++ b/db/Makefile
@@ -25,6 +25,9 @@ distribute := compat.h \
hash/extern.h hash/hash.h hash/page.h \
recno/extern.h recno/recno.h
+others := makedb
+install-bin := makedb
+
include ../Rules
CPPFLAGS += -D__DBINTERFACE_PRIVATE
@@ -35,3 +38,5 @@ CFLAGS-hash_func.c := -Wno-unused
# The db code outsmarts the compiler frequently.
override CFLAGS += -Wno-uninitialized
+
+$(objpfx)makedb: -ldb
diff --git a/db/makedb.c b/db/makedb.c
index b1ed982..a215f25 100644
--- a/db/makedb.c
+++ b/db/makedb.c
@@ -39,15 +39,16 @@ static const struct option long_options[] =
{ "help", no_argument, NULL, 'h' },
{ "fold-case", no_argument, NULL, 'f' },
{ "output", required_argument, NULL, 'o' },
+ { "quiet", no_argument, NULL, 'q' },
{ "undo", no_argument, NULL, 'u' },
{ "version", no_argument, NULL, 'V' },
- { NULL, }
+ { NULL, 0, NULL, 0}
};
/* Prototypes for local functions. */
static void usage __P ((int status)) __attribute__ ((noreturn));
static int process_input __P ((FILE *input, const char *inname, DB *output,
- int to_lowercase));
+ int to_lowercase, int be_quiet));
static int print_database __P ((DB *db));
@@ -64,6 +65,7 @@ main (argc, argv)
int do_version;
int to_lowercase;
int do_undo;
+ int be_quiet;
int status;
int opt;
@@ -78,6 +80,7 @@ main (argc, argv)
do_version = 0;
to_lowercase = 0;
do_undo = 0;
+ be_quiet = 0;
output_name = NULL;
while ((opt = getopt_long (argc, argv, "fho:uV", long_options, NULL)) != EOF)
@@ -94,6 +97,9 @@ main (argc, argv)
case 'o':
output_name = optarg;
break;
+ case 'q':
+ be_quiet = 1;
+ break;
case 'u':
do_undo = 1;
break;
@@ -170,7 +176,8 @@ main (argc, argv)
error (EXIT_FAILURE, errno, gettext ("cannot open output file `%s'"));
/* Start the real work. */
- status = process_input (input_file, input_name, db_file, to_lowercase);
+ status = process_input (input_file, input_name, db_file, to_lowercase,
+ be_quiet);
/* Close files. */
if (input_file != stdin)
@@ -197,6 +204,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-f, --fold-case convert key to lower case\n\
-h, --help display this help and exit\n\
-o, --output=NAME write output to file NAME\n\
+ --quiet don't print messages while building database\n\
-u, --undo print content of database file, one entry a line\n\
-V, --version output version information and exit\n\
If INPUT-FILE is -, input is read from standard input.\n"),
@@ -208,11 +216,12 @@ If INPUT-FILE is -, input is read from standard input.\n"),
static int
-process_input (input, inname, output, to_lowercase)
+process_input (input, inname, output, to_lowercase, be_quiet)
FILE *input;
const char *inname;
DB *output;
int to_lowercase;
+ int be_quiet;
{
char *line;
size_t linelen;
@@ -278,11 +287,18 @@ process_input (input, inname, output, to_lowercase)
if (status != 0)
{
if (status == 1)
- error_at_line (0, 0, inname, linenr, gettext ("duplicate key"));
+ {
+ if (!be_quiet)
+ error_at_line (0, 0, inname, linenr,
+ gettext ("duplicate key"));
+ /* This is no real error. Just give a warning. */
+ status = 0;
+ }
else
error (0, errno, gettext ("while writing data base file"));
- status = EXIT_FAILURE;
+ status = status ? EXIT_FAILURE : EXIT_SUCCESS;
+
clearerr (input);
break;
}
diff --git a/elf/dl-error.c b/elf/dl-error.c
index 2eaa7e0..40ded4f 100644
--- a/elf/dl-error.c
+++ b/elf/dl-error.c
@@ -20,13 +20,15 @@ Cambridge, MA 02139, USA. */
#include <stddef.h>
#include <link.h>
#include <setjmp.h>
+#include <stdlib.h>
#include <string.h>
/* This structure communicates state between _dl_catch_error and
_dl_signal_error. */
struct catch
{
- const char *errstring, *objname; /* Error detail filled in here. */
+ char *errstring; /* Error detail filled in here. */
+ const char *objname;
jmp_buf env; /* longjmp here on error. */
};
@@ -69,7 +71,7 @@ _dl_signal_error (int errcode,
}
int
-_dl_catch_error (const char **errstring,
+_dl_catch_error (char **errstring,
const char **objname,
void (*operate) (void))
{
@@ -82,7 +84,8 @@ _dl_catch_error (const char **errstring,
catch = &c;
(*operate) ();
catch = NULL;
- *errstring = *objname = NULL;
+ *errstring = NULL;
+ *objname = NULL;
return 0;
}
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 6fd6a6c..b56303f 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -481,6 +481,7 @@ _dl_map_object (struct link_map *loader, const char *name, int type)
{
int fd;
char *realname;
+ char *name_copy;
struct link_map *l;
/* Look for this name among those already loaded. */
@@ -572,8 +573,8 @@ _dl_map_object (struct link_map *loader, const char *name, int type)
if (fd != -1)
{
- name = local_strdup (name);
- if (name == NULL)
+ name_copy = local_strdup (name);
+ if (name_copy == NULL)
{
__close (fd);
fd = -1;
@@ -583,5 +584,5 @@ _dl_map_object (struct link_map *loader, const char *name, int type)
if (fd == -1)
_dl_signal_error (errno, name, "cannot open shared object file");
- return _dl_map_object_from_fd (name, fd, realname, loader, type);
+ return _dl_map_object_from_fd (name_copy, fd, realname, loader, type);
}
diff --git a/elf/dlerror.c b/elf/dlerror.c
index 663207d..9b78e47 100644
--- a/elf/dlerror.c
+++ b/elf/dlerror.c
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
#include <stdlib.h>
static int last_errcode;
-static const char *last_errstring;
+static char *last_errstring;
static const char *last_object_name;
char *
diff --git a/elf/link.h b/elf/link.h
index a963700..a628172 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -178,8 +178,9 @@ extern void _dl_signal_error (int errcode,
/* Call OPERATE, catching errors from `dl_signal_error'. If there is no
error, *ERRSTRING is set to null. If there is an error, *ERRSTRING and
*OBJECT are set to the strings passed to _dl_signal_error, and the error
- code passed is the return value. */
-extern int _dl_catch_error (const char **errstring,
+ code passed is the return value. ERRSTRING if nonzero points to a
+ malloc'ed string which the caller has to free after use. */
+extern int _dl_catch_error (char **errstring,
const char **object,
void (*operate) (void));
diff --git a/elf/rtld.c b/elf/rtld.c
index 8b75492..0736218 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -38,6 +38,12 @@ extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
ElfW(Addr) *user_entry));
extern void _dl_sysdep_start_cleanup (void);
+/* System-dependent function to read a file's whole contents
+ in the most convenient manner available. */
+extern void *_dl_sysdep_read_whole_file (const char *filename,
+ size_t *filesize_ptr,
+ int mmap_prot);
+
int _dl_argc;
char **_dl_argv;
const char *_dl_rpath;
@@ -138,6 +144,8 @@ dl_main (const ElfW(Phdr) *phdr,
enum { normal, list, verify, trace } mode;
struct link_map **preloads;
unsigned int npreloads;
+ size_t file_size;
+ char *file;
mode = getenv ("LD_TRACE_LOADED_OBJECTS") != NULL ? trace : normal;
@@ -296,8 +304,77 @@ of this helper program; chances are you did not intend to run this program.\n",
l->l_next = &_dl_rtld_map;
_dl_rtld_map.l_prev = l;
+ /* We have two ways to specify objects to preload: via environment
+ variable and via the file /etc/ld.so.preload. The later can also
+ be used when security is enabled. */
preloads = NULL;
npreloads = 0;
+
+ /* Read the contents of the file. */
+ file = _dl_sysdep_read_whole_file ("/etc/ld.so.preload", &file_size,
+ PROT_READ | PROT_WRITE);
+ if (file)
+ {
+ /* Parse the file. It contains names of libraries to be loaded,
+ separated by white spaces or `:'. It may also contain
+ comments introduced by `#'. */
+ char *problem;
+ char *runp;
+ size_t rest;
+
+ /* Eliminate comments. */
+ runp = file;
+ rest = file_size;
+ while (rest > 0)
+ {
+ char *comment = memchr (runp, '#', rest);
+ if (comment == NULL)
+ break;
+
+ rest -= comment - runp;
+ do
+ *comment = ' ';
+ while (--rest > 0 && *++comment != '\n');
+ }
+
+ /* We have one problematic case: if we have a name at the end of
+ the file without a trailing terminating characters, we cannot
+ place the \0. Handle the case separately. */
+ if (file[file_size - 1] != ' ' && file[file_size] != '\t'
+ && file[file_size] != '\n')
+ {
+ problem = &file[file_size];
+ while (problem > file && problem[-1] != ' ' && problem[-1] != '\t'
+ && problem[-1] != '\n')
+ --problem;
+
+ if (problem > file)
+ problem[-1] = '\0';
+ }
+ else
+ problem = NULL;
+
+ if (file != problem)
+ {
+ char *p;
+ runp = file;
+ while ((p = strsep (&runp, ": \t\n")) != NULL)
+ {
+ (void) _dl_map_object (NULL, p, lt_library);
+ ++npreloads;
+ }
+ }
+
+ if (problem != NULL)
+ {
+ char *p = strndupa (problem, file_size - (problem - file));
+ (void) _dl_map_object (NULL, p, lt_library);
+ }
+
+ /* We don't need the file anymore. */
+ __munmap (file, file_size);
+ }
+
if (! __libc_enable_secure)
{
const char *preloadlist = getenv ("LD_PRELOAD");
@@ -313,25 +390,25 @@ of this helper program; chances are you did not intend to run this program.\n",
(void) _dl_map_object (NULL, p, lt_library);
++npreloads;
}
-
- if (npreloads != 0)
- {
- /* Set up PRELOADS with a vector of the preloaded libraries. */
- struct link_map *l;
- unsigned int i;
- preloads = __alloca (npreloads * sizeof preloads[0]);
- l = _dl_rtld_map.l_next; /* End of the chain before preloads. */
- i = 0;
- do
- {
- preloads[i++] = l;
- l = l->l_next;
- } while (l);
- assert (i == npreloads);
- }
}
}
+ if (npreloads != 0)
+ {
+ /* Set up PRELOADS with a vector of the preloaded libraries. */
+ struct link_map *l;
+ unsigned int i;
+ preloads = __alloca (npreloads * sizeof preloads[0]);
+ l = _dl_rtld_map.l_next; /* End of the chain before preloads. */
+ i = 0;
+ do
+ {
+ preloads[i++] = l;
+ l = l->l_next;
+ } while (l);
+ assert (i == npreloads);
+ }
+
/* Load all the libraries specified by DT_NEEDED entries. If LD_PRELOAD
specified some libraries to load, these are inserted before the actual
dependencies in the executable's searchlist for symbol resolution. */
@@ -386,7 +463,7 @@ of this helper program; chances are you did not intend to run this program.\n",
char buf[20], *bp;
buf[sizeof buf - 1] = '\0';
bp = _itoa (l->l_addr, &buf[sizeof buf - 1], 16, 0);
- while (&buf[sizeof buf - 1] - bp < sizeof l->l_addr * 2)
+ while ((size_t) (&buf[sizeof buf - 1] - bp) < sizeof l->l_addr * 2)
*--bp = '0';
_dl_sysdep_message ("\t", l->l_libname, " => ", l->l_name,
" (0x", bp, ")\n", NULL);
@@ -403,12 +480,12 @@ of this helper program; chances are you did not intend to run this program.\n",
char buf[20], *bp;
buf[sizeof buf - 1] = '\0';
bp = _itoa (ref->st_value, &buf[sizeof buf - 1], 16, 0);
- while (&buf[sizeof buf - 1] - bp < sizeof loadbase * 2)
+ while ((size_t) (&buf[sizeof buf - 1] - bp) < sizeof loadbase * 2)
*--bp = '0';
_dl_sysdep_message (_dl_argv[i], " found at 0x", bp, NULL);
buf[sizeof buf - 1] = '\0';
bp = _itoa (loadbase, &buf[sizeof buf - 1], 16, 0);
- while (&buf[sizeof buf - 1] - bp < sizeof loadbase * 2)
+ while ((size_t) (&buf[sizeof buf - 1] - bp) < sizeof loadbase * 2)
*--bp = '0';
_dl_sysdep_message (" in object at 0x", bp, "\n", NULL);
}
diff --git a/io/fcntl.h b/io/fcntl.h
index 7d24c22..26d42f3 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -43,16 +43,6 @@ __BEGIN_DECLS
#endif
#endif /* Use misc. */
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-#define FAPPEND O_APPEND
-#define FASYNC O_ASYNC
-#define FFSYNC O_FSYNC
-#define FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
/* Do the file control operation described by CMD on FD.
The remaining arguments are interpreted depending on CMD. */
extern int __fcntl __P ((int __fd, int __cmd, ...));
diff --git a/locale/C-collate.c b/locale/C-collate.c
index 08fb47b..0d7be6b 100644
--- a/locale/C-collate.c
+++ b/locale/C-collate.c
@@ -20,6 +20,9 @@ Boston, MA 02111-1307, USA. */
#include <endian.h>
#include "localeinfo.h"
+/* These tables' entries contain values which make the function behave
+ accoriding to POSIX.2 Table 2-8 ``LC_COLLATE Category Definition in
+ the POSIX Locale''. */
const u_int32_t _nl_C_LC_COLLATE_symbol_hash[446] =
{
diff --git a/locale/C-ctype.c b/locale/C-ctype.c
index 6daeb1d..0b9f1a0 100644
--- a/locale/C-ctype.c
+++ b/locale/C-ctype.c
@@ -20,6 +20,14 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h"
#include <endian.h>
+/* This table's entries are taken from POSIX.2 Table 2-6
+ ``LC_CTYPE Category Definitionin the POSIX Locale''.
+
+ The `_nl_C_LC_CTYPE_width' array is a GNU extension.
+
+ In the `_nl_C_LC_CTYPE_class' array the value for EOF (== -1)
+ is set to always return 0 and the conversion arrays return EOF. */
+
const char _nl_C_LC_CTYPE_class[768] =
/* 0x80 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
/* 0x86 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
diff --git a/locale/C-messages.c b/locale/C-messages.c
index b5fcd19..566fedc 100644
--- a/locale/C-messages.c
+++ b/locale/C-messages.c
@@ -19,14 +19,19 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h"
+/* This table's entries are taken from POSIX.2 Table 2-12
+ ``LC_MESSAGES Category Definition in the POSIX Locale''.
+
+ The last two fields are a GNU extension. */
+
const struct locale_data _nl_C_LC_MESSAGES =
{
_nl_C_name,
NULL, 0, /* no file mapped */
4,
{
- { string: "[yY][[:alpha:]]*" },
- { string: "[nN][[:alpha:]]*" },
+ { string: "^[yY]" },
+ { string: "^[nN]" },
{ string: "" },
{ string: "" }
}
diff --git a/locale/C-monetary.c b/locale/C-monetary.c
index 542e5c3..d81dbf8 100644
--- a/locale/C-monetary.c
+++ b/locale/C-monetary.c
@@ -19,6 +19,14 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h"
+/* This table's entries are taken from POSIX.2 Table 2-9
+ ``LC_MONETARY Category Definition in the POSIX Locale''. */
+#ifdef __CHAR_UNSIGNED__
+static const char not_available[] = "\377";
+#else
+static const char not_available[] = "\177";
+#endif
+
const struct locale_data _nl_C_LC_MONETARY =
{
_nl_C_name,
@@ -27,18 +35,18 @@ const struct locale_data _nl_C_LC_MONETARY =
{
{ string: "" },
{ string: "" },
- { string: "." },
{ string: "" },
- { string: "\177" },
+ { string: "" },
+ { string: not_available },
{ string: "" },
{ string: "" },
- { string: "\177" },
- { string: "\177" },
- { string: "\177" },
- { string: "\177" },
- { string: "\177" },
- { string: "\177" },
- { string: "\177" },
- { string: "\177" }
+ { string: not_available },
+ { string: not_available },
+ { string: not_available },
+ { string: not_available },
+ { string: not_available },
+ { string: not_available },
+ { string: not_available },
+ { string: not_available }
}
};
diff --git a/locale/C-numeric.c b/locale/C-numeric.c
index 6298f70..9a981f1 100644
--- a/locale/C-numeric.c
+++ b/locale/C-numeric.c
@@ -19,6 +19,14 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h"
+/* This table's entries are taken from POSIX.2 Table 2-10
+ ``LC_NUMERIC Category Definition in the POSIX Locale''. */
+#ifdef __CHAR_UNSIGNED__
+static const char not_available[] = "\377";
+#else
+static const char not_available[] = "\177";
+#endif
+
const struct locale_data _nl_C_LC_NUMERIC =
{
_nl_C_name,
@@ -27,6 +35,6 @@ const struct locale_data _nl_C_LC_NUMERIC =
{
{ string: "." },
{ string: "" },
- { string: "\177" }
+ { string: not_available }
}
};
diff --git a/locale/C-time.c b/locale/C-time.c
index a595e6b..b03ff49 100644
--- a/locale/C-time.c
+++ b/locale/C-time.c
@@ -19,6 +19,9 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h"
+/* This table's entries are taken from POSIX.2 Table 2-11
+ ``LC_TIME Category Definition in the POSIX Locale''. */
+
const struct locale_data _nl_C_LC_TIME =
{
_nl_C_name,
@@ -65,7 +68,7 @@ const struct locale_data _nl_C_LC_TIME =
{ string: "December" },
{ string: "AM" },
{ string: "PM" },
- { string: "%a %b %d %H:%M:%S %Y" },
+ { string: "%a %b %e %H:%M:%S %Y" },
{ string: "%m/%d/%y" },
{ string: "%H:%M:%S" },
{ string: "%I:%M:%S %p" },
diff --git a/nss/Makefile b/nss/Makefile
index 5dcae4d..4a36dcf 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -23,7 +23,8 @@ subdir := nss
headers := nss.h
distribute := nsswitch.h XXX-lookup.c getXXbyYY.c getXXbyYY_r.c \
- getXXent.c getXXent_r.c databases.def
+ getXXent.c getXXent_r.c databases.def \
+ nsswitch.conf db-Makefile
# This is the trivial part which goes into libc itself.
routines = nsswitch $(addsuffix -lookup,$(databases))
diff --git a/nss/nss_db/db-XXX.c b/nss/nss_db/db-XXX.c
index 792dc5c..e2bab51 100644
--- a/nss/nss_db/db-XXX.c
+++ b/nss/nss_db/db-XXX.c
@@ -34,7 +34,7 @@ Cambridge, MA 02139, USA. */
#define ENTNAME_r CONCAT(ENTNAME,_r)
#include <paths.h>
-#define DBFILE _PATH_VARDB DATABASE
+#define DBFILE _PATH_VARDB DATABASE ".db"
#ifdef NEED_H_ERRNO
#define H_ERRNO_PROTO , int *herrnop
@@ -79,7 +79,7 @@ internal_setent (int stayopen)
/* Thread-safe, exported version of that. */
int
-CONCAT(_nss_files_set,ENTNAME) (int stayopen)
+CONCAT(_nss_db_set,ENTNAME) (int stayopen)
{
int status;
@@ -110,7 +110,7 @@ internal_endent (void)
/* Thread-safe, exported version of that. */
int
-CONCAT(_nss_files_end,ENTNAME) (void)
+CONCAT(_nss_db_end,ENTNAME) (void)
{
__libc_lock_lock (lock);
@@ -133,11 +133,13 @@ lookup (const DBT *key, struct STRUCTURE *result,
DBT value;
/* Open the database. */
- internal_setent (keep_db);
+ status = internal_setent (keep_db);
+ if (status != NSS_STATUS_SUCCESS)
+ return status;
/* Succeed iff it matches a value that parses correctly. */
status = (((*db->get) (db, key, &value, 0) == 0 &&
- parse_line (value.data, result, buffer, buflen) == 0)
+ parse_line (value.data, result, buffer, buflen))
? NSS_STATUS_SUCCESS : NSS_STATUS_NOTFOUND);
if (! keep_db)
@@ -164,9 +166,9 @@ lookup (const DBT *key, struct STRUCTURE *result,
#define DB_LOOKUP(name, keysize, keypattern, break_if_match, proto...) \
enum nss_status \
-_nss_files_get##name##_r (proto, \
- struct STRUCTURE *result, \
- char *buffer, int buflen H_ERRNO_PROTO) \
+_nss_db_get##name##_r (proto, \
+ struct STRUCTURE *result, \
+ char *buffer, int buflen H_ERRNO_PROTO) \
{ \
DBT key; \
enum nss_status status; \
@@ -186,8 +188,8 @@ _nss_files_get##name##_r (proto, \
/* Return the next entry from the database file, doing locking. */
enum nss_status
-CONCAT(_nss_files_get,ENTNAME_r) (struct STRUCTURE *result,
- char *buffer, int buflen H_ERRNO_PROTO)
+CONCAT(_nss_db_get,ENTNAME_r) (struct STRUCTURE *result,
+ char *buffer, int buflen H_ERRNO_PROTO)
{
/* Return next entry in host file. */
enum nss_status status;
diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c
index 1bd26d1..128ae37 100644
--- a/nss/nss_files/files-service.c
+++ b/nss/nss_files/files-service.c
@@ -39,7 +39,7 @@ LINE_PARSER
#include GENERIC
-DB_LOOKUP (servbyname, 1 + strlen (name), (".%s", name),
+DB_LOOKUP (servbyname, 1 + strlen (name), (".%s/%s", name, proto),
{
/* Must match both protocol and name. */
if (strcmp (result->s_proto, proto))
@@ -48,8 +48,10 @@ DB_LOOKUP (servbyname, 1 + strlen (name), (".%s", name),
},
const char *name, const char *proto)
-DB_LOOKUP (servbyport, 20, ("=%d", port),
+DB_LOOKUP (servbyport, 20, ("=%d/%s", port, proto),
{
- if (result->s_port == port)
+ /* Must match both port and protocol. */
+ if (result->s_port == port
+ && strcmp (result->s_proto, proto) == 0)
break;
- }, int port)
+ }, int port, const char *proto)
diff --git a/po/SYS_libc.pot b/po/SYS_libc.pot
index 3bc8a9b..c86468f 100644
--- a/po/SYS_libc.pot
+++ b/po/SYS_libc.pot
@@ -1,4 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
+# GNU libc message catalog of translations
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libc 1.93\n"
-"POT-Creation-Date: 1996-08-14 18:02\n"
+"POT-Creation-Date: 1996-08-29 1:37\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+DIST\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -49,7 +49,7 @@ msgstr ""
msgid " (rule from \"%s\", line %d)"
msgstr ""
-#: locale/programs/ld-collate.c:360 programs/ld-ctype.c:1233
+#: locale/programs/ld-collate.c:360 locale/programs/ld-ctype.c:1233
msgid " done\n"
msgstr ""
@@ -183,7 +183,7 @@ msgstr ""
msgid "%s: command was '%s', result was %d\n"
msgstr ""
-#: locale/programs/charmap.c:593 programs/locfile.c:878
+#: locale/programs/charmap.c:593 locale/programs/locfile.c:878
#, c-format
msgid "%s: error in state machine"
msgstr ""
@@ -228,7 +228,7 @@ msgstr ""
msgid "%s: output would overwrite %s\n"
msgstr ""
-#: time/zic.c:838 zic.c:1249 zic.c:1269
+#: time/zic.c:838 time/zic.c:1249 time/zic.c:1269
#, c-format
msgid "%s: panic: Invalid l_value %d\n"
msgstr ""
@@ -299,7 +299,7 @@ msgstr ""
msgid ".rhosts writeable by other than owner"
msgstr ""
-#: clnt_perr.c:133 sunrpc/clnt_perr.c:112
+#: sunrpc/clnt_perr.c:112 sunrpc/clnt_perr.c:133
#, c-format
msgid "; low version = %lu, high version = %lu"
msgstr ""
@@ -554,6 +554,10 @@ msgstr ""
msgid "Error in unknown error system: "
msgstr ""
+#: inet/ruserpass.c:156
+msgid "Error: .netrc file is readable by others."
+msgstr ""
+
#: stdio-common/../sysdeps/gnu/errlist.c:662
msgid "Exchange full"
msgstr ""
@@ -1191,6 +1195,10 @@ msgstr ""
msgid "Remote address changed"
msgstr ""
+#: inet/ruserpass.c:157
+msgid "Remove password or make file unreadable by others."
+msgstr ""
+
#: resolv/herror.c:73
msgid "Resolver Error 0 (no error)"
msgstr ""
@@ -1395,7 +1403,7 @@ msgstr ""
msgid "Transport endpoint is not connected"
msgstr ""
-#: catgets/gencat.c:202
+#: catgets/gencat.c:202 db/makedb.c:196
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
@@ -1405,7 +1413,13 @@ msgstr ""
msgid "Trying %s...\n"
msgstr ""
-#: ../sysdeps/mach/_strerror.c:58 string/../sysdeps/generic/_strerror.c:36
+#: inet/ruserpass.c:241
+#, c-format
+msgid "Unknown .netrc keyword %s"
+msgstr ""
+
+#: string/../sysdeps/generic/_strerror.c:36
+#: string/../sysdeps/mach/_strerror.c:58
msgid "Unknown error "
msgstr ""
@@ -1469,6 +1483,22 @@ msgid ""
"is -, output is written to standard output.\n"
msgstr ""
+#: db/makedb.c:199
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... INPUT-FILE OUTPUT-FILE\n"
+" %s [OPTION]... -o OUTPUT-FILE INPUT-FILE\n"
+" %s [OPTION]... -u INPUT-FILE\n"
+"Mandatory arguments to long options are mandatory for short options too.\n"
+" -f, --fold-case convert key to lower case\n"
+" -h, --help display this help and exit\n"
+" -o, --output=NAME write output to file NAME\n"
+" --quiet don't print messages while building database\n"
+" -u, --undo print content of database file, one entry a line\n"
+" -V, --version output version information and exit\n"
+"If INPUT-FILE is -, input is read from standard input.\n"
+msgstr ""
+
#: posix/getconf.c:131
#, c-format
msgid "Usage: %s variable_name [pathname]\n"
@@ -1507,12 +1537,12 @@ msgstr ""
msgid "Zone continuation line end time is not after end time of previous line"
msgstr ""
-#: locale/programs/charmap.c:397 programs/locfile.c:341
+#: locale/programs/charmap.c:397 locale/programs/locfile.c:341
#, c-format
msgid "`%1$s' definition does not end with `END %1$s'"
msgstr ""
-#: locale/programs/ld-monetary.c:358 programs/ld-numeric.c:190
+#: locale/programs/ld-monetary.c:358 locale/programs/ld-numeric.c:190
#, c-format
msgid "`-1' must be last entry in `%s' field in `%s' category"
msgstr ""
@@ -1552,7 +1582,7 @@ msgstr ""
msgid "bad .rhosts owner"
msgstr ""
-#: locale/programs/charmap.c:212 programs/locfile.c:209
+#: locale/programs/charmap.c:212 locale/programs/locfile.c:209
msgid "bad argument"
msgstr ""
@@ -1598,21 +1628,26 @@ msgstr ""
msgid "cannot insert collation element `%.*s'"
msgstr ""
-#: locale/programs/ld-collate.c:1492 programs/ld-collate.c:1497
+#: locale/programs/ld-collate.c:1492 locale/programs/ld-collate.c:1497
msgid "cannot insert into result table"
msgstr ""
-#: locale/programs/ld-collate.c:1165 programs/ld-collate.c:1207
+#: locale/programs/ld-collate.c:1165 locale/programs/ld-collate.c:1207
#, c-format
msgid "cannot insert new collating symbol definition: %s"
msgstr ""
-#: catgets/gencat.c:249
+#: db/makedb.c:148
+#, c-format
+msgid "cannot open database file `%s': %s"
+msgstr ""
+
+#: catgets/gencat.c:249 db/makedb.c:167
#, c-format
msgid "cannot open input file `%s'"
msgstr ""
-#: catgets/gencat.c:754 gencat.c:795
+#: catgets/gencat.c:754 catgets/gencat.c:795 db/makedb.c:176
#, c-format
msgid "cannot open output file `%s'"
msgstr ""
@@ -1645,11 +1680,12 @@ msgstr ""
msgid "character `%c' not defined while needed as default value"
msgstr ""
-#: locale/programs/ld-ctype.c:938 locale/programs/ld-ctype.c:1017
-#: locale/programs/ld-ctype.c:1041 locale/programs/ld-ctype.c:1113
-#: programs/ld-ctype.c:1001 programs/ld-ctype.c:1009 programs/ld-ctype.c:1025
-#: programs/ld-ctype.c:1033 programs/ld-ctype.c:1067 programs/ld-ctype.c:1075
-#: programs/ld-ctype.c:1151
+#: locale/programs/ld-ctype.c:938 locale/programs/ld-ctype.c:1001
+#: locale/programs/ld-ctype.c:1009 locale/programs/ld-ctype.c:1017
+#: locale/programs/ld-ctype.c:1025 locale/programs/ld-ctype.c:1033
+#: locale/programs/ld-ctype.c:1041 locale/programs/ld-ctype.c:1067
+#: locale/programs/ld-ctype.c:1075 locale/programs/ld-ctype.c:1113
+#: locale/programs/ld-ctype.c:1151
#, c-format
msgid "character `%s' not defined while needed as default value"
msgstr ""
@@ -1722,7 +1758,7 @@ msgstr ""
msgid "definition keyword expected"
msgstr ""
-#: locale/programs/charset.c:87 programs/charset.c:132
+#: locale/programs/charset.c:87 locale/programs/charset.c:132
#, c-format
msgid "duplicate character name `%s'"
msgstr ""
@@ -1736,6 +1772,10 @@ msgstr ""
msgid "duplicate definition for character `%.*s'"
msgstr ""
+#: db/makedb.c:293
+msgid "duplicate key"
+msgstr ""
+
#: catgets/gencat.c:368
msgid "duplicate set definition"
msgstr ""
@@ -1817,12 +1857,12 @@ msgstr ""
msgid "failure while writing data for category `%s'"
msgstr ""
-#: locale/programs/ld-monetary.c:154 programs/ld-numeric.c:95
+#: locale/programs/ld-monetary.c:154 locale/programs/ld-numeric.c:95
#, c-format
msgid "field `%s' in category `%s' not defined"
msgstr ""
-#: locale/programs/ld-messages.c:81 programs/ld-messages.c:102
+#: locale/programs/ld-messages.c:81 locale/programs/ld-messages.c:102
#, c-format
msgid "field `%s' in category `%s' undefined"
msgstr ""
@@ -1883,7 +1923,7 @@ msgstr ""
msgid "illegal result type"
msgstr ""
-#: catgets/gencat.c:341 gencat.c:418
+#: catgets/gencat.c:341 catgets/gencat.c:418
msgid "illegal set number"
msgstr ""
@@ -1897,6 +1937,10 @@ msgstr ""
msgid "implementation limit: no more than %d character maps allowed"
msgstr ""
+#: db/makedb.c:150
+msgid "incorrectly formatted file"
+msgstr ""
+
#: time/zic.c:815
msgid "input line of unknown type"
msgstr ""
@@ -1926,7 +1970,7 @@ msgstr ""
msgid "invalid abbreviation format"
msgstr ""
-#: time/zic.c:1115 zic.c:1314 zic.c:1328
+#: time/zic.c:1115 time/zic.c:1314 time/zic.c:1328
msgid "invalid day of month"
msgstr ""
@@ -1938,7 +1982,7 @@ msgstr ""
msgid "invalid leaping year"
msgstr ""
-#: time/zic.c:1102 zic.c:1205
+#: time/zic.c:1102 time/zic.c:1205
msgid "invalid month name"
msgstr ""
@@ -1950,7 +1994,7 @@ msgstr ""
msgid "invalid starting year"
msgstr ""
-#: time/zic.c:1131 zic.c:1233
+#: time/zic.c:1131 time/zic.c:1233
msgid "invalid time of day"
msgstr ""
@@ -1982,10 +2026,10 @@ msgstr ""
msgid "memory clobbered past end of allocated block"
msgstr ""
-#: locale/programs/ld-collate.c:167 locale/programs/ld-collate.c:177
-#: locale/programs/ld-collate.c:1467 posix/getconf.c:174
-#: programs/ld-collate.c:173 programs/ld-collate.c:1438 programs/locfile.c:940
-#: programs/xmalloc.c:64
+#: locale/programs/ld-collate.c:167 locale/programs/ld-collate.c:173
+#: locale/programs/ld-collate.c:177 locale/programs/ld-collate.c:1438
+#: locale/programs/ld-collate.c:1467 locale/programs/locfile.c:940
+#: locale/programs/xmalloc.c:64 posix/getconf.c:174
msgid "memory exhausted"
msgstr ""
@@ -2002,11 +2046,11 @@ msgstr ""
msgid "never registered prog %d\n"
msgstr ""
-#: rpc_parse.c:313 sunrpc/rpc_parse.c:305
+#: sunrpc/rpc_parse.c:305 sunrpc/rpc_parse.c:313
msgid "no array-of-pointer declarations -- use typedef"
msgstr ""
-#: locale/programs/ld-messages.c:95 programs/ld-messages.c:116
+#: locale/programs/ld-messages.c:95 locale/programs/ld-messages.c:116
#, c-format
msgid "no correct regular expression for field `%s' in category `%s': %s"
msgstr ""
@@ -2023,11 +2067,13 @@ msgstr ""
msgid "no other keyword shall be specified when `copy' is used"
msgstr ""
-#: locale/programs/charmap.c:315 programs/charmap.c:466 programs/charmap.c:545
+#: locale/programs/charmap.c:315 locale/programs/charmap.c:466
+#: locale/programs/charmap.c:545
msgid "no symbolic name given"
msgstr ""
-#: locale/programs/charmap.c:380 programs/charmap.c:512 programs/charmap.c:578
+#: locale/programs/charmap.c:380 locale/programs/charmap.c:512
+#: locale/programs/charmap.c:578
msgid "no symbolic name given for end of range"
msgstr ""
@@ -2044,25 +2090,30 @@ msgstr ""
msgid "portmap CALLIT: cannot fork.\n"
msgstr ""
-#: portmap.c:116 sunrpc/portmap.c:94
+#: sunrpc/portmap.c:94 sunrpc/portmap.c:116
msgid "portmap cannot bind"
msgstr ""
-#: portmap.c:112 sunrpc/portmap.c:86
+#: sunrpc/portmap.c:86 sunrpc/portmap.c:112
msgid "portmap cannot create socket"
msgstr ""
-#: rpc_scan.c:464 sunrpc/rpc_scan.c:456
+#: sunrpc/rpc_scan.c:456 sunrpc/rpc_scan.c:464
msgid "preprocessor error"
msgstr ""
-#: rpcinfo.c:350 sunrpc/rpcinfo.c:222
+#: db/makedb.c:309
+#, c-format
+msgid "problems while reading `%s'"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:222 sunrpc/rpcinfo.c:350
#, c-format
msgid "program %lu is not available\n"
msgstr ""
-#: rpcinfo.c:282 rpcinfo.c:371 rpcinfo.c:408 rpcinfo.c:429
-#: sunrpc/rpcinfo.c:245 sunrpc/rpcinfo.c:462
+#: sunrpc/rpcinfo.c:245 sunrpc/rpcinfo.c:282 sunrpc/rpcinfo.c:371
+#: sunrpc/rpcinfo.c:408 sunrpc/rpcinfo.c:429 sunrpc/rpcinfo.c:462
#, c-format
msgid "program %lu version %lu is not available\n"
msgstr ""
@@ -2126,7 +2177,7 @@ msgstr ""
msgid "run_svc returned unexpectedly\n"
msgstr ""
-#: time/zic.c:709 zic.c:711
+#: time/zic.c:709 time/zic.c:711
msgid "same rule name in multiple files"
msgstr ""
@@ -2142,7 +2193,7 @@ msgstr ""
msgid "sorting order `forward' and `backward' are mutually exclusive"
msgstr ""
-#: locale/programs/ld-collate.c:1567 programs/ld-collate.c:1613
+#: locale/programs/ld-collate.c:1567 locale/programs/ld-collate.c:1613
msgid ""
"specification of sorting weight for collation symbol does not make sense"
msgstr ""
@@ -2159,7 +2210,7 @@ msgstr ""
msgid "starting year greater than ending year"
msgstr ""
-#: sunrpc/svc_tcp.c:199 svc_tcp.c:204
+#: sunrpc/svc_tcp.c:199 sunrpc/svc_tcp.c:204
msgid "svc_tcp: makefd_xprt: out of memory\n"
msgstr ""
@@ -2171,7 +2222,7 @@ msgstr ""
msgid "svctcp_.c - udp socket creation problem"
msgstr ""
-#: sunrpc/svc_tcp.c:154 svc_tcp.c:161
+#: sunrpc/svc_tcp.c:154 sunrpc/svc_tcp.c:161
msgid "svctcp_create: out of memory\n"
msgstr ""
@@ -2211,16 +2262,17 @@ msgid ""
"definition"
msgstr ""
-#: locale/programs/ld-collate.c:1054 programs/ld-collate.c:1181
+#: locale/programs/ld-collate.c:1054 locale/programs/ld-collate.c:1181
#, c-format
msgid ""
"symbol for multicharacter collating element `%.*s' duplicates symbolic name "
"in charset"
msgstr ""
-#: locale/programs/charmap.c:314 locale/programs/charmap.c:465
-#: locale/programs/charmap.c:576 programs/charmap.c:348 programs/charmap.c:378
-#: programs/charmap.c:511 programs/charmap.c:544
+#: locale/programs/charmap.c:314 locale/programs/charmap.c:348
+#: locale/programs/charmap.c:378 locale/programs/charmap.c:465
+#: locale/programs/charmap.c:511 locale/programs/charmap.c:544
+#: locale/programs/charmap.c:576
#, c-format
msgid "syntax error in %s definition: %s"
msgstr ""
@@ -2273,7 +2325,7 @@ msgstr ""
msgid "syntax error in order specification"
msgstr ""
-#: locale/programs/charmap.c:195 programs/charmap.c:211
+#: locale/programs/charmap.c:195 locale/programs/charmap.c:211
#, c-format
msgid "syntax error in prolog: %s"
msgstr ""
@@ -2286,7 +2338,7 @@ msgstr ""
msgid "syntax error: not inside a locale definition section"
msgstr ""
-#: catgets/gencat.c:370 gencat.c:506 gencat.c:533
+#: catgets/gencat.c:370 catgets/gencat.c:506 catgets/gencat.c:533
msgid "this is the first definition"
msgstr ""
@@ -2294,7 +2346,7 @@ msgstr ""
msgid "time before zero"
msgstr ""
-#: time/zic.c:1128 zic.c:1960 zic.c:1979
+#: time/zic.c:1128 time/zic.c:1960 time/zic.c:1979
msgid "time overflow"
msgstr ""
@@ -2351,13 +2403,13 @@ msgstr ""
msgid "typed single year"
msgstr ""
-#: locale/programs/charmap.c:617 programs/charmap.c:628
+#: locale/programs/charmap.c:617 locale/programs/charmap.c:628
#, c-format
msgid "unknown character `%s'"
msgstr ""
-#: locale/programs/ld-messages.c:193 locale/programs/ld-messages.c:215
-#: programs/ld-messages.c:204 programs/ld-messages.c:226
+#: locale/programs/ld-messages.c:193 locale/programs/ld-messages.c:204
+#: locale/programs/ld-messages.c:215 locale/programs/ld-messages.c:226
#, c-format
msgid "unknown character in field `%s' of category `%s'"
msgstr ""
@@ -2379,8 +2431,8 @@ msgstr ""
msgid "unknown signal"
msgstr ""
-#: locale/programs/ld-collate.c:1366 locale/programs/ld-collate.c:1731
-#: programs/ld-collate.c:1557
+#: locale/programs/ld-collate.c:1366 locale/programs/ld-collate.c:1557
+#: locale/programs/ld-collate.c:1731
#, c-format
msgid "unknown symbol `%.*s': line ignored"
msgstr ""
@@ -2393,7 +2445,7 @@ msgstr ""
msgid "unterminated message"
msgstr ""
-#: locale/programs/linereader.c:515 programs/linereader.c:550
+#: locale/programs/linereader.c:515 locale/programs/linereader.c:550
msgid "unterminated string"
msgstr ""
@@ -2422,7 +2474,7 @@ msgstr ""
msgid "use of 2/29 in non leap-year"
msgstr ""
-#: locale/programs/charmap.c:438 programs/charmap.c:492
+#: locale/programs/charmap.c:438 locale/programs/charmap.c:492
#, c-format
msgid "value for %s must be an integer"
msgstr ""
@@ -2432,7 +2484,7 @@ msgstr ""
msgid "value for <%s> must lie between 1 and 4"
msgstr ""
-#: locale/programs/ld-monetary.c:148 programs/ld-numeric.c:89
+#: 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 ""
@@ -2452,7 +2504,7 @@ msgid ""
"value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length"
msgstr ""
-#: locale/programs/ld-monetary.c:370 programs/ld-numeric.c:199
+#: locale/programs/ld-monetary.c:370 locale/programs/ld-numeric.c:199
#, c-format
msgid "values for field `%s' in category `%s' must be smaller than 127"
msgstr ""
@@ -2478,6 +2530,18 @@ msgstr ""
msgid "while opening old catalog file"
msgstr ""
+#: db/makedb.c:336
+msgid "while reading database"
+msgstr ""
+
+#: db/makedb.c:298
+msgid "while writing data base file"
+msgstr ""
+
+#: db/makedb.c:129
+msgid "wrong number of arguments"
+msgstr ""
+
#: time/zic.c:1078
msgid "wrong number of fields on Leap line"
msgstr ""
diff --git a/posix/sys/types.h b/posix/sys/types.h
index 05d63d6..e8d382d 100644
--- a/posix/sys/types.h
+++ b/posix/sys/types.h
@@ -45,6 +45,7 @@ __BEGIN_DECLS
#define mode_t __mode_t
#define nlink_t __nlink_t
#define off_t __off_t
+#define loff_t __loff_t
#define pid_t __pid_t
#define uid_t __uid_t
#ifndef ssize_t
diff --git a/resolv/arpa/nameser.h b/resolv/arpa/nameser.h
index f2b251b..7da0aef 100644
--- a/resolv/arpa/nameser.h
+++ b/resolv/arpa/nameser.h
@@ -135,17 +135,6 @@
#define STATUS 0x2 /* nameserver status query */
/*#define xxx 0x3*/ /* 0x3 reserved */
#define NS_NOTIFY_OP 0x4 /* notify secondary of SOA change */
-#ifdef ALLOW_UPDATES
- /* non standard - supports ALLOW_UPDATES stuff from Mike Schwartz */
-# define UPDATEA 0x9 /* add resource record */
-# define UPDATED 0xa /* delete a specific resource record */
-# define UPDATEDA 0xb /* delete all named resource record */
-# define UPDATEM 0xc /* modify a specific resource record */
-# define UPDATEMA 0xd /* modify all named resource record */
-# define ZONEINIT 0xe /* initial zone transfer */
-# define ZONEREF 0xf /* incremental zone referesh */
-#endif
-
/*
* Currently defined response codes
*/
@@ -155,10 +144,6 @@
#define NXDOMAIN 3 /* non existent domain */
#define NOTIMP 4 /* not implemented */
#define REFUSED 5 /* query refused */
-#ifdef ALLOW_UPDATES
- /* non standard */
-# define NOCHANGE 0xf /* update failed to change db */
-#endif
/*
* Type values for resources and queries
@@ -193,12 +178,17 @@
#define T_AAAA 28 /* IP6 Address */
#define T_LOC 29 /* Location Information */
#define T_NXT 30 /* Next Valid Name in Zone */
+#define T_EID 31 /* Endpoint identifier */
+#define T_NIMLOC 32 /* Nimrod locator */
+#define T_SRV 33 /* Server selection */
+#define T_ATMA 34 /* ATM Address */
/* non standard */
#define T_UINFO 100 /* user (finger) information */
#define T_UID 101 /* user ID */
#define T_GID 102 /* group ID */
#define T_UNSPEC 103 /* Unspecified format (binary data) */
/* Query type values which do not appear in resource records */
+#define T_IXFR 251 /* incremental zone transfer */
#define T_AXFR 252 /* transfer zone of authority */
#define T_MAILB 253 /* transfer mailbox records */
#define T_MAILA 254 /* transfer mail agent records */
@@ -355,18 +345,6 @@ typedef struct {
*/
#define INDIR_MASK 0xc0
-/*
- * Structure for passing resource records around.
- */
-struct rrec {
- int16_t r_zone; /* zone number */
- int16_t r_class; /* class number */
- int16_t r_type; /* type number */
- u_int32_t r_ttl; /* time to live */
- int r_size; /* size of data area */
- char *r_data; /* pointer to data */
-};
-
extern u_int16_t _getshort __P((const u_char *));
extern u_int32_t _getlong __P((const u_char *));
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
index bb314bc..b476676 100644
--- a/resolv/res_debug.c
+++ b/resolv/res_debug.c
@@ -667,7 +667,7 @@ __p_rr(cp, msg, file)
case T_AAAA: {
char t[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
- fprintf(file, "\t%s\n", inet_ntop(AF_INET6, cp, t, sizeof t));
+ fprintf(file, "\t%s", inet_ntop(AF_INET6, cp, t, sizeof t));
cp += dlen;
break;
}
@@ -675,11 +675,23 @@ __p_rr(cp, msg, file)
case T_LOC: {
char t[255];
- (void) fprintf(file, "\t%s\n", loc_ntoa(cp, t));
+ (void) fprintf(file, "\t%s", loc_ntoa(cp, t));
cp += dlen;
break;
}
+ case T_SRV: {
+ u_int priority, weight, port;
+
+ priority = _getshort(cp); cp += INT16SZ;
+ weight = _getshort(cp); cp += INT16SZ;
+ port = _getshort(cp); cp += INT16SZ;
+ fprintf(file, "\t%u %u %u ", priority, weight, port);
+ if ((cp = p_fqname(cp, msg, file)) == NULL)
+ return (NULL);
+ break;
+ }
+
case T_MINFO:
case T_RP:
putc('\t', file);
@@ -856,13 +868,15 @@ const struct res_sym __p_class_syms[] = {
const struct res_sym __p_type_syms[] = {
{T_A, "A", "address"},
{T_NS, "NS", "name server"},
+ {T_MD, "MD", "mail destination (deprecated)"},
+ {T_MF, "MF", "mail forwarder (deprecated)"},
{T_CNAME, "CNAME", "canonical name"},
{T_SOA, "SOA", "start of authority"},
{T_MB, "MB", "mailbox"},
{T_MG, "MG", "mail group member"},
{T_MR, "MR", "mail rename"},
{T_NULL, "NULL", "null"},
- {T_WKS, "WKS", "well-known service"},
+ {T_WKS, "WKS", "well-known service (deprecated)"},
{T_PTR, "PTR", "domain name pointer"},
{T_HINFO, "HINFO", "host information"},
{T_MINFO, "MINFO", "mailbox information"},
@@ -877,22 +891,27 @@ const struct res_sym __p_type_syms[] = {
{T_NSAP_PTR, "NSAP_PTR", "domain name pointer"},
{T_SIG, "SIG", "signature"},
{T_KEY, "KEY", "key"},
- {T_NXT, "NXT", "next valid name"},
{T_PX, "PX", "mapping information"},
- {T_GPOS, "GPOS", "geographical position"},
+ {T_GPOS, "GPOS", "geographical position (withdrawn)"},
{T_AAAA, "AAAA", "IPv6 address"},
{T_LOC, "LOC", "location"},
+ {T_NXT, "NXT", "next valid name (unimplemented)"},
+ {T_EID, "EID", "endpoint identifier (unimplemented)"},
+ {T_NIMLOC, "NIMLOC", "NIMROD locator (unimplemented)"},
+ {T_SRV, "SRV", "server selection"},
+ {T_ATMA, "ATMA", "ATM address (unimplemented)"},
+ {T_IXFR, "IXFR", "incremental zone transfer"},
{T_AXFR, "AXFR", "zone transfer"},
- {T_MAILB, "MAILB", "mailbox-related data"},
- {T_MAILA, "MAILA", "mail agent"},
- {T_UINFO, "UINFO", "user information"},
- {T_UID, "UID", "user ID"},
- {T_GID, "GID", "group ID"},
+ {T_MAILB, "MAILB", "mailbox-related data (deprecated)"},
+ {T_MAILA, "MAILA", "mail agent (deprecated)"},
+ {T_UINFO, "UINFO", "user information (nonstandard)"},
+ {T_UID, "UID", "user ID (nonstandard)"},
+ {T_GID, "GID", "group ID (nonstandard)"},
#ifdef ALLOW_T_UNSPEC
- {T_UNSPEC, "UNSPEC", "unspecified data"},
+ {T_UNSPEC, "UNSPEC", "unspecified data (nonstandard)"},
#endif /* ALLOW_T_UNSPEC */
{T_ANY, "ANY", "\"any\""},
- {0, (char *)0, (char *)0}
+ {0, NULL, NULL}
};
int
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 8d87b8c..caeb337 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -126,7 +126,11 @@ static u_int32_t net_mask __P((struct in_addr));
* Resolver state default settings.
*/
-struct __res_state _res;
+struct __res_state _res
+# if defined(__BIND_RES_TEXT)
+ = { RES_TIMEOUT, } /* Motorola, et al. */
+# endif
+ ;
/*
* Set up default settings. If the configuration file exist, the values
diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c
index feaf0ef..505c391 100644
--- a/resolv/res_mkquery.c
+++ b/resolv/res_mkquery.c
@@ -94,9 +94,6 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
register HEADER *hp;
register u_char *cp;
register int n;
-#ifdef ALLOW_UPDATES
- struct rrec *newrr = (struct rrec *) newrr_in;
-#endif
u_char *dnptrs[20], **dpp, **lastdnptr;
if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
@@ -186,63 +183,6 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
hp->ancount = htons(1);
break;
-#ifdef ALLOW_UPDATES
- /*
- * For UPDATEM/UPDATEMA, do UPDATED/UPDATEDA followed by UPDATEA
- * (Record to be modified is followed by its replacement in msg.)
- */
- case UPDATEM:
- case UPDATEMA:
-
- case UPDATED:
- /*
- * The res code for UPDATED and UPDATEDA is the same; user
- * calls them differently: specifies data for UPDATED; server
- * ignores data if specified for UPDATEDA.
- */
- case UPDATEDA:
- buflen -= RRFIXEDSZ + datalen;
- if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
- return (-1);
- cp += n;
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(datalen, cp);
- cp += INT16SZ;
- if (datalen) {
- bcopy(data, cp, datalen);
- cp += datalen;
- }
- if ( (op == UPDATED) || (op == UPDATEDA) ) {
- hp->ancount = htons(0);
- break;
- }
- /* Else UPDATEM/UPDATEMA, so drop into code for UPDATEA */
-
- case UPDATEA: /* Add new resource record */
- buflen -= RRFIXEDSZ + datalen;
- if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
- return (-1);
- cp += n;
- __putshort(newrr->r_type, cp);
- cp += INT16SZ;
- __putshort(newrr->r_class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(newrr->r_size, cp);
- cp += INT16SZ;
- if (newrr->r_size) {
- bcopy(newrr->r_data, cp, newrr->r_size);
- cp += newrr->r_size;
- }
- hp->ancount = htons(0);
- break;
-#endif /* ALLOW_UPDATES */
default:
return (-1);
}
diff --git a/resolv/resolv.h b/resolv/resolv.h
index fd38fca..23460c5 100644
--- a/resolv/resolv.h
+++ b/resolv/resolv.h
@@ -71,9 +71,9 @@
#include <stdio.h>
/*
- * revision information. this is the release date in YYYYMMDD format.
- * it can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__RES > 19931104)". do not
+ * Revision information. This is the release date in YYYYMMDD format.
+ * It can change every day so the right thing to do with it is use it
+ * in preprocessor commands such as "#if (__RES > 19931104)". Do not
* compare for equality; rather, use it to determine whether your resolver
* is new enough to contain a certain feature.
*/
@@ -121,7 +121,7 @@ struct __res_state {
struct in_addr addr;
u_int32_t mask;
} sort_list[MAXRESOLVSORT];
- char pad[72]; /* On an i38this means 512b total. */
+ char pad[72]; /* on an i386 this means 512b total */
};
/*
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index 9112d46..7ab46f1 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -241,6 +241,9 @@ __printf_fp (FILE *fp,
strlen (_NL_CURRENT (LC_MONETARY, MON_DECIMAL_POINT))) <= 0)
decimal = (wchar_t) *_NL_CURRENT (LC_MONETARY, MON_DECIMAL_POINT);
}
+ /* Give default value. */
+ if (decimal == L'\0')
+ decimal = L'.';
if (info->group)
@@ -249,7 +252,7 @@ __printf_fp (FILE *fp,
grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
else
grouping = _NL_CURRENT (LC_MONETARY, MON_GROUPING);
-
+
if (*grouping <= 0 || *grouping == CHAR_MAX)
grouping = NULL;
else
@@ -273,7 +276,7 @@ __printf_fp (FILE *fp,
thousands_sep = (wchar_t) *_NL_CURRENT (LC_MONETARY,
MON_THOUSANDS_SEP);
}
-
+
if (thousands_sep == L'\0')
grouping = NULL;
}
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index 36349a5..0dfb499 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -31,21 +31,26 @@ Cambridge, MA 02139, USA. */
extern int _dl_argc;
extern char **_dl_argv;
extern char **_environ;
+extern void _end;
extern void _start (void);
int __libc_enable_secure;
+int __libc_multiple_libcs; /* Defining this here avoids the inclusion
+ of init-first. */
ElfW(Addr)
_dl_sysdep_start (void **start_argptr,
void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phnum,
ElfW(Addr) *user_entry))
{
- const ElfW(Phdr) *phdr;
- ElfW(Word) phnum;
+ const ElfW(Phdr) *phdr = NULL;
+ ElfW(Word) phnum = 0;
ElfW(Addr) user_entry;
ElfW(auxv_t) *av;
- uid_t uid, euid;
- gid_t gid, egid;
+ uid_t uid = 0;
+ uid_t euid = 0;
+ gid_t gid = 0;
+ gid_t egid = 0;
unsigned int seen;
user_entry = (ElfW(Addr)) &_start;
@@ -103,6 +108,18 @@ _dl_sysdep_start (void **start_argptr,
DL_SYSDEP_INIT;
#endif
+ if (__sbrk (0) == &_end)
+ {
+ /* The dynamic linker was run as a program, and so the initial break
+ starts just after our bss, at &_end. The malloc in dl-minimal.c
+ will consume the rest of this page, so tell the kernel to move the
+ break up that far. When the user program examines its break, it
+ will see this new value and not clobber our data. */
+ size_t pg = __getpagesize ();
+
+ __sbrk (pg - ((&_end - (void *) 0) & (pg - 1)));
+ }
+
(*dl_main) (phdr, phnum, &user_entry);
return user_entry;
}
diff --git a/sysdeps/generic/sbrk.c b/sysdeps/generic/sbrk.c
index d3ea705..afed590 100644
--- a/sysdeps/generic/sbrk.c
+++ b/sysdeps/generic/sbrk.c
@@ -38,22 +38,8 @@ __sbrk (ptrdiff_t increment)
instances of __brk and __sbrk can share the heap, returning
interleaved pieces of it. */
if (__curbrk == NULL || __libc_multiple_libcs)
- {
- extern void _end;
-
- if (__brk (0) < 0) /* Initialize the break. */
- return (void *) -1;
-
- /* Align break address to page boundary if not happened before. */
- if (!__libc_multiple_libcs && __curbrk == &_end)
- {
- size_t pg = __getpagesize ();
- ptrdiff_t rest = pg - ((&_end - (void *) 0) & (pg - 1));
-
- if (__brk (__curbrk + rest) < 0)
- return (void *) -1;
- }
- }
+ if (__brk (0) < 0) /* Initialize the break. */
+ return (void *) -1;
if (increment == 0)
return __curbrk;
diff --git a/sysdeps/unix/sysv/linux/fcntlbits.h b/sysdeps/unix/sysv/linux/fcntlbits.h
index 8d92ac0..9088e6d 100644
--- a/sysdeps/unix/sysv/linux/fcntlbits.h
+++ b/sysdeps/unix/sysv/linux/fcntlbits.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 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
@@ -23,4 +23,13 @@ Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include <linux/fcntl.h>
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+#define FAPPEND O_APPEND
+#define FFSYNC O_FSYNC
+#define FNONBLOCK O_NONBLOCK
+#define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
#endif /* fcntlbits.h */
diff --git a/sysdeps/unix/sysv/linux/gnu/types.h b/sysdeps/unix/sysv/linux/gnu/types.h
index 89b815d..abfcb6e 100644
--- a/sysdeps/unix/sysv/linux/gnu/types.h
+++ b/sysdeps/unix/sysv/linux/gnu/types.h
@@ -51,6 +51,7 @@ 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. */