* [PATCH] iucv protocol (s390).
@ 2007-11-23 10:00 Martin Schwidefsky
2007-11-23 15:20 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Martin Schwidefsky @ 2007-11-23 10:00 UTC (permalink / raw)
To: Glibc hackers
Hi,
this patch adds the iucv header containing the sockaddr_iucv definition
and adds the protocol to __opensock and __libc_sa_len. I'm not 100% sure
about the whole thing, since it adds the protocol to every architecture.
I doubt that we'll ever see AF_IUCV on anything else than a s390
machine. Please advise.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
---
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.
diff -urpN libc/sysdeps/unix/sysv/linux/Makefile libc-s390/sysdeps/unix/sysv/linux/Makefile
--- libc/sysdeps/unix/sysv/linux/Makefile 2007-11-21 14:50:48.000000000 +0100
+++ libc-s390/sysdeps/unix/sysv/linux/Makefile 2007-11-23 10:17:42.000000000 +0100
@@ -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 -urpN libc/sysdeps/unix/sysv/linux/netiucv/iucv.h libc-s390/sysdeps/unix/sysv/linux/netiucv/iucv.h
--- libc/sysdeps/unix/sysv/linux/netiucv/iucv.h 1970-01-01 01:00:00.000000000 +0100
+++ libc-s390/sysdeps/unix/sysv/linux/netiucv/iucv.h 2007-11-23 10:33:08.000000000 +0100
@@ -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 -urpN libc/sysdeps/unix/sysv/linux/opensock.c libc-s390/sysdeps/unix/sysv/linux/opensock.c
--- libc/sysdeps/unix/sysv/linux/opensock.c 2007-11-09 16:39:51.000000000 +0100
+++ libc-s390/sysdeps/unix/sysv/linux/opensock.c 2007-11-23 10:28:31.000000000 +0100
@@ -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,8 @@ __opensock (void)
{ AF_APPLETALK, "net/appletalk" },
{ AF_ECONET, "sys/net/econet" },
{ AF_ASH, "sys/net/ash" },
- { AF_X25, "net/x25" }
+ { AF_X25, "net/x25" },
+ { AF_IUCV, "net/iucv" }
};
#define nafs (sizeof (afs) / sizeof (afs[0]))
char fname[sizeof "/proc/" + 14];
diff -urpN libc/sysdeps/unix/sysv/linux/sa_len.c libc-s390/sysdeps/unix/sysv/linux/sa_len.c
--- libc/sysdeps/unix/sysv/linux/sa_len.c 2007-11-09 16:39:38.000000000 +0100
+++ libc-s390/sysdeps/unix/sysv/linux/sa_len.c 2007-11-23 10:29:06.000000000 +0100
@@ -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,8 @@ __libc_sa_len (sa_family_t af)
return sizeof (struct sockaddr_in6);
case AF_IPX:
return sizeof (struct sockaddr_ipx);
+ case AF_IUCV:
+ return sizeof (struct sockaddr_iucv);
case AF_LOCAL:
return sizeof (struct sockaddr_un);
case AF_PACKET:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] iucv protocol (s390).
2007-11-23 10:00 [PATCH] iucv protocol (s390) Martin Schwidefsky
@ 2007-11-23 15:20 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2007-11-23 15:20 UTC (permalink / raw)
To: schwidefsky; +Cc: Glibc hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I checked in a version of the patch which doesn't have the problem of
adding ballast to the other archs.
- --
â§ Ulrich Drepper â§ Red Hat, Inc. â§ 444 Castro St â§ Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFHRu+22ijCOnn/RHQRAtVTAJ9PpgKHrsa+2jcgSbkNt0M6wjDfPgCZAfTE
K7iSwqPerk3o3rNBhhIt1iU=
=xy7+
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-23 15:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-23 10:00 [PATCH] iucv protocol (s390) Martin Schwidefsky
2007-11-23 15:20 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).