diff options
author | luther <luther@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-12-22 18:12:32 +0000 |
---|---|---|
committer | luther <luther@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-12-22 18:12:32 +0000 |
commit | c06cc5cbdefd408e18bf3bfb251a67ff29c6c47e (patch) | |
tree | 25055e43cfffc38cba634ee16ebf8853ffeaa054 | |
parent | a5095e6ce804ebbcf40f67e603d0d420b9e0a749 (diff) | |
download | ATCD-c06cc5cbdefd408e18bf3bfb251a67ff29c6c47e.tar.gz |
Fri Dec 22 12:09:59 2000 Luther J Baker <luther@cs.wustl.edu>
-rw-r--r-- | PACE/ChangeLog | 18 | ||||
-rw-r--r-- | PACE/pace/Makefile | 42 | ||||
-rw-r--r-- | PACE/pace/config/config.h | 40 | ||||
-rw-r--r-- | PACE/pace/posix/socket.c | 4 | ||||
-rw-r--r-- | PACE/pace/posix/socket.h | 220 | ||||
-rw-r--r-- | PACE/pace/posix/socket.inl | 12 | ||||
-rw-r--r-- | PACE/pace/sys/socket.h | 12 |
7 files changed, 314 insertions, 34 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog index 3350bb8a5f9..7165ac1e727 100644 --- a/PACE/ChangeLog +++ b/PACE/ChangeLog @@ -1,9 +1,25 @@ +Fri Dec 22 12:09:59 2000 Luther J Baker <luther@cs.wustl.edu> + + * pace/Makefile: + * pace/config/config.h: + + * pace/sys/socket.h: + * pace/posix/socket.h: + * pace/posix/socket.inl: + * pace/posix/socket.c: + + Updated. Linux is building sockets correctly now. + Fri Dec 22 10:54:13 2000 Luther J Baker <luther@cs.wustl.edu> - * sys/socket.s + * socket.h + * sys/socket.h + * Makefile Moved socket.h to sys/socket.h. + Started looking at Makefile to add socket.h + Thu Dec 21 18:22:28 2000 Luther J Baker <luther@cs.wustl.edu> * docs/index.html: diff --git a/PACE/pace/Makefile b/PACE/pace/Makefile index c7bd12ae889..7261a3db69b 100644 --- a/PACE/pace/Makefile +++ b/PACE/pace/Makefile @@ -24,7 +24,6 @@ PACE_FILES = \ semaphore \ setjmp \ signal \ - socket \ stdio \ stdlib \ string \ @@ -35,10 +34,34 @@ PACE_FILES = \ CONFIG_FILES = SYS_FILES = \ sys/mman \ + sys/socket \ sys/stat \ sys/times \ sys/utsname \ sys/wait + +# POSIX_SOCKET Unit of Functionality +# pace_accept is in sys/socket.h +# pace_bind is in sys/socket.h +# pace_connect is in sys/socket.h +# pace_getpeername is in sys/socket.h +# pace_getsockname is in sys/socket.h +# pace_getsockopt is in sys/socket.h +# pace_setsockopt is in sys/socket.h +# pace_isfdtype is in sys/socket.h +# pace_listen is in sys/socket.h +# pace_recv is in sys/socket.h +# pace_recvfrom is in sys/socket.h +# pace_rcvmsg is in sys/socket.h +# pace_send is in sys/socket.h +# pace_sendto is in sys/socket.h +# pace_sendmsg is in sys/socket.h +# pace_shutdown is in sys/socket.h +# pace_socket is in sys/socket.h +# pace_socketpair is in sys/socket.h +POSIX_SOCK_FILES = \ + sys/socket + # POSIX_SINGLE_PROCESS Unit of Functionality (POSIX.1) # pace_sysconf is in unistd.h; # pace_time is in time.h; @@ -47,6 +70,7 @@ POSIX_SP_FILES = \ unistd \ time \ sys/utsname + # POSIX_MULTI_PROCESS Unit of Functionality (POSIX.1) # pace__exit is in unistd.h # pace_assert is in assert.h @@ -67,6 +91,7 @@ POSIX_MP_FILES = \ locale \ sys/times \ sys/wait + # POSIX_SIGNALS Unit of Functionality (POSIX.1) # pace_abort is in stdlib.h; # pace_alarm is in unistd.h; @@ -83,12 +108,14 @@ POSIX_SIG_FILES = \ unistd \ signal \ setjmp + # POSIX_USER_GROUPS Unit of Functionality (POSIX.1) # pace_getegid, pace_geteuid, pace_getgid, pace_getgroups, pace_getlogin, # pace_getpgrp, pace_getuid, pace_setgid, pace_setsid, pace_setuid are in # unistd.h; POSIX_UG_FILES = \ unistd + # POSIX_FILE_SYSTEM Unit of Functionality (POSIX.1) # pace_access, pace_chdir are in unistd.h; # pace_closedir is in dirent.h; @@ -114,6 +141,7 @@ POSIX_FS_FILES = \ sys/stat \ stdio \ utime + # POSIX_FILE_ATTRIBUTES Unit of Functionality (POSIX.1) # pace_chmod is in sys/stat.h; # pace_chown is in unistd.h; @@ -121,10 +149,12 @@ POSIX_FS_FILES = \ POSIX_FA_FILES = \ sys/stat \ unistd + # POSIX_FIFO Unit of Functionality (POSIX.1) # pace_mkfifo is in sys/stat.h; POSIX_F_FILES = \ sys/stat + # POSIX_DEVICE_IO Unit of Functionality (POSIX.1) # pace_clearerr is in stdio.h; # pace_close is in unistd.h; @@ -142,6 +172,7 @@ POSIX_DI_FILES = \ stdio \ unistd \ fcntl + # POSIX_FD_MGMT Unit of Functionality (POSIX.1) # pace_dup, pace_dup2 are in unistd.h; # pace_fcntl is in fcntl.h; @@ -152,10 +183,12 @@ POSIX_FM_FILES = \ unistd \ fcntl \ stdio + # POSIX_PIPE Unit of Functionality (POSIX.1) # pace_pipe is in unistd.h; POSIX_P_FILES = \ unistd + # POSIX_DEVICE_SPECIFIC Unit of Functionality (POSIX.1) # pace_cfgetispeed, pace_cfgetospeed, pace_cfsetispeed, pace_cfsetospeed are # in termios.h; @@ -168,10 +201,12 @@ POSIX_DS_FILES = \ termios \ stdio \ unistd + # POSIX_SYSTEM_DATABASE Unit of Functionality (POSIX.1) # pace_getgrgid, pace_getgrnam, pace_getpwnam, pace_getpwuid are in grp.h; POSIX_SD_FILES = \ grp + # POSIX_C_LANG_SUPPORT Unit of Functionality (POSIX.1) # Character handling functions (e.g., isalnum, toupper) are in ctype.h; # Mathematics functions (e.g., acos, tanh) are in math.h; @@ -185,22 +220,26 @@ POSIX_CLS_FILES = \ setjmp \ stdlib \ time + # _POSIX_JOB_CONTROL Unit of Functionality (POSIX.1) # pace_setpgid is in unistd.h; # pace_tcgetpgrp, pace_tcsetpgrp are in termios.h _POSIX_JC_FILES = \ unistd \ termios + # POSIX_USER_GROUPS_R Unit of Functionality (POSIX.1) # pace_getlogin_r is in unistd.h; POSIX_UGR_FILES = \ unistd + # POSIX_FILE_LOCKING Unit of Functionality (POSIX.1) # pace_flockfile, pace_ftrylockfile, pace_funlockfile, pace_getc_unlocked, # pace_getchar_unlocked, pace_putc_unlocked, pace_putchar_unlocked are in # stdio.h; POSIX_FL_FILES = \ stdio + # POSIX_C_LANG_SUPPORT_R Unit of Functionality (POSIX.1) # pace_asctime_r, pace_ctime_r, pace_gmtime_r, pace_localtime_r are in time.h; # pace_rand_r is in stdlib.h; @@ -211,6 +250,7 @@ POSIX_CLSR_FILES = \ stdlib \ string \ dirent + # POSIX_SYSTEM_DATABASE_R Unit of Functionality (POSIX.1) # pace_getgrgid_r, pace_getgrnam_r are in grp.h; # pace_getpwnam_r, pace_getpwuid_r are in pwd.h; diff --git a/PACE/pace/config/config.h b/PACE/pace/config/config.h index 30cf9396d5f..13b0e878bab 100644 --- a/PACE/pace/config/config.h +++ b/PACE/pace/config/config.h @@ -100,26 +100,30 @@ one of the above units of functionality. */ #if PACE_HAS_ALL_POSIX_FUNCS -# define PACE_HAS_POSIX_SP_UOF 1 -# define PACE_HAS_POSIX_MP_UOF 1 -# define PACE_HAS_POSIX_SIG_UOF 1 -# define PACE_HAS_POSIX_UG_UOF 1 -# define PACE_HAS_POSIX_FS_UOF 1 -# define PACE_HAS_POSIX_FA_UOF 1 -# define PACE_HAS_POSIX_F_UOF 1 -# define PACE_HAS_POSIX_DI_UOF 1 -# define PACE_HAS_POSIX_FM_UOF 1 -# define PACE_HAS_POSIX_P_UOF 1 -# define PACE_HAS_POSIX_DS_UOF 1 -# define PACE_HAS_POSIX_SD_UOF 1 -# define PACE_HAS_POSIX_CLS_UOF 1 -# define PACE_HAS_POSIX_JC_UOF 1 -# define PACE_HAS_POSIX_UGR_UOF 1 -# define PACE_HAS_POSIX_FL_UOF 1 -# define PACE_HAS_POSIX_CLSR_UOF 1 -# define PACE_HAS_POSIX_SDR_UOF 1 +# define PACE_HAS_POSIX_UOF 1 +# define PACE_HAS_POSIX_SP_UOF 1 +# define PACE_HAS_POSIX_MP_UOF 1 +# define PACE_HAS_POSIX_SIG_UOF 1 +# define PACE_HAS_POSIX_UG_UOF 1 +# define PACE_HAS_POSIX_FS_UOF 1 +# define PACE_HAS_POSIX_FA_UOF 1 +# define PACE_HAS_POSIX_F_UOF 1 +# define PACE_HAS_POSIX_DI_UOF 1 +# define PACE_HAS_POSIX_FM_UOF 1 +# define PACE_HAS_POSIX_P_UOF 1 +# define PACE_HAS_POSIX_DS_UOF 1 +# define PACE_HAS_POSIX_SD_UOF 1 +# define PACE_HAS_POSIX_CLS_UOF 1 +# define PACE_HAS_POSIX_JC_UOF 1 +# define PACE_HAS_POSIX_UGR_UOF 1 +# define PACE_HAS_POSIX_FL_UOF 1 +# define PACE_HAS_POSIX_CLSR_UOF 1 +# define PACE_HAS_POSIX_SDR_UOF 1 # define PACE_HAS_POSIX_NONUOF_FUNCS 1 #else +# if !defined PACE_HAS_POSIX_SOCK_UOF +# define PACE_HAS_POSIX_SOCK_UOF 0 +# endif /* ! PACE_HAS_POSIX_SOCK_UOF */ # if !defined PACE_HAS_POSIX_SP_UOF # define PACE_HAS_POSIX_SP_UOF 0 # endif /* ! PACE_HAS_POSIX_SP_UOF */ diff --git a/PACE/pace/posix/socket.c b/PACE/pace/posix/socket.c index 8e2e29ec517..68854c863f7 100644 --- a/PACE/pace/posix/socket.c +++ b/PACE/pace/posix/socket.c @@ -13,8 +13,8 @@ * * ============================================================================= */ -#include "pace/socket.h" +#include "pace/sys/socket.h" #if !defined (PACE_HAS_INLINE) -# include "pace/posix/socket.inl" +# include "pace/posix/sys/socket.inl" #endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/posix/socket.h b/PACE/pace/posix/socket.h new file mode 100644 index 00000000000..e628d26418d --- /dev/null +++ b/PACE/pace/posix/socket.h @@ -0,0 +1,220 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/socket.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SOCKET_H_POSIX +#define PACE_SOCKET_H_POSIX + +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/uio.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + +#ifndef PACE_SOMAXCONN +#define PACE_SOMAXCONN SOMAXCONN +#endif /* PACE_SOMAXCONN */ + +#ifndef PACE_SOCKLEN_T +#define PACE_SOCKLEN_T + typedef socklen_t pace_socklen_t; +#endif /* PACE_SOCKLEN_T */ + +#ifndef PACE_SA_FAMILY_T +#define PACE_SA_FAMILY_T + typedef sa_family_t pace_family_t; +#endif /* PACE_SA_FAMILY_T */ + +#ifndef PACE_MSGHDR +#define PACE_MSGHDR + typedef struct msghdr pace_msghdr; +#endif /* PACE_MSGHDR */ + +#ifndef PACE_CMSGRHDR +#define PACE_CMSGRHDR + typedef struct cmsghdr pace_cmsghdr; +#endif /* PACE_CMSGRHDR */ + +#ifndef PACE_LINGER +#define PACE_LINGER + typedef struct linger pace_linger; +#endif /* PACE_LINGER */ + +#ifndef PACE_SOCK_STREAM +#define PACE_SOCK_STREAM SOCK_STREAM +#endif /* PACE_SOCK_STREAM */ + +#ifndef PACE_SOCK_DGRAM +#define PACE_SOCK_DGRAM SOCK_DGRAM +#endif /* PACE_SOCK_DGRAM */ + +#ifndef PACE_SOCK_RAW +#define PACE_SOCK_RAW SOCK_RAW +#endif /* PACE_MSGHDR */ + +#ifndef PACE_SOCK_SEQPACKET +#define PACE_SOCK_SEQPACKET SOCK_SEQPACKET +#endif /* PACE_SOCK_SEQPACKET */ + +#ifndef PACE_PF_UNSPEC +#define PACE_PF_UNSPEC PF_UNSPEC +#endif /* PACE_PF_UNSPEC */ + +#ifndef PACE_PF_LOCAL +#define PACE_PF_LOCAL PF_LOCAL +#endif /* PACE_PF_LOCAL */ + +#ifndef PACE_PF_INET +#define PACE_PF_INET PF_INET +#endif /* PACE_PF_INET */ + +#ifndef PACE_PF_ISO +#define PACE_PF_ISO PF_ISO +#endif /* PACE_PF_ISO */ + +#ifndef PACE_PF_OSI +#define PACE_PF_OSI PF_OSI +#endif /* PACE_PF_OSI */ + +#ifndef PACE_AF_UNSPEC +#define PACE_AF_UNSPEC AF_UNSPEC +#endif /* PACE_AF_UNSPEC */ + +#ifndef PACE_AF_LOCAL +#define PACE_AF_LOCAL AF_LOCAL +#endif /* PACE_AF_LOCAL */ + +#ifndef PACE_AF_INET +#define PACE_AF_INET AF_INET +#endif /* PACE_AF_INET */ + +#ifndef PACE_AF_ISO +#define PACE_AF_ISO AF_ISO +#endif /* PACE_AF_ISO */ + +#ifndef PACE_AF_OSI +#define PACE_AF_OSI AF_OSI +#endif /* PACE_AF_OSI */ + +#ifndef PACE_MSG_OOB +#define PACE_MSG_OOB MSG_OOB +#endif /* PACE_MSG_OOB */ + +#ifndef PACE_MSG_PEEK +#define PACE_MSG_PEEK MSG_PEEK +#endif /* PACE_MSG_PEEK */ + +#ifndef PACE_MSG_DONTROUTE +#define PACE_MSG_DONTROUTE MSG_DONTROUTE +#endif /* PACE_MSG_DONTROUTE */ + +#ifndef PACE_MSG_EOR +#define PACE_MSG_EOR MSG_EOR +#endif /* PACE_MSG_EOR */ + +#ifndef PACE_MSG_TRUNC +#define PACE_MSG_TRUNC MSG_TRUNC +#endif /* PACE_MSG_TRUNC */ + +#ifndef PACE_MSG_CTRUNC +#define PACE_MSG_CTRUNC MSG_CTRUNC +#endif /* PACE_MSG_CTRUNC */ + +#ifndef PACE_MSG_WAITALL +#define PACE_MSG_WAITALL MSG_WAITALL +#endif /* PACE_MSG_WAITALL */ + +#ifndef PACE_SOL_SOCKET +#define PACE_SOL_SOCKET SOL_SOCKET +#endif /* PACE_SOL_SOCKET */ + +#ifndef PACE_SO_BROADCAST +#define PACE_SO_BROADCAST SO_BROADCAST +#endif /* PACE_SO_BROADCAST */ + +#ifndef PACE_SO_DEBUG +#define PACE_SO_DEBUG SO_DEBUG +#endif /* PACE_SO_DEBUG */ + +#ifndef PACE_SO_DONTROUTE +#define PACE_SO_DONTROUTE SO_DONTROUTE +#endif /* PACE_SO_DONTROUTE */ + +#ifndef PACE_SO_ERROR +#define PACE_SO_ERROR SO_ERROR +#endif /* PACE_SO_ERROR */ + +#ifndef PACE_SO_KEEPALIVE +#define PACE_SO_KEEPALIVE SO_KEEPALIVE +#endif /* PACE_SO_KEEPALIVE */ + +#ifndef PACE_SO_LINGER +#define PACE_SO_LINGER SO_LINGER +#endif /* PACE_SO_LINGER */ + +#ifndef PACE_SO_OOBINLINE +#define PACE_SO_OOBINLINE SO_OOBINLINE +#endif /* PACE_SO_OOBINLINE */ + +#ifndef PACE_SO_RCVBUF +#define PACE_SO_RCVBUF SO_RCVBUF +#endif /* PACE_SO_RCVBUF */ + +#ifndef PACE_SO_RCVLOWAT +#define PACE_SO_RCVLOWAT SO_RCVLOWAT +#endif /* PACE_SO_RCVLOWAT */ + +#ifndef PACE_SO_RCVTIMEO +#define PACE_SO_RCVTIMEO SO_RCVTIMEO +#endif /* PACE_SO_RCVTIMEO */ + +#ifndef PACE_SO_REUSEADDR +#define PACE_SO_REUSEADDR SO_REUSEADDR +#endif /* PACE_SO_REUSEADDR */ + +#ifndef PACE_SO_SNDBUF +#define PACE_SO_SNDBUF SO_SNDBUF +#endif /* PACE_SO_SNDBUF */ + +#ifndef PACE_SO_SNDLOWAT +#define PACE_SO_SNDLOWAT SO_SNDLOWAT +#endif /* PACE_SO_SNDLOWAT */ + +#ifndef PACE_SO_SNDTIMEO +#define PACE_SO_SNDTIMEO SO_SNDTIMEO +#endif /* PACE_SO_SNDTIMEO */ + +#ifndef PACE_SO_TYPE +#define PACE_SO_TYPE SO_TYPE +#endif /* PACE_SO_TYPE */ + +#ifndef PACE_CMSG_DATA +#define PACE_CMSG_DATA(cmsg) CMSG_DATA(cmsg) +#endif /* PACE_CMSG_DATA */ + +#ifndef PACE_CMSG_NXTHDR +#define PACE_CMSG_NXTHDR(mhdr, cmsg) CMSG_NXTHDR(mhdr, cmsg) +#endif /* PACE_CMSG_DATA */ + +#ifndef PACE_CMSG_FIRSTHDR +#define PACE_CMSG_NXTHDR(mhdr, cmsg) CMSG_NXTHDR(mhdr, cmsg) +#endif /* PACE_CMSG_DATA */ + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#endif /* PACE_SOCKET_H_POSIX */ diff --git a/PACE/pace/posix/socket.inl b/PACE/pace/posix/socket.inl index 0b8b91e8243..5b38e4e198c 100644 --- a/PACE/pace/posix/socket.inl +++ b/PACE/pace/posix/socket.inl @@ -203,7 +203,7 @@ pace_sendmsg (int s, #if (PACE_HAS_POSIX_SOCK_UOF) PACE_INLINE int -shutdown (int s, int how) +pace_shutdown (int s, int how) { shutdown (s, how); } @@ -212,7 +212,7 @@ shutdown (int s, int how) #if (PACE_HAS_POSIX_SOCK_UOF) PACE_INLINE int -socket (int protofamily, int type, int protocol) +pace_socket (int protofamily, int type, int protocol) { socket (protofamily, type, protocol); } @@ -221,10 +221,10 @@ socket (int protofamily, int type, int protocol) #if (PACE_HAS_POSIX_SOCK_UOF) PACE_INLINE int -socketpair (int protofamily, - int type, - int protocol, - int sv[2]) +pace_socketpair (int protofamily, + int type, + int protocol, + int sv[2]) { socketpair (protofamily, type, protocol, sy); } diff --git a/PACE/pace/sys/socket.h b/PACE/pace/sys/socket.h index b799f076fef..4c06359460e 100644 --- a/PACE/pace/sys/socket.h +++ b/PACE/pace/sys/socket.h @@ -208,7 +208,7 @@ extern "C" { (IEEE Std P1003.1g, D6.6, March 1997 Edition) */ #if (PACE_HAS_POSIX_SOCK_UOF) - PACE_INLINE int shutdown (int s, int how); + PACE_INLINE int pace_shutdown (int s, int how); #endif /* PACE_HAS_POSIX_SOCK_UOF */ /** @@ -217,7 +217,7 @@ extern "C" { (IEEE Std P1003.1g, D6.6, March 1997 Edition) */ #if (PACE_HAS_POSIX_SOCK_UOF) - PACE_INLINE int socket (int protofamily, int type, int protocol); + PACE_INLINE int pace_socket (int protofamily, int type, int protocol); #endif /* PACE_HAS_POSIX_SOCK_UOF */ /** @@ -226,10 +226,10 @@ extern "C" { (IEEE Std P1003.1g, D6.6, March 1997 Edition) */ #if (PACE_HAS_POSIX_SOCK_UOF) - PACE_INLINE int socketpair (int protofamily, - int type, - int protocol, - int sv[2]); + PACE_INLINE int pace_socketpair (int protofamily, + int type, + int protocol, + int sv[2]); #endif /* PACE_HAS_POSIX_SOCK_UOF */ #if defined (PACE_HAS_INLINE) |