aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/htonl.c34
-rw-r--r--sysdeps/generic/htons.c34
-rw-r--r--sysdeps/generic/netinet/in.h15
-rw-r--r--sysdeps/generic/ntohl.c34
-rw-r--r--sysdeps/generic/ntohs.c34
-rw-r--r--sysdeps/libm-i387/e_acoshf.S4
-rw-r--r--sysdeps/libm-i387/e_acoshl.S3
-rw-r--r--sysdeps/mach/hurd/fcntlbits.h34
-rw-r--r--sysdeps/sparc/Dist1
-rw-r--r--sysdeps/sparc/bsd-_setjmp.S47
-rw-r--r--sysdeps/sparc/bsd-setjmp.S44
-rw-r--r--sysdeps/sparc/divrem.m44
-rw-r--r--sysdeps/sparc/dl-machine.h145
-rw-r--r--sysdeps/sparc/elf/DEFS.h5
-rw-r--r--sysdeps/sparc/elf/start.S31
-rw-r--r--sysdeps/sparc/fpu_control.h7
-rw-r--r--sysdeps/sparc/rem.S4
-rw-r--r--sysdeps/sparc/sdiv.S4
-rw-r--r--sysdeps/sparc/setjmp.S44
-rw-r--r--sysdeps/sparc/udiv.S4
-rw-r--r--sysdeps/sparc/urem.S4
-rw-r--r--sysdeps/unix/sysv/linux/netinet/in.h15
-rw-r--r--sysdeps/unix/sysv/linux/sparc/Makefile8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/__sigtrampoline.S109
-rw-r--r--sysdeps/unix/sysv/linux/sparc/errno.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/profil-counter.h11
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sigaction.c21
-rw-r--r--sysdeps/unix/sysv/linux/sparc/syscall.S19
-rw-r--r--sysdeps/unix/sysv/linux/sparc/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sysdep.S3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sysdep.h41
31 files changed, 468 insertions, 299 deletions
diff --git a/sysdeps/generic/htonl.c b/sysdeps/generic/htonl.c
index 724ef54639..f1e077ae1a 100644
--- a/sysdeps/generic/htonl.c
+++ b/sysdeps/generic/htonl.c
@@ -1,28 +1,28 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ 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., 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 <ansidecl.h>
#include <netinet/in.h>
#undef htonl
-unsigned long int
-DEFUN(htonl, (x), unsigned long int x)
+u_int32_t
+htonl (x)
+ u_int32_t x;
{
#if BYTE_ORDER == LITTLE_ENDIAN
x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24);
diff --git a/sysdeps/generic/htons.c b/sysdeps/generic/htons.c
index e3209f3e68..3aaf28551c 100644
--- a/sysdeps/generic/htons.c
+++ b/sysdeps/generic/htons.c
@@ -1,28 +1,28 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ 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., 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 <ansidecl.h>
#include <netinet/in.h>
#undef htons
-unsigned short int
-DEFUN(htons, (x), unsigned short int x)
+u_int16_t
+htons (x)
+ u_int16_t x;
{
#if BYTE_ORDER == LITTLE_ENDIAN
x = (x << 8) | (x >> 8);
diff --git a/sysdeps/generic/netinet/in.h b/sysdeps/generic/netinet/in.h
index ad77c8be7d..5531fc2ece 100644
--- a/sysdeps/generic/netinet/in.h
+++ b/sysdeps/generic/netinet/in.h
@@ -190,12 +190,17 @@ struct ip_mreq
struct in_addr imr_interface; /* local IP address of interface */
};
-/* Functions to convert between host and network byte order. */
+/* Functions to convert between host and network byte order.
-extern unsigned long int ntohl __P ((unsigned long int));
-extern unsigned short int ntohs __P ((unsigned short int));
-extern unsigned long int htonl __P ((unsigned long int));
-extern unsigned short int htons __P ((unsigned short int));
+ Please note that these functions normally take `unsigned long int' or
+ `unsigned short int' values as arguments and also return them. But
+ this was a short-sighted decision since on different systems the types
+ may have different representations but the values are always the same. */
+
+extern u_int32_t ntohl __P ((u_int32_t __netlong));
+extern u_int16_t ntohs __P ((u_int16_t __netshort));
+extern u_int32_t htonl __P ((u_int32_t __hostlong));
+extern u_int16_t htons __P ((u_int16_t __hostshort));
#include <endian.h>
diff --git a/sysdeps/generic/ntohl.c b/sysdeps/generic/ntohl.c
index 389cc9ffc0..0cb83c5aa4 100644
--- a/sysdeps/generic/ntohl.c
+++ b/sysdeps/generic/ntohl.c
@@ -1,28 +1,28 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ 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., 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 <ansidecl.h>
#include <netinet/in.h>
#undef ntohl
-unsigned long int
-DEFUN(ntohl, (x), unsigned long int x)
+u_int32_t
+ntohl (x)
+ u_int32_t x;
{
#if BYTE_ORDER == LITTLE_ENDIAN
x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24);
diff --git a/sysdeps/generic/ntohs.c b/sysdeps/generic/ntohs.c
index 1ac462a6d2..f4f37eec93 100644
--- a/sysdeps/generic/ntohs.c
+++ b/sysdeps/generic/ntohs.c
@@ -1,28 +1,28 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ 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., 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 <ansidecl.h>
#include <netinet/in.h>
#undef ntohs
-unsigned short int
-DEFUN(ntohs, (x), unsigned short int x)
+u_int16_t
+ntohs (x)
+ u_int16_t x;
{
#if BYTE_ORDER == LITTLE_ENDIAN
x = (x << 8) | (x >> 8);
diff --git a/sysdeps/libm-i387/e_acoshf.S b/sysdeps/libm-i387/e_acoshf.S
index a4f50ba7ac..8aa78957e2 100644
--- a/sysdeps/libm-i387/e_acoshf.S
+++ b/sysdeps/libm-i387/e_acoshf.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -42,7 +42,7 @@ limit: .double 0.29
.text
ENTRY(__ieee754_acoshf)
- movl 8(%esp), %ecx
+ movl 4(%esp), %ecx
cmpl $0x3f800000, %ecx
jl 5f // < 1 => invalid
fldln2 // log(2)
diff --git a/sysdeps/libm-i387/e_acoshl.S b/sysdeps/libm-i387/e_acoshl.S
index b0fa45c44e..0c81daaebe 100644
--- a/sysdeps/libm-i387/e_acoshl.S
+++ b/sysdeps/libm-i387/e_acoshl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -49,6 +49,7 @@ limit: .double 0.29
.text
ENTRY(__ieee754_acoshl)
movl 12(%esp), %ecx
+ andl $0xffff, %ecx
cmpl $0x3fff, %ecx
jl 5f // < 1 => invalid
fldln2 // log(2)
diff --git a/sysdeps/mach/hurd/fcntlbits.h b/sysdeps/mach/hurd/fcntlbits.h
index efa7069107..9906c97eb3 100644
--- a/sysdeps/mach/hurd/fcntlbits.h
+++ b/sysdeps/mach/hurd/fcntlbits.h
@@ -1,21 +1,21 @@
/* O_*, F_*, FD_* bit values for GNU.
-Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
-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 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. */
+ Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+ 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 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. */
#ifndef _FCNTLBITS_H
diff --git a/sysdeps/sparc/Dist b/sysdeps/sparc/Dist
index ef6c44f78e..55f26143fd 100644
--- a/sysdeps/sparc/Dist
+++ b/sysdeps/sparc/Dist
@@ -1,4 +1,5 @@
DEFS.h
+elf/DEFS.h
dotmul.S umul.S
divrem.m4 sdiv.S udiv.S rem.S urem.S
alloca.S
diff --git a/sysdeps/sparc/bsd-_setjmp.S b/sysdeps/sparc/bsd-_setjmp.S
index 5b685d5496..522fe0e3a1 100644
--- a/sysdeps/sparc/bsd-_setjmp.S
+++ b/sysdeps/sparc/bsd-_setjmp.S
@@ -1,26 +1,43 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Sparc version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ 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., 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>
-ENTRY (setjmp)
+ENTRY (_setjmp)
+#ifdef PIC
+1:
+ jmpl 2f,%o1
+ nop
+2:
+ sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)),%l7
+ or %l7,%lo(_GLOBAL_OFFSET_TABLE_-(1b-.)),%l7
+ add %l7,%o1,%l7
+ sethi %hi(C_SYMBOL_NAME (__sigsetjmp)),%g1
+ or %g1,%lo(C_SYMBOL_NAME (__sigsetjmp)),%g1
+ ld [%l7+%g1],%g1
+ ld [%g1],%g1
+ jmpl %g1,%g0
+ mov %g0,%o1 /* Pass second argument of zero */
+#else
+
sethi %hi(C_SYMBOL_NAME (__sigsetjmp)), %g1
or %lo(C_SYMBOL_NAME (__sigsetjmp)), %g1, %g1
jmp %g1
mov %g0, %o1 /* Pass second argument of zero. */
+#endif
diff --git a/sysdeps/sparc/bsd-setjmp.S b/sysdeps/sparc/bsd-setjmp.S
index b0a6326a2c..09aee661da 100644
--- a/sysdeps/sparc/bsd-setjmp.S
+++ b/sysdeps/sparc/bsd-setjmp.S
@@ -1,26 +1,42 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Sparc version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ 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