summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/brk.S33
-rw-r--r--sysdeps/unix/sysv/linux/alpha/clone.S29
-rw-r--r--sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S31
-rw-r--r--sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S31
-rw-r--r--sysdeps/unix/sysv/linux/alpha/llseek.S31
-rw-r--r--sysdeps/unix/sysv/linux/alpha/sigsuspend.S37
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscall.S31
-rw-r--r--sysdeps/unix/sysv/linux/configure9
-rw-r--r--sysdeps/unix/sysv/linux/errnos.h1
-rw-r--r--sysdeps/unix/sysv/linux/getsysstats.c39
-rw-r--r--sysdeps/unix/sysv/linux/paths.h3
-rw-r--r--sysdeps/unix/sysv/linux/sigsuspend.c29
-rw-r--r--sysdeps/unix/sysv/linux/sparc/clone.S88
14 files changed, 261 insertions, 133 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 0e87d09142..fcfb76c08f 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -5,7 +5,7 @@ endif
ifeq ($(subdir), misc)
sysdep_routines += sysctl clone
-sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
+sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
sys/user.h syscall-list.h sys/sysmacros.h sys/procfs.h \
sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index d31d9e9b4d..3d9f6dca5f 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -1,24 +1,25 @@
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe <brendan@zen.org>, 1993.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* __brk is a special syscall under Linux since it never returns an
-error. Instead, the error condition is indicated by returning the old
-break value (instead of the new, requested one). */
+ error. Instead, the error condition is indicated by returning the old
+ break value (instead of the new, requested one). */
#include <sysdep.h>
#define _ERRNO_H
@@ -39,8 +40,10 @@ __curbrk: .skip 8
LEAF(__brk, 0)
ldgp gp, 0(t12)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 9dbf3034c9..03ecddc727 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -1,20 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson (rth@tamu.edu)
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* clone() is even more special than fork() as it mucks with stacks
and invokes a function in the right context after its all over. */
@@ -33,8 +34,10 @@ ENTRY(__clone)
stq a4,0(sp)
stq a5,8(sp)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index 1176a2730f..dbc25bcbf3 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@azstarnet.com).
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -26,8 +27,10 @@ LEAF(__ieee_get_fp_control, 16)
#ifdef PROF
ldgp gp, 0(pv)
lda sp, -16(sp)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
lda sp, -16(sp)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index aa761ecaca..8486cfaa3a 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@azstarnet.com).
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -24,8 +25,10 @@ LEAF(__ieee_set_fp_control, 16)
#ifdef PROF
ldgp gp, 0(sp)
lda sp, -16(sp)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
lda sp, -16(sp)
diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S
index 45fb349236..a2e644c161 100644
--- a/sysdeps/unix/sysv/linux/alpha/llseek.S
+++ b/sysdeps/unix/sysv/linux/alpha/llseek.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@cs.arizona.edu).
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* For compatibility only: a "long" is 64 bits on the Alpha, so
llseek() isn't really needed. But there are some programs out
@@ -26,8 +27,10 @@ Cambridge, MA 02139, USA. */
ENTRY(llseek)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 83d331fef0..f476ed595f 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@cs.arizona.edu).
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* sigsuspend is a special syscall since it needs to dereference the
sigset. */
@@ -23,11 +24,13 @@ Cambridge, MA 02139, USA. */
.text
-LEAF(sigsuspend, 0)
+LEAF(__sigsuspend, 0)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
@@ -46,4 +49,6 @@ error:
#endif
jmp zero, __syscall_error
- END(sigsuspend)
+ END(__sigsuspend)
+
+weak_alias(__sigsuspend, sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index 81043c2cdb..75e1260aea 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -1,20 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@azstarnet.com).
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@azstarnet.com>, 1996.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -44,8 +45,10 @@ Cambridge, MA 02139, USA. */
LEAF(__syscall, 0)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
@@ -69,4 +72,6 @@ error:
#endif
jmp zero, __syscall_error
+END(__syscall)
+
weak_alias(__syscall, syscall)
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 5e83d4411d..2592c6c8c8 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -43,3 +43,12 @@ Linux 2.0.10 or later. This check uses <linux/version.h>, so
make sure that file was built correctly when installing the kernel header
files." 1>&2; exit 1; }
fi
+
+# The Linux filesystem standard prescribes where to place "essential"
+# files. I.e., when the installation prefix is "/usr" we have to place
+# shared library objects and the configuation files on the root partition
+# in /lib and /etc.
+if test "$prefix" = "/usr"; then
+ libc_cv_slibdir="/lib"
+ libc_cv_sysconfdir="/etc"
+fi
diff --git a/sysdeps/unix/sysv/linux/errnos.h b/sysdeps/unix/sysv/linux/errnos.h
index 53a2ec053d..982477c8f3 100644
--- a/sysdeps/unix/sysv/linux/errnos.h
+++ b/sysdeps/unix/sysv/linux/errnos.h
@@ -37,6 +37,7 @@ __set_errno (int __err)
{
return *__errno_location () = errno = __err;
}
+# define __set_errno __set_errno
# else /* !_LIBC_REENTRANT */
# define __set_errno(val) errno = (val)
# endif /* _LIBC_REENTRANT */
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
index d37ca8c80f..2b855c7a84 100644
--- a/sysdeps/unix/sysv/linux/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
@@ -1,23 +1,24 @@
/* getsysstats - Determine various system internal values, Linux version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <alloca.h>
#include <errno.h>
#include <mntent.h>
#include <paths.h>
diff --git a/sysdeps/unix/sysv/linux/paths.h b/sysdeps/unix/sysv/linux/paths.h
index 2905e9effd..6751c0d4a9 100644
--- a/sysdeps/unix/sysv/linux/paths.h
+++ b/sysdeps/unix/sysv/linux/paths.h
@@ -49,6 +49,7 @@
#define _PATH_DEVNULL "/dev/null"
#define _PATH_DRUM "/dev/drum"
#define _PATH_KMEM "/dev/kmem"
+#define _PATH_LASTLOG "/var/log/lastlog"
#define _PATH_MAILDIR "/var/spool/mail"
#define _PATH_MAN "/usr/man"
#define _PATH_MEM "/dev/mem"
@@ -60,7 +61,9 @@
#define _PATH_SHELLS "/etc/shells"
#define _PATH_TTY "/dev/tty"
#define _PATH_UNIX "/vmlinux"
+#define _PATH_UTMP "/var/run/utmp"
#define _PATH_VI "/usr/bin/vi"
+#define _PATH_WTMP "/var/log/wtmp"
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c
index 1aeda8224a..8b3d2519ce 100644
--- a/sysdeps/unix/sysv/linux/sigsuspend.c
+++ b/sysdeps/unix/sysv/linux/sigsuspend.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <signal.h>
#include <stddef.h>
@@ -25,8 +25,9 @@ extern int __syscall_sigsuspend (int, unsigned long, unsigned long);
/* Change the set of blocked signals to SET,
wait until a signal arrives, and restore the set of blocked signals. */
int
-sigsuspend (set)
+__sigsuspend (set)
const sigset_t *set;
{
return __syscall_sigsuspend (0, 0, *set);
}
+weak_alias (__sigsuspend, sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/sparc/clone.S b/sysdeps/unix/sysv/linux/sparc/clone.S
new file mode 100644
index 0000000000..875dcba64a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/clone.S
@@ -0,0 +1,88 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Miguel de Icaza (miguel@nuclecu.unam.mx)
+
+ FIXME: Currently only 6 parameters can be passsed
+ to the clone function.
+
+ based on code written for the Intel by Richard
+ Henderson (rth@tamu.edu)
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* clone() is even more special than fork() as it mucks with stacks
+ and invokes a function in the right context after its all over. */
+
+#include <asm/errno.h>
+#include <asm/unistd.h>
+
+/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */
+
+ .text
+ .align 4
+ .globl __libc_clone
+ .type __libc_clone,@function
+ .weak clone
+ __clone = __libc_clone
+ clone = __libc_clone
+__libc_clone:
+ save %sp,-96,%sp
+ /* sanity check arguments */
+ tst %i0
+ be __clone_syscall_error
+ tst %i1
+ be __clone_syscall_error
+ cmp %i3,0
+ bl __clone_syscall_error
+ nop
+
+ /* Flush the register windows */
+ ta 3
+
+ /* Parameters for system call */
+ mov %i1,%o1
+ mov %i2,%o0
+
+ /* parameters that are on the stack for routine */
+#define P(x) 0x5c+(x*4)
+ ld [%fp+P(0)],%o2
+ ld [%fp+P(1)],%o3
+ ld [%fp+P(2)],%o4
+ ld [%fp+P(3)],%o5
+ /* Do the system call */
+ set __NR_clone,%g1
+ ta 0x10
+ bcs __clone_syscall_error
+ tst %o1
+ bne __thread_start
+ nop
+ mov %o0,%i0
+ ret
+ restore
+
+__clone_syscall_error:
+ call __errno_location
+ set EINVAL,%i0
+ st %i0,[%o0]
+ mov -1,%i0
+ ret
+ restore
+
+__thread_start:
+ mov %i5,%o1
+ call %i0
+ mov %i4,%o0
+ call _exit,0
+ nop