From: Ulrich Drepper Date: Fri, 23 Nov 2007 15:19:41 +0000 (+0000) Subject: * sysdeps/unix/sysv/linux/Makefile [subdir=inet] (sysdep_headers): X-Git-Tag: upstream/2.30~14461 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea2c47b6befbe76dae29b55b27e86d54aa742d38;p=external%2Fglibc.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 953508a..7679c46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-11-23 Martin Schwidefsky + + * 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 [BZ #5382] diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 5683bab..5f32d1a 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 0000000..779ebff --- /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 +#include + +__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 2252980..95559eb 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 0000000..f099d65 --- /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 0000000..6575b83 --- /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 ae5616b..1a89b27 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 #include #include +#include #include 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: