about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-11-23 15:19:41 +0000
committerUlrich Drepper <drepper@redhat.com>2007-11-23 15:19:41 +0000
commitea2c47b6befbe76dae29b55b27e86d54aa742d38 (patch)
tree9334050927c9d3f7e69c7b41f63183943a5c8ae5
parent70d5b6ef41c5997ee7c039103626f1bd495d831b (diff)
downloadglibc-ea2c47b6befbe76dae29b55b27e86d54aa742d38.tar.gz
glibc-ea2c47b6befbe76dae29b55b27e86d54aa742d38.tar.xz
glibc-ea2c47b6befbe76dae29b55b27e86d54aa742d38.zip
* sysdeps/unix/sysv/linux/Makefile [subdir=inet] (sysdep_headers):
	Add netiucv/iucv.h.
	* sysdeps/unix/sysv/linux/netiucv/iucv.h: New file.
	* sysdeps/unix/sysv/linux/opensock.c (__opensock): Add AF_IUCV
	protocol.
	* sysdeps/unix/sysv/linux/sa_len.c (__libc_sa_len): Likewise.
	* sysdeps/unix/sysv/linux/s390/opensock.c: New file.
	* sysdeps/unix/sysv/linux/s390/sa_len.c: New file.
-rw-r--r--ChangeLog11
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/netiucv/iucv.h39
-rw-r--r--sysdeps/unix/sysv/linux/opensock.c7
-rw-r--r--sysdeps/unix/sysv/linux/s390/opensock.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/sa_len.c2
-rw-r--r--sysdeps/unix/sysv/linux/sa_len.c7
7 files changed, 66 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 953508a3fe..7679c4691d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-11-23  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+
+	* sysdeps/unix/sysv/linux/Makefile [subdir=inet] (sysdep_headers):
+	Add netiucv/iucv.h.
+	* sysdeps/unix/sysv/linux/netiucv/iucv.h: New file.
+	* sysdeps/unix/sysv/linux/opensock.c (__opensock): Add AF_IUCV
+	protocol.
+	* sysdeps/unix/sysv/linux/sa_len.c (__libc_sa_len): Likewise.
+	* sysdeps/unix/sysv/linux/s390/opensock.c: New file.
+	* sysdeps/unix/sysv/linux/s390/sa_len.c: New file.
+
 2007-11-22  Ulrich Drepper  <drepper@redhat.com>
 
 	[BZ #5382]
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 5683babde8..5f32d1a4a9 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -122,7 +122,7 @@ ifeq ($(subdir),inet)
 sysdep_headers += netinet/if_fddi.h netinet/if_tr.h \
 		  netipx/ipx.h netash/ash.h netax25/ax25.h netatalk/at.h \
 		  netrom/netrom.h netpacket/packet.h netrose/rose.h \
-		  neteconet/ec.h
+		  neteconet/ec.h netiucv/iucv.h
 endif
 
 # Don't compile the ctype glue code, since there is no old non-GNU C library.
diff --git a/sysdeps/unix/sysv/linux/netiucv/iucv.h b/sysdeps/unix/sysv/linux/netiucv/iucv.h
new file mode 100644
index 0000000000..779ebffb10
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/netiucv/iucv.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 2007 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef __NETIUCV_IUCV_H
+#define __NETIUCV_IUCV_H	1
+
+#include <features.h>
+#include <bits/sockaddr.h>
+
+__BEGIN_DECLS
+
+struct sockaddr_iucv
+  {
+    __SOCKADDR_COMMON (siucv_);
+    unsigned short	siucv_port;		/* Reserved */
+    unsigned int	siucv_addr;		/* Reserved */
+    char		siucv_nodeid[8];	/* Reserved */
+    char		siucv_user_id[8];	/* Guest User Id */
+    char		siucv_name[8];		/* Application Name */
+  };
+
+__END_DECLS
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/opensock.c b/sysdeps/unix/sysv/linux/opensock.c
index 2252980789..95559eb799 100644
--- a/sysdeps/unix/sysv/linux/opensock.c
+++ b/sysdeps/unix/sysv/linux/opensock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001, 2002, 2007 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
@@ -53,7 +53,10 @@ __opensock (void)
       { AF_APPLETALK, "net/appletalk" },
       { AF_ECONET, "sys/net/econet" },
       { AF_ASH, "sys/net/ash" },
-      { AF_X25, "net/x25" }
+      { AF_X25, "net/x25" },
+#ifdef NEED_AF_IUCV
+      { AF_IUCV, "net/iucv" }
+#endif
     };
 #define nafs (sizeof (afs) / sizeof (afs[0]))
   char fname[sizeof "/proc/" + 14];
diff --git a/sysdeps/unix/sysv/linux/s390/opensock.c b/sysdeps/unix/sysv/linux/s390/opensock.c
new file mode 100644
index 0000000000..f099d651ff
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/opensock.c
@@ -0,0 +1,2 @@
+#define NEED_AF_IUCV 1
+#include "../opensock.c"
diff --git a/sysdeps/unix/sysv/linux/s390/sa_len.c b/sysdeps/unix/sysv/linux/s390/sa_len.c
new file mode 100644
index 0000000000..6575b83e9c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/sa_len.c
@@ -0,0 +1,2 @@
+#define NEED_AF_IUCV 1
+#include "../sa_len.c"
diff --git a/sysdeps/unix/sysv/linux/sa_len.c b/sysdeps/unix/sysv/linux/sa_len.c
index ae5616bf45..1a89b276d4 100644
--- a/sysdeps/unix/sysv/linux/sa_len.c
+++ b/sysdeps/unix/sysv/linux/sa_len.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2002, 2007 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
@@ -26,6 +26,7 @@
 #include <netipx/ipx.h>
 #include <netpacket/packet.h>
 #include <netrose/rose.h>
+#include <netiucv/iucv.h>
 #include <sys/un.h>
 
 int
@@ -47,6 +48,10 @@ __libc_sa_len (sa_family_t af)
       return sizeof (struct sockaddr_in6);
     case AF_IPX:
       return sizeof (struct sockaddr_ipx);
+#ifdef NEED_AF_IUCV
+    case AF_IUCV:
+      return sizeof (struct sockaddr_iucv);
+#endif
     case AF_LOCAL:
       return sizeof (struct sockaddr_un);
     case AF_PACKET: