diff options
author | Roland McGrath <roland@gnu.org> | 1995-05-20 00:13:43 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-05-20 00:13:43 +0000 |
commit | a2fe9c76a9d7645c63288eda807e01a6b1901d29 (patch) | |
tree | 68882cda9fe373eda0ecaa70503d34812186138d /sysdeps | |
parent | 2b83a2a4d978012cdf78b648337c31091e20526d (diff) | |
download | glibc-a2fe9c76a9d7645c63288eda807e01a6b1901d29.tar glibc-a2fe9c76a9d7645c63288eda807e01a6b1901d29.tar.gz glibc-a2fe9c76a9d7645c63288eda807e01a6b1901d29.tar.bz2 glibc-a2fe9c76a9d7645c63288eda807e01a6b1901d29.zip |
Fri May 19 17:16:46 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/mach/hurd/i386/init-first.c: In cthreads case, handle
args on stack from kernel.
* posix/Makefile, sysdeps/alpha/Makefile,
* sysdeps/mach/hurd/Makefile, sysdeps/sparc/Makefile, Makefile,
* Makerules, Make-dist: Fix "cvs commit" cmds in rules to not fail
in the absence of CVS dirs.
* hurd/hurdstartup.c: Don't call __mach_init. Grok args from the
kernel on the stack properly.
* set-init.c: Never call _init/_fini; just run __libc_subinit.
* Makerules (LDFLAGS-c.so): Add -nostartfiles.
* mach/Machrules (LDFLAGS-$(interface.so)): Likewise.
* configure.in: Move defaulting of --with-elf and --with-gnu-*
based on host os outside the AC_CACHE_VAL for the sysdirs
calculation.
* Makeconfig (localedir, nlsdir): New variables.
* values.h: New file.
* Makefile (headers): Add values.h.
* locale/Makefile (distribute): Add error.h.
* locale/localedef.c: Include "error.h".
(main): Use error_message_count instead of warning_cntr.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/alpha/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/Makefile | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/init-first.c | 17 | ||||
-rw-r--r-- | sysdeps/sparc/Makefile | 2 |
4 files changed, 20 insertions, 5 deletions
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 06621b824d..8573ca811c 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -91,4 +91,4 @@ $(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir) # Make it unwritable so noone will edit it by mistake. -chmod a-w $@-tmp mv -f $@-tmp $@ - test -d CVS && cvs commit -m'Regenerated from $<' $@ + test ! -d CVS || cvs commit -m'Regenerated from $<' $@ diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile index d1e8580e93..1886d07094 100644 --- a/sysdeps/mach/hurd/Makefile +++ b/sysdeps/mach/hurd/Makefile @@ -108,7 +108,7 @@ $(objpfx)stamp-errnos: $(hurd)/errnos.awk $(errno.texinfo) \ # Make it unwritable so noone will edit it by mistake. -chmod a-w $(hurd)/errnos.h-tmp ./$(..)move-if-change $(hurd)/errnos.h-tmp $(hurd)/errnos.h - test -d CVS && \ + test ! -d CVS || \ (cd $(hurd); cvs commit -m'Regenerated from $^' errnos.h) touch $@ @@ -117,7 +117,7 @@ $(hurd)/errlist.c: $(hurd)/errlist.awk $(errno.texinfo) # Make it unwritable so noone will edit it by mistake. -chmod a-w $@-tmp mv -f $@-tmp $@ - test -d CVS && cvs commit -m'Regenerated from $^' $@ + test ! -d CVS || cvs commit -m'Regenerated from $^' $@ # We install the real libc.a as libcrt.a and as libc.a we install a linker # script which does -( -lcrt -lmachuser -lhurduser -). diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c index 55ffe1aada..d747e75c7d 100644 --- a/sysdeps/mach/hurd/i386/init-first.c +++ b/sysdeps/mach/hurd/i386/init-first.c @@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */ #include <hurd.h> #include <stdio.h> #include <unistd.h> +#include <string.h> #include "hurdstartup.h" #include "set-hooks.h" #include "hurdmalloc.h" /* XXX */ @@ -118,9 +119,23 @@ init (int *data, int retaddr) { /* Initialize cthreads, which will allocate us a new stack to run on. */ void *newsp = (*_cthread_init_routine) (); + struct hurd_startup_data *od; + /* Copy the argdata from the old stack to the new one. */ newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data, - (char *) &d[1] - (char *) data); + (char *) d - (char *) data); + + /* Set up the Hurd startup data block immediately following + the argument and environment pointers on the new stack. */ + od = (newsp + ((char *) d - (char *) data)); + if ((void *) argv[0] == d) + /* We were started up by the kernel with arguments on the stack. + There is no Hurd startup data, so zero the block. */ + memset (od, 0, sizeof *od); + else + /* Copy the Hurd startup data block to the new stack. */ + *od = *d; + data = newsp; } diff --git a/sysdeps/sparc/Makefile b/sysdeps/sparc/Makefile index b651dfb2c6..d4124a6eb7 100644 --- a/sysdeps/sparc/Makefile +++ b/sysdeps/sparc/Makefile @@ -46,7 +46,7 @@ $(divrem:%=$(sysdep_dir)/sparc/%.S): $(sysdep_dir)/sparc/divrem.m4 # Make it unwritable so noone will edit it by mistake. -chmod a-w $@-tmp mv -f $@-tmp $@ - test -d CVS && cvs commit -m'Regenerated from $<' $@ + test ! -d CVS || cvs commit -m'Regenerated from $<' $@ sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/%.S) |