aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog88
-rw-r--r--Rules10
-rw-r--r--catgets/catgets.c19
-rw-r--r--catgets/open_catalog.c28
-rw-r--r--config.make.in1
-rwxr-xr-xconfigure7
-rw-r--r--configure.in6
-rw-r--r--elf/elf.h2
-rw-r--r--iconv/iconv_prog.c6
-rw-r--r--include/bits/cmathcalls.h1
-rw-r--r--include/complex.h1
-rw-r--r--include/execinfo.h1
-rw-r--r--include/fenv.h1
-rw-r--r--inet/netinet/in.h2
-rw-r--r--intl/loadmsgcat.c23
-rw-r--r--libio/stdio.h13
-rw-r--r--linuxthreads/ChangeLog5
-rw-r--r--linuxthreads/Makefile3
-rw-r--r--locale/findlocale.c6
-rw-r--r--locale/loadlocale.c46
-rw-r--r--locale/programs/localedef.c6
-rw-r--r--malloc/malloc.c12
-rw-r--r--math/Makefile2
-rw-r--r--misc/Makefile3
-rw-r--r--misc/mkstemp.c (renamed from sysdeps/generic/mkstemp.c)20
-rw-r--r--misc/mktemp.c (renamed from sysdeps/generic/mktemp.c)20
-rw-r--r--posix/Makefile2
-rw-r--r--posix/regex.c8
-rw-r--r--stdio-common/tempnam.c17
-rw-r--r--stdio-common/tmpfile.c18
-rw-r--r--stdio-common/tmpfile64.c23
-rw-r--r--stdio-common/tmpnam.c22
-rw-r--r--stdio-common/tmpnam_r.c16
-rw-r--r--stdio/stdio.h15
-rw-r--r--sunrpc/Makefile4
-rw-r--r--sunrpc/clnt_unix.c5
-rw-r--r--sunrpc/key_call.c87
-rw-r--r--sunrpc/svc_unix.c5
-rw-r--r--sysdeps/generic/getpgid.c4
-rw-r--r--sysdeps/generic/glob.c2
-rw-r--r--sysdeps/generic/tempname.c46
-rw-r--r--sysdeps/posix/mkstemp.c90
-rw-r--r--sysdeps/posix/mktemp.c89
-rw-r--r--sysdeps/posix/tempname.c287
44 files changed, 520 insertions, 552 deletions
diff --git a/ChangeLog b/ChangeLog
index e918d29cac..095145f991 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,91 @@
+1998-08-03 16:36 Ulrich Drepper <drepper@cygnus.com>
+
+ * catgets/catgets.c: Use mmap/munmap only is _POSIX_MAPPED_FILES
+ is defined.
+ * catgets/open_catalog.c: Likewise.
+ * iconv/iconv_prog.c: Likewise.
+ * intl/loadmsgcat.c: Likewise.
+ * locale/findlocale.c: Likewise.
+ * locale/loadlocale.c: Likewise.
+ * locale/programs/localedef.c: Likewise.
+ * malloc/malloc.c: Likewise.
+
+ * elf/elf.h: Fix typo.
+
+ * math/Makefile: Use $(LN_S) instead of ln.
+
+ * sysdeps/generic/getpgid.c: Fix return type.
+
+1998-08-01 02:49 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
+
+ * sysdeps/posix/tempname.c (__stdio_gen_tempname): Rename to
+ __gen_tempname and simplify the interface. Strip out the
+ code to do path search and create FILE objects. This function
+ now takes a mktemp() style template and returns either a name
+ or a file descriptor.
+ (__path_search): New function; searches for directories for
+ temp files.
+ * sysdeps/generic/tempname.c: Stub out __gen_tempname and
+ __path_search, not __stdio_gen_tempname.
+
+ * libio/stdio.h: Prototype __gen_tempname and __path_search,
+ not __stdio_gen_tempname.
+ * stdio/stdio.h: Likewise.
+
+ * stdio-common/tempnam.c: Use __path_search and __gen_tempname.
+ * stdio-common/tmpfile.c: Likewise.
+ * stdio-common/tmpfile64.c: Likewise.
+ * stdio-common/tmpnam.c: Likewise.
+ * stdio-common/tmpnam_r.c: Likewise.
+
+ * misc/mkstemp.c: New file. Use __gen_tempname.
+ * misc/mktemp.c: Likewise.
+
+ * sysdeps/posix/mkstemp.c: Removed.
+ * sysdeps/posix/mktemp.c: Removed.
+ * sysdeps/generic/mkstemp.c: Removed.
+ * sysdeps/generic/mktemp.c: Removed.
+
+1998-08-02 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
+
+ * configure.in: Check, if door add-on is installed.
+ * config.make.in: Add have_doors.
+ * sunrpc/Makefile: Add HAVE_DOOR define.
+ * sunrpc/key_call.c: Add keyserv/door interface.
+
+ * sunrpc/svc_unix.c: Call setsockopt only if SO_PASSCRED is defined.
+ * sunrpc/clnt_unix.c: Likewise.
+
+1998-08-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * inet/netinet/in.h (IN_CLASSC): Correct mask.
+ Reported by Ian Staniforth <I.Staniforth@sheffield.ac.uk> [fixes
+ PR libc/727].
+
+1998-08-03 10:23 Ulrich Drepper <drepper@cygnus.com>
+
+ * misc/Makefile: Fix installation problem with --disable-shared.
+ * posix/Makefile: Likewise.
+
+1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * posix/regex.c (re_search_2): Optimize searching for anchored
+ pattern if '^' cannot match at embedded newlines.
+ (regerror): Renamed from __regerror, which it should only be
+ called if _LIBC.
+
+1998-07-31 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sunrpc/svc_unix.c (__msgread): Check setsockopt return value.
+
+1998-07-31 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/generic/glob.c: Remove obsolete cast.
+
+1998-07-31 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * Rules (tests): Fix last change.
+
1998-07-31 17:59 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/Makefile [subdir==misc] (sysdep_routines):
diff --git a/Rules b/Rules
index 2353cc34a0..a3005a069e 100644
--- a/Rules
+++ b/Rules
@@ -89,12 +89,14 @@ else
others: $(addprefix $(objpfx),$(extra-objs))
endif
ifeq ($(cross-compiling),yes)
-tests: $(addprefix $(objpfx),$(tests) $(tests-static) $(test-srcs))
+tests: $(addprefix $(objpfx),$(tests) $(test-srcs))
+ifeq ($(build-static),yes)
+tests: $(addprefix $(objpfx),$(tests-static))
+endif
else
-ifneq (($build-static),yes)
tests: $(tests:%=$(objpfx)%.out)
-else
-tests: $(tests:%=$(objpfx)%.out) $(tests-static:%=$(objpfx)%.sout)
+ifeq ($(build-static),yes)
+tests: $(tests-static:%=$(objpfx)%.sout)
endif
endif
diff --git a/catgets/catgets.c b/catgets/catgets.c
index ebfb2c54cc..b5de2fbb50 100644
--- a/catgets/catgets.c
+++ b/catgets/catgets.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -166,15 +166,18 @@ catclose (nl_catd catalog_desc)
catalog = (__nl_catd) catalog_desc;
+#ifdef _POSIX_MAPPED_FILES
if (catalog->status == mmapped)
__munmap ((void *) catalog->file_ptr, catalog->file_size);
- else if (catalog->status == malloced)
- free ((void *) catalog->file_ptr);
- else if (catalog->status != closed && catalog->status != nonexisting)
- {
- __set_errno (EBADF);
- return -1;
- }
+ else
+#endif /* _POSIX_MAPPED_FILES */
+ if (catalog->status == malloced)
+ free ((void *) catalog->file_ptr);
+ else if (catalog->status != closed && catalog->status != nonexisting)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
if (catalog->nlspath)
free ((void *) catalog->nlspath);
diff --git a/catgets/open_catalog.c b/catgets/open_catalog.c
index deaa8718dd..e4b61d779a 100644
--- a/catgets/open_catalog.c
+++ b/catgets/open_catalog.c
@@ -24,7 +24,9 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
-#include <sys/mman.h>
+#ifdef _POSIX_MAPPED_FILES
+# include <sys/mman.h>
+#endif
#include <sys/stat.h>
#include "catgetsinfo.h"
@@ -194,19 +196,20 @@ __open_catalog (__nl_catd catalog)
goto unlock_return;
}
-#ifndef MAP_COPY
+ catalog->file_size = st.st_size;
+#ifdef _POSIX_MAPPED_FILES
+# ifndef MAP_COPY
/* Linux seems to lack read-only copy-on-write. */
-# define MAP_COPY MAP_PRIVATE
-#endif
-#ifndef MAP_FILE
+# define MAP_COPY MAP_PRIVATE
+# endif
+# ifndef MAP_FILE
/* Some systems do not have this flag; it is superfluous. */
-# define MAP_FILE 0
-#endif
-#ifndef MAP_INHERIT
+# define MAP_FILE 0
+# endif
+# ifndef MAP_INHERIT
/* Some systems might lack this; they lose. */
-# define MAP_INHERIT 0
-#endif
- catalog->file_size = st.st_size;
+# define MAP_INHERIT 0
+# endif
catalog->file_ptr =
(struct catalog_obj *) __mmap (NULL, st.st_size, PROT_READ,
MAP_FILE|MAP_COPY|MAP_INHERIT, fd, 0);
@@ -214,6 +217,7 @@ __open_catalog (__nl_catd catalog)
/* Tell the world we managed to mmap the file. */
catalog->status = mmapped;
else
+#endif /* _POSIX_MAPPED_FILES */
{
/* mmap failed perhaps because the system call is not
implemented. Try to load the file. */
@@ -258,9 +262,11 @@ __open_catalog (__nl_catd catalog)
invalid_file:
/* Invalid file. Free the resources and mark catalog as not
usable. */
+#ifdef _POSIX_MAPPED_FILES
if (catalog->status == mmapped)
__munmap ((void *) catalog->file_ptr, catalog->file_size);
else
+#endif /* _POSIX_MAPPED_FILES */
free (catalog->file_ptr);
catalog->status = nonexisting;
goto unlock_return;
diff --git a/config.make.in b/config.make.in
index 9f8ea0a909..6b4dc7ae9b 100644
--- a/config.make.in
+++ b/config.make.in
@@ -40,6 +40,7 @@ old-glibc-headers = @old_glibc_headers@
versioning = @VERSIONING@
no-whole-archive = @no_whole_archive@
exceptions = @exceptions@
+have_doors = @linux_doors@
have-bash2 = @libc_cv_have_bash2@
have-ksh = @libc_cv_have_ksh@
diff --git a/configure b/configure
index 1b50582d81..fc1f09aea6 100755
--- a/configure
+++ b/configure
@@ -2879,6 +2879,12 @@ echo "$ac_t""$pic_default" 1>&6
+case "$add_ons" in
+ *door*) linux_doors=yes ;;
+ *) linux_doors=no ;;
+esac
+
+
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
config_makefile=
else
@@ -3083,6 +3089,7 @@ s%@bounded@%$bounded%g
s%@static_nss@%$static_nss%g
s%@nopic_initfini@%$nopic_initfini%g
s%@DEFINES@%$DEFINES%g
+s%@linux_doors@%$linux_doors%g
s%@VERSION@%$VERSION%g
s%@RELEASE@%$RELEASE%g
diff --git a/configure.in b/configure.in
index 2f7f925516..036491805a 100644
--- a/configure.in
+++ b/configure.in
@@ -1168,6 +1168,12 @@ AC_SUBST(nopic_initfini)
AC_SUBST(DEFINES)
+case "$add_ons" in
+ *door*) linux_doors=yes ;;
+ *) linux_doors=no ;;
+esac
+AC_SUBST(linux_doors)
+
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
config_makefile=
else
diff --git a/elf/elf.h b/elf/elf.h
index 4974c08edd..6418927160 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1170,7 +1170,7 @@ typedef struct
#define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */
#define DT_MIPS_NUM 0x32
-/* Legal values for DT_MIPS_FLAG Elf32_Dyn entry. */
+/* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */
#define RHF_NONE 0 /* No flags */
#define RHF_QUICKSTART (1 << 0) /* Use quickstart */
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index 82ff5cf802..f12a69020e 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -30,7 +30,9 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/mman.h>
+#ifdef _POSIX_MAPPED_FILES
+# include <sys/mman.h>
+#endif
#include <gconv_int.h>
/* Get libc version number. */
@@ -176,6 +178,7 @@ main (int argc, char *argv[])
continue;
}
+#ifdef _POSIX_MAPPED_FILES
/* We have possibilities for reading the input file. First try
to mmap() it since this will provide the fastest solution. */
if (fstat (fd, &st) == 0
@@ -206,6 +209,7 @@ main (int argc, char *argv[])
munmap ((void *) addr, st.st_size);
}
else
+#endif /* _POSIX_MAPPED_FILES */
{
/* Read the file in pieces. */
if (process_fd (cd, fd, output) != 0)
diff --git a/include/bits/cmathcalls.h b/include/bits/cmathcalls.h
new file mode 100644
index 0000000000..dd029602f9
--- /dev/null
+++ b/include/bits/cmathcalls.h
@@ -0,0 +1 @@
+#include <math/bits/cmathcalls.h>
diff --git a/include/complex.h b/include/complex.h
new file mode 100644
index 0000000000..acf8cf14ba
--- /dev/null
+++ b/include/complex.h
@@ -0,0 +1 @@
+#include <math/complex.h>
diff --git a/include/execinfo.h b/include/execinfo.h
new file mode 100644
index 0000000000..d5c52164d2
--- /dev/null
+++ b/include/execinfo.h
@@ -0,0 +1 @@
+#include <debug/execinfo.h>
diff --git a/include/fenv.h b/include/fenv.h
new file mode 100644
index 0000000000..b2da08406c
--- /dev/null
+++ b/include/fenv.h
@@ -0,0 +1 @@
+#include <math/fenv.h>
diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index ddc09753e2..418c6f96f7 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -118,7 +118,7 @@ struct in_addr
#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
#define IN_CLASSB_MAX 65536
-#define IN_CLASSC(a) ((((uint32_t) (a)) & 0xc0000000) == 0xc0000000)
+#define IN_CLASSC(a) ((((uint32_t) (a)) & 0xe0000000) == 0xc0000000)
#define IN_CLASSC_NET 0xffffff00
#define IN_CLASSC_NSHIFT 8
#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index f6214e1428..480e6bc384 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -35,8 +35,13 @@
# include <unistd.h>
#endif
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
# include <sys/mman.h>
+# undef HAVE_MMAP
+# define HAVE_MMAP 1
+#else
+# undef HAVE_MMAP
#endif
#include "gettext.h"
@@ -72,10 +77,7 @@ _nl_load_domain (domain_file)
size_t size;
struct stat st;
struct mo_file_header *data = (struct mo_file_header *) -1;
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
int use_mmap = 0;
-#endif
struct loaded_domain *domain;
domain_file->decided = 1;
@@ -103,8 +105,7 @@ _nl_load_domain (domain_file)
return;
}
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
+#ifdef HAVE_MMAP
/* Now we are ready to load the file. If mmap() is available we try
this first. If not available or it failed we try to load it. */
data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
@@ -153,8 +154,7 @@ _nl_load_domain (domain_file)
if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
{
/* The magic number is wrong: not a message catalog file. */
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
+#ifdef HAVE_MMAP
if (use_mmap)
munmap ((caddr_t) data, size);
else
@@ -188,9 +188,8 @@ _nl_load_domain (domain_file)
((char *) data + W (domain->must_swap, data->hash_tab_offset));
break;
default:
- /* This is an illegal revision. */
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || defined _LIBC
+ /* This is an invalid revision. */
+#ifdef HAVE_MMAP
if (use_mmap)
munmap ((caddr_t) data, s