Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* conform/data/sys/socket.h-data: Fix typos.  Correct getsockopt,
	recvfrom, send, and socketpair prototypes.  Add allow lines.
	* socket/sys/socket.h: Include <sys/uio.h>.
	Don't use fancy __SOCKADDR_ARG definition unless __USE_GNU.
	Fix type of second parameter of listen.
	Don't declare isfdtype unless __USE_MISC.
	* sysdeps/generic/listen.c: Fix type of second parameter of listen.
	* sysdeps/mach/hurd/listen.c: Likewise.
	* sysdeps/generic/bits/socket.h (struct sockaddr_storage): Define
	ss_family and __ss_family.
	* sysdeps/unix/sysv/aix/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	(struct msghdr): Change type of msg_iovlen to int and type of
	msg_controllen to socklen_t.
	* sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file.
	* sysdeps/unix/sysv/linux/ia64/bits/socket.h: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/bits/socket.h: New file.
  • Loading branch information
Ulrich Drepper committed Jan 27, 2001
1 parent 257abbe commit 6f0ea37
Show file tree
Hide file tree
Showing 13 changed files with 984 additions and 28 deletions.
18 changes: 18 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
2001-01-27 Ulrich Drepper <[email protected]>

* conform/data/sys/socket.h-data: Fix typos. Correct getsockopt,
recvfrom, send, and socketpair prototypes. Add allow lines.
* socket/sys/socket.h: Include <sys/uio.h>.
Don't use fancy __SOCKADDR_ARG definition unless __USE_GNU.
Fix type of second parameter of listen.
Don't declare isfdtype unless __USE_MISC.
* sysdeps/generic/listen.c: Fix type of second parameter of listen.
* sysdeps/mach/hurd/listen.c: Likewise.
* sysdeps/generic/bits/socket.h (struct sockaddr_storage): Define
ss_family and __ss_family.
* sysdeps/unix/sysv/aix/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
(struct msghdr): Change type of msg_iovlen to int and type of
msg_controllen to socklen_t.
* sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file.
* sysdeps/unix/sysv/linux/ia64/bits/socket.h: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/bits/socket.h: New file.

* conform/data/sys/shm.h-data: SHMLBA is not required to by a constant.
* conform/conformtest.pl: Implement handling of symbol.

Expand Down
4 changes: 2 additions & 2 deletions bits/socket.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Generic/4.3 BSD version.
Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
Copyright (C) 1991,92,1994-1999,2000,2001 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
Expand Down Expand Up @@ -145,7 +145,7 @@ struct sockaddr

struct sockaddr_storage
{
__SOCKADDR_COMMON (__ss_); /* Address family, etc. */
__SOCKADDR_COMMON (ss_); /* Address family, etc. */
__ss_aligntype __ss_align; /* Force desired alignment. */
char __ss_padding[_SS_PADSIZE];
};
Expand Down
25 changes: 18 additions & 7 deletions conform/data/sys/socket.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type sa_family_t
type {struct sockaddr}

element {struct sockaddr} sa_family_t sa_family
element {struct sockaddr} char sa_data [0]
element {struct sockaddr} char sa_data []

type {struct sockaddr_storage}

Expand Down Expand Up @@ -64,7 +64,7 @@ macro SO_RCVTIMEO
macro SO_REUSEADDR
macro SO_SNDBUF
macro SO_SNDLOWAT
macro SO_SNFTIMEO
macro SO_SNDTIMEO
macro SO_TYPE

macro SOMAXCONN
Expand All @@ -80,7 +80,7 @@ macro MSG_WAITALL
macro AF_UNIX
macro AF_UNSPEC
macro AF_INET
macro_AF_INET6
macro AF_INET6

macro SHUT_RD
macro SHUT_WR
Expand All @@ -91,18 +91,29 @@ function int bind (int, const struct sockaddr*, socklen_t)
function int connect (int, const struct sockaddr*, socklen_t)
function int getpeername (int, struct sockaddr*, socklen_t*)
function int getsockname (int, struct sockaddr*, socklen_t*)
function int getsockopt (int, int, int, void*, socklen_t)
function int getsockopt (int, int, int, void*, socklen_t*)
function int listen (int, int)
function ssize_t recv (int, void*, size_t, int)
function ssize_t recvfrom (int, void*, size_t, int)
function ssize_t recvfrom (int, void*, size_t, int, struct sockaddr*, socklen_t*)
function ssize_t recvmsg (int, struct msghdr*, int)
function ssize_t send (int, const struct msghdr*, int)
function ssize_t send (int, const void*, size_t, int)
function ssize_t sendmsg (int, const struct msghdr*, int)
function ssize_t sendto (int, const void*, size_t, int, const struct sockaddr*, socklen_t)
function int setsockopt (int, int, int, const void*, socklen_t)
function int shutdown (int, int)
function int socket (int, int, int)
function int socketpair (int, int, int, int)
function int socketpair (int, int, int, int[2])

allow-header sys/uio.h

allow ss_*
allow sa_*
allow if_*
allow ifc_*
allow ifru_*
allow infu_*
allow ifra_*
allow msg_*
allow cmsg_*
allow l_*
#endif
9 changes: 6 additions & 3 deletions socket/sys/socket.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Declarations of socket constants, types, and functions.
Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
Copyright (C) 1991,92,1994-1999,2000,2001 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
Expand All @@ -24,6 +24,7 @@

__BEGIN_DECLS

#include <sys/uio.h>
#define __need_size_t
#include <stddef.h>

Expand Down Expand Up @@ -61,7 +62,7 @@ enum
uses with any of the listed types to be allowed without complaint.
G++ 2.7 does not support transparent unions so there we want the
old-style declaration, too. */
#if defined __cplusplus || !__GNUC_PREREQ (2, 7)
#if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU
# define __SOCKADDR_ARG struct sockaddr *__restrict
# define __CONST_SOCKADDR_ARG __const struct sockaddr *
#else
Expand Down Expand Up @@ -178,7 +179,7 @@ extern int setsockopt (int __fd, int __level, int __optname,
/* Prepare to accept connections on socket FD.
N connection requests will be queued before further requests are refused.
Returns 0 on success, -1 for errors. */
extern int listen (int __fd, unsigned int __n) __THROW;
extern int listen (int __fd, int __n) __THROW;

/* Await a connection on socket FD.
When a connection arrives, open a new socket to communicate with it,
Expand All @@ -198,10 +199,12 @@ extern int accept (int __fd, __SOCKADDR_ARG __addr,
extern int shutdown (int __fd, int __how) __THROW;


#ifdef __USE_MISC
/* FDTYPE is S_IFSOCK or another S_IF* macro defined in <sys/stat.h>;
returns 1 if FD is open on an object of the indicated type, 0 if not,
or -1 for errors (setting errno). */
extern int isfdtype (int __fd, int __fdtype) __THROW;
#endif

__END_DECLS

Expand Down
4 changes: 2 additions & 2 deletions sysdeps/generic/bits/socket.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Generic/4.3 BSD version.
Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
Copyright (C) 1991,92,1994-1999,2000,2001 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
Expand Down Expand Up @@ -145,7 +145,7 @@ struct sockaddr

struct sockaddr_storage
{
__SOCKADDR_COMMON (__ss_); /* Address family, etc. */
__SOCKADDR_COMMON (ss_); /* Address family, etc. */
__ss_aligntype __ss_align; /* Force desired alignment. */
char __ss_padding[_SS_PADSIZE];
};
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/generic/listen.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1995, 1996, 1997, 2001 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
Expand All @@ -25,7 +25,7 @@
int
listen (fd, n)
int fd;
unsigned int n;
int n;
{
__set_errno (ENOSYS);
return -1;
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/mach/hurd/listen.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1992, 1994, 1997, 2001 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
Expand Down Expand Up @@ -30,7 +30,7 @@
int
listen (fd, n)
int fd;
unsigned int n;
int n;
{
error_t err = HURD_DPORT_USE (fd, __socket_listen (port, n));
if (err)
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/unix/sysv/aix/bits/socket.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. AIX version.
Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
Copyright (C) 1991,92,1994-1999,2000,2001 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
Expand Down Expand Up @@ -152,7 +152,7 @@ struct sockaddr

struct sockaddr_storage
{
__SOCKADDR_COMMON (__ss_); /* Address family, etc. */
__SOCKADDR_COMMON (ss_); /* Address family, etc. */
__ss_aligntype __ss_align; /* Force desired alignment. */
char __ss_padding[_SS_PADSIZE];
};
Expand Down
Loading

0 comments on commit 6f0ea37

Please sign in to comment.