diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-09-26 05:23:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-09-26 05:23:10 +0000 |
commit | 916ea7e833299175911244898bf6665aaea7c166 (patch) | |
tree | 41c6bb8762469306a6dab1536514a21b3ff2d9c1 /sysdeps/unix/sysv | |
parent | 8755441d32dec7eb305bdfe8eb50a8712c265f2c (diff) | |
download | glibc-916ea7e833299175911244898bf6665aaea7c166.tar glibc-916ea7e833299175911244898bf6665aaea7c166.tar.gz glibc-916ea7e833299175911244898bf6665aaea7c166.tar.bz2 glibc-916ea7e833299175911244898bf6665aaea7c166.zip |
(struct cmsghdr): Don't declare __cmsg_data field if its size would be bigger
than 0.
(CMSG_DATA): Adjust accordingly.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r-- | sysdeps/unix/sysv/aix/bits/socket.h | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/socket.h | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/bits/socket.h | 5 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h index 45877fade4..1fdadfe082 100644 --- a/sysdeps/unix/sysv/aix/bits/socket.h +++ b/sysdeps/unix/sysv/aix/bits/socket.h @@ -203,14 +203,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 - unsigned char __cmsg_data[0]; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L + __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ #endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h index 2d57128231..82c4302ed5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h index 482eefe257..a10c3a711a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) |