aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-14 11:43:26 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-14 11:43:26 +0000
commit7ef90c1595a5687b5a48b789718ecd20742465bf (patch)
tree7e1292f068d02f0cd97adb57d0782db7f17cf062
parent5d47ceca3f6d10b36889b11609fb58f5305c4042 (diff)
downloadglibc-7ef90c1595a5687b5a48b789718ecd20742465bf.tar.xz
glibc-7ef90c1595a5687b5a48b789718ecd20742465bf.zip
Update.
1998-09-14 11:26 Ulrich Drepper <drepper@cygnus.com> * wcsmbs/wcsmbs-tst1.c: Include stdlib.h. 1998-09-14 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * libc-work/nis/nss_nisplus/nisplus-service.c (_nss_nisplus_parse_servent): Convert port in network byte order. 1998-09-14 07:53 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu> * stdlib/stdlib.h: Add a switch, __need_malloc_and_calloc, to provide only malloc and calloc. * include/stdlib.h: Support the above. * string/bits/string2.h: Use __need_malloc_and_calloc when including stdlib.h. (__string2_1bptr_p): Avoid -Wbad-function-cast warnings. * iconvdata/iso-2022-jp.c: Include <stdlib.h>. * iconvdata/iso646.c: Include <stdlib.h>. 1998-09-14 07:51 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu> * sunrpc/rpc_cout.c: Add braces around ambiguous else. * sysdeps/libm-ieee754/w_pow.c: Likewise. * sysdeps/libm-ieee754/w_powf.c: Likewise. * sysdeps/libm-ieee754/w_powl.c: Likewise. 1998-09-14 07:57 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu> * stdio-common/stdio_lim.h.in: New file. All parameters are adjustable at build time. * Rules: Add a rule to build bits/stdio_lim.h from stdio-common/stdio_lim.h.in. (It has to be in Rules so that all subdirectories know how to make the file. It can't be in Makerules because then it gets built at top level and the dependencies are wrong.) * stdio-common/Makefile (distribute): Add stdio_lim.h.in. * sysdeps/unix/sysv/linux/Makefile: Delete rules to make stdio_lim.h. * sysdeps/unix/sysv/linux/stdio_lim.h.in: Removed. * sysdeps/unix/sysv/linux/Dist: Take out stdio_lim.h.in. * sysdeps/posix/Makefile: Removed. * sysdeps/posix/mk-stdiolim.c: Removed. * sysdeps/generic/bits/stdio_lim.h: Removed. 1998-09-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * argp/argp-help.c: Fixup indentation. * nss/nss_files/files-alias.c: Quiet -Wparentheses warning. * resolv/nss_dns/dns-network.c: Likewise. * resolv/res_send.c: Likewise. * rt/aio_cancel.c: Likewise. * rt/aio_misc.c: Likewise. 1998-09-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile (install-symbolic-link): Remove the link list file at last. * Makerules (install-clean-symbolic-link-list): Removed. 1998-09-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * timezone/tst-timezone.c: Print time in UTC to get consistent output. 1998-09-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/rtld.c (_dl_rpath): Removed. * elf/dl-support.c (_dl_path): Removed. * elf/Makefile ($(objpfx)ld.so): Don't pass -rpath. (CFLAGS-dl-support.c): Removed. * elf/dl-load.c (env_path_list): Renamed from fake_path_list. All uses changed. (_dl_init_paths): Always set env_path_list from LD_LIBRARY_PATH, instead of appending it to the main map's rpath info. (_dl_map_object): Consistently use LD_LIBRARY_PATH after all DT_RPATHs. This makes it effective again. (decompose_rpath): Remove second parameter, callers changed. (fillin_rpath): Allocate enough space in curwd. (expand_dynamic_string_token): Cope with get_origin returning -1. 1998-09-14 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * libc-work/nis/nss_compat/compat-pwd.c: Add support for passwd.adjunct. * nis/nss_nis/nis-pwd.c (_nss_nis_getpwent_r): Correct test for invalid password. 1998-09-13 18:06 Ulrich Drepper <drepper@cygnus.com> * locale/programs/locale.c: Update dates.
-rw-r--r--ChangeLog95
-rw-r--r--Makefile1
-rw-r--r--Makerules6
-rw-r--r--Rules44
-rw-r--r--argp/argp-help.c7
-rw-r--r--elf/Makefile10
-rw-r--r--elf/dl-load.c159
-rw-r--r--elf/dl-support.c4
-rw-r--r--elf/rtld.c10
-rw-r--r--iconvdata/iso-2022-jp.c1
-rw-r--r--iconvdata/iso646.c1
-rw-r--r--include/stdlib.h9
-rw-r--r--locale/programs/locale.c4
-rw-r--r--nis/nss_compat/compat-pwd.c93
-rw-r--r--nis/nss_nis/nis-pwd.c2
-rw-r--r--nis/nss_nisplus/nisplus-service.c2
-rw-r--r--nss/nss_files/files-alias.c10
-rw-r--r--resolv/nss_dns/dns-network.c28
-rw-r--r--resolv/res_send.c4
-rw-r--r--rt/aio_cancel.c36
-rw-r--r--rt/aio_misc.c12
-rw-r--r--stdio-common/Makefile3
-rw-r--r--stdio-common/stdio_lim.h.in (renamed from sysdeps/generic/bits/stdio_lim.h)23
-rw-r--r--stdlib/stdlib.h25
-rw-r--r--string/bits/string2.h32
-rw-r--r--sunrpc/rpc_cout.c175
-rw-r--r--sysdeps/libm-ieee754/w_pow.c5
-rw-r--r--sysdeps/libm-ieee754/w_powf.c5
-rw-r--r--sysdeps/libm-ieee754/w_powl.c5
-rw-r--r--sysdeps/posix/Makefile37
-rw-r--r--sysdeps/posix/mk-stdiolim.c106
-rw-r--r--sysdeps/unix/sysv/linux/Dist1
-rw-r--r--sysdeps/unix/sysv/linux/Makefile27
-rw-r--r--sysdeps/unix/sysv/linux/stdio_lim.h.in43
-rw-r--r--timezone/tst-timezone.c4
-rw-r--r--wcsmbs/wcsmbs-tst1.c1
36 files changed, 500 insertions, 530 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e34716a1a..00d0704af6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,98 @@
+1998-09-14 11:26 Ulrich Drepper <drepper@cygnus.com>
+
+ * wcsmbs/wcsmbs-tst1.c: Include stdlib.h.
+
+1998-09-14 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
+
+ * libc-work/nis/nss_nisplus/nisplus-service.c
+ (_nss_nisplus_parse_servent): Convert port in network byte order.
+
+1998-09-14 07:53 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
+
+ * stdlib/stdlib.h: Add a switch, __need_malloc_and_calloc,
+ to provide only malloc and calloc.
+ * include/stdlib.h: Support the above.
+ * string/bits/string2.h: Use __need_malloc_and_calloc when
+ including stdlib.h.
+ (__string2_1bptr_p): Avoid -Wbad-function-cast warnings.
+
+ * iconvdata/iso-2022-jp.c: Include <stdlib.h>.
+ * iconvdata/iso646.c: Include <stdlib.h>.
+
+1998-09-14 07:51 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
+
+ * sunrpc/rpc_cout.c: Add braces around ambiguous else.
+ * sysdeps/libm-ieee754/w_pow.c: Likewise.
+ * sysdeps/libm-ieee754/w_powf.c: Likewise.
+ * sysdeps/libm-ieee754/w_powl.c: Likewise.
+
+1998-09-14 07:57 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
+
+ * stdio-common/stdio_lim.h.in: New file. All parameters
+ are adjustable at build time.
+ * Rules: Add a rule to build bits/stdio_lim.h from
+ stdio-common/stdio_lim.h.in. (It has to be in Rules so that
+ all subdirectories know how to make the file. It can't be
+ in Makerules because then it gets built at top level and the
+ dependencies are wrong.)
+
+ * stdio-common/Makefile (distribute): Add stdio_lim.h.in.
+ * sysdeps/unix/sysv/linux/Makefile: Delete rules to make
+ stdio_lim.h.
+ * sysdeps/unix/sysv/linux/stdio_lim.h.in: Removed.
+ * sysdeps/unix/sysv/linux/Dist: Take out stdio_lim.h.in.
+ * sysdeps/posix/Makefile: Removed.
+ * sysdeps/posix/mk-stdiolim.c: Removed.
+ * sysdeps/generic/bits/stdio_lim.h: Removed.
+
+1998-09-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * argp/argp-help.c: Fixup indentation.
+ * nss/nss_files/files-alias.c: Quiet -Wparentheses warning.
+ * resolv/nss_dns/dns-network.c: Likewise.
+ * resolv/res_send.c: Likewise.
+ * rt/aio_cancel.c: Likewise.
+ * rt/aio_misc.c: Likewise.
+
+1998-09-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * Makefile (install-symbolic-link): Remove the link list file at last.
+ * Makerules (install-clean-symbolic-link-list): Removed.
+
+1998-09-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * timezone/tst-timezone.c: Print time in UTC to get consistent
+ output.
+
+1998-09-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elf/rtld.c (_dl_rpath): Removed.
+ * elf/dl-support.c (_dl_path): Removed.
+ * elf/Makefile ($(objpfx)ld.so): Don't pass -rpath.
+ (CFLAGS-dl-support.c): Removed.
+
+ * elf/dl-load.c (env_path_list): Renamed from fake_path_list. All
+ uses changed.
+ (_dl_init_paths): Always set env_path_list from LD_LIBRARY_PATH,
+ instead of appending it to the main map's rpath info.
+ (_dl_map_object): Consistently use LD_LIBRARY_PATH after all
+ DT_RPATHs. This makes it effective again.
+ (decompose_rpath): Remove second parameter, callers changed.
+ (fillin_rpath): Allocate enough space in curwd.
+ (expand_dynamic_string_token): Cope with get_origin returning -1.
+
+1998-09-14 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
+
+ * libc-work/nis/nss_compat/compat-pwd.c: Add support for
+ passwd.adjunct.
+
+ * nis/nss_nis/nis-pwd.c (_nss_nis_getpwent_r): Correct test for
+ invalid password.
+
+1998-09-13 18:06 Ulrich Drepper <drepper@cygnus.com>
+
+ * locale/programs/locale.c: Update dates.
+
1998-09-13 Mark Kettenis <kettenis@phys.uva.nl>
* sysdeps/generic/bits/types.h: Include <features.h>. Make sure
diff --git a/Makefile b/Makefile
index 45c905820e..21ae9d508a 100644
--- a/Makefile
+++ b/Makefile
@@ -101,6 +101,7 @@ install: install-symbolic-link
.PHONY: install-symbolic-link
install-symbolic-link: subdir_install
$(symbolic-link-prog) $(symbolic-link-list)
+ rm -f $(symbolic-link-list)
install:
-test ! -x $(common-objpfx)elf/ldconfig || \
diff --git a/Makerules b/Makerules
index c17ea781b9..2e724fabd5 100644
--- a/Makerules
+++ b/Makerules
@@ -651,14 +651,8 @@ endif
ifeq (no,$(cross-compiling))
ifeq (yes,$(build-shared))
-# We need to clean the symbolic link list first.
symbolic-link-prog := $(common-objpfx)elf/sln
symbolic-link-list := $(common-objpfx)elf/symlink.list
-install: install-clean-symbolic-link-list
-.PHONY: install-clean-symbolic-link-list
-install-clean-symbolic-link-list:
- rm -f $(symbolic-link-list)
-
define make-shlib-link
echo $(<F) $@ >> $(symbolic-link-list)
endef
diff --git a/Rules b/Rules
index b401c3136c..9c61b8418a 100644
--- a/Rules
+++ b/Rules
@@ -200,3 +200,47 @@ $(common-objpfx)dummy$o: $(common-objpfx)dummy.c $(before-compile);
endef
object-suffixes-left := $(object-suffixes)
include $(o-iterator)
+
+# There's no good place to put this - here will do.
+# The dependencies are wrong if it's run from the top level.
+ifeq ($(filter %posix, $(sysdirs)),)
+L_tmpnam = 1
+TMP_MAX = 0
+L_ctermid = 1
+L_cuserid = 1
+else
+L_tmpnam = 19
+TMP_MAX = 238328
+L_ctermid = 9
+L_cuserid = 9
+endif
+
+$(common-objpfx)bits/stdio_%.h $(common-objpfx)bits/stdio_%.d: \
+ $(..)stdio-common/stdio_%.h.in
+ $(make-target-directory)
+ echo '#include "$(..)posix/bits/posix1_lim.h"' | \
+ SUNPRO_DEPENDENCIES='$(@:.h=.d)T MARKER' \
+ $(CC) $(+includes) -E -dM -xc - -o $(@:.d=.h)T
+ sed -e 's!MARKER!$(@:.h=.d) $(@:.d=.h)!' \
+ -e 's!$(common-objpfx)!$$(common-objpfx)!g' \
+ $(@:.h=.d)T > $(@:.h=.d)t && \
+ mv -f $(@:.h=.d)t $(@:.h=.d)
+ fopen_max=`sed -n 's/^#define OPEN_MAX //p' $(@:.d=.h)T`; \
+ filename_max=`sed -n 's/^#define PATH_MAX //p' $(@:.d=.h)T`; \
+ fopen_max=$${fopen_max:-16}; \
+ filename_max=$${filename_max:-1024}; \
+ sed -e "s/@FOPEN_MAX@/$$fopen_max/" \
+ -e "s/@FILENAME_MAX@/$$filename_max/" \
+ -e "s/@L_tmpnam@/$(L_tmpnam)/" \
+ -e "s/@TMP_MAX@/$(TMP_MAX)/" \
+ -e "s/@L_ctermid@/$(L_ctermid)/" \
+ -e "s/@L_cuserid@/$(L_cuserid)/" \
+ $< > $(@:.d=.h).new && \
+ mv -f $(@:.d=.h).new $(@:.d=.h); \
+# Remove these last so that they can be examined if something went wrong.
+ rm -f $(@:.d=.h)T $(@:.h=.d)T
+# Get dependencies.
+ifndef no_deps
+-include $(common-objpfx)bits/stdio_lim.d
+endif
+common-generated += bits/stdio_lim.h bits/stdio_lim.d
diff --git a/argp/argp-help.c b/argp/argp-help.c
index 9a1c05387f..a3a1a12ef9 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -833,11 +833,12 @@ hol_append (struct hol *hol, struct hol *more)
__mempcpy (short_options, hol->short_options, hol_so_len);
- /* Fix up the short options pointers from HOL. */
+ /* Fix up the short options pointers from HOL. */
for (e = entries, left = hol->num_entries; left > 0; e++, left--)
e->short_options += (short_options - hol->short_options);
- /* Now add the short options from MORE, fixing up its entries too. */
+ /* Now add the short options from MORE, fixing up its entries
+ too. */
so = short_options + hol_so_len;
more_so = more->short_options;
for (left = more->num_entries; left > 0; e++, left--)
@@ -872,7 +873,7 @@ hol_append (struct hol *hol, struct hol *more)
hol->num_entries = num_entries;
hol->short_options = short_options;
}
- }
+ }
hol_free (more);
}
diff --git a/elf/Makefile b/elf/Makefile
index 7f2201dc0a..ddd9d222fb 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -116,13 +116,9 @@ endif
$(objpfx)ld.so: $(objpfx)librtld.os $(addprefix $(objpfx),$(rtld-ldscript)) \
$(ld-map)
- $(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
- -Wl,-rpath=$(default-rpath) $(LDFLAGS-rtld) \
- $(filter-out $(rtld-ldscript) $(map-file),$^) \
- $(load-map-file) -Wl,-soname=$(rtld-installed-name)
-
-# The dl code in the static libc needs a default library path.
-CFLAGS-dl-support.c = -D'DEFAULT_RPATH="$(default-rpath)"'
+ $(LINK.o) -nostdlib -nostartfiles -shared -o $@ $(LDFLAGS-rtld) \
+ $(filter-out $(rtld-ldscript) $(map-file),$^) \
+ $(load-map-file) -Wl,-soname=$(rtld-installed-name)
# interp.c exists just to get this string into the libraries.
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"'
diff --git a/elf/dl-load.c b/elf/dl-load.c
index b93258e9eb..cb0a4ff753 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -99,9 +99,8 @@ size_t _dl_pagesize;
extern const char *_dl_platform;
extern size_t _dl_platformlen;
-/* This is a fake list to store the RPATH information for static
- binaries. */
-static struct r_search_path_elem **fake_path_list;
+/* This is the decomposed LD_LIBRARY_PATH search path. */
+static struct r_search_path_elem **env_path_list;
/* List of the hardware capabilities we might end up using. */
static const struct r_strlenpair *capstr;
@@ -175,7 +174,8 @@ expand_dynamic_string_token (struct link_map *l, const char *s)
{
assert (l->l_name[0] == '\0');
l->l_origin = get_origin ();
- origin_len = l->l_origin ? strlen (l->l_origin) : 0;
+ origin_len = (l->l_origin && l->l_origin != (char *) -1
+ ? strlen (l->l_origin) : 0);
}
else
origin_len = l->l_origin == (char *) -1 ? 0 : strlen (l->l_origin);
@@ -293,8 +293,8 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
interpreted as `use the current directory'. */
if (len == 0)
{
- static char curwd[2];
- cp = strcpy (curwd, ".");
+ static char curwd[] = "./";
+ cp = curwd;
}
/* Remove trailing slashes (except for "/"). */
@@ -388,7 +388,7 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
static struct r_search_path_elem **
internal_function
-decompose_rpath (const char *rpath, size_t additional_room, struct link_map *l)
+decompose_rpath (const char *rpath, struct link_map *l)
{
/* Make a copy we can work with. */
const char *where = l->l_name;
@@ -410,7 +410,7 @@ decompose_rpath (const char *rpath, size_t additional_room, struct link_map *l)
/* This object is on the list of objects for which the RPATH
must not be used. */
result = (struct r_search_path_elem **)
- malloc ((additional_room + 1) * sizeof (*result));
+ malloc (sizeof (*result));
if (result == NULL)
_dl_signal_error (ENOMEM, NULL,
"cannot create cache for search path");
@@ -433,10 +433,9 @@ decompose_rpath (const char *rpath, size_t additional_room, struct link_map *l)
if (*cp == ':')
++nelems;
- /* Allocate room for the result. NELEMS + 1 + ADDITIONAL_ROOM is an upper
- limit for the number of necessary entries. */
- result = (struct r_search_path_elem **) malloc ((nelems + 1
- + additional_room + 1)
+ /* Allocate room for the result. NELEMS + 1 is an upper limit for the
+ number of necessary entries. */
+ result = (struct r_search_path_elem **) malloc ((nelems + 1 + 1)
* sizeof (*result));
if (result == NULL)
_dl_signal_error (ENOMEM, NULL, "cannot create cache for search path");
@@ -458,32 +457,9 @@ _dl_init_paths (const char *llp)
struct r_search_path_elem *pelem, **aelem;
size_t round_size;
-#ifdef PIC
- /* We have in `search_path' the information about the RPATH of the
- dynamic loader. Now fill in the information about the applications
- RPATH and the directories addressed by the LD_LIBRARY_PATH environment
- variable. */
+ /* Fill in the information about the application's RPATH and the
+ directories addressed by the LD_LIBRARY_PATH environment variable. */
struct link_map *l;
-#endif
-
- /* Number of elements in the library path. */
- size_t nllp;
-
- /* First determine how many elements the LD_LIBRARY_PATH contents has. */
- if (llp != NULL && *llp != '\0')
- {
- /* Simply count the number of colons. */
- const char *cp = llp;
- nllp = 1;
- while (*cp)
- {
- if (*cp == ':' || *cp == ';')
- ++nllp;
- ++cp;
- }
- }
- else
- nllp = 0;
/* Get the capabilities. */
capstr = _dl_important_hwcaps (_dl_platform, _dl_platformlen,
@@ -533,81 +509,44 @@ _dl_init_paths (const char *llp)
l = _dl_loaded;
if (l != NULL)
{
- /* We should never get here when initializing in a static application.
- If this is a dynamically linked application _dl_loaded always
- points to the main map which is not dlopen()ed. */
assert (l->l_type != lt_loaded);
if (l->l_info[DT_RPATH])
- {
- /* Allocate room for the search path and fill in information
- from RPATH. */
- l->l_rpath_dirs =
- decompose_rpath ((const char *)
- (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr
- + l->l_info[DT_RPATH]->d_un.d_val),
- nllp, l);
- }
+ /* Allocate room for the search path and fill in information
<