Skip to content

Commit

Permalink
[BZ #5607]
Browse files Browse the repository at this point in the history
2008-01-16  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5607]
	* conform/data/fcntl.h-data: Fix posix_fadvise and posix_fallocate
	prototypes.
	* conform/data/limits.h-data: Adjust limits changed in v6 and add
	additional suffixes.
	* conform/data/mqueue.h-data: Fix typo in mq_curmsgs entry.
	Add optional functions mq_timedreceive and mq_timedsend.
	* conform/data/netdb.h-data: Add more AI_* and EAI_* constants.
	* conform/data/pthread.h-data: Fix prototype of
	pthread_condattr_setclock.  pthread_sigmask is not required in v6.
	* conform/data/semaphore.h-data: Allow time.h definitions.
	* conform/data/signal.h-data: Likewise.
	* conform/data/stdio.h-data: getw and putw are not required in v6.
	* conform/data/stdlib.h-data: Change setstate prototype.
	* conform/data/string.h-data: Fix strerror_r prototype.
	* conform/data/time.h-data: Fix typo in TIMER_ABSTIME definition.
	* conform/data/unistd.h-data: pthread_atfork not required in v6.
	Fix readlink prototype.
	* conform/data/netinet/in.h-data: Add const to in6addr_any and
	in6addr_loopback.
	* inet/netinet/in.h: Cleanup namespace.
	* posix/regex.h: Likewise.
	* resolv/netdb.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/in.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
  • Loading branch information
Ulrich Drepper committed Jan 16, 2008
1 parent fbe90cd commit a53d3f8
Show file tree
Hide file tree
Showing 20 changed files with 256 additions and 100 deletions.
29 changes: 29 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
2008-01-16 Ulrich Drepper <drepper@redhat.com>

[BZ #5607]
* conform/data/fcntl.h-data: Fix posix_fadvise and posix_fallocate
prototypes.
* conform/data/limits.h-data: Adjust limits changed in v6 and add
additional suffixes.
* conform/data/mqueue.h-data: Fix typo in mq_curmsgs entry.
Add optional functions mq_timedreceive and mq_timedsend.
* conform/data/netdb.h-data: Add more AI_* and EAI_* constants.
* conform/data/pthread.h-data: Fix prototype of
pthread_condattr_setclock. pthread_sigmask is not required in v6.
* conform/data/semaphore.h-data: Allow time.h definitions.
* conform/data/signal.h-data: Likewise.
* conform/data/stdio.h-data: getw and putw are not required in v6.
* conform/data/stdlib.h-data: Change setstate prototype.
* conform/data/string.h-data: Fix strerror_r prototype.
* conform/data/time.h-data: Fix typo in TIMER_ABSTIME definition.
* conform/data/unistd.h-data: pthread_atfork not required in v6.
Fix readlink prototype.
* conform/data/netinet/in.h-data: Add const to in6addr_any and
in6addr_loopback.
* inet/netinet/in.h: Cleanup namespace.
* posix/regex.h: Likewise.
* resolv/netdb.h: Likewise.
* sysdeps/unix/sysv/linux/bits/in.h: Likewise.
* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.

2008-01-15 Ulrich Drepper <drepper@redhat.com>

* conform/data/fmtmsg.h-data: Add missing allows.
Expand Down
4 changes: 2 additions & 2 deletions conform/data/fcntl.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function int creat (const char*, mode_t)
function int fcntl (int, int, ...)
function int open (const char*, int, ...)
#ifdef XOPEN2K
function int posix_fadvise (int, off_t, size_t, int)
function int posix_fallocate (int, off_t, size_t)
function int posix_fadvise (int, off_t, off_t, int)
function int posix_fallocate (int, off_t, off_t)
#endif

allow-header sys/stat.h
Expand Down
15 changes: 15 additions & 0 deletions conform/data/limits.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ constant _POSIX_CLOCKRES_MIN <= 20000000
optional-constant _POSIX_AIO_LISTIO_MAX 2
optional-constant _POSIX_AIO_MAX 1
optional-constant _POSIX_ARG_MAX 4096
#ifdef XOPEN2K
optional-constant _POSIX_CHILD_MAX 25
#else
optional-constant _POSIX_CHILD_MAX 6
#endif
optional-constant _POSIX_DELAYTIMER_MAX 32
optional-constant _POSIX_LINK_MAX 8
optional-constant _POSIX_LOGIN_NAME_MAX 9
Expand All @@ -66,8 +70,16 @@ optional-constant _POSIX_MAX_INPUT 255
optional-constant _POSIX_MQ_OPEN_MAX 8
optional-constant _POSIX_MQ_PRIO_MAX 32
optional-constant _POSIX_NAME_MAX 14
#ifdef XOPEN2K
optional-constant _POSIX_NGROUPS_MAX 8
#else
optional-constant _POSIX_NGROUPS_MAX 0
#endif
#ifdef XOPEN2K
optional-constant _POSIX_OPEN_MAX 20
#else
optional-constant _POSIX_OPEN_MAX 16
#endif
optional-constant _POSIX_PATH_MAX 256
optional-constant _POSIX_PIPE_BUF 512
optional-constant _POSIX2_RE_DUP_MAX 255
Expand Down Expand Up @@ -126,3 +138,6 @@ optional-constant NL_SETMAX >= 255
optional-constant NL_TEXTMAX
optional-constant NZERO >= 20
optional-constant TMP_MAX >= 10000

allow *_MAX
allow *_MIN
6 changes: 5 additions & 1 deletion conform/data/mqueue.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type {struct mq_attr}
element {struct mq_attr} long mq_flags
element {struct mq_attr} long mq_maxmsg
element {struct mq_attr} long mq_msgsize
element {struct mq_attr} long mq_curmsg
element {struct mq_attr} long mq_curmsgs

function int mq_close (mqd_t)
function int mq_getattr (mqd_t, struct mq_attr*)
Expand All @@ -18,6 +18,10 @@ function ssize_t mq_receive (mqd_t, char*, size_t, unsigned int*)
function int mq_send (mqd_t, const char*, size_t, unsigned int)
function int mq_setattr (mqd_t, const struct mq_attr*, struct mq_attr*)
function int mq_unlink (const char*)
#ifdef XOPEN2K
optional-function ssize_t mq_timedreceive (mqd_t, char*, size_t, unsigned int*, const struct timespec*)
optional-function int mq_timedsend (mqd_t, const char*, size_t, unsigned int, const struct timespec*)
#endif

allow-header fcntl.h
allow-header signal.h
Expand Down
5 changes: 5 additions & 0 deletions conform/data/netdb.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ element {struct addrinfo} {struct addrinfo*} ai_next
macro AI_PASSIVE
macro AI_CANONNAME
macro AI_NUMERICHOST
macro AI_V4MAPPED
macro AI_ALL
macro AI_ADDRCONFIG
macro AI_NUMERICSERV

macro NI_NOFQDN
macro NI_NUMERICHOST
Expand All @@ -71,6 +75,7 @@ macro EAI_NONAME
macro EAI_SERVICE
macro EAI_SOCKTYPE
macro EAI_SYSTEM
macro EAI_OVERFLOW

function void endhostent (void)
function void endnetent (void)
Expand Down
4 changes: 2 additions & 2 deletions conform/data/netinet/in.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ element {struct sockaddr_in6} uint32_t sin6_flowinfo
element {struct sockaddr_in6} {struct in6_addr} sin6_addr
element {struct sockaddr_in6} uint32_t sin6_scope_id

variable {struct in6_addr} in6addr_any
variable {const struct in6_addr} in6addr_any

// constant IN6ADDR_ANY_INIT
macro IN6ADDR_ANY_INIT

variable {struct in6_addr} in6addr_loopback
variable {const struct in6_addr} in6addr_loopback

// constant IN6ADDR_LOOPBACK_INIT
macro IN6ADDR_LOOPBACK_INIT
Expand Down
4 changes: 3 additions & 1 deletion conform/data/pthread.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function int pthread_condattr_destroy (pthread_condattr_t*)
optional-function int pthread_condattr_getclock (const pthread_condattr_t*, clockid_t*)
function int pthread_condattr_getpshared (const pthread_condattr_t*, int*)
function int pthread_condattr_init (pthread_condattr_t*)
optional-function int pthread_condattr_setclock (const pthread_condattr_t*, clockid_t*)
optional-function int pthread_condattr_setclock (pthread_condattr_t*, clockid_t)
function int pthread_condattr_setpshared (pthread_condattr_t*, int)
function int pthread_create (pthread_t*, const pthread_attr_t*, void *(*) (void*), void*)
function int pthread_detach (pthread_t)
Expand Down Expand Up @@ -140,7 +140,9 @@ function int pthread_setconcurrency (int)
# endif
function int pthread_setschedparam (pthread_t, int, const struct sched_param*)
function int pthread_setspecific (pthread_key_t, const void*)
#ifndef XOPEN2K
function int pthread_sigmask (int, const sigset_t*, sigset_t*)
#endif
function int pthread_spin_destroy (pthread_spinlock_t*)
function int pthread_spin_init (pthread_spinlock_t*, int)
function int pthread_spin_lock (pthread_spinlock_t*)
Expand Down
1 change: 1 addition & 0 deletions conform/data/semaphore.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function int sem_wait (sem_t*)
allow-header fcntl.h
allow-header sys/types.h
# endif
allow-header time.h

allow sem_*
allow SEM_*
Expand Down
2 changes: 2 additions & 0 deletions conform/data/signal.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,5 @@ allow SS_*
allow SV_*
allow TRAP_*
allow *_t

allow-header time.h
4 changes: 4 additions & 0 deletions conform/data/stdio.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ function int getchar_unlocked ()
function int getopt (int, char *const[], const char *)
#endif
function {char*} gets (char*)
#ifndef XOPEN2K
function int getw (FILE*)
#endif
function int pclose (FILE*)
function void perror (const char*)
function {FILE*} popen (const char*, const char*)
Expand All @@ -77,7 +79,9 @@ function int putchar (int)
function int putc_unlocked (int, FILE*)
function int putchar_unlocked (int)
function int puts (const char*)
#ifndef XOPEN2K
function int putw (int, FILE*)
#endif
function int remove (const char*)
function int rename (const char*, const char*)
function void rewind (FILE*)
Expand Down
2 changes: 1 addition & 1 deletion conform/data/stdlib.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function {char*} realpath (const char*, char*)
function {unsigned short int*} seed48 (unsigned short int[3])
function int setenv (const char*, const char*, int)
function void setkey (const char*)
function {char*} setstate (const char*)
function {char*} setstate (char*)
function void srand (unsigned int)
function void srand48 (long int)
function void srandom (unsigned)
Expand Down
2 changes: 1 addition & 1 deletion conform/data/string.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function size_t strcspn (const char*, const char*)
function {char*} strdup (const char*)
function {char*} strerror (int)
#ifdef XOPEN2K
function {char*} strerror_r (int, char*, size_t)
function int strerror_r (int, char*, size_t)
#endif
function size_t strlen (const char*)
function {char*} strncat (char*, const char*, size_t)
Expand Down
2 changes: 1 addition & 1 deletion conform/data/time.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ element {struct itimerspec} {struct timespec} it_interval
element {struct itimerspec} {struct timespec} it_value

constant CLOCK_REALTIME
constant TIME_ABSTIME
constant TIMER_ABSTIME
constant CLOCK_MONOTONIC

type clock_t
Expand Down
4 changes: 3 additions & 1 deletion conform/data/unistd.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,12 @@ function {long int} pathconf (const char*, int)
function int pause (void)
function int pipe (int[2])
function ssize_t pread (int, void*, size_t, off_t)
#ifndef XOPEN2K
function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void))
#endif
function ssize_t pwrite (int, const void*, size_t, off_t)
function ssize_t read (int, void*, size_t)
function int readlink (const char*, char*, size_t)
function ssize_t readlink (const char*, char*, size_t)
function int rmdir (const char*)
function {void*} sbrk (intptr_t)
function int setegid (gid_t)
Expand Down
28 changes: 20 additions & 8 deletions inet/netinet/in.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,17 @@ struct in6_addr
{
union
{
uint8_t u6_addr8[16];
uint16_t u6_addr16[8];
uint32_t u6_addr32[4];
} in6_u;
#define s6_addr in6_u.u6_addr8
#define s6_addr16 in6_u.u6_addr16
#define s6_addr32 in6_u.u6_addr32
uint8_t __u6_addr8[16];
#if defined __USE_MISC || defined __USE_GNU
uint16_t __u6_addr16[8];
uint32_t __u6_addr32[4];
#endif
} __in6_u;
#define s6_addr __in6_u.__u6_addr8
#if defined __USE_MISC || defined __USE_GNU
# define s6_addr16 __in6_u.__u6_addr16
# define s6_addr32 __in6_u.__u6_addr32
#endif
};

extern const struct in6_addr in6addr_any; /* :: */
Expand Down Expand Up @@ -238,6 +242,7 @@ struct sockaddr_in6
};


#if defined __USE_MISC || defined __USE_GNU
/* IPv4 multicast request. */
struct ip_mreq
{
Expand All @@ -259,6 +264,8 @@ struct ip_mreq_source
/* IP address of interface. */
struct in_addr imr_sourceaddr;
};
#endif


/* Likewise, for IPv6. */
struct ipv6_mreq
Expand All @@ -271,6 +278,7 @@ struct ipv6_mreq
};


#if defined __USE_MISC || defined __USE_GNU
/* Multicast group request. */
struct group_req
{
Expand Down Expand Up @@ -337,6 +345,7 @@ struct group_filter
- sizeof (struct sockaddr_storage) \
+ ((numsrc) \
* sizeof (struct sockaddr_storage)))
#endif


/* Get system-specific definitions. */
Expand Down Expand Up @@ -422,12 +431,14 @@ extern uint16_t htons (uint16_t __hostshort)
&& (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \
&& (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3]))

#if defined __USE_MISC || defined __USE_GNU
/* Bind socket to a privileged IP port. */
extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __THROW;

/* The IPv6 version of this function. */
extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
__THROW;
#endif


#define IN6_IS_ADDR_MC_NODELOCAL(a) \
Expand All @@ -450,6 +461,8 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
(IN6_IS_ADDR_MULTICAST(a) \
&& ((((__const uint8_t *) (a))[1] & 0xf) == 0xe))


#ifdef __USE_GNU
/* IPv6 packet information. */
struct in6_pktinfo
{
Expand All @@ -465,7 +478,6 @@ struct ip6_mtuinfo
};


#ifdef __USE_GNU
/* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */
extern int inet6_option_space (int __nbytes)
__THROW __attribute_deprecated__;
Expand Down
Loading

0 comments on commit a53d3f8

Please sign in to comment.