about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-03-18 14:42:25 +0000
committerUlrich Drepper <drepper@redhat.com>1998-03-18 14:42:25 +0000
commit3116126871400c8737a9df0145f66534f097c06c (patch)
tree9a41a87b932c3963a7d482ceabc8de92c69bef5b /sysdeps/unix/sysv
parent52cda95831cdc685d74b99334a06fb1f69996dc4 (diff)
downloadglibc-3116126871400c8737a9df0145f66534f097c06c.tar.gz
glibc-3116126871400c8737a9df0145f66534f097c06c.tar.xz
glibc-3116126871400c8737a9df0145f66534f097c06c.zip
Update.
1998-03-18 14:25  Ulrich Drepper  <drepper@cygnus.com>

	* string/bits/string2.h: Add optimization for strdup.
	Always define __strsep and __strtok_r and make real names available
	when feature select macros are defined.

1998-03-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* manual/install.texi (Installation): Use i486-linux as example
	instead of the unsupported sunos4.
	(Reporting Bugs): Mention glibcbug script.
	(Tools for Installation): gcc 2.8.1/egcs 1.0.2 is required.

1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* posix/wordexp-tst.sh: Make portable.  Add more tests.

	* posix/Makefile (do-globtest do-wordexp-test): New targets.

1998-03-18 13:38  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/libc-start.c: Moved to ...
	* sysdeps/generic/libc-start.c: ...here, replacing former content.

	* sysdeps/unix/sysv/linux/Dist: Add netash/ash.h and
	netpacket/packet.h.

	* sysdeps/unix/sysv/linux/bits/socket.h: Pretty print.

1998-03-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/bits/resource.h: Remove trailing comma
	in enumerator for strict standard compliance.
	* sysdeps/generic/bits/resource.h: Likewise.

1998-03-18 10:04  Philip Blundell  <pb@nexus.co.uk>

	* sysdeps/arm/sysdep.h (__ARM_USES_FP): Deleted.
	(PLTJMP): New macro.

	* sysdeps/arm/fpu/__longjmp.S: New file, implementation of
	longjmp() when floating point enabled.
	* sysdeps/arm/fpu/setjmp.S: Likewise for setjmp().
	* sysdeps/arm/__longjmp.S: Remove floating point code.
	* sysdeps/arm/setjmp.S: Likewise.

	* sysdeps/arm/bsd-setjmp.S: Call __sigsetjmp by correct name.
	* sysdeps/arm/bsd-_setjmp.S: Likewise.

	* sysdeps/arm/memset.S: New file; optimised ARM implementation of
	memset().

	* sysdeps/generic/setsockopt.c (setsockopt): Keep in step with
	prototype.

1998-03-17 16:16  Philip Blundell  <pb@nexus.co.uk>

	Based on patches from Pat Beirne and Scott Bambrough:

	* sysdeps/arm/__longjmp.S: Use ip, not r2, as temporary.

	* sysdeps/arm/bits/fenv.h: New file.

	* sysdeps/arm/dl-machine.h: New file.  Add ELF support.
	* sysdeps/arm/elf/setjmp.S: Likewise.
	* sysdeps/arm/elf/start.S: Likewise.
	* sysdeps/arm/init-first.c: Likewise.
	* sysdeps/arm/setjmp.S: Call __sigjmp_save through PLT
	* sysdeps/arm/sysdep.h: Change format of .type directive.  Correct
	comment about floating point to reflect current reality.

	* sysdeps/unix/arm/brk.S: Support PIC.
	* sysdeps/unix/arm/sysdep.S (syscall_error): Support PIC and
	re-entrant code.
	* sysdeps/unix/sysv/linux/arm/socket.S: Check correctly for error
	return; call syscall_error through PLT.
	* sysdeps/unix/sysv/linux/arm/sysdep.h (ENTRY): Correct error jump.

1998-03-04 12:01  Philip Blundell  <pb@nexus.co.uk>

	* sysdeps/unix/sysv/linux/netpacket/packet.h: New file.
	* sysdeps/unix/sysv/linux/netash/ash.h: Likewise.
	* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Install them.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/Dist2
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/arm/socket.S6
-rw-r--r--sysdeps/unix/sysv/linux/arm/sysdep.h6
-rw-r--r--sysdeps/unix/sysv/linux/bits/resource.h4
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h18
-rw-r--r--sysdeps/unix/sysv/linux/libc-start.c73
-rw-r--r--sysdeps/unix/sysv/linux/netash/ash.h34
-rw-r--r--sysdeps/unix/sysv/linux/netpacket/packet.h61
9 files changed, 115 insertions, 91 deletions
diff --git a/sysdeps/unix/sysv/linux/Dist b/sysdeps/unix/sysv/linux/Dist
index 4471224bcc..709f9abae5 100644
--- a/sysdeps/unix/sysv/linux/Dist
+++ b/sysdeps/unix/sysv/linux/Dist
@@ -22,6 +22,7 @@ net/if_slip.h
 net/ppp-comp.h
 net/ppp_defs.h
 net/route.h
+netash/ash.h
 netatalk/at.h
 netax25/ax25.h
 netinet/if_fddi.h
@@ -30,6 +31,7 @@ netinet/igmp.h
 netinet/in_systm.h
 netinet/ip_fw.h
 netinet/ip_icmp.h
+netpacket/packet.h
 netinet/tcp.h
 netinet/udp.h
 netipx/ipx.h
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 7b53e3a399..7a73ded547 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -74,7 +74,7 @@ sysdep_headers += netinet/in_systm.h netinet/udp.h \
 		  netinet/if_fddi.h netinet/if_tr.h netinet/igmp.h \
 		  netinet/ip_fw.h  netinet/ip_icmp.h netipx/ipx.h \
 		  sys/socketvar.h netax25/ax25.h netrom/netrom.h \
-		  netrose/rose.h
+		  netrose/rose.h netpacket/packet.h netash/ash.h
 endif
 
 ifeq ($(subdir),posix)
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 1940061dda..0ff6dd0164 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 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
@@ -41,9 +41,9 @@ ENTRY (__socket)
         /* Do the system call trap.  */
 	swi SYS_ify(socketcall)
 
-	/* %eax is < 0 if there was an error.  */
+	/* r0 is < 0 if there was an error.  */
 	cmn r0, $124
-	bge syscall_error
+	bge syscall_error(PLT)
 
 	/* Successful; return the syscall's value.  */
 	RETINSTR(mov,pc,r14)
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index af08277a63..3b7ffe08d9 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -41,7 +41,7 @@
    Since version 2.1 the return value of a system call might be
    negative even if the call succeeded.  E.g., the `lseek' system call
    might return a large offset.  Therefore we must not anymore test
-   for < 0, but test for a real error by making sure the value in %eax
+   for < 0, but test for a real error by making sure the value in R0
    is a real error number.  Linus said he will make sure the no syscall
    returns a value in -1 .. -4095 as a valid result so we can savely
    test with -4095.  */
@@ -51,7 +51,7 @@
   ENTRY (name)								      \
     DO_CALL (args, syscall_name);					      \
     cmn r0, $4096;							      \
-    bge syscall_error;
+    bgt syscall_error;
 
 #undef	PSEUDO_END
 #define	PSEUDO_END(name)						      \
diff --git a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h
index c649217e7e..faa493e7e3 100644
--- a/sysdeps/unix/sysv/linux/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/bits/resource.h
@@ -1,5 +1,5 @@
 /* Bit values & structures for resource limits.  Linux version.
-   Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1996, 1997, 1998 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
@@ -99,7 +99,7 @@ enum __rlimit_resource
 
   RLIMIT_NLIMITS = RLIM_NLIMITS,
 #undef RLIM_NLIMITS
-  RLIM_NLIMITS = RLIMIT_NLIMITS,
+  RLIM_NLIMITS = RLIMIT_NLIMITS
 #define RLIMIT_NLIMITS RLIMIT_NLIMITS
 #define RLIM_NLIMITS RLIM_NLIMITS
 };
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 2b3b098926..91eec61d28 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -66,16 +66,16 @@ enum __socket_type
 #define	PF_AAL5		8	/* Reserved for Werner's ATM.  */
 #define	PF_X25		9	/* Reserved for X.25 project.  */
 #define	PF_INET6	10	/* IP version 6.  */
-#define	PF_ROSE		11	/* Amateur Radio X.25 PLP       */
-#define	PF_DECnet	12	/* Reserved for DECnet project  */
-#define	PF_NETBEUI	13	/* Reserved for 802.2LLC project*/
-#define	PF_SECURITY	14	/* Security callback pseudo AF */
-#define	PF_KEY		15	/* PF_KEY key management API */
+#define	PF_ROSE		11	/* Amateur Radio X.25 PLP.  */
+#define	PF_DECnet	12	/* Reserved for DECnet project.  */
+#define	PF_NETBEUI	13	/* Reserved for 802.2LLC project.  */
+#define	PF_SECURITY	14	/* Security callback pseudo AF.  */
+#define	PF_KEY		15	/* PF_KEY key management API.  */
 #define	PF_NETLINK	16
-#define	PF_ROUTE	PF_NETLINK /* Alias to emulate 4.4BSD */
-#define	PF_PACKET	17	/* Packet family                */
-#define	PF_ASH		18	/* Ash */
-#define	PF_MAX		32	/* For now.. */
+#define	PF_ROUTE	PF_NETLINK /* Alias to emulate 4.4BSD.  */
+#define	PF_PACKET	17	/* Packet family.  */
+#define	PF_ASH		18	/* Ash.  */
+#define	PF_MAX		32	/* For now..  */
 
 /* Address families.  */
 #define	AF_UNSPEC	PF_UNSPEC
diff --git a/sysdeps/unix/sysv/linux/libc-start.c b/sysdeps/unix/sysv/linux/libc-start.c
deleted file mode 100644
index d32e54f162..0000000000
--- a/sysdeps/unix/sysv/linux/libc-start.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright (C) 1998 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.  */
-
-#include <link.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-extern void __libc_init_first (int argc, char **argv, char **envp);
-
-extern int _dl_starting_up;
-weak_extern (_dl_starting_up)
-extern int __libc_multiple_libcs;
-
-int
-__libc_start_main (int (*main) (int, char **, char **), int argc,
-		   char **argv, void (*init) (void), void (*fini) (void),
-		   void (*rtld_fini) (void))
-{
-#ifndef PIC
-  /* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
-     If the address would be taken inside the expression the optimizer
-     would try to be too smart and throws it away.  Grrr.  */
-  int *dummy_addr = &_dl_starting_up;
-
-  __libc_multiple_libcs = dummy_addr && !_dl_starting_up;
-#endif
-
-  /* Register the destructor of the dynamic linker if there is any.  */
-  if (rtld_fini != NULL)
-    atexit (rtld_fini);
-
-  /* Set the global _environ variable correctly.  */
-  __environ = &argv[argc + 1];
-
-  /* Call the initializer of the libc.  */
-#ifdef PIC
-  if (_dl_debug_impcalls)
-    _dl_debug_message (1, "\ninitialize libc\n\n", NULL);
-#endif
-  __libc_init_first (argc, argv, __environ);
-
-  /* Call the initializer of the program.  */
-#ifdef PIC
-  if (_dl_debug_impcalls)
-    _dl_debug_message (1, "\ninitialize program: ", argv[0], "\n\n", NULL);
-#endif
-  (*init) ();
-
-  /* Register the destructor of the program.  */
-  atexit (fini);
-
-#ifdef PIC
-  if (_dl_debug_impcalls)
-    _dl_debug_message (1, "\ntransferring control: ", argv[0], "\n\n", NULL);
-#endif
-
-  exit ((*main) (argc, argv, __environ));
-}
diff --git a/sysdeps/unix/sysv/linux/netash/ash.h b/sysdeps/unix/sysv/linux/netash/ash.h
new file mode 100644
index 0000000000..e4feec44ab
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/netash/ash.h
@@ -0,0 +1,34 @@
+/* Definitions for use with Linux AF_ASH sockets.
+   Copyright (C) 1998 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 __NETASH_ASH_H
+#define __NETASH_ASH_H	1
+
+#include <features.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+
+struct sockaddr_ash
+  {
+    _SOCKADDR_COMMON (sash_);		/* Common data: address family etc.  */
+    int if_index;			/* Interface to use.  */
+    int channel;			/* Realtime or control.  */
+  };
+
+#endif	/* netash/ash.h */
diff --git a/sysdeps/unix/sysv/linux/netpacket/packet.h b/sysdeps/unix/sysv/linux/netpacket/packet.h
new file mode 100644
index 0000000000..a382654326
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/netpacket/packet.h
@@ -0,0 +1,61 @@
+/* Definitions for use with Linux AF_PACKET sockets.
+   Copyright (C) 1998 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 __NETPACKET_PACKET_H
+#define __NETPACKET_PACKET_H	1
+
+struct sockaddr_ll
+  {
+    unsigned short int sll_family;
+    unsigned short int sll_protocol;
+    int sll_ifindex;
+    unsigned short int sll_hatype;
+    unsigned char sll_pkttype;
+    unsigned char sll_halen;
+    unsigned char sll_addr[8];
+  };
+
+/* Packet types.  */
+
+#define PACKET_HOST		0		/* To us.  */
+#define PACKET_BROADCAST	1		/* To all.  */
+#define PACKET_MULTICAST	2		/* To group.  */
+#define PACKET_OTHERHOST	3		/* To someone else.  */
+#define PACKET_OUTGOING		4		/* Originated by us . */
+#define PACKET_LOOPBACK		5
+#define PACKET_FASTROUTE	6
+
+/* Packet socket options.  */
+
+#define PACKET_ADD_MEMBERSHIP		1
+#define PACKET_DROP_MEMBERSHIP		2
+
+struct packet_mreq
+  {
+    int mr_ifindex;
+    unsigned short int mr_type;
+    unsigned short int mr_alen;
+    unsigned char mr_address[8];
+  };
+
+#define PACKET_MR_MULTICAST	0
+#define PACKET_MR_PROMISC	1
+#define PACKET_MR_ALLMULTI	2
+
+#endif	/* netpacket/packet.h */