diff options
author | luther <luther@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-06-17 22:37:17 +0000 |
---|---|---|
committer | luther <luther@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-06-17 22:37:17 +0000 |
commit | b08677558378b00b7660c1998bb98c5ca63f1e8e (patch) | |
tree | 42ab5e62bc5d777ad796ddfed615f2fafcf92550 /PACE/pace/sys | |
parent | b8d91abfca747302fee3c4e9d59fbe40865a13a7 (diff) | |
download | ATCD-b08677558378b00b7660c1998bb98c5ca63f1e8e.tar.gz |
Sat Jun 17 17:24:47 2000 Luther J Baker <luther@cs.wustl.edu>
Diffstat (limited to 'PACE/pace/sys')
-rw-r--r-- | PACE/pace/sys/mman.h | 67 | ||||
-rw-r--r-- | PACE/pace/sys/socket.h | 54 | ||||
-rw-r--r-- | PACE/pace/sys/stat.h | 42 | ||||
-rw-r--r-- | PACE/pace/sys/termios.h | 54 | ||||
-rw-r--r-- | PACE/pace/sys/times.h | 29 | ||||
-rw-r--r-- | PACE/pace/sys/types.h | 51 | ||||
-rw-r--r-- | PACE/pace/sys/utsname.h | 29 |
7 files changed, 57 insertions, 269 deletions
diff --git a/PACE/pace/sys/mman.h b/PACE/pace/sys/mman.h index ea684d367b9..27175d7cc74 100644 --- a/PACE/pace/sys/mman.h +++ b/PACE/pace/sys/mman.h @@ -6,73 +6,22 @@ * pace * * = FILENAME - * mman.h + * pace/sys/mman.h * * = AUTHOR * Luther Baker * * ============================================================================ */ - #ifndef PACE_SYS_MMAN_H #define PACE_SYS_MMAN_H - -#include "pace/defines.h" -#include <sys/mman.h> - -/* Linux wants to use sys/types.h to define off_t. - * Sun is happy with sys/mman.h. - */ -# if defined (linux) -#include "pace/sys/types.h" -# endif /* linux */ - - -# if defined (PACE_HAS_CPLUSPLUS) -extern "C" { -# endif /* PACE_HAS_CPLUSPLUS */ - - PACE_INLINE int pace_mlock (const void * addr, size_t len); - - PACE_INLINE int pace_mlockall (int flags); - - PACE_INLINE void * pace_mmap (void * addr, - size_t len, - int prot, - int flags, - int fildes, - off_t off); - - PACE_INLINE int pace_mprotect (const void * addr, - size_t len, - int prot); - - PACE_INLINE int pace_msync (void * addr, - size_t len, - int flags); - - PACE_INLINE int pace_munlock (const void * addr, size_t len); - - PACE_INLINE int pace_munlockall (); - - PACE_INLINE int pace_munmap (void *addr, size_t len); - - PACE_INLINE int pace_shm_open (const char * name, - int oflag, - mode_t mode); - /* Requires PACE_POSIX_C_SOURCE > 2. */ - - PACE_INLINE int pace_shm_unlink (const char * name); - /* Requires PACE_POSIX_C_SOURCE > 2. */ - -# if defined (PACE_HAS_CPLUSPLUS) -} -# endif /* PACE_HAS_CPLUSPLUS */ - -# if defined (PACE_HAS_INLINE) -# include "mman.inl" -# endif /* PACE_HAS_INLINE */ - +#if defined (PACE_HAS_POSIX) +# include "posix/mman.h" +#elif defined (PACE_VXWORKS) +# include "vxworks/mman.h" +#elif defined (PACE_WIN32) +# include "win32/mman.h" +#endif #endif /* PACE_SYS_MMAN_H */ diff --git a/PACE/pace/sys/socket.h b/PACE/pace/sys/socket.h index db3c6111732..d7673841103 100644 --- a/PACE/pace/sys/socket.h +++ b/PACE/pace/sys/socket.h @@ -6,60 +6,22 @@ * pace * * = FILENAME - * socket.h + * pace/sys/socket.h * * = AUTHOR * Luther Baker * * ============================================================================ */ - #ifndef PACE_SYS_SOCKET_H #define PACE_SYS_SOCKET_H - -#include "pace/defines.h" -#include "pace/sys/types.h" -#include <sys/socket.h> - - -# if defined (PACE_HAS_CPLUSPLUS) -extern "C" { -# endif /* PACE_HAS_CPLUSPLUS */ - - PACE_INLINE int pace_closesocket (PACE_HANDLE handle); - - PACE_INLINE int pace_getpeername (int s, - struct sockaddr * name, - socklen_t * namelen); - - PACE_INLINE int pace_getsockname (int s, - struct sockaddr * name, - socklen_t * namelen); - - PACE_INLINE int pace_getsockopt (int s, - int level, - int optname, - void * optval, - socklen_t * optlen); - - PACE_INLINE int pace_setsockopt (int s, - int level, - int optname, - const void * optval, - socklen_t optlen); - - PACE_INLINE int pace_socket (int domain, - int type, - int protocol); - -# if defined (PACE_HAS_CPLUSPLUS) -} -# endif /* PACE_HAS_CPLUSPLUS */ - -# if defined (PACE_HAS_INLINE) -# include "socket.inl" -# endif /* PACE_HAS_INLINE */ - +#if defined (PACE_HAS_POSIX) +# include "posix/socket.h" +#elif defined (PACE_VXWORKS) +# include "vxworks/socket.h" +#elif defined (PACE_WIN32) +# include "win32/socket.h" +#endif #endif /* PACE_SYS_SOCKET_H */ diff --git a/PACE/pace/sys/stat.h b/PACE/pace/sys/stat.h index cac798c1a2f..2f7883bf6cb 100644 --- a/PACE/pace/sys/stat.h +++ b/PACE/pace/sys/stat.h @@ -6,48 +6,22 @@ * pace * * = FILENAME - * stat.h + * pace/sys/stat.h * * = AUTHOR * Luther Baker * * ============================================================================ */ - #ifndef PACE_SYS_STAT_H #define PACE_SYS_STAT_H - -#include "pace/defines.h" -#include "pace/sys/types.h" -#include <sys/stat.h> - - -# if defined (PACE_HAS_CPLUSPLUS) -extern "C" { -# endif /* PACE_HAS_CPLUSPLUS */ - - PACE_INLINE int pace_chmod (const char * path, mode_t mode); - - PACE_INLINE int pace_fchmod (int fildes, mode_t mode); - - PACE_INLINE int pace_fstat (int fildes, struct stat * buf); - - PACE_INLINE int pace_mkdir (const char * path, mode_t mode); - - PACE_INLINE int pace_mkfifo (const char * path, mode_t mode); - - PACE_INLINE int pace_stat (const char * path, struct stat * buf); - - PACE_INLINE mode_t pace_umask (mode_t cmask); - -# if defined (PACE_HAS_CPLUSPLUS) -} -# endif /* PACE_HAS_CPLUSPLUS */ - -# if defined (PACE_HAS_INLINE) -# include "stat.inl" -# endif /* PACE_HAS_INLINE */ - +#if defined (PACE_HAS_POSIX) +# include "posix/stat.h" +#elif defined (PACE_VXWORKS) +# include "vxworks/stat.h" +#elif defined (PACE_WIN32) +# include "win32/stat.h" +#endif #endif /* PACE_SYS_STAT_H */ diff --git a/PACE/pace/sys/termios.h b/PACE/pace/sys/termios.h index b8e96cef2bf..b0ce5e79882 100644 --- a/PACE/pace/sys/termios.h +++ b/PACE/pace/sys/termios.h @@ -6,60 +6,22 @@ * pace * * = FILENAME - * termios.h + * pace/sys/termios.h * * = AUTHOR * Luther Baker * * ============================================================================ */ - #ifndef PACE_SYS_TERMIOS_H #define PACE_SYS_TERMIOS_H - -#include "pace/defines.h" -#include "pace/sys/types.h" -#include <termios.h> - - -# if defined (PACE_HAS_CPLUSPLUS) -extern "C" { -# endif /* PACE_HAS_CPLUSPLUS) */ - - PACE_INLINE speed_t pace_cfgetospeed (const struct termios * termiosp); - - PACE_INLINE int pace_cfsetospeed (struct termios * termios_p, speed_t speed); - - PACE_INLINE speed_t pace_cfgetispeed (const struct termios * termios_p); - - PACE_INLINE int pace_cfsetispeed (struct termios * termios_p, speed_t speed); - - PACE_INLINE int pace_tcdrain (int fildes); - - PACE_INLINE int pace_tcflow (int fildes, int action); - - PACE_INLINE int pace_tcflush (int fildes, int queue_selector); - - PACE_INLINE int pace_tcgetattr (int fildes, struct termios * termios_p); - - PACE_INLINE pid_t pace_tcgetpgrp (int fildes); - - PACE_INLINE int pace_tcsendbreak (int fildes, int duration); - - PACE_INLINE int pace_tcsetattr (int fildes, - int optional_actions, - const struct termios * termios_p); - - PACE_INLINE int pace_tcsetpgrp (int fildes, pid_t pgrp_id); - -# if defined (PACE_HAS_CPLUSPLUS) -} -# endif /* PACE_HAS_CPLUSPLUS */ - -# if defined (PACE_HAS_INLINE) -# include "termios.inl" -# endif /* PACE_HAS_INLINE */ - +#if defined (PACE_HAS_POSIX) +# include "posix/termios.h" +#elif defined (PACE_VXWORKS) +# include "vxworks/termios.h" +#elif defined (PACE_WIN32) +# include "win32/termios.h" +#endif #endif /* PACE_SYS_TERMIOS_H */ diff --git a/PACE/pace/sys/times.h b/PACE/pace/sys/times.h index daca45a727f..4e06690f38a 100644 --- a/PACE/pace/sys/times.h +++ b/PACE/pace/sys/times.h @@ -6,35 +6,22 @@ * pace * * = FILENAME - * times.h + * pace/sys/times.h * * = AUTHOR * Luther Baker * * ============================================================================ */ - #ifndef PACE_SYS_TIMES_H #define PACE_SYS_TIMES_H - -#include "pace/defines.h" -#include <sys/times.h> - - -# if defined (PACE_HAS_CPLUSPLUS) -extern "C" { -# endif /* PACE_HAS_CPLUSPLUS */ - - PACE_INLINE clock_t pace_times (struct tms * buffer); - -# if defined (PACE_HAS_CPLUSPLUS) -} -# endif /* PACE_HAS_CPLUSPLUS */ - -# if defined (PACE_HAS_INLINE) -# include "times.inl" -# endif /* PACE_HAS_INLINE */ - +#if defined (PACE_HAS_POSIX) +# include "posix/times.h" +#elif defined (PACE_VXWORKS) +# include "vxworks/times.h" +#elif defined (PACE_WIN32) +# include "win32/times.h" +#endif #endif /* PACE_SYS_TIMES_H */ diff --git a/PACE/pace/sys/types.h b/PACE/pace/sys/types.h index fe48799e3b1..c4029fd03e1 100644 --- a/PACE/pace/sys/types.h +++ b/PACE/pace/sys/types.h @@ -1,5 +1,4 @@ -/* -*- C -*- - * $Id$ +/* $Id$ * ============================================================================ * @@ -7,54 +6,22 @@ * pace * * = FILENAME - * types.h + * pace/sys/types.h * * = AUTHOR * Luther Baker * * ============================================================================ */ - #ifndef PACE_SYS_TYPES_H #define PACE_SYS_TYPES_H - -#include <sys/types.h> - -/* specific to SunOS 5.7 ace.cs <luther@cs.wustl.edu> */ -#include <inttypes.h> - - -/* Wrap a handle. */ -# define PACE_HANDLE int -# define PACE_INVALID_HANDLE -1 - -# if defined (PACE_PSOS_TM) -typedef long long longlong_t; -typedef long id_t; -# endif /* PACE_PSOS_TM */ - -# define PACE_UINT32 uint32_t -# define PACE_UINT16 uint16_t - -# if defined PACE_HAS_WCHAR -# if defined PACE_USES_WCHAR -# define PACE_TCHAR wchar -# define PACE_TEXT(X) X -# endif /* PACE_USES_WCHAR */ -# else /* !PACE_HAS_WCHAR */ -# define PACE_TCHAR char -# define PACE_TEXT(X) X -# endif /* PACE_HAS_WCHAR */ - -# if defined (PACE_HAS_CPLUSPLUS) -extern "C" { -# endif /* (PACE_HAS_CPLUSPLUS) */ - - -# if defined (PACE_HAS_CPLUSPLUS) -} -# endif /* PACE_HAS_CPLUSPLUS */ - +#if defined (PACE_HAS_POSIX) +# include "posix/types.h" +#elif defined (PACE_VXWORKS) +# include "vxworks/types.h" +#elif defined (PACE_WIN32) +# include "win32/types.h" +#endif #endif /* PACE_SYS_TYPES_H */ diff --git a/PACE/pace/sys/utsname.h b/PACE/pace/sys/utsname.h index b451cc5b883..4ac47150c3d 100644 --- a/PACE/pace/sys/utsname.h +++ b/PACE/pace/sys/utsname.h @@ -6,35 +6,22 @@ * pace * * = FILENAME - * utsname.h + * pace/sys/utsname.h * * = AUTHOR * Luther Baker * * ============================================================================ */ - #ifndef PACE_SYS_UTSNAME_H #define PACE_SYS_UTSNAME_H - -#include "pace/defines.h" -#include <sys/utsname.h> - - -# if defined (PACE_HAS_CPLUSPLUS) -extern "C" { -# endif /* PACE_HAS_CPLUSPLUS */ - - PACE_INLINE int pace_uname (struct utsname * name); - -# if defined (PACE_HAS_CPLUSPLUS) -} -# endif /* PACE_HAS_CPLUSPLUS */ - -# if defined (PACE_HAS_INLINE) -# include "utsname.inl" -# endif /* PACE_HAS_INLINE */ - +#if defined (PACE_HAS_POSIX) +# include "posix/utsname.h" +#elif defined (PACE_VXWORKS) +# include "vxworks/utsname.h" +#elif defined (PACE_WIN32) +# include "win32/utsname.h" +#endif #endif /* PACE_SYS_UTSNAME_H */ |