* sysdeps/unix/sysv/linux/shmat.c: Include sys/shm.h instead of
sys/sem.h.
* stdlib/stdlib.h [__USE_SVID]: Declare a64l, l64a.
* stdlib/l64a.c: Use 6-bit numbers as indices in CONV_TABLE, not
literal byte values.
* misc/bsd-compat.c (getpgrp): Define with prototype.
* misc/init-misc.c (__progname_full): New variable.
(program_invocation_name, program_invocation_short_name): New aliases.
(__init_misc): Define with prototype. Set __progname_full.
* misc/progname.c: File removed.
* misc/Makefile (aux): Remove progname.
* misc/hsearch_r.c (isprime): Define with prototype.
* sysdeps/unix/sysv/linux/seteuid.c: Just include unix/bsd version.
* sysdeps/unix/bsd/seteuid.c: Disallow arg of -1.
* sysdeps/unix/bsd/setegid.c: Likewise.
* posix/tstgetopt.c, posix/tstgetopt.args: Test long options too.
* sysdeps/unix/sysv/linux/i386/init-first.c (init): Save, set, and
restore %ebx by hand for personality syscall.
GCC cannot deal with spilling the dedicated GOT register.
* misc/Makefile (routines): Add mntent, which was somehow omitted.
Fri Sep 29 15:07:10 1995 Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
* sysdeps/unix/sysv/linux/adjtime.c (__adjtime):
Change name of field `mode' in `struct timex' to `modes'.
Linux-1.3.28 updates this name according to RFC 1489.
* sysdeps/stub/sys/sem_buf.h (union semun): New type.
* sysdeps/mach/hurd/i386/init-first.c (init1) [PIC]: Call
__libc_global_ctors.
* sysdeps/i386/init-first.c: Rewritten.
* sysdeps/unix/sysv/linux/i386/init-first.S: File removed.
* sysdeps/unix/sysv/linux/i386/init-first.c: New file.
* sysdeps/unix/sysv/linux/i386/fpu_control.h: Fix name in decl of
___fpu_control.
* Makerules (build-shlib): New canned sequence, broken out of
lib%.so rule. Link in $^ instead of just $<.
(lib%.so: lib%_pic.a): Use it.
(libc.so): New target; use $(build-shlib) for cmds, but also depend
on soinit.so first and sofini.so last.
* elf/soinit.c: New file.
* elf/sofini.c: New file.
* elf/Makefile (distribute): Add soinit.c and sofini.c.
(extra-objs): Add soinit.so and sofini.so.
* sysvipc/sys/shm.h (shmat): Fix return type to char *.
* sysdeps/stub/sys/ipc_buf.h (key_t): Type removed.
* misc/syslog.c (vsyslog): Rewritten using open_memstream to
dynamically allocate buffers.
* Makerules (install-lib-nosubdir): Make this, rather than
install-no-libc.a, depend on the installed shared libraries.
* mktime.c (localtime_r): Add substitute if the system doesn't
provide one.
Mon Sep 18 14:39:20 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* time/gmtime.c (gmtime_r): Define as weak alias.
* time/localtime.c (localtime_r): Define as weak alias.
* time/time.h [__USE_REENTRANT] (gmtime_r, localtime_r): Declare them.
* errno.h: Only define _ERRNO_H #ifndef __need_Emath.
#undef __need_Emath after including errnos.h.
[_ERRNO_H]: Protect decls with this.
Sun Sep 17 08:22:12 1995 Paul Eggert <eggert@twinsun.com>
Fix mktime so that it does not write over localtime's returned value.
* localtime.c (__localtime_r): New function, with extra arg
specifying where to store result.
(localtime): Use it.
(_tmbuf): New var.
* gmtime.c (__gmtime_r, gmtime, _tmbuf): Likewise.
* mktime.c (__mktime_internal): Conversion function is now
__localtime_r style, not localtime style.
(mktime): Pass __localtime_r, not localtime.
* timegm.c (timegm): Pass __gmtime_r, not gmtime.
* offtime.c (__offtime): New arg specifying where to store result.
* time.h (__mktime_internal, __offtime): Adjust decls accordingly.
(__gmtime_r, __localtime_r): New decls.
* time/localtime.c: <stddef.h>, <ctype.h>, <stdio.h>,
<stdlib.h>, <string.h>: Remove includes.
<errno.h>: Add include.
* time/mktime.c, time/time.h, time/timegm.c (__mktime_internal):
Renamed from _mktime_internal to avoid namespace pollution.
* time/gmtime.c: Clear tm_isdst.
* misc/efgcvt_r.c (ecvt_r, fcvt_r): Last arg is size_t, not int.
* stdlib/stdlib.h (ecvt_r, fcvt_r): Fix type of last arg: make it
size_t.
* sysdeps/mach/hurd/fpathconf.c: Call __io_pathconf instead of
__file_pathconf.
* sysdeps/mach/hurd/pathconf.c: Likewise.
* elf/elf.h (AT_GID): Fix typo: Read -> Real.
* misc/efgvt_r.c: New file. Reentrant version of [efg]cvt functions.
* misc/efgcvt.c: Rewrite to use reentrant functions.
* misc/hsearch_r.c: New file. Reentrant version of functions from
hsearch family.
* misc/hsearch.c, misc/tsearch.c: New files.
* misc/Makefile (routines): Add efgcvt_r, hsearch_r, hsearch, tsearch.
* posix/unistd.h (ttyname_r): Add prototype for new function.
* stdlib/drand48_r.c, stdlib/erand48_r.c, stdlib/jrand48_r.c,
stdlib/lrand48_r.c, stdlib/mrand48_r.c, stdlib/nrand48_r.c,
stdlib/seed48_r.c, stdlib/srand48_r.c, stdlib/lcong48_r.c,
stdlib/drand48-iter.c: New files implementing reentrant versions
of functions from drand48 family.
* stdlib/seed48.c, stdlib/drand48.c, stdlib/erand48.c,
stdlib/jrand48.c, stdlib/lrand48.c, stdlib/mrand48.c,
stdlib/nrand48.c, stdlib/srand48.c, stdlib/lcong48.c:
Rewrite to use reentrant versions.
* stdlib/a64l.c, stdlib/l64a.c: New files. Implement a64l()
and l64a() functions from SysV library.
* stdlib/Makefile (routines): Add drand48_r, erand48_r, lrand48_r,
nrand48_r, mrand48_r, jrand48_r, srand48_r, seed48_r, lcong48_r,
drand48-iter, a64l, l64a.
* stdlib/stdlib.h: Declare them.
* stdlib/random_r.c: New file. Reentrant version of functions
from random family.
* stdlib/stdlib.h: Declare them.
* stdlib/random.c: Rewrite to use reentrant functions.
* string/strerror_r.c: New file. Reentrant version.
* string/strerror.c: Change for new _strerror_internal form.
* string/Makefile (routines): Add strerror_r.
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Set default
value of user_entry to `_start'.
Close AT_ENTRY case with `break'.
* sysdeps/generic/strstr.c: New and much faster implementation
by Stephen R. van den Berg.
* sysdeps/generic/_strerror.c: _strerror_internal now takes
three argument and has and explicit buffer length.
* sysdeps/mach/_strerror.c: Change for new interface with three
arguments.
* stdio/perror.c, stdio/vfprintf.c: Callers changed.
* sysdeps/mach/hurd/ttyname_r.c: New file. Reentrant version.
* sysdeps/posix/ttyname_r.c: New file. Reentrant version.
* sysdeps/stub/ttyname_r: New file. Define as dummy function.
* sysdeps/posix/utimes.c: Include <utime.h> for prototype.
(utimes): First parameter to utime must be file, not path.
* sysdeps/posix/sysconf.c (__sysconf): Test for CLK_TCK in case
_SC_CLK_TCK and return it when available.
Test for STREAM_MAX in case _SC_STREAM_MAX and return it when
available.
Add case for _SC_2_LOCALEDEF which is now available.
* posix/sys/types.h [__USE_SVID] (key_t): New type.
* sysvipc/Makefile, sysvipc/ftok.c, sysvipc/sys/ipc.h,
sysvipc/sys/msg.h, sysvipc/sys/sem.h, sysvipc/sys/shm.h,
sysdeps/stub/sys/msq_buf.h, sysdeps/stub/sys/sem_buf.h,
sysdeps/stub/sys/shm_buf.h, sysdeps/stub/sys/ipc_buf.h,
sysdeps/stub/semctl.c, sysdeps/stub/semget.c, sysdeps/stub/semop.c,
sysdeps/stub/shmat.c, sysdeps/stub/shmctl.c, sysdeps/stub/shmdt.c,
sysdeps/stub/shmget.c, sysdeps/stub/msgctl.c, sysdeps/stub/msgget.c,
sysdeps/stub/msgrcv.c, sysdeps/stub/msgsnd.c: New files.
Add implementation of System V IPC.
* misc/progname.c (program_invocation_name,
program_invocation_short_name): Make these initialized data
definitions.
* sysdeps/mach/hurd/setitimer.c (fork_itimer): Add self reference
so gcc doesn't optimize out the function entirely.
* posix/unistd.h [__USE_BSD] (ttyslot): Declare it.
* posix/unistd.h [__USE_BSD] (L_SET, L_INCR, L_XTND): Define
unless L_SET already defined.
* misc/sys/file.h (L_SET, L_INCR, L_XTND): Don't define if L_SET
already defined.
Incorporated -lutil library from 4.4-Lite.
* misc/Makefile (extra-libs, libutil-routines): New variables.
* misc/login.c, misc/login_tty.c, misc/logout.c, misc/logwtmp.c,
sysdeps/generic/pty.c: New files for -lutil incorporated from 4.4-Lite.
Support simple, light-weight unwind-protect mechanism for longjmp.
* setjmp/longjmp.c: Call _longjmp_unwind first thing.
* sysdeps/mach/hurd/jmp-unwind.c: New file.
* sysdeps/stub/jmp-unwind.c: New file.
* sysdeps/i386/jmp_buf.h (_JMPBUF_UNWINDS): New macro.
* sysdeps/mips/jmp_buf.h (_JMPBUF_UNWINDS): New macro.
* setjmp/Makefile (routines): Add jmp-unwind.
* hurd/hurd/userlink.h (struct hurd_userlink): Move `next' and
`prevp' members into new substructure `resource'; add another such
substructure `thread' and members `cleanup' (function ptr) and
`cleanup_data' (generic ptr).
(_hurd_userlink_link, _hurd_userlink_unlink): Insert/remove LINK
into the `_hurd_self_sigstate ()->active_resources' list via the
`thread' substructure.
* hurd/hurd/port.h (_hurd_port_cleanup): Declare it.
(_hurd_port_locked_get): Set LINK->cleanup to _hurd_port_cleanup and
LINK->cleanup_data' to the port extracted.
* hurd/hurd/signal.h (struct hurd_sigstate): New member
`active_resources'.
* hurd/port-cleanup.c: New file.
* hurd/Makefile (routines): Add port-cleanup.
* malloc/malloc.c: Include errno.h.
Sat Mar 25 18:24:21 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/loadlocale.c (_nl_load_locale): Avoid */ inside comment.
* config.h.in [HAVE_ELF || HAVE_GNU_LD]: Define HAVE_WEAK_SYMBOLS.
* stdlib/strtod.c (PASTE, PASTE1): New helper macros; use these in
access to float.h macros.
* misc/efgcvt.c: New file.
* misc/Makefile (routines): Add efgcvt.