This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
socket.h borked
- From: ams at kemisten dot nu (Alfred M. Szmidt)
- To: libc-alpha at sources dot redhat dot com
- Date: Sat, 11 Sep 2004 16:14:27 +0200 (CEST)
- Subject: socket.h borked
Seems that sysdeps/unix/bsd/bsd4.4/bits/socket.h got broken by the
various changes to sys/misc/cdefs.h, fix applied. __THROW is expanded
to __attribute__ ((__nothrow__)), so you get a declaration that looks
like this:
_EXTERN_INLINE struct cmsghdr *
__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __attribute__ ((__nothrow__))
{
...
}
Which isn't legal C according to the gcc laws of this week...
i386-unknown-gnu0.3-gcc getgrent.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -Wno-parentheses -mpreferred-stack-boundary=2 -I../include -I. -I/home/update/ams/src/libc.obj/grp -I.. -I../libio -I../hurd -I/home/update/ams/src/libc.obj/hurd/ -I../mach -I/home/update/ams/src/libc.obj/mach/ -I/home/update/ams/src/libc.obj -I../sysdeps/i386/elf -I../sysdeps/mach/hurd/i386 -I../sysdeps/mach/hurd -I../sysdeps/gnu -I../sysdeps/unix/bsd/bsd4.4 -I../sysdeps/unix/mman -I../sysdeps/mach/i386 -I../sysdeps/mach -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/unix/bsd -I../sysdeps/unix/common -I../sysdeps/unix/inet -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /home/update/ams/src/libc.obj/grp/getgrent.o -MD -MP -MF /home/upd
ate/ams/src/libc.obj/grp/getgrent.o.dt -MT /home/update/ams/src/libc.obj/grp/getgrent.o
In file included from ../socket/sys/socket.h:35,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:24,
from ../include/netinet/in.h:3,
from ../nss/nsswitch.h:25,
from ../nss/getXXent.c:23,
from getgrent.c:30:
../sysdeps/unix/bsd/bsd4.4/bits/socket.h:234: error: parse error before '{' token
../sysdeps/unix/bsd/bsd4.4/bits/socket.h:239: warning: type defaults to `int' in declaration of `__cmsg'
../sysdeps/unix/bsd/bsd4.4/bits/socket.h:240: error: invalid type argument of `->'
../sysdeps/unix/bsd/bsd4.4/bits/socket.h:240: warning: data definition has no type or storage class
../sysdeps/unix/bsd/bsd4.4/bits/socket.h:241: error: parse error before "if"
2004-09-11 Alfred M. Szmidt <ams@kemisten.nu>
* sysdeps/unix/bsd/bsd4.4/bits/socket.h (__cmsg_nxthdr): Remove
__THROW from function declaration.
--- sysdeps/unix/bsd/bsd4.4/bits/socket.h.~1.5.~ 2002-08-27 00:39:52.000000000 +0200
+++ sysdeps/unix/bsd/bsd4.4/bits/socket.h 2004-09-11 16:07:03.000000000 +0200
@@ -230,7 +230,7 @@ extern struct cmsghdr *__cmsg_nxthdr (st
# define _EXTERN_INLINE extern __inline
# endif
_EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
{
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */