diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-14 19:43:02 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-14 19:43:02 +0000 |
commit | c764b9a7280436b891ffa5dfb46d14a8df405a97 (patch) | |
tree | 843f8e5a4314ff9e86c0e85da6908bdd00f15eef | |
parent | 19cc96bfe5d37c40995d6d60d902258852c38909 (diff) | |
download | glibc-c764b9a7280436b891ffa5dfb46d14a8df405a97.tar.gz glibc-c764b9a7280436b891ffa5dfb46d14a8df405a97.tar.xz glibc-c764b9a7280436b891ffa5dfb46d14a8df405a97.zip |
Update.
1998-07-14 19:39 Ulrich Drepper <drepper@cygnus.com> * stdio-common/vfscanf.c (ungetc): Use _IO_sputbackc, not _IO_ungetc. [_USE_IN_LIBIO] (encode_error): Free cancelation handler. (conv_error): Likewise. (input_error): Likewise. (memory_error): Likewise. 1998-07-12 Mark Kettenis <kettenis@phys.uva.nl> * sysdeps/mach/hurd/dl-sysdep.c: Bring in sync with generic implementation. Include <entry.h>. Replace references to symbol _start with macro ENTRY_POINT. (__libc_uid): Remove. (__libc_multiple_libcs): New variable. (__libc_stack_end): New variable. (_dl_hwcap_mask): New variable. (_dl_important_hwcaps): New function. (_dl_show_auxv): Mark internal.
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | linuxthreads/ChangeLog | 4 | ||||
-rw-r--r-- | linuxthreads/sysdeps/pthread/bits/libc-lock.h | 6 | ||||
-rw-r--r-- | stdio-common/vfscanf.c | 9 | ||||
-rw-r--r-- | sysdeps/mach/hurd/dl-sysdep.c | 43 |
5 files changed, 72 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog index 8cf6fa2e6b..561f3ed5fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +1998-07-14 19:39 Ulrich Drepper <drepper@cygnus.com> + + * stdio-common/vfscanf.c (ungetc): Use _IO_sputbackc, not _IO_ungetc. + [_USE_IN_LIBIO] (encode_error): Free cancelation handler. + (conv_error): Likewise. + (input_error): Likewise. + (memory_error): Likewise. + +1998-07-12 Mark Kettenis <kettenis@phys.uva.nl> + + * sysdeps/mach/hurd/dl-sysdep.c: Bring in sync with generic + implementation. Include <entry.h>. Replace references to symbol + _start with macro ENTRY_POINT. + (__libc_uid): Remove. + (__libc_multiple_libcs): New variable. + (__libc_stack_end): New variable. + (_dl_hwcap_mask): New variable. + (_dl_important_hwcaps): New function. + (_dl_show_auxv): Mark internal. + 1998-07-14 Mark Kettenis <kettenis@phys.uva.nl> * mach/Makefile: Create target directory before generating diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index fb309c7ab9..ef0634d459 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,7 @@ +1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end. + 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de> * Examples/ex6.c: Include <unistd.h> for usleep. diff --git a/linuxthreads/sysdeps/pthread/bits/libc-lock.h b/linuxthreads/sysdeps/pthread/bits/libc-lock.h index 7d336bed52..db9a4718d3 100644 --- a/linuxthreads/sysdeps/pthread/bits/libc-lock.h +++ b/linuxthreads/sysdeps/pthread/bits/libc-lock.h @@ -131,6 +131,12 @@ typedef pthread_key_t __libc_key_t; } \ } +/* Sometimes we have to exit the block in the middle. */ +#define __libc_cleanup_end(DOIT) \ + if (_avail) { \ + _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ + } + /* Create thread-specific key. */ #define __libc_key_create(KEY, DESTRUCTOR) \ (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index c1ff2690b7..bd167b9a5b 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -55,30 +55,35 @@ # undef va_list # define va_list _IO_va_list -# define ungetc(c, s) ((void) ((int) c != EOF && --read_in), \ - _IO_ungetc (c, s)) +# define ungetc(c, s) ((void) ((int) c == EOF \ + || (--read_in, \ + _IO_sputbackc (s, (unsigned char) c)))) # define inchar() (c == EOF ? EOF \ : ((c = _IO_getc_unlocked (s)), \ (void) (c != EOF && ++read_in), c)) # define encode_error() do { \ if (errp != NULL) *errp |= 4; \ _IO_funlockfile (s); \ + __libc_cleanup_end (0); \ __set_errno (EILSEQ); \ return done; \ } while (0) # define conv_error() do { \ if (errp != NULL) *errp |= 2; \ _IO_funlockfile (s); \ + __libc_cleanup_end (0); \ return done; \ } while (0) # define input_error() do { \ _IO_funlockfile (s); \ if (errp != NULL) *errp |= 1; \ + __libc_cleanup_end (0); \ return done ?: EOF; \ } while (0) # define memory_error() do { \ _IO_funlockfile (s); \ __set_errno (ENOMEM); \ + __libc_cleanup_end (0); \ return EOF; \ } while (0) # define ARGCHECK(s, format) \ diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index c380256a33..71ccdfb500 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -37,16 +37,24 @@ #include <ctype.h> #include <sys/stat.h> -#include "dl-machine.h" +#include <entry.h> +#include <dl-machine.h> +#include <dl-procinfo.h> extern void __mach_init (void); extern int _dl_argc; extern char **_dl_argv; extern char **_environ; +extern void ENTRY_POINT (void); -uid_t __libc_uid; int __libc_enable_secure; +int __libc_multiple_libcs; /* Defining this here avoids the inclusion + of init-first. */ +/* This variable containts the lowest stack address ever used. */ +void *__libc_stack_end; +unsigned long int _dl_hwcap_mask = HWCAP_IMPORTANT; + struct hurd_startup_data *_dl_hurd_data; @@ -86,8 +94,6 @@ _dl_sysdep_start (void **start_argptr, void (*dl_main) (const Elf32_Phdr *phdr, Elf32_Word phent, Elf32_Addr *user_entry)) { - extern void _start (); - void go (int *argdata) { extern unsigned int _dl_skip_args; /* rtld.c */ @@ -103,21 +109,20 @@ _dl_sysdep_start (void **start_argptr, { static struct hurd_startup_data nodata; _dl_hurd_data = &nodata; - nodata.user_entry = (vm_address_t) &_start; + nodata.user_entry = (vm_address_t) &ENTRY_POINT; } else _dl_hurd_data = (void *) p; - __libc_uid = __getuid (); __libc_enable_secure = _dl_hurd_data->flags & EXEC_SECURE; if (_dl_hurd_data->flags & EXEC_STACK_ARGS && _dl_hurd_data->user_entry == 0) - _dl_hurd_data->user_entry = (vm_address_t) &_start; + _dl_hurd_data->user_entry = (vm_address_t) &ENTRY_POINT; unfmh(); /* XXX */ - if (_dl_hurd_data->user_entry == (vm_address_t) &_start) + if (_dl_hurd_data->user_entry == (vm_address_t) &ENTRY_POINT) /* We were invoked as a command, not as the program interpreter. The generic ld.so code supports this: it will parse the args as "ld.so PROGRAM [ARGS...]". For booting the Hurd, we @@ -576,11 +581,33 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg, void +internal_function _dl_show_auxv (void) { /* There is nothing to print. Hurd has no auxiliary vector. */ } + +/* Return an array of useful/necessary hardware capability names. */ +const struct r_strlenpair * +internal_function +_dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz, + size_t *max_capstrlen) +{ + struct r_strlenpair *result; + + /* Return an empty array. Hurd has no hardware capabilities. */ + result = (struct r_strlenpair *) malloc (sizeof (*result)); + if (result == NULL) + _dl_signal_error (ENOMEM, NULL, "cannot create capability list"); + + result[0].str = (char *) result; /* Does not really matter. */ + result[0].len = 0; + + *sz = 1; + return result; +} + void weak_function _dl_sysdep_fatal (const char *msg, ...) { |