diff options
author | luther <luther@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-06-26 17:27:57 +0000 |
---|---|---|
committer | luther <luther@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-06-26 17:27:57 +0000 |
commit | 4da7a32787207c496ea290b9247877518c7323c8 (patch) | |
tree | 4a76abd7fc428be37f2b7a64424195b536e638e4 | |
parent | 2aa8563c10b28e615895376a8a4bd6b90684e119 (diff) | |
download | ATCD-4da7a32787207c496ea290b9247877518c7323c8.tar.gz |
Mon Jun 26 12:24:36 2000 Luther J Baker <luther@cs.wustl.edu>
87 files changed, 5425 insertions, 4 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog index 80f3d9c89df..ecaf30b0f1a 100644 --- a/PACE/ChangeLog +++ b/PACE/ChangeLog @@ -1,3 +1,13 @@ +Mon Jun 26 12:24:36 2000 Luther J Baker <luther@cs.wustl.edu> + + * pace/pace/posix/TODO: + + Updated. + + * pace/pace/win32/*.[h,inl,cpp] README TODO: + + Added to repository. + Mon Jun 26 11:03:00 2000 John Heitmann <jwh1@cs.wustl.edu> * pace/pace/posix/pwd.inl diff --git a/PACE/pace/posix/TODO b/PACE/pace/posix/TODO index e5ae2ab1cf7..8b137891791 100644 --- a/PACE/pace/posix/TODO +++ b/PACE/pace/posix/TODO @@ -1,3 +1 @@ -* figure out why we can't call getXXXXXXX_r in netdb.inl -* get rid of warning on line 164 of stdio.inl -* I believe we need to implement lltostr, ulltostr, and memalign + diff --git a/PACE/pace/win32/README b/PACE/pace/win32/README index 83569929709..d46fa4c9dc3 100644 --- a/PACE/pace/win32/README +++ b/PACE/pace/win32/README @@ -1 +1 @@ -WIN32 dir. +WIN32 dir diff --git a/PACE/pace/win32/TODO b/PACE/pace/win32/TODO new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/PACE/pace/win32/TODO diff --git a/PACE/pace/win32/aio.c b/PACE/pace/win32/aio.c new file mode 100644 index 00000000000..d2f62e92389 --- /dev/null +++ b/PACE/pace/win32/aio.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/aio.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/aio.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/aio.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/aio.h b/PACE/pace/win32/aio.h new file mode 100644 index 00000000000..199d5d981f4 --- /dev/null +++ b/PACE/pace/win32/aio.h @@ -0,0 +1,65 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/aio.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_AIO_H +#define PACE_AIO_H + +#include <aio.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + /** The aio_cancel() function attempts to cancel one or more + asynchronous I/O requests currently outstanding against file + descriptor fildes. The aiocbp argument points to the asynchronous + I/O control block for a particular request to be + canceled. If aiocbp is NULL, then all outstanding cancelable + asynchronous I/O requests against fildes are canceled. */ + PACE_INLINE int pace_aio_cancel (int fildes, struct aiocb * aiocb); + + PACE_INLINE int pace_aio_error (const struct aiocb * aiocbp); + + PACE_INLINE int pace_aio_fsync (int op, struct aiocb * aiocbp); + + PACE_INLINE int pace_aio_read (struct aiocb * aiocbp); + + PACE_INLINE int pace_aio_return (struct aiocb * aiocbp); + + PACE_INLINE int pace_aio_suspend (const struct aiocb * const list[], + int nent, + const struct timespec * timeout); + + PACE_INLINE int pace_aio_write (struct aiocb * aiocbp); + + PACE_INLINE int pace_lio_listio (int mode, + struct aiocb * const list[], + int nent, + struct sigevent * sig); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/aio.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_AIO_H */ + + + + + diff --git a/PACE/pace/win32/aio.inl b/PACE/pace/win32/aio.inl new file mode 100644 index 00000000000..c59c6efd2c4 --- /dev/null +++ b/PACE/pace/win32/aio.inl @@ -0,0 +1,75 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/aio.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_aio_cancel (int fildes, struct aiocb * aiocbp) +{ + return aio_cancel (fildes, aiocbp); +} + +PACE_INLINE +int +pace_aio_error (const struct aiocb * aiocbp) +{ + return aio_error (aiocbp); +} + +PACE_INLINE +int +pace_aio_fsync (int op, struct aiocb * aiocbp) +{ + return aio_fsync (op, aiocbp); +} + +PACE_INLINE +int +pace_aio_read (struct aiocb * aiocbp) +{ + return aio_read (aiocbp); +} + +PACE_INLINE +int +pace_aio_return (struct aiocb * aiocbp) +{ + return aio_return (aiocbp); +} + +PACE_INLINE +int +pace_aio_suspend (const struct aiocb * const list[], + int nent, + const struct timespec * timeout) +{ + return aio_suspend (list, nent, timeout); +} + +PACE_INLINE +int +pace_aio_write (struct aiocb * aiocbp) +{ + return aio_write (aiocbp); +} + +PACE_INLINE +int +pace_lio_listio (int mode, + struct aiocb * const list[], + int nent, + struct sigevent * sig) +{ + return lio_listio (mode, list, nent, sig); +} diff --git a/PACE/pace/win32/assert.c b/PACE/pace/win32/assert.c new file mode 100644 index 00000000000..368fd0a62f6 --- /dev/null +++ b/PACE/pace/win32/assert.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/assert.c + * + * = AUTHOR + * Joe Hoffert + * + * ============================================================================= */ + +#include "pace/assert.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/assert.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/assert.h b/PACE/pace/win32/assert.h new file mode 100644 index 00000000000..02b6c3fd233 --- /dev/null +++ b/PACE/pace/win32/assert.h @@ -0,0 +1,33 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/assert.h + * + * = AUTHOR + * Joe Hoffert + * + * =========================================================================== */ + +#ifndef PACE_ASSERT_H +#define PACE_ASSERT_H + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE void pace_assert (int expression); + +# if defined (PACE_HAS_CPLUSPLUS) +} +# endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/assert.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_ASSERT_H */ diff --git a/PACE/pace/win32/assert.inl b/PACE/pace/win32/assert.inl new file mode 100644 index 00000000000..c781892b2d6 --- /dev/null +++ b/PACE/pace/win32/assert.inl @@ -0,0 +1,24 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/assert.inl + * + * = AUTHOR + * Joe Hoffert + * + * ============================================================================= */ + +#include <assert.h> + +PACE_INLINE +void +pace_assert (int expression) +{ + assert (expression); + return; +} diff --git a/PACE/pace/win32/ctype.c b/PACE/pace/win32/ctype.c new file mode 100644 index 00000000000..7bf7d34ae07 --- /dev/null +++ b/PACE/pace/win32/ctype.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/ctype.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/ctype.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/ctype.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/ctype.h b/PACE/pace/win32/ctype.h new file mode 100644 index 00000000000..39bc255428d --- /dev/null +++ b/PACE/pace/win32/ctype.h @@ -0,0 +1,57 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/ctype.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_CTYPE_H +#define PACE_CTYPE_H + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_isalnum (int c); + + PACE_INLINE int pace_isalpha (int c); + + PACE_INLINE int pace_iscntrl (int c); + + PACE_INLINE int pace_isdigit (int c); + + PACE_INLINE int pace_isgraph (int c); + + PACE_INLINE int pace_islower (int c); + + PACE_INLINE int pace_isprint (int c); + + PACE_INLINE int pace_ispunct (int c); + + PACE_INLINE int pace_isspace (int c); + + PACE_INLINE int pace_isupper (int c); + + PACE_INLINE int pace_isxdigit (int c); + + PACE_INLINE int pace_tolower (int c); + + PACE_INLINE int pace_toupper (int c); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/ctype.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_CTYPE_H */ diff --git a/PACE/pace/win32/ctype.inl b/PACE/pace/win32/ctype.inl new file mode 100644 index 00000000000..ca007dde11f --- /dev/null +++ b/PACE/pace/win32/ctype.inl @@ -0,0 +1,107 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/ctype.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include <ctype.h> + +PACE_INLINE +int +pace_isalnum (int c) +{ + return isalnum (c); +} + +PACE_INLINE +int +pace_isalpha (int c) +{ + return isalpha (c); +} + +PACE_INLINE +int +pace_iscntrl (int c) +{ + return iscntrl (c); +} + +PACE_INLINE +int +pace_isdigit (int c) +{ + return isdigit (c); +} + +PACE_INLINE +int +pace_isgraph (int c) +{ + return isgraph (c); +} + +PACE_INLINE +int +pace_islower (int c) +{ + return islower (c); +} + +PACE_INLINE +int +pace_isprint (int c) +{ + return isprint (c); +} + +PACE_INLINE +int +pace_ispunct (int c) +{ + return ispunct (c); +} + +PACE_INLINE +int +pace_isspace (int c) +{ + return isspace (c); +} + +PACE_INLINE +int +pace_isupper (int c) +{ + return isupper (c); +} + +PACE_INLINE +int +pace_isxdigit (int c) +{ + return isxdigit (c); +} + +PACE_INLINE +int +pace_tolower (int c) +{ + return tolower (c); +} + +PACE_INLINE +int +pace_toupper (int c) +{ + return toupper (c); +} diff --git a/PACE/pace/win32/dirent.c b/PACE/pace/win32/dirent.c new file mode 100644 index 00000000000..d04ea9c1ac9 --- /dev/null +++ b/PACE/pace/win32/dirent.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/dirent.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/dirent.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/dirent.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/dirent.h b/PACE/pace/win32/dirent.h new file mode 100644 index 00000000000..afa9f8cac4e --- /dev/null +++ b/PACE/pace/win32/dirent.h @@ -0,0 +1,46 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/dirent.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_DIRENT_H +#define PACE_DIRENT_H + +#include "pace/sys/types.h" +#include <dirent.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE DIR * pace_opendir (const char * dirname); + + PACE_INLINE struct dirent * pace_readdir (DIR * dirp); + + PACE_INLINE int pace_readdir_r (DIR * dirp, struct dirent * entry, + struct dirent ** result); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE void pace_rewinddir (DIR * dirp); + + PACE_INLINE int pace_closedir (DIR * dirp); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/dirent.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_DIRENT_H */ diff --git a/PACE/pace/win32/dirent.inl b/PACE/pace/win32/dirent.inl new file mode 100644 index 00000000000..fd5a5994b45 --- /dev/null +++ b/PACE/pace/win32/dirent.inl @@ -0,0 +1,58 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/dirent.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +DIR * +pace_opendir (const char * dirname) +{ + return opendir (dirname); +} + +PACE_INLINE +struct dirent * +pace_readdir (DIR * dirp) +{ + return readdir (dirp); +} + +PACE_INLINE +int +pace_readdir_r (DIR * dirp, struct dirent * entry, + struct dirent ** result) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return readdir_r (dirp, entry, result); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_UNUSED_ARG (dirp); + PACE_UNUSED_ARG (entry); + PACE_UNUSED_ARG (result); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +void +pace_rewinddir (DIR * dirp) +{ + rewinddir (dirp); + return; +} + +PACE_INLINE +int +pace_closedir (DIR * dirp) +{ + return closedir (dirp); +} diff --git a/PACE/pace/win32/fcntl.c b/PACE/pace/win32/fcntl.c new file mode 100644 index 00000000000..69183a1ba35 --- /dev/null +++ b/PACE/pace/win32/fcntl.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/fcntl.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/fcntl.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/fcntl.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/fcntl.h b/PACE/pace/win32/fcntl.h new file mode 100644 index 00000000000..755502bbf27 --- /dev/null +++ b/PACE/pace/win32/fcntl.h @@ -0,0 +1,54 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/fnctl.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_FCNTL_H +#define PACE_FCNTL_H + +#include "pace/sys/types.h" +#include "pace/unistd.h" +#include <sys/stat.h> +#include <fcntl.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_creat (const char * path, pace_mode_t mode); + + # define pace_fcntl(X) fcntl X + /* int fcntl (int fildes, int cmd, *//* arg *//* ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + # define pace_open(X) open X + /* int open (const char *path, int oflag, *//* pace_mode_t mode *//* ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/fcntl.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_FCNTL_H */ diff --git a/PACE/pace/win32/fcntl.inl b/PACE/pace/win32/fcntl.inl new file mode 100644 index 00000000000..79036ab5647 --- /dev/null +++ b/PACE/pace/win32/fcntl.inl @@ -0,0 +1,21 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/fcntl.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_creat (const char * path, pace_mode_t mode) +{ + return creat (path, mode); +} diff --git a/PACE/pace/win32/grp.c b/PACE/pace/win32/grp.c new file mode 100644 index 00000000000..59b11cbb739 --- /dev/null +++ b/PACE/pace/win32/grp.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/grp.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/grp.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/grp.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/grp.h b/PACE/pace/win32/grp.h new file mode 100644 index 00000000000..4ff45169ef1 --- /dev/null +++ b/PACE/pace/win32/grp.h @@ -0,0 +1,51 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace (posix ace) + * + * = FILENAME + * pace/posix/grp.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_GRP_H +#define PACE_GRP_H + +#include <grp.h> + +# if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +# endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE struct group * pace_getgrgid (pace_gid_t gid); + + PACE_INLINE int pace_getgrgid_r (pace_gid_t gid, + struct group * grp, + char * buffer, + size_t bufsize, + struct group ** result); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE struct group * pace_getgrnam (const char * name); + + PACE_INLINE int pace_getgrnam_r (const char * name, + struct group * grp, + char * buffer, + size_t bufsize, + struct group ** result); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + +# if defined (PACE_HAS_CPLUSPLUS) +} +# endif /* PACE_HAS_CPLUSPLUS */ + +# if defined (PACE_HAS_INLINE) +# include "pace/posix/grp.inl" +# endif /* PACE_HAS_INLINE */ + +#endif /* PACE_GRP_H */ diff --git a/PACE/pace/win32/grp.inl b/PACE/pace/win32/grp.inl new file mode 100644 index 00000000000..aa67a653946 --- /dev/null +++ b/PACE/pace/win32/grp.inl @@ -0,0 +1,68 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/grp.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +struct group * +pace_getgrgid (pace_gid_t gid) +{ + return getgrgid (gid); +} + +PACE_INLINE +int +pace_getgrgid_r (pace_gid_t gid, + struct group * grp, + char * buffer, + size_t bufsize, + struct group ** result) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return getgrgid_r (gid, grp, buffer, bufsize, result); +# else /* !PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_UNUSED_ARG (gid); + PACE_UNUSED_ARG (grp); + PACE_UNUSED_ARG (buffer); + PACE_UNUSED_ARG (bufsize); + PACE_UNUSED_ARG (result); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* !PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +struct group * +pace_getgrnam (const char * name) +{ + return getgrnam (name); +} + +PACE_INLINE +int +pace_getgrnam_r (const char * name, + struct group * grp, + char * buffer, + size_t bufsize, + struct group ** result) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return getgrnam_r (name, grp, buffer, bufsize, result); +# else /* !PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_UNUSED_ARG (name); + PACE_UNUSED_ARG (grp); + PACE_UNUSED_ARG (buffer); + PACE_UNUSED_ARG (bufsize); + PACE_UNUSED_ARG (result); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* !PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} diff --git a/PACE/pace/win32/limits.h b/PACE/pace/win32/limits.h new file mode 100644 index 00000000000..fb952113bbd --- /dev/null +++ b/PACE/pace/win32/limits.h @@ -0,0 +1,29 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace (posix ace) + * + * = FILENAME + * pace/posix/limits.h + * + * = AUTHOR + * Joe Hoffert + * + * ============================================================================ */ + +#ifndef PACE_LIMITS_H +#define PACE_LIMITS_H + +#include <limits.h> + +# if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +# endif /* (PACE_HAS_CPLUSPLUS) */ + +# if defined (PACE_HAS_CPLUSPLUS) +} +# endif /* PACE_HAS_CPLUSPLUS */ + +#endif /* PACE_LIMITS_H */ diff --git a/PACE/pace/win32/locale.c b/PACE/pace/win32/locale.c new file mode 100644 index 00000000000..3f818716eda --- /dev/null +++ b/PACE/pace/win32/locale.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/locale.c + * + * = AUTHOR + * Joe Hoffert + * + * ============================================================================= */ + +#include "pace/locale.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/locale.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/locale.h b/PACE/pace/win32/locale.h new file mode 100644 index 00000000000..d28b31381be --- /dev/null +++ b/PACE/pace/win32/locale.h @@ -0,0 +1,33 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/locale.h + * + * = AUTHOR + * Joe Hoffert + * + * =========================================================================== */ + +#ifndef PACE_LOCALE_H +#define PACE_LOCALE_H + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE char * pace_setlocale (int category, const char * locale); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/locale.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_LOCALE_H */ diff --git a/PACE/pace/win32/locale.inl b/PACE/pace/win32/locale.inl new file mode 100644 index 00000000000..85fa6d9b00b --- /dev/null +++ b/PACE/pace/win32/locale.inl @@ -0,0 +1,23 @@ +/* $Id$ -*- C -*- + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/locale.inl + * + * = AUTHOR + * Joe Hoffert + * + * =========================================================================== */ + +#include <locale.h> + +PACE_INLINE +char * +pace_setlocale (int category, const char * locale) +{ + return setlocale (category, locale); +} diff --git a/PACE/pace/win32/math.c b/PACE/pace/win32/math.c new file mode 100644 index 00000000000..8c2e32301fa --- /dev/null +++ b/PACE/pace/win32/math.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/math.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/math.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/math.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/math.h b/PACE/pace/win32/math.h new file mode 100644 index 00000000000..d477a0093bc --- /dev/null +++ b/PACE/pace/win32/math.h @@ -0,0 +1,75 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/math.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_MATH_H +#define PACE_MATH_H + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE double pace_acos (double x); + + PACE_INLINE double pace_asin (double x); + + PACE_INLINE double pace_atan (double x); + + PACE_INLINE double pace_atan2 (double x, double y); + + PACE_INLINE double pace_cos (double x); + + PACE_INLINE double pace_sin (double x); + + PACE_INLINE double pace_tan (double x); + + PACE_INLINE double pace_cosh (double x); + + PACE_INLINE double pace_sinh (double x); + + PACE_INLINE double pace_tanh (double x); + + PACE_INLINE double pace_exp (double x); + + PACE_INLINE double pace_frexp (double x, int * exp); + + PACE_INLINE double pace_ldexp (double x, int exp); + + PACE_INLINE double pace_log (double x); + + PACE_INLINE double pace_log10 (double x); + + PACE_INLINE double pace_modf (double x, double * iptr); + + PACE_INLINE double pace_pow (double x, double y); + + PACE_INLINE double pace_sqrt (double x); + + PACE_INLINE double pace_ceil (double x); + + PACE_INLINE double pace_fabs (double x); + + PACE_INLINE double pace_floor (double x); + + PACE_INLINE double pace_fmod (double x, double y); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/math.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_MATH_H */ diff --git a/PACE/pace/win32/math.inl b/PACE/pace/win32/math.inl new file mode 100644 index 00000000000..c3047620d51 --- /dev/null +++ b/PACE/pace/win32/math.inl @@ -0,0 +1,171 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/math.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include <math.h> + +PACE_INLINE +double +pace_acos (double x) +{ + return acos (x); +} + +PACE_INLINE +double +pace_asin (double x) +{ + return asin (x); +} + +PACE_INLINE +double +pace_atan (double x) +{ + return atan (x); +} + +PACE_INLINE +double +pace_atan2 (double x, double y) +{ + return atan2 (x, y); +} + +PACE_INLINE +double +pace_cos (double x) +{ + return cos (x); +} + +PACE_INLINE +double +pace_sin (double x) +{ + return sin (x); +} + +PACE_INLINE +double +pace_tan (double x) +{ + return tan (x); +} + +PACE_INLINE +double +pace_cosh (double x) +{ + return cosh (x); +} + +PACE_INLINE +double +pace_sinh (double x) +{ + return sinh (x); +} + +PACE_INLINE +double +pace_tanh (double x) +{ + return tanh (x); +} + +PACE_INLINE +double +pace_exp (double x) +{ + return exp (x); +} + +PACE_INLINE +double +pace_frexp (double x, int * exp) +{ + return frexp (x, exp); +} + +PACE_INLINE +double +pace_ldexp (double x, int exp) +{ + return ldexp (x, exp); +} + +PACE_INLINE +double +pace_log (double x) +{ + return log (x); +} + +PACE_INLINE +double +pace_log10 (double x) +{ + return log10 (x); +} + +PACE_INLINE +double +pace_modf (double x, double * iptr) +{ + return modf (x, iptr); +} + +PACE_INLINE +double +pace_pow (double x, double y) +{ + return pow (x, y); +} + +PACE_INLINE +double +pace_sqrt (double x) +{ + return sqrt (x); +} + +PACE_INLINE +double +pace_ceil (double x) +{ + return ceil (x); +} + +PACE_INLINE +double +pace_fabs (double x) +{ + return fabs (x); +} + +PACE_INLINE +double +pace_floor (double x) +{ + return floor (x); +} + +PACE_INLINE +double +pace_fmod (double x, double y) +{ + return fmod (x, y); +} + diff --git a/PACE/pace/win32/mman.c b/PACE/pace/win32/mman.c new file mode 100644 index 00000000000..b68b87baa22 --- /dev/null +++ b/PACE/pace/win32/mman.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/mman.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/sys/mman.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/mman.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/mman.h b/PACE/pace/win32/mman.h new file mode 100644 index 00000000000..982b6c73f75 --- /dev/null +++ b/PACE/pace/win32/mman.h @@ -0,0 +1,66 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/mman.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SYS_MMAN_H +#define PACE_SYS_MMAN_H + +#include <sys/mman.h> + +#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 (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 "pace/posix/mman.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SYS_MMAN_H */ diff --git a/PACE/pace/win32/mman.inl b/PACE/pace/win32/mman.inl new file mode 100644 index 00000000000..ff233602591 --- /dev/null +++ b/PACE/pace/win32/mman.inl @@ -0,0 +1,107 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/mman.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_mlock (const void * addr, size_t len) +{ + return mlock (((char*)addr), len); +} + +PACE_INLINE +int +pace_mlockall (int flags) +{ + return mlockall (flags); +} + +PACE_INLINE +void * +pace_mmap (void * addr, + size_t len, + int prot, + int flags, + int fildes, + pace_off_t off) +{ + return mmap ((char *) addr, len, prot, flags, fildes, off); +} + +PACE_INLINE +int +pace_munlock (const void * addr, size_t len) +{ + return munlock (((char*)addr), len); +} + +PACE_INLINE +int +pace_mprotect (void * addr, + size_t len, + int prot) +{ + return mprotect (addr, len, prot); +} + +PACE_INLINE +int +pace_msync (void * addr, + size_t len, + int flags) +{ + return msync (addr, len, flags); +} + +PACE_INLINE +int +pace_munlockall () +{ + return munlockall (); +} + +PACE_INLINE +int +pace_munmap (void * addr, size_t len) +{ + return munmap ((char *) addr, len); +} + +PACE_INLINE +int +pace_shm_open (const char * name, + int oflag, + pace_mode_t mode) +{ +# if (PACE_POSIX_C_SOURCE > 2) + return shm_open (name, oflag, mode); +# else /* ! PACE_POSIX_C_SOURCE */ + PACE_UNUSED_ARG (name); + PACE_UNUSED_ARG (oflag); + PACE_UNUSED_ARG (mode); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_POSIX_C_SOURCE */ +} + +PACE_INLINE +int +pace_shm_unlink (const char * name) +{ +# if (PACE_POSIX_C_SOURCE > 2) + return shm_unlink (name); +# else /* ! PACE_POSIX_C_SOURCE */ + PACE_UNUSED_ARG (name); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_POSIX_C_SOURCE */ +} diff --git a/PACE/pace/win32/mqueue.c b/PACE/pace/win32/mqueue.c new file mode 100644 index 00000000000..32937ccb02e --- /dev/null +++ b/PACE/pace/win32/mqueue.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace (posix ace) + * + * = FILENAME + * pace/posix/mqueue.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/mqueue.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/mqueue.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/mqueue.h b/PACE/pace/win32/mqueue.h new file mode 100644 index 00000000000..d6bf93be666 --- /dev/null +++ b/PACE/pace/win32/mqueue.h @@ -0,0 +1,65 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/mqueue.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_MQUEUE_H +#define PACE_MQUEUE_H + +#include <mqueue.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_mq_close (mqd_t mqdes); + + PACE_INLINE int pace_mq_getattr (mqd_t mqdes, + struct mq_attr * mqstat); + + PACE_INLINE int pace_mq_notify (mqd_t mqdes, + const struct sigevent * notification); + + # define pace_mq_open(X) mq_open X + /* mqd_t mq_open (const char *name, int oflag, (*//* args *//*) ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE ssize_t pace_mq_receive (mqd_t mqdes, + char * msg_ptr, + size_t msg_len, + unsigned int * nmsg_prio); + + PACE_INLINE int pace_mq_send (mqd_t mqdes, + const char * mst_ptr, + size_t msg_len, + unsigned int psg_prio); + + PACE_INLINE int pace_mq_setattr (mqd_t mqdes, + const struct mq_attr * mqstat, + struct mq_attr * omqstat); + + PACE_INLINE int pace_mq_unlink (const char * name); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/mqueue.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_MQUEUE_H */ diff --git a/PACE/pace/win32/mqueue.inl b/PACE/pace/win32/mqueue.inl new file mode 100644 index 00000000000..63b66c87218 --- /dev/null +++ b/PACE/pace/win32/mqueue.inl @@ -0,0 +1,73 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/mqueue.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_mq_close (mqd_t mqdes) +{ + return mq_close (mqdes); +} + +PACE_INLINE +int +pace_mq_getattr (mqd_t mqdes, + struct mq_attr * mqstat) +{ + return mq_getattr (mqdes, mqstat); +} + +PACE_INLINE +int +pace_mq_notify (mqd_t mqdes, + const struct sigevent * notification) +{ + return mq_notify (mqdes, notification); +} + +PACE_INLINE +ssize_t +pace_mq_receive (mqd_t mqdes, + char * msg_ptr, + size_t msg_len, + unsigned int * msg_prio) +{ + return mq_receive (mqdes, msg_ptr, msg_len, msg_prio); +} + +PACE_INLINE +int +pace_mq_send (mqd_t mqdes, + const char * msg_ptr, + size_t msg_len, + unsigned int msg_prio) +{ + return mq_send (mqdes, msg_ptr, msg_len, msg_prio); +} + +PACE_INLINE +int +pace_mq_setattr (mqd_t mqdes, + const struct mq_attr * mqstat, + struct mq_attr * omqstat) +{ + return mq_setattr (mqdes, mqstat, omqstat); +} + +PACE_INLINE +int +pace_mq_unlink (const char * name) +{ + return mq_unlink (name); +} diff --git a/PACE/pace/win32/pthread.c b/PACE/pace/win32/pthread.c new file mode 100644 index 00000000000..426c377c446 --- /dev/null +++ b/PACE/pace/win32/pthread.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/pthread.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/pthread.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/pthread.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/pthread.h b/PACE/pace/win32/pthread.h new file mode 100644 index 00000000000..7fe07119ac8 --- /dev/null +++ b/PACE/pace/win32/pthread.h @@ -0,0 +1,211 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/pthread.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_PTHREAD_H +#define PACE_PTHREAD_H + +#include "pace/sys/types.h" +#include "pace/signal.h" +#include <pthread.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_pthread_atfork (void (*prepare) (), + void (*parent) (), + void (*child) ()); + + PACE_INLINE int pace_pthread_attr_destroy (pace_pthread_attr_t * attr); + + PACE_INLINE int pace_pthread_attr_getdetachstate (const pace_pthread_attr_t * attr, + int * detachstate); + + PACE_INLINE int pace_pthread_attr_getinheritsched (const pace_pthread_attr_t * attr, + int * inheritsched); + + PACE_INLINE int pace_pthread_attr_getschedparam (const pace_pthread_attr_t * attr, + struct sched_param * param); + + PACE_INLINE int pace_pthread_attr_getschedpolicy (const pace_pthread_attr_t * attr, + int * policy); + + PACE_INLINE int pace_pthread_attr_getscope (const pace_pthread_attr_t * attr, + int * contentionscope); + + PACE_INLINE int pace_pthread_attr_getstackaddr (const pace_pthread_attr_t * attr, + void ** stackaddr); + + PACE_INLINE int pace_pthread_attr_getstacksize (const pace_pthread_attr_t * attr, + size_t * stacksize); + + PACE_INLINE int pace_pthread_attr_init (pace_pthread_attr_t * attr); + + PACE_INLINE int pace_pthread_attr_setdetachstate (pace_pthread_attr_t * attr, + int detachstate); + + PACE_INLINE int pace_pthread_attr_setinheritsched (pace_pthread_attr_t * attr, + int inheritsched); + + PACE_INLINE int pace_pthread_attr_setschedparam (pace_pthread_attr_t * attr, + const struct + sched_param * param); + + PACE_INLINE int pace_pthread_attr_setschedpolicy (pace_pthread_attr_t * attr, + int policy); + + PACE_INLINE int pace_pthread_attr_setscope (pace_pthread_attr_t * attr, + int contentionscope); + + PACE_INLINE int pace_pthread_attr_setstackaddr (pace_pthread_attr_t * attr, + void * stackaddr); + + PACE_INLINE int pace_pthread_attr_setstacksize (pace_pthread_attr_t * attr, + size_t stacksize); + + PACE_INLINE int pace_pthread_cancel (pace_pthread_t thread); + + PACE_INLINE void pace_pthread_cleanup_push (void (*routine)(void*), void * arg); + + PACE_INLINE void pace_pthread_cleanup_pop (int execute); + + # define PACE_PTHREAD_COND_INITIALIZER PTHREAD_COND_INITIALIZER + + PACE_INLINE int pace_pthread_cond_broadcast (pace_pthread_cond_t * cond); + + PACE_INLINE int pace_pthread_cond_destroy (pace_pthread_cond_t * cond); + + PACE_INLINE int pace_pthread_cond_init (pace_pthread_cond_t * cond, + const pace_pthread_condattr_t * attr); + + PACE_INLINE int pace_pthread_cond_signal (pace_pthread_cond_t * cond); + + PACE_INLINE int pace_pace_pthread_cond_timedwait (pthread_cond_t * cond, + pace_pthread_mutex_t * mutex, + const struct timespec * abstime); + + PACE_INLINE int pace_pthread_cond_wait (pace_pthread_cond_t * cond, + pace_pthread_mutex_t * mutex); + + PACE_INLINE int pace_pthread_condattr_destroy (pace_pthread_condattr_t * attr); + + PACE_INLINE int pace_pthread_condattr_getpshared (const pace_pthread_condattr_t * attr, + int * pshared); + + PACE_INLINE int pace_pthead_condattr_init (pace_pthread_condattr_t * attr); + + PACE_INLINE int pace_pthread_condattr_setpshared (pace_pthread_condattr_t * attr, + int pshared); + + PACE_INLINE int pace_pthread_create (pace_pthread_t * thread, + const pace_pthread_attr_t * attr, + void * (*start_routine) (void*), + void * arg); + + PACE_INLINE int pace_pthread_detach (pace_pthread_t thread); + + PACE_INLINE int pace_pthread_equal (pace_pthread_t t1, pthread_t t2); + + PACE_INLINE void pace_pthread_exit (void * value_ptr); + + PACE_INLINE int pace_pthread_getschedparam (pace_pthread_t thread, + int * policy, + struct sched_param * param); + + PACE_INLINE void * pace_pthread_getspecific (pace_pthread_key_t key); + + PACE_INLINE int pace_pthread_join (pace_pthread_t thread, void ** value_ptr); + + PACE_INLINE int pace_pthread_key_create (pace_pthread_key_t * key, + void (*destructor)(void*)); + + PACE_INLINE int pace_pthread_key_delete (pace_pthread_key_t key); + + PACE_INLINE int pace_pthread_kill (pace_pthread_t thread, int sig); + + # define PACE_PTHREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER + + PACE_INLINE int pace_pthread_mutex_destroy (pace_pthread_mutex_t * mutex); + + PACE_INLINE int pace_pthread_mutex_getprioceiling (pace_pthread_mutex_t * mutex, + int * prioceiling); + + PACE_INLINE int pace_pthread_mutex_init (pace_pthread_mutex_t * mutex, + const pace_pthread_mutexattr_t * attr); + + PACE_INLINE int pace_pthread_mutex_lock (pace_pthread_mutex_t * mutex); + + PACE_INLINE int pace_pthread_mutex_setprioceiling (pace_pthread_mutex_t * mutex, + int prioceiling, + int * old_ceiling); + + PACE_INLINE int pace_pthread_mutex_trylock (pthread_mutex_t * mutex); + + PACE_INLINE int pace_pthread_mutex_unlock (pace_pthread_mutex_t * mutex); + + PACE_INLINE int pace_pthread_mutexattr_destroy (pace_pthread_mutexattr_t * sttr); + + PACE_INLINE int pace_pthread_mutexattr_getprioceiling (pace_pthread_mutexattr_t * attr, + int * prioceiling); + + PACE_INLINE int pace_pthread_mutexattr_getprotocol + (const pace_pthread_mutexattr_t * attr, int * protocol); + + PACE_INLINE int pace_pthread_mutexattr_setprioceiling (pace_pthread_mutexattr_t * attr, + int prioceiling); + + PACE_INLINE int pace_pthread_mutexattr_setprotocol (pace_pthread_mutexattr_t * attr, + int protocol); + PACE_INLINE int + pace_pthread_mutexattr_getpshared (const pace_pthread_mutexattr_t * attr, + int * pshared); + + PACE_INLINE int pace_pthread_mutexattr_init (pace_pthread_mutexattr_t * attr); + + PACE_INLINE int pace_pthread_mutexattr_setpshared (pace_pthread_mutexattr_t * attr, + int pshared); + + PACE_INLINE int pace_pthread_once (pace_pthread_once_t * once_control, + void (*void_routine) ()); + + # define PACE_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT + + PACE_INLINE pace_pthread_t pace_pthread_self (); + + PACE_INLINE int pace_pthread_setcancelstate (int state, int * oldstate); + + PACE_INLINE int pace_pthread_setcanceltype (int type, int * oldtype); + + PACE_INLINE int pace_pthread_setschedparam (pace_pthread_t thread, + int policy, + const struct sched_param * param); + + PACE_INLINE int pace_pthread_setspecific (pace_pthread_key_t key, const void * value); + + PACE_INLINE int pace_pthread_sigmask (int how, + const sigset_t * set, + sigset_t * oset); + + PACE_INLINE void pace_pthread_testcancel (); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/pthread.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_PTHREAD_H */ diff --git a/PACE/pace/win32/pthread.inl b/PACE/pace/win32/pthread.inl new file mode 100644 index 00000000000..661624977e7 --- /dev/null +++ b/PACE/pace/win32/pthread.inl @@ -0,0 +1,504 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/pthread.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/unistd.h" + +PACE_INLINE +int +pace_pthread_atfork (void (*prepare) (), + void (*parent) (), + void (*child) ()) +{ + return pthread_atfork (prepare, parent, child); +} + +PACE_INLINE +int +pace_pthread_attr_destroy (pace_pthread_attr_t * attr) +{ + return pthread_attr_destroy (attr); +} + +PACE_INLINE +int +pace_pthread_attr_getdetachstate (const pace_pthread_attr_t * attr, + int * detachstate) +{ + return pthread_attr_getdetachstate (attr, detachstate); +} + +PACE_INLINE +int +pace_pthread_attr_getinheritsched (const pace_pthread_attr_t * attr, + int * inheritsched) +{ + return pthread_attr_getinheritsched (attr, inheritsched); +} + +PACE_INLINE +int +pace_pthread_attr_getschedparam (const pace_pthread_attr_t * attr, + struct sched_param * param) +{ + return pthread_attr_getschedparam (attr, param); +} + +PACE_INLINE +int +pace_pthread_attr_getschedpolicy (const pace_pthread_attr_t * attr, + int * policy) +{ + return pthread_attr_getschedpolicy (attr, policy); +} + +PACE_INLINE +int +pace_pthread_attr_getscope (const pace_pthread_attr_t * attr, + int * contentionscope) +{ + return pthread_attr_getscope (attr, contentionscope); +} + +PACE_INLINE +int +pace_pthread_attr_getstackaddr (const pace_pthread_attr_t * attr, + void ** stackaddr) +{ + return pthread_attr_getstackaddr (attr, stackaddr); +} + +PACE_INLINE +int +pace_pthread_attr_getstacksize (const pace_pthread_attr_t * attr, + size_t * stacksize) +{ + return pthread_attr_getstacksize (attr, stacksize); +} + +PACE_INLINE +int +pace_pthread_attr_init (pace_pthread_attr_t * attr) +{ + return pthread_attr_init (attr); +} + +PACE_INLINE +int +pace_pthread_attr_setdetachstate (pace_pthread_attr_t * attr, + int detachstate) +{ + return pthread_attr_setdetachstate (attr, detachstate); +} + +PACE_INLINE +int +pace_pthread_attr_setinheritsched (pace_pthread_attr_t * attr, + int inheritsched) +{ + return pthread_attr_setinheritsched (attr, inheritsched); +} + +PACE_INLINE +int +pace_pthread_attr_setschedparam (pace_pthread_attr_t * attr, + const struct sched_param * param) +{ + return pthread_attr_setschedparam (attr, param); +} + +PACE_INLINE +int +pace_pthread_attr_setschedpolicy (pace_pthread_attr_t * attr, + int policy) +{ + return pthread_attr_setschedpolicy (attr, policy); +} + +PACE_INLINE +int +pace_pthread_attr_setscope (pace_pthread_attr_t * attr, + int contentionscope) +{ + return pthread_attr_setscope (attr, contentionscope); +} + +PACE_INLINE +int +pace_pthread_attr_setstackaddr (pace_pthread_attr_t * attr, + void * stackaddr) +{ + return pthread_attr_setstackaddr (attr, stackaddr); +} + +PACE_INLINE +int +pace_pthread_attr_setstacksize (pace_pthread_attr_t * attr, + size_t stacksize) +{ + return pthread_attr_setstacksize (attr, stacksize); +} + +PACE_INLINE +int +pace_pthread_cancel (pace_pthread_t thread) +{ + return pthread_cancel (thread); +} + +PACE_INLINE +void +pace_pthread_cleanup_push (void (*routine)(void*), void * arg) +{ + pthread_cleanup_push (routine, arg); + return; +} + +PACE_INLINE +void +pace_pthread_cleanup_pop (int execute) +{ + pthread_cleanup_pop (execute); + return; +} + +PACE_INLINE +int +pace_pthread_cond_broadcast (pace_pthread_cond_t * cond) +{ + return pthread_cond_broadcast (cond); +} + +PACE_INLINE +int +pace_pthread_cond_destroy (pace_pthread_cond_t * cond) +{ + return pthread_cond_destroy (cond); +} + +PACE_INLINE +int +pace_pthread_cond_init (pace_pthread_cond_t * cond, + const pace_pthread_condattr_t * attr) +{ + return pthread_cond_init (cond, attr); +} + +PACE_INLINE +int +pace_pthread_cond_signal (pace_pthread_cond_t * cond) +{ + return pthread_cond_signal (cond); +} + +PACE_INLINE +int +pace_pace_pthread_cond_timedwait (pthread_cond_t * cond, + pace_pthread_mutex_t * mutex, + const struct timespec * abstime) +{ + return pthread_cond_timedwait (cond, mutex, abstime); +} + +PACE_INLINE +int +pace_pthread_cond_wait (pace_pthread_cond_t * cond, + pace_pthread_mutex_t * mutex) +{ + return pthread_cond_wait (cond, mutex); +} + +PACE_INLINE +int +pace_pthread_condattr_destroy (pace_pthread_condattr_t * attr) +{ + return pthread_condattr_destroy (attr); +} + +PACE_INLINE +int +pace_pthread_condattr_getpshared (const pace_pthread_condattr_t * attr, + int * pshared) +{ + return pthread_condattr_getpshared (attr, pshared); +} + +PACE_INLINE +int +pace_pthead_condattr_init (pace_pthread_condattr_t * attr) +{ + return pthread_condattr_init (attr); +} + +PACE_INLINE +int +pace_pthread_condattr_setpshared (pace_pthread_condattr_t * attr, + int pshared) +{ + return pthread_condattr_setpshared (attr, pshared); +} + +PACE_INLINE +int +pace_pthread_create (pace_pthread_t * thread, + const pace_pthread_attr_t * attr, + void * (*start_routine) (void*), + void * arg) +{ + return pthread_create (thread, attr, start_routine, arg); +} + +PACE_INLINE +int +pace_pthread_detach (pace_pthread_t thread) +{ + return pthread_detach (thread); +} + +PACE_INLINE +int +pace_pthread_equal (pace_pthread_t t1, pthread_t t2) +{ + return pthread_equal (t1, t2); +} + +PACE_INLINE +void +pace_pthread_exit (void * value_ptr) +{ + pthread_exit (value_ptr); + return; +} + +PACE_INLINE +int +pace_pthread_getschedparam (pace_pthread_t thread, + int * policy, + struct sched_param * param) +{ + return pthread_getschedparam (thread, policy, param); +} + +PACE_INLINE +void * +pace_pthread_getspecific (pace_pthread_key_t key) +{ + return pthread_getspecific (key); +} + +PACE_INLINE +int +pace_pthread_join (pace_pthread_t thread, void ** value_ptr) +{ + return pthread_join (thread, value_ptr); +} + +PACE_INLINE +int +pace_pthread_key_create (pace_pthread_key_t * key, + void (*destructor)(void*)) +{ + return pthread_key_create (key, destructor); +} + +PACE_INLINE +int +pace_pthread_key_delete (pace_pthread_key_t key) +{ + return pthread_key_delete (key); +} + +PACE_INLINE +int +pace_pthread_kill (pace_pthread_t thread, int sig) +{ + return pthread_kill (thread, sig); +} + +PACE_INLINE +int +pace_pthread_mutex_destroy (pace_pthread_mutex_t * mutex) +{ + return pthread_mutex_destroy (mutex); +} + +PACE_INLINE +int +pace_pthread_mutex_getprioceiling (pace_pthread_mutex_t * mutex, + int * prioceiling) +{ + return pthread_mutex_getprioceiling (mutex, prioceiling); +} + +PACE_INLINE +int +pace_pthread_mutex_init (pace_pthread_mutex_t * mutex, + const pace_pthread_mutexattr_t * attr) +{ + return pthread_mutex_init (mutex, attr); +} + +PACE_INLINE +int +pace_pthread_mutex_lock (pace_pthread_mutex_t * mutex) +{ + return pthread_mutex_lock (mutex); +} + +PACE_INLINE +int +pace_pthread_mutex_setprioceiling (pace_pthread_mutex_t * mutex, + int prioceiling, + int * old_ceiling) +{ + return pthread_mutex_setprioceiling (mutex, prioceiling, old_ceiling); +} + +PACE_INLINE +int +pace_pthread_mutex_trylock (pthread_mutex_t * mutex) +{ + return pthread_mutex_trylock (mutex); +} + +PACE_INLINE +int +pace_pthread_mutex_unlock (pace_pthread_mutex_t * mutex) +{ + return pthread_mutex_unlock (mutex); +} + +PACE_INLINE +int +pace_pthread_mutexattr_destroy (pace_pthread_mutexattr_t * attr) +{ + return pthread_mutexattr_destroy (attr); +} + +PACE_INLINE +int +pace_pthread_mutexattr_getprioceiling (pace_pthread_mutexattr_t * attr, + int * prioceiling) +{ + return pthread_mutexattr_getprioceiling (attr, prioceiling); +} + +PACE_INLINE +int +pace_pthread_mutexattr_getprotocol (const pace_pthread_mutexattr_t * attr, + int * protocol) +{ + return pthread_mutexattr_getprotocol (attr, protocol); +} + +PACE_INLINE +int +pace_pthread_mutexattr_setprioceiling (pace_pthread_mutexattr_t * attr, + int prioceiling) +{ + return pthread_mutexattr_setprioceiling (attr, prioceiling); +} + +PACE_INLINE +int +pace_pthread_mutexattr_setprotocol (pace_pthread_mutexattr_t * attr, + int protocol) +{ + return pthread_mutexattr_setprotocol (attr, protocol); +} + +PACE_INLINE +int +pace_pthread_mutexattr_getpshared (const pace_pthread_mutexattr_t * attr, + int * pshared) +{ + return pthread_mutexattr_getpshared (attr, pshared); +} + +PACE_INLINE +int +pace_pthread_mutexattr_init (pace_pthread_mutexattr_t * attr) +{ + return pthread_mutexattr_init (attr); +} + +PACE_INLINE +int +pace_pthread_mutexattr_setpshared (pace_pthread_mutexattr_t * attr, + int pshared) +{ + return pthread_mutexattr_setpshared (attr, pshared); +} + +PACE_INLINE +int +pace_pthread_once (pace_pthread_once_t * once_control, + void (*void_routine) ()) +{ + return pthread_once (once_control, void_routine); +} + +PACE_INLINE +pace_pthread_t +pace_pthread_self () +{ + return pthread_self (); +} + +PACE_INLINE +int +pace_pthread_setcancelstate (int state, int * oldstate) +{ + return pthread_setcancelstate (state, oldstate); +} + +PACE_INLINE +int +pace_pthread_setcanceltype (int type, int * oldtype) +{ + return pthread_setcanceltype (type, oldtype); +} + + +PACE_INLINE +int +pace_pthread_setschedparam (pace_pthread_t thread, + int policy, + const struct sched_param * param) +{ + return pthread_setschedparam (thread, policy, param); +} + +PACE_INLINE +int +pace_pthread_setspecific (pace_pthread_key_t key, const void * value) +{ + return pthread_setspecific (key, value); +} + +PACE_INLINE +int +pace_pthread_sigmask (int how, const sigset_t * set, + sigset_t * oset) +{ + return pthread_sigmask (how, set, oset); +} + +PACE_INLINE +void +pace_pthread_testcancel () +{ + pthread_testcancel (); + return; +} diff --git a/PACE/pace/win32/pwd.c b/PACE/pace/win32/pwd.c new file mode 100644 index 00000000000..6284186cd66 --- /dev/null +++ b/PACE/pace/win32/pwd.c @@ -0,0 +1,20 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/pwd.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/pwd.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/pwd.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/pwd.h b/PACE/pace/win32/pwd.h new file mode 100644 index 00000000000..b62a2dabacb --- /dev/null +++ b/PACE/pace/win32/pwd.h @@ -0,0 +1,51 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/pwd.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_PWD_H +#define PACE_PWD_H + +#include <pwd.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE struct passwd * pace_getpwuid (uid_t uid); + + PACE_INLINE int pace_getpwuid_r (uid_t uid, + struct passwd * pwd, + char * buffer, + size_t bufsize, + struct passwd ** result); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE struct passwd * pace_getpwnam (const char * name); + + PACE_INLINE int pace_getpwnam_r (const char * name, + struct passwd * pwd, + char * buffer, + size_t bufsize, + struct passwd ** result); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/pwd.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_PWD_H */ diff --git a/PACE/pace/win32/pwd.inl b/PACE/pace/win32/pwd.inl new file mode 100644 index 00000000000..57fc6393638 --- /dev/null +++ b/PACE/pace/win32/pwd.inl @@ -0,0 +1,58 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/pwd.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +struct passwd * +pace_getpwuid (uid_t uid) +{ + return getpwuid (uid); +} + +PACE_INLINE +int +pace_getpwuid_r (uid_t uid, + struct passwd * pwd, + char * buffer, + size_t bufsize, + struct passwd ** result) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return getpwuid_r (uid, pwd, buffer, bufsize, result); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +struct passwd * +pace_getpwnam (const char * name) +{ + return getpwnam (name); +} + +PACE_INLINE +int +pace_getpwnam_r (const char * name, + struct passwd * pwd, + char * buffer, + size_t bufsize, + struct passwd ** result) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return getpwnam_r (name, pwd, buffer, bufsize, result); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} diff --git a/PACE/pace/win32/sched.c b/PACE/pace/win32/sched.c new file mode 100644 index 00000000000..d78a66dbc7f --- /dev/null +++ b/PACE/pace/win32/sched.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/sched.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/sched.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/sched.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/sched.h b/PACE/pace/win32/sched.h new file mode 100644 index 00000000000..f7e9e9abd30 --- /dev/null +++ b/PACE/pace/win32/sched.h @@ -0,0 +1,54 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/sched.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SCHED_H +#define PACE_SCHED_H + +#include <sched.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_sched_get_priority_max (int policy); + + PACE_INLINE int pace_sched_get_priority_min (int policy); + + PACE_INLINE int pace_sched_getparam (pid_t pid, + struct sched_param * param); + + PACE_INLINE int pace_sched_rr_get_interval (pid_t pid, + struct timespec * interval); + + PACE_INLINE int pace_sched_setparam (pid_t pid, + const struct sched_param * param); + + PACE_INLINE int pace_sched_getscheduler (pid_t pid); + + PACE_INLINE int pace_sched_setscheduler (pid_t pid, + int policy, + const struct sched_param * param); + + PACE_INLINE int pace_sched_yield (); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/sched.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SCHED_H */ diff --git a/PACE/pace/win32/sched.inl b/PACE/pace/win32/sched.inl new file mode 100644 index 00000000000..60d184577d9 --- /dev/null +++ b/PACE/pace/win32/sched.inl @@ -0,0 +1,75 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/sched.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_sched_get_priority_max (int policy) +{ + return sched_get_priority_max (policy); +} + +PACE_INLINE +int +pace_sched_get_priority_min (int policy) +{ + return sched_get_priority_min (policy); +} + +PACE_INLINE +int +pace_sched_getparam (pid_t pid, + struct sched_param * param) +{ + return sched_getparam (pid, param); +} + +PACE_INLINE +int +pace_sched_rr_get_interval (pid_t pid, + struct timespec * interval) +{ + return sched_rr_get_interval (pid, interval); +} + +PACE_INLINE +int +pace_sched_setparam (pid_t pid, + const struct sched_param * param) +{ + return sched_setparam (pid, param); +} + +PACE_INLINE +int +pace_sched_getscheduler (pid_t pid) +{ + return sched_getscheduler (pid); +} + +PACE_INLINE +int +pace_sched_setscheduler (pid_t pid, + int policy, + const struct sched_param * param) +{ + return sched_setscheduler (pid, policy, param); +} + +PACE_INLINE +int +pace_sched_yield () +{ + return sched_yield (); +} diff --git a/PACE/pace/win32/semaphore.c b/PACE/pace/win32/semaphore.c new file mode 100644 index 00000000000..695190f4531 --- /dev/null +++ b/PACE/pace/win32/semaphore.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/semaphore.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/semaphore.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/semaphore.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/semaphore.h b/PACE/pace/win32/semaphore.h new file mode 100644 index 00000000000..e6ec9422f5e --- /dev/null +++ b/PACE/pace/win32/semaphore.h @@ -0,0 +1,57 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/semaphore.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SEMAPHORE_H +#define PACE_SEMAPHORE_H + +#include <semaphore.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_sem_close (sem_t * sem); + + PACE_INLINE int pace_sem_destroy (sem_t * sem); + + PACE_INLINE int pace_sem_getvalue (sem_t * sem, int * sval); + + PACE_INLINE int pace_sem_init (sem_t * sem, int pshared, unsigned int value); + + # define pace_sem_open(X) sem_open X + /* int fprintf (FILE *stream, const char *format, (*//* args *//*) ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE int pace_sem_post (sem_t * sem); + + PACE_INLINE int pace_sem_trywait (sem_t * sem); + + PACE_INLINE int pace_sem_unlink (const char * name); + + PACE_INLINE int pace_sem_wait (sem_t * sem); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/semaphore.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SEMAPHORE_H */ diff --git a/PACE/pace/win32/semaphore.inl b/PACE/pace/win32/semaphore.inl new file mode 100644 index 00000000000..6e0d761be6c --- /dev/null +++ b/PACE/pace/win32/semaphore.inl @@ -0,0 +1,70 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/semaphore.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_sem_close (sem_t * sem) +{ + return sem_close (sem); +} + +PACE_INLINE +int +pace_sem_destroy (sem_t * sem) +{ + return sem_destroy (sem); +} + +PACE_INLINE +int +pace_sem_getvalue (sem_t * sem, int * sval) +{ + return sem_getvalue (sem, sval); +} + +PACE_INLINE +int +pace_sem_init (sem_t * sem, int pshared, unsigned int value) +{ + return sem_init (sem, pshared, value); +} + +PACE_INLINE +int +pace_sem_post (sem_t * sem) +{ + return sem_post (sem); +} + +PACE_INLINE +int +pace_sem_trywait (sem_t * sem) +{ + return sem_trywait (sem); +} + +PACE_INLINE +int +pace_sem_unlink (const char * name) +{ + return sem_unlink (name); +} + +PACE_INLINE +int +pace_sem_wait (sem_t * sem) +{ + return sem_wait (sem); +} diff --git a/PACE/pace/win32/setjmp.c b/PACE/pace/win32/setjmp.c new file mode 100644 index 00000000000..00db5828a7c --- /dev/null +++ b/PACE/pace/win32/setjmp.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/setjmp.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/setjmp.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/setjmp.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/setjmp.h b/PACE/pace/win32/setjmp.h new file mode 100644 index 00000000000..6a8f1c581ba --- /dev/null +++ b/PACE/pace/win32/setjmp.h @@ -0,0 +1,37 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/setjmp.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SETJMP_H +#define PACE_SETJMP_H + +#include <setjmp.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_sigsetjmp (sigjmp_buf env, int savemask); + + PACE_INLINE void pace_siglongjmp (sigjmp_buf env, int val); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/setjmp.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SETJMP_H */ diff --git a/PACE/pace/win32/setjmp.inl b/PACE/pace/win32/setjmp.inl new file mode 100644 index 00000000000..5bd72aa329d --- /dev/null +++ b/PACE/pace/win32/setjmp.inl @@ -0,0 +1,29 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/setjmp.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_sigsetjmp (sigjmp_buf env, int savemask) +{ + return sigsetjmp (env, savemask); +} + +PACE_INLINE +void +pace_siglongjmp (sigjmp_buf env, int val) +{ + siglongjmp (env, val); + return; +} diff --git a/PACE/pace/win32/signal.c b/PACE/pace/win32/signal.c new file mode 100644 index 00000000000..380a3fec811 --- /dev/null +++ b/PACE/pace/win32/signal.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/signal.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/signal.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/signal.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/signal.h b/PACE/pace/win32/signal.h new file mode 100644 index 00000000000..adbf862073d --- /dev/null +++ b/PACE/pace/win32/signal.h @@ -0,0 +1,71 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/signal.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#ifndef PACE_SIGNAL_H +#define PACE_SIGNAL_H + +#include "pace/sys/types.h" +#include <signal.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_kill (pid_t pid, int sig); + + PACE_INLINE int pace_sigaction (int sig, + const struct sigaction * act, + struct sigaction * oact); + + PACE_INLINE int pace_sigaddset (sigset_t * set, int signo); + + PACE_INLINE int pace_sigemptyset (sigset_t * set); + + PACE_INLINE int pace_sigdelset (sigset_t * set, int signo); + + PACE_INLINE int pace_sigfillset (sigset_t * set); + + PACE_INLINE int pace_sigismember (const sigset_t * set, int signo); + + PACE_INLINE int pace_sigpending (sigset_t * set); + + PACE_INLINE int pace_sigprocmask (int how, + const sigset_t * set, + sigset_t * oset); + + PACE_INLINE int pace_sigqueue (pid_t pid, + int signo, + const union sigval value); + + PACE_INLINE int pace_sigsuspend (const sigset_t * sigmask); + + PACE_INLINE int pace_sigtimedwait (const sigset_t * set, + siginfo_t * info, + const struct timespec * timeout); + + PACE_INLINE int pace_sigwait (const sigset_t * set, int * sig); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_sigwaitinfo (const sigset_t * set, siginfo_t * info); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/signal.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SIGNAL_H */ diff --git a/PACE/pace/win32/signal.inl b/PACE/pace/win32/signal.inl new file mode 100644 index 00000000000..66c5de2918b --- /dev/null +++ b/PACE/pace/win32/signal.inl @@ -0,0 +1,122 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/signal.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_kill (pid_t pid, int sig) +{ + return kill (pid, sig); +} + +PACE_INLINE +int +pace_sigaction (int sig, const struct sigaction * act, + struct sigaction * oact) +{ + return sigaction (sig, act, oact); +} + +PACE_INLINE +int +pace_sigaddset (sigset_t * set, int signo) +{ + return sigaddset (set, signo); +} + +PACE_INLINE +int +pace_sigemptyset (sigset_t * set) +{ + return sigemptyset (set); +} + +PACE_INLINE +int +pace_sigdelset (sigset_t * set, int signo) +{ + return sigdelset (set, signo); +} + +PACE_INLINE +int +pace_sigfillset (sigset_t * set) +{ + return sigfillset (set); +} + +PACE_INLINE +int +pace_sigismember (const sigset_t * set, int signo) +{ + return sigismember (set, signo); +} + +PACE_INLINE +int +pace_sigpending (sigset_t * set) +{ + return sigpending (set); +} + +PACE_INLINE +int +pace_sigprocmask (int how, const sigset_t * set, + sigset_t * oset) +{ + return sigprocmask (how, set, oset); +} + +PACE_INLINE +int +pace_sigqueue (pid_t pid, int signo, + const union sigval value) +{ + return sigqueue (pid, signo, value); +} + +PACE_INLINE +int +pace_sigsuspend (const sigset_t * sigmask) +{ + return sigsuspend (sigmask); +} + +PACE_INLINE +int +pace_sigtimedwait (const sigset_t * set, siginfo_t * info, + const struct timespec * timeout) +{ + return sigtimedwait (set, info, timeout); +} + +PACE_INLINE +int +pace_sigwait (const sigset_t * set, int * sig) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return sigwait (set, sig); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_UNUSED_ARG (set); + PACE_UNUSED_ARG (sig); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_sigwaitinfo (const sigset_t *set, siginfo_t *info) +{ + return sigwaitinfo (set, info); +} diff --git a/PACE/pace/win32/stat.c b/PACE/pace/win32/stat.c new file mode 100644 index 00000000000..efd10b03f76 --- /dev/null +++ b/PACE/pace/win32/stat.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stat.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/sys/stat.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/stat.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/stat.h b/PACE/pace/win32/stat.h new file mode 100644 index 00000000000..49c8bda2ba6 --- /dev/null +++ b/PACE/pace/win32/stat.h @@ -0,0 +1,48 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stat.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SYS_STAT_H +#define PACE_SYS_STAT_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 "pace/posix/stat.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SYS_STAT_H */ diff --git a/PACE/pace/win32/stat.inl b/PACE/pace/win32/stat.inl new file mode 100644 index 00000000000..fc5eac836ac --- /dev/null +++ b/PACE/pace/win32/stat.inl @@ -0,0 +1,63 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stat.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_chmod (const char * path, pace_mode_t mode) +{ + return chmod (path, mode); +} + +PACE_INLINE +int +pace_fchmod (int fildes, pace_mode_t mode) +{ + return fchmod (fildes, mode); +} + +PACE_INLINE +int +pace_fstat (int fildes, struct stat * buf) +{ + return fstat (fildes, buf); +} + +PACE_INLINE +int +pace_mkdir (const char * path, pace_mode_t mode) +{ + return mkdir (path, mode); +} + +PACE_INLINE +int +pace_mkfifo (const char * path, pace_mode_t mode) +{ + return mkfifo (path, mode); +} + +PACE_INLINE +int +pace_stat (const char * path, struct stat * buf) +{ + return stat (path, buf); +} + +PACE_INLINE +pace_mode_t +pace_umask (pace_mode_t cmask) +{ + return umask (cmask); +} diff --git a/PACE/pace/win32/stdio.c b/PACE/pace/win32/stdio.c new file mode 100644 index 00000000000..251d6da309d --- /dev/null +++ b/PACE/pace/win32/stdio.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stdio.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/stdio.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/stdio.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/stdio.h b/PACE/pace/win32/stdio.h new file mode 100644 index 00000000000..13c3f5eb3fe --- /dev/null +++ b/PACE/pace/win32/stdio.h @@ -0,0 +1,183 @@ +/* $Id$ -*- C -*- + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stdio.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_STDIO_H +#define PACE_STDIO_H + +#include <stdio.h> +#include <stdarg.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + #define pace_stderr stderr; + + #define pace_stdout stdout; + + #define pace_stdin stdin; + + PACE_INLINE void pace_clearerr (FILE * stream); + + PACE_INLINE char * pace_ctermid (char * s); + + PACE_INLINE int pace_fclose (FILE * stream); + + PACE_INLINE FILE * pace_fdopen (int fildes, const char * type); + + PACE_INLINE int pace_ferror (FILE * stream); + + PACE_INLINE int pace_feof (FILE * stream); + + PACE_INLINE int pace_fflush (FILE * stream); + + PACE_INLINE int pace_fileno (FILE * stream); + + PACE_INLINE int pace_fgetc (FILE * stream); + + PACE_INLINE char * pace_fgets (char * s, int n, FILE * stream); + + PACE_INLINE void pace_flockfile (FILE * file); + /* Requires PACE_HAS_REENTRANT. */ + + PACE_INLINE FILE * pace_fopen (const char * filename, const char * mode); + + #define pace_fprintf(X) fprintf X + /* int fprintf (FILE *stream, const char *format, (*//* args *//*) ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE int pace_fputc (int c, FILE * stream); + + PACE_INLINE int pace_fputs (const char * s, FILE * stream); + + PACE_INLINE size_t pace_fread (void * ptr, + size_t size, + size_t number_of_items, + FILE * stream); + + PACE_INLINE FILE * pace_freopen (const char * filename, + const char * mode, + FILE * stream); + + #define pace_fscanf(X) fscanf X + /* int fscanf (FILE*stream, const char *format, ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE int pace_fseek (FILE * stream, long offset, int whence); + + PACE_INLINE long pace_ftell (FILE * stream); + + PACE_INLINE int pace_ftrylockfile (FILE * file); + /* Requires PACE_HAS_REENTRANT. */ + + PACE_INLINE void pace_funlockfile (FILE * file); + /* Requires PACE_HAS_REENTRANT. */ + + PACE_INLINE int pace_getc (FILE * stream); + + PACE_INLINE int pace_getc_unlocked (FILE * stream); + /* Requires PACE_HAS_REENTRANT. */ + + PACE_INLINE int pace_getchar (); + + PACE_INLINE int pace_getchar_unlocked (); + /* Requires PACE_HAS_REENTRANT. */ + + PACE_INLINE char *pace_gets (char * s); + + PACE_INLINE void pace_perror (const char * s); + + #define pace_printf(X) printf X + /* int printf (const char *format, (*//* args*//*) ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE int pace_putc (int c, FILE * stream); + + PACE_INLINE int pace_putc_unlocked (int c, FILE * stream); + /* Requires PACE_HAS_REENTRANT. */ + + PACE_INLINE int pace_putchar (int c); + + PACE_INLINE int pace_putchar_unlocked (int c); + /* Requires PACE_HAS_REENTRANT. */ + + PACE_INLINE int pace_puts (const char * s); + + PACE_INLINE int pace_remove (const char * path); + + PACE_INLINE int pace_rename (const char * old_name, + const char * new_name); + + PACE_INLINE void pace_rewind (FILE * stream); + + PACE_INLINE int pace_sprintf (char * buf, const char * format, ... ); + + #define pace_scanf(X) scanf X + /* int scanf (const char *format, ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE void pace_setbuf (FILE * stream, char * buf); + + #define pace_sscanf(X) sscanf X + /* int sscanf (const char *s, const char *format, ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + #define pace_snprintf(X) snprintf X + /* int snprintf (char *s, size_t n, const char *format, (*//* args*//*) ... ); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE FILE * pace_tmpfile (); + + PACE_INLINE char * pace_tmpnam (char * s); + + PACE_INLINE int pace_ungetc (int c, FILE * stream); + + PACE_INLINE int pace_vsprintf (char * buffer, + const char * format, + va_list argptr); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/stdio.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_STDIO_H */ diff --git a/PACE/pace/win32/stdio.inl b/PACE/pace/win32/stdio.inl new file mode 100644 index 00000000000..7358cfa89da --- /dev/null +++ b/PACE/pace/win32/stdio.inl @@ -0,0 +1,371 @@ +/* $Id$ -*- C -*- + + * =========================================================================== + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stdio.inl + * + * = AUTHOR + * Luther Baker + * + * =========================================================================== */ + +PACE_INLINE +void +pace_clearerr (FILE * stream) +{ + clearerr (stream); + return; +} + +PACE_INLINE +char * +pace_ctermid (char * s) +{ + return ctermid (s); +} + +PACE_INLINE +int +pace_fclose (FILE * stream) +{ + return fclose (stream); +} + +PACE_INLINE +FILE * +pace_fdopen (int fildes, + const char * type) +{ + return fdopen (fildes, + type); +} + +PACE_INLINE +int +pace_ferror (FILE * stream) +{ + return ferror (stream); +} + +PACE_INLINE +int +pace_feof (FILE * stream) +{ + return feof (stream); +} + +PACE_INLINE +int +pace_fflush (FILE * stream) +{ + return fflush (stream); +} + +PACE_INLINE +int +pace_fileno (FILE * stream) +{ + return fileno (stream); +} + +PACE_INLINE +int +pace_fgetc (FILE * stream) +{ + return fgetc (stream); +} + +PACE_INLINE +char * +pace_fgets (char * s, + int n, + FILE * stream) +{ + return fgets (s, + n, + stream); +} + +PACE_INLINE +void +pace_flockfile (FILE * file) +{ +#if defined (PACE_HAS_REENTRANT) + flockfile (file); +#else /* ! PACE_HAS_REENTRANT */ + PACE_UNUSED_ARG (file); + PACE_ERRNO_NO_SUPPORT (); +#endif /* ! PACE_HAS_REENTRANT */ + return; +} + +PACE_INLINE +FILE * +pace_fopen (const char * filename, + const char * mode) +{ + return fopen (filename, + mode); +} + +PACE_INLINE +int +pace_fputc (int c, + FILE * stream) +{ + return fputc (c, + stream); +} + +PACE_INLINE +int +pace_fputs (const char * s, + FILE * stream) +{ + return fputs (s, + stream); +} + +PACE_INLINE +size_t +pace_fread (void * ptr, + size_t size, + size_t number_of_items, + FILE * stream) +{ + return fread (ptr, + size, + number_of_items, + stream); +} + +PACE_INLINE +FILE * +pace_freopen (const char * filename, + const char * mode, + FILE * stream) +{ + return freopen (filename, + mode, + stream); +} + +PACE_INLINE +int +pace_fseek (FILE * stream, + long offset, + int whence) +{ + return fseek (stream, + offset, + whence); +} + +PACE_INLINE +long +pace_ftell (FILE * stream) +{ + return ftell (stream); +} + +PACE_INLINE +int +pace_ftrylockfile (FILE * file) +{ +#if defined (PACE_HAS_REENTRANT) + return ftrylockfile (file); +#else /* ! PACE_HAS_REENTRANT */ + PACE_UNUSED_ARG(file); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +#endif /* ! PACE_HAS_REENTRANT */ +} + +PACE_INLINE +void +pace_funlockfile (FILE * file) +{ +#if defined (PACE_HAS_REENTRANT) + funlockfile (file); +#else /* ! PACE_HAS_REENTRANT */ + PACE_UNUSED_ARG(file); + PACE_ERRNO_NO_SUPPORT (); +#endif /* ! PACE_HAS_REENTRANT */ + return; +} + +PACE_INLINE +int +pace_getc (FILE * stream) +{ + return getc (stream); +} + +PACE_INLINE +int +pace_getc_unlocked (FILE * stream) +{ +#if defined (PACE_HAS_REENTRANT) + return getc_unlocked (stream); +#else /* ! PACE_HAS_POSIX */ + PACE_UNUSED_ARG(stream); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +#endif /* ! PACE_HAS_POSIX */ +} + +PACE_INLINE +int +pace_getchar () +{ + return getchar (); +} + +PACE_INLINE +int +pace_getchar_unlocked () +{ +#if defined (PACE_HAS_REENTRANT) + return getchar_unlocked (); +#else /* ! PACE_HAS_REENTRANT */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +#endif /* ! PACE_HAS_REENTRANT */ +} + +PACE_INLINE +char * +pace_gets (char * s) +{ + return gets (s); +} + +PACE_INLINE +void +pace_perror (const char * s) +{ + perror (s); + return; +} + +PACE_INLINE +int +pace_putc (int c, + FILE * stream) +{ + return putc (c, stream); +} + +PACE_INLINE +int +pace_putc_unlocked (int c, + FILE * stream) +{ +#if defined (PACE_HAS_REENTRANT) + return putc_unlocked (c, stream); +#else /* ! PACE_HAS_REENTRANT */ + PACE_UNUSED_ARG(c); + PACE_UNUSED_ARG(stream); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +#endif /* ! PACE_HAS_REENTRANT */ +} + +PACE_INLINE +int +pace_putchar (int c) +{ + return putchar (c); +} + +PACE_INLINE +int +pace_putchar_unlocked (int c) +{ +#if defined (PACE_HAS_REENTRANT) + return putchar_unlocked (c); +#else /* ! PACE_HAS_REENTRANT */ + PACE_UNUSED_ARG(c); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +#endif /* ! PACE_HAS_REENTRANT */ +} + +PACE_INLINE +int +pace_puts (const char * s) +{ + return puts (s); +} + +PACE_INLINE +int +pace_remove (const char * path) +{ + return remove (path); +} + +PACE_INLINE +int +pace_rename (const char * old_name, + const char * new_name) +{ + return rename (old_name, + new_name); +} + +PACE_INLINE +void +pace_rewind (FILE * stream) +{ + rewind (stream); + return; +} + +PACE_INLINE +int +pace_sprintf (char * buf, const char * format, ... ) +{ + va_list ap; + va_start (ap, format); + vsprintf (buf, format, ap); + va_end (ap); + return 0; +} + +PACE_INLINE +void +pace_setbuf (FILE * stream, char * buf) +{ + setbuf (stream, buf); + return; +} + +PACE_INLINE +FILE * +pace_tmpfile () +{ + return tmpfile (); +} + +PACE_INLINE +char * +pace_tmpnam (char * s) +{ + return tmpnam (s); +} + +PACE_INLINE +int +pace_ungetc (int c, FILE * stream) +{ + return ungetc (c, stream); +} + +PACE_INLINE +int +pace_vsprintf (char * buffer, + const char * format, + va_list argptr) +{ + return vsprintf (buffer, format, argptr); +} diff --git a/PACE/pace/win32/stdlib.c b/PACE/pace/win32/stdlib.c new file mode 100644 index 00000000000..041a8bd0bbe --- /dev/null +++ b/PACE/pace/win32/stdlib.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stdlib.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/stdlib.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/stdlib.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/stdlib.h b/PACE/pace/win32/stdlib.h new file mode 100644 index 00000000000..a386afdd635 --- /dev/null +++ b/PACE/pace/win32/stdlib.h @@ -0,0 +1,53 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stdlib.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_STDLIB_H +#define PACE_STDLIB_H + +#include "pace/unistd.h" + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_atoi (const char * str); + + PACE_INLINE long pace_atol (const char * str); + + PACE_INLINE void pace_exit (int status); + + PACE_INLINE char * pace_getenv (const char * name); + + PACE_INLINE int pace_rand_r (unsigned int * seed); + + /* Memory Management. */ + + PACE_INLINE void * pace_malloc (size_t size); + + PACE_INLINE void * pace_calloc (size_t nelem, size_t elsize); + + PACE_INLINE void pace_free (void * ptr); + + PACE_INLINE void * pace_realloc (void * ptr, size_t size); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/stdlib.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_STDLIB_H */ diff --git a/PACE/pace/win32/stdlib.inl b/PACE/pace/win32/stdlib.inl new file mode 100644 index 00000000000..1133f1f1c38 --- /dev/null +++ b/PACE/pace/win32/stdlib.inl @@ -0,0 +1,83 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/stdlib.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include <stdlib.h> + +PACE_INLINE +int +pace_atoi (const char * str) +{ + return atoi (str); +} + +PACE_INLINE +long +pace_atol (const char * str) +{ + return atol (str); +} + +PACE_INLINE +void +pace_exit (int status) +{ + exit (status); + return; +} + +PACE_INLINE +char * +pace_getenv (const char * name) +{ + return getenv (name); +} + +PACE_INLINE +int +pace_rand_r (unsigned int *seed) +{ + return rand_r (seed); +} + +/* Memory Management. */ + +PACE_INLINE +void * +pace_malloc (size_t size) +{ + return malloc (size); +} + +PACE_INLINE +void * +pace_calloc (size_t nelem, size_t elsize) +{ + return calloc (nelem, elsize); +} + +PACE_INLINE +void +pace_free (void * ptr) +{ + free (ptr); + return; +} + +PACE_INLINE +void * +pace_realloc (void * ptr, size_t size) +{ + return realloc (ptr, size); +} diff --git a/PACE/pace/win32/string.c b/PACE/pace/win32/string.c new file mode 100644 index 00000000000..4d06077a947 --- /dev/null +++ b/PACE/pace/win32/string.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/string.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/string.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/string.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/string.h b/PACE/pace/win32/string.h new file mode 100644 index 00000000000..a16946fe482 --- /dev/null +++ b/PACE/pace/win32/string.h @@ -0,0 +1,68 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/string.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_STRING_H +#define PACE_STRING_H + +#include "pace/unistd.h" + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE char * pace_strcat (char * s1, const char * s2); + + PACE_INLINE char * pace_strncat (char * s1, const char * s2, size_t n); + + PACE_INLINE const char * pace_strchr (const char * s, int c); + + PACE_INLINE const char * pace_strrchr (const char * s, int c); + + PACE_INLINE int pace_strcmp (const char * s1, const char * s2); + + PACE_INLINE int pace_strncmp (const char * s1, const char * s2, size_t n); + + PACE_INLINE char * pace_strcpy (char * s1, const char * s2); + + PACE_INLINE char * pace_strncpy (char * s1, const char * s2, size_t n); + + PACE_INLINE size_t pace_strcspn (const char * s1, const char * s2); + + PACE_INLINE size_t pace_strspn (const char * s1, const char * s2); + + PACE_INLINE size_t pace_strlen (const char * s); + + PACE_INLINE const char * pace_strpbrk (const char * s1, const char * s2); + + PACE_INLINE const char * pace_strstr (const char * s1, const char * s2); + + PACE_INLINE char * pace_strtok (char * s1, const char * s2); + + PACE_INLINE char * pace_strtok_r (char * s, + const char * sep, + char ** lasts); + /* Requires PACE_HAS_REENTRANT. */ + + + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/string.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_STRING_H */ diff --git a/PACE/pace/win32/string.inl b/PACE/pace/win32/string.inl new file mode 100644 index 00000000000..5a01ccfa202 --- /dev/null +++ b/PACE/pace/win32/string.inl @@ -0,0 +1,129 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/string.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include <string.h> + +PACE_INLINE +char * +pace_strcat (char * s1, const char * s2) +{ + return strcat (s1, s2); +} + +PACE_INLINE +char * +pace_strncat (char * s1, const char * s2, size_t n) +{ + return strncat (s1, s2, n); +} + +PACE_INLINE +const char * +pace_strchr (const char * s, int c) +{ + return strchr (s, c); +} + +PACE_INLINE +const char * +pace_strrchr (const char * s, int c) +{ + return strrchr (s, c); +} + +PACE_INLINE +int +pace_strcmp (const char * s1, const char * s2) +{ + return strcmp (s1, s2); +} + +PACE_INLINE +int +pace_strncmp (const char * s1, const char * s2, size_t n) +{ + return strncmp (s1, s2, n); +} + +PACE_INLINE +char * +pace_strcpy (char * s1, const char * s2) +{ + return strcpy (s1, s2); +} + +PACE_INLINE +char * +pace_strncpy (char * s1, const char * s2, size_t n) +{ + return strncpy (s1, s2, n); +} + +PACE_INLINE +size_t +pace_strcspn (const char * s1, const char * s2) +{ + return strcspn (s1, s2); +} + +PACE_INLINE +size_t +pace_strspn (const char * s1, const char * s2) +{ + return strspn (s1, s2); +} + +PACE_INLINE +size_t +pace_strlen (const char * s) +{ + return strlen (s); +} + +PACE_INLINE +const char * +pace_strpbrk (const char * s1, const char * s2) +{ + return strpbrk (s1, s2); +} + +PACE_INLINE +const char * +pace_strstr (const char * s1, const char * s2) +{ + return strstr (s1, s2); +} + +PACE_INLINE +char * +pace_strtok (char * s1, const char * s2) +{ + return strtok (s1, s2); +} + +PACE_INLINE +char * +pace_strtok_r (char * s, const char * sep, char ** lasts) +{ +# if defined (PACE_HAS_REENTRANT) + return strtok_r (s, sep, lasts); +# else /* ! PACE_HAS_REENTRANT */ + PACE_UNUSED_ARG (s); + PACE_UNUSED_ARG (sep); + PACE_UNUSED_ARG (lasts); + PACE_ERRNO_NO_SUPPORT (); + return 0; +# endif /* ! PACE_HAS_REENTRANT */ +} diff --git a/PACE/pace/win32/termios.c b/PACE/pace/win32/termios.c new file mode 100644 index 00000000000..2591229b8fb --- /dev/null +++ b/PACE/pace/win32/termios.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/termios.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/sys/termios.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/termios.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/termios.h b/PACE/pace/win32/termios.h new file mode 100644 index 00000000000..36f6d5e44d5 --- /dev/null +++ b/PACE/pace/win32/termios.h @@ -0,0 +1,60 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/termios.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SYS_TERMIOS_H +#define PACE_SYS_TERMIOS_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 "pace/posix/termios.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SYS_TERMIOS_H */ diff --git a/PACE/pace/win32/termios.inl b/PACE/pace/win32/termios.inl new file mode 100644 index 00000000000..caceea6c181 --- /dev/null +++ b/PACE/pace/win32/termios.inl @@ -0,0 +1,105 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/termios.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/unistd.h" + +PACE_INLINE +speed_t +pace_cfgetospeed (const struct termios *termiosp) +{ + return cfgetospeed (termiosp); +} + +PACE_INLINE +int +pace_cfsetospeed (struct termios *termios_p, speed_t speed) +{ + return cfsetospeed (termios_p, speed); +} + +PACE_INLINE +speed_t +pace_cfgetispeed (const struct termios *termios_p) +{ + return cfgetispeed (termios_p); +} + +PACE_INLINE +int +pace_cfsetispeed (struct termios *termios_p, speed_t speed) +{ + return cfsetispeed (termios_p, speed); +} + +PACE_INLINE +int +pace_tcdrain (int fildes) +{ + return tcdrain (fildes); +} + +PACE_INLINE +int +pace_tcgetattr (int fildes, struct termios *termios_p) +{ + return tcgetattr (fildes, termios_p); +} + +PACE_INLINE +int +pace_tcflow (int fildes, int action) +{ + return tcflow (fildes, action); +} + +PACE_INLINE +int +pace_tcflush (int fildes, int queue_selector) +{ + return tcflush (fildes, queue_selector); +} + +PACE_INLINE +pid_t +pace_tcgetpgrp (int fildes) +{ + return tcgetpgrp (fildes); +} + +PACE_INLINE +int +pace_tcsendbreak (int fildes, int duration) +{ + return tcsendbreak (fildes, duration); +} + +PACE_INLINE +int +pace_tcsetattr (int fildes, + int optional_actions, + const struct termios *termios_p) +{ + return tcsetattr (fildes, optional_actions, termios_p); +} + +PACE_INLINE +int +pace_tcsetpgrp (int fildes, pid_t pgrp_id) +{ + return tcsetpgrp (fildes, pgrp_id); +} + + + diff --git a/PACE/pace/win32/time.c b/PACE/pace/win32/time.c new file mode 100644 index 00000000000..08f00379305 --- /dev/null +++ b/PACE/pace/win32/time.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/time.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/time.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/time.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/time.h b/PACE/pace/win32/time.h new file mode 100644 index 00000000000..42835012cc8 --- /dev/null +++ b/PACE/pace/win32/time.h @@ -0,0 +1,90 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/time.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_TIME_H +#define PACE_TIME_H + +#include <time.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE char * pace_asctime_r (const struct tm * tm, char * buf); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_clock_getres (clockid_t clock_id, + struct timespec * res); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_clock_gettime (clockid_t clock_id, + struct timespec * tp); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_clock_settime (clockid_t clock_id, + const struct timespec * tp); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE char * pace_ctime_r (const time_t * clock, char * buf); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE struct tm * pace_gmtime_r (const time_t * clock, + struct tm * result); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE struct tm * pace_localtime_r (const time_t * clock, + struct tm * result); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_nanosleep (const struct timespec * rqtp, + struct timespec * rmtp); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_time (time_t *tloc); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_timer_create (clockid_t clock_id, + struct sigevent * evp, + timer_t * timerid); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_timer_delete (timer_t timerid); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_timer_getoverrun (timer_t timerid); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_timer_gettime (timer_t timerid, + struct itimerspec * value); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_timer_settime (timer_t timerid, + int flags, + const struct itimerspec * value, + struct itimerspec * ovalue); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE void pace_tzset (); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/time.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_TIME_H */ diff --git a/PACE/pace/win32/time.inl b/PACE/pace/win32/time.inl new file mode 100644 index 00000000000..7037ff257df --- /dev/null +++ b/PACE/pace/win32/time.inl @@ -0,0 +1,197 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/time.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include <errno.h> +extern int errno; + +PACE_INLINE +char * +pace_asctime_r (const struct tm * time, char * buf) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return asctime_r (time, buf); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT (); + return 0; +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_clock_getres (clockid_t clock_id, + struct timespec * res) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return clock_getres (clock_id, res); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_clock_gettime (clockid_t clock_id, + struct timespec * tp) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return clock_gettime (clock_id, tp); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_clock_settime (clockid_t clock_id, + const struct timespec * tp) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return clock_settime (clock_id, tp); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +char * +pace_ctime_r (const time_t * clock, char * buf) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return ctime_r (clock, buf); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT (); + return 0; +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +struct tm * +pace_gmtime_r (const time_t * clock, struct tm * result) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return gmtime_r (clock, result); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT (); + return 0; +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +struct tm * +pace_localtime_r (const time_t * clock, struct tm * result) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return localtime_r (clock, result); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT (); + return 0; +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_nanosleep (const struct timespec * rqtp, + struct timespec * rmtp) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return nanosleep (rqtp, rmtp); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_time (time_t * tloc) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return time (tloc); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_timer_create (clockid_t clock_id, + struct sigevent *evp, + timer_t *timerid) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return timer_create (clock_id, evp, timerid); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_timer_delete (timer_t timerid) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return timer_delete (timerid); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_timer_getoverrun (timer_t timerid) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return timer_getoverrun (timerid); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_timer_gettime (timer_t timerid, + struct itimerspec * value) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return timer_gettime (timerid, value); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_timer_settime (timer_t timerid, + int flags, + const struct itimerspec * value, + struct itimerspec * ovalue) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return timer_settime (timerid, flags, value, ovalue); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +void +pace_tzset () +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + tzset (); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_ERRNO_NO_SUPPORT (); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + return; +} diff --git a/PACE/pace/win32/times.c b/PACE/pace/win32/times.c new file mode 100644 index 00000000000..3e47e331020 --- /dev/null +++ b/PACE/pace/win32/times.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/times.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/sys/times.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/times.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/times.h b/PACE/pace/win32/times.h new file mode 100644 index 00000000000..fd24b664961 --- /dev/null +++ b/PACE/pace/win32/times.h @@ -0,0 +1,35 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/times.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SYS_TIMES_H +#define PACE_SYS_TIMES_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 "pace/posix/times.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SYS_TIMES_H */ diff --git a/PACE/pace/win32/times.inl b/PACE/pace/win32/times.inl new file mode 100644 index 00000000000..cf098f129a8 --- /dev/null +++ b/PACE/pace/win32/times.inl @@ -0,0 +1,21 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/times.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +clock_t +pace_times (struct tms * buffer) +{ + return times (buffer); +} diff --git a/PACE/pace/win32/types.h b/PACE/pace/win32/types.h new file mode 100644 index 00000000000..cb33f4cee06 --- /dev/null +++ b/PACE/pace/win32/types.h @@ -0,0 +1,39 @@ +/* -*- C -*- + * $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/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_HAS_CPLUSPLUS) +extern "C" { +#endif /* (PACE_HAS_CPLUSPLUS) */ + + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#endif /* PACE_SYS_TYPES_H */ diff --git a/PACE/pace/win32/unistd.c b/PACE/pace/win32/unistd.c new file mode 100644 index 00000000000..f8e1e9a4676 --- /dev/null +++ b/PACE/pace/win32/unistd.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/unistd.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/unistd.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/unistd.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/unistd.h b/PACE/pace/win32/unistd.h new file mode 100644 index 00000000000..44e7c15ff95 --- /dev/null +++ b/PACE/pace/win32/unistd.h @@ -0,0 +1,150 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/unistd.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_UNISTD_H +#define PACE_UNISTD_H + +#include "pace/sys/types.h" +#include <stropts.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE void pace__exit (int status); + + PACE_INLINE unsigned int pace_alarm (unsigned int seconds); + + PACE_INLINE int pace_access (const char * path, int amode); + + PACE_INLINE int pace_chdir (const char * path); + + PACE_INLINE int pace_chown (const char * path, uid_t owner, pace_gid_t group); + + PACE_INLINE int pace_close (int fildes); + + PACE_INLINE int pace_dup (int fildes); + + PACE_INLINE int pace_dup2 (int fildes, int fildes2); + + #define pace_execl(X) execl X + #define pace_execle(X) execle X + #define pace_execlp(X) execlp X + /* int execl (const char *path, const char *arg0, ..., + * const char *argn, char * (*//*NULL*//*) ); + * int execle (const char *path, char *const arg0[], ..., + * const char *argn, char * (*//*NULL*//*), char *const envp[]); + * int execlp (const char *file, const char *arg0, ..., + * const char *argn, char * (*//*NULL*//*)); + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE int pace_execv (const char * path, char * const argv[]); + + PACE_INLINE int pace_execve (const char * path, char * const argv[], + char * const envp[]); + + PACE_INLINE int pace_execvp (const char * file, char * const argv[]); + + PACE_INLINE int pace_fdatasync (int fildes); + + PACE_INLINE pace_pid_t pace_fork (); + + PACE_INLINE long pace_fpathconf (int fildes, int name); + + PACE_INLINE int pace_fsync (int fildes); + + PACE_INLINE int pace_ftruncate (int fildes, pace_off_t length); + + PACE_INLINE char * pace_getcwd (char * buf, size_t size); + + PACE_INLINE uid_t pace_getegid (); + + PACE_INLINE uid_t pace_geteuid (); + + PACE_INLINE uid_t pace_getgid (); + + PACE_INLINE int pace_getgroups (int gidsetsize, pace_gid_t grouplist[]); + + PACE_INLINE char * pace_getlogin (); + + PACE_INLINE int pace_getlogin_r (char * name, size_t namesize); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE pace_pid_t pace_getpgrp (); + + PACE_INLINE pace_pid_t pace_getpid (); + + PACE_INLINE pace_pid_t pace_getppid (); + + PACE_INLINE uid_t pace_getuid (); + + #define pace_ioctl(X) ioctl X + /* int ioctl (int fildes, int request, (*//* args *//*)) + * + * PLEASE PAY SPECIAL ATTENTION HERE! + * This is a macro and requires an additional set of parenthesis + * surrounding the arguments. + */ + + PACE_INLINE int pace_isatty (int fildes); + + PACE_INLINE int pace_link (const char * existing, const char * new_link); + + PACE_INLINE pace_off_t pace_lseek (int fildes, off_t offset, int whence); + + PACE_INLINE long pace_pathconf (const char * path, int name); + + PACE_INLINE int pace_pause (); + + PACE_INLINE int pace_pipe (int fildes[2]); + + PACE_INLINE ssize_t pace_read (int fildes, void * buf, size_t nbyte); + + PACE_INLINE int pace_rmdir (const char * path); + + PACE_INLINE int pace_setgid (pace_gid_t gid); + + PACE_INLINE int pace_setpgid (pace_pid_t pid, pid_t pgid); + + PACE_INLINE pace_pid_t pace_setsid (); + + PACE_INLINE int pace_setuid (uid_t uid); + + PACE_INLINE unsigned pace_sleep (unsigned int seconds); + + PACE_INLINE long pace_sysconf (int name); + + PACE_INLINE char * pace_ttyname (int fildes); + + PACE_INLINE int pace_ttyname_r (int fildes, char * name, size_t namesize); + /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */ + + PACE_INLINE int pace_unlink (const char * path); + + PACE_INLINE ssize_t pace_write (int fildes, const void * buf, size_t nbyte); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/unistd.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_UNISTD_H */ diff --git a/PACE/pace/win32/unistd.inl b/PACE/pace/win32/unistd.inl new file mode 100644 index 00000000000..c432c3571b4 --- /dev/null +++ b/PACE/pace/win32/unistd.inl @@ -0,0 +1,354 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/unistd.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include <unistd.h> + +PACE_INLINE +void +pace__exit (int status) +{ + _exit (status); + return; +} + +PACE_INLINE +int +pace_access (const char * path, int amode) +{ + return access (path, amode); +} + +PACE_INLINE +unsigned int +pace_alarm (unsigned int seconds) +{ + return alarm (seconds); +} + +PACE_INLINE +int +pace_chdir (const char * path) +{ + return chdir (path); +} + +PACE_INLINE +int +pace_chown (const char * path, uid_t owner, pace_gid_t group) +{ + return chown (path, owner, group); +} + +PACE_INLINE +int +pace_close (int fildes) +{ + return close (fildes); +} + +PACE_INLINE +int +pace_dup (int fildes) +{ + return dup (fildes); +} + +PACE_INLINE +int +pace_dup2 (int fildes, int fildes2) +{ + return dup2 (fildes, fildes2); +} + +PACE_INLINE +int +pace_execv (const char * path, + char * const argv[]) +{ + return execv (path, argv); + /* if successful, this operation does NOT return */ +} + +PACE_INLINE +int +pace_execve (const char * path, + char * const argv[], + char * const envp[]) +{ + return execve (path, argv, envp); + /* if successful, this operation does NOT return */ +} + +PACE_INLINE +int +pace_execvp (const char * file, + char * const argv[]) +{ + return execvp (file, argv); + /* if successful, this operation does NOT return */ +} + +PACE_INLINE +int +pace_fdatasync (int fildes) +{ + return fdatasync (fildes); +} + +PACE_INLINE +pid_t +pace_fork () +{ + return fork (); +} + +PACE_INLINE +long +pace_fpathconf (int fildes, int name) +{ + return fpathconf (fildes, name); +} + +PACE_INLINE +int +pace_fsync (int fildes) +{ + return fildes; +} + +PACE_INLINE +int +pace_ftruncate (int fildes, pace_off_t length) +{ + return ftruncate (fildes, length); +} + +PACE_INLINE +char * +pace_getcwd (char * buf, size_t size) +{ + return getcwd (buf, size); +} + +PACE_INLINE +uid_t +pace_getegid () +{ + return getegid (); +} + +PACE_INLINE +uid_t +pace_geteuid () +{ + return geteuid (); +} + +PACE_INLINE +int +pace_getgroups (int gidsetsize, pace_gid_t grouplist[]) +{ + return getgroups (gidsetsize, grouplist); +} + +PACE_INLINE +uid_t +pace_getgid () +{ + return getgid (); +} + +PACE_INLINE +char* +pace_getlogin () +{ + return getlogin (); +} + +PACE_INLINE +int +pace_getlogin_r (char * name, size_t namesize) +{ +# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return getlogin_r (name, namesize); +# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_UNUSED_ARG (name); + PACE_UNUSED_ARG (namesize); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +pid_t +pace_getpgrp () +{ + return getpgrp (); +} + +PACE_INLINE +pid_t +pace_getpid () +{ + return getpid (); +} + +PACE_INLINE +pid_t +pace_getppid () +{ + return getppid (); +} + +PACE_INLINE +uid_t +pace_getuid () +{ + return getuid (); +} + +PACE_INLINE +int +pace_isatty (int fildes) +{ + return isatty (fildes); +} + +PACE_INLINE +int +pace_link (const char * existing, const char * new_link) +{ + return link (existing, new_link); +} + +PACE_INLINE +pace_off_t +pace_lseek (int fildes, pace_off_t offset, int whence) +{ + return lseek (fildes, offset, whence); +} + +PACE_INLINE +int +pace_pause () +{ + return pause (); +} + +PACE_INLINE +long +pace_pathconf (const char * path, int name) +{ + return pathconf (path, name); +} + +PACE_INLINE +int +pace_pipe (int fildes[2]) +{ + return pipe (fildes); +} + +PACE_INLINE +ssize_t +pace_read (int fildes, void * buf, size_t nbyte) +{ + return read (fildes, buf, nbyte); +} + +PACE_INLINE +int +pace_rmdir (const char * path) +{ + return rmdir (path); +} + +PACE_INLINE +int +pace_setgid (pace_gid_t gid) +{ + return setgid (gid); +} + +PACE_INLINE +int +pace_setpgid (pid_t pid, pid_t pgid) +{ + return setpgid (pid, pgid); +} + +PACE_INLINE +pid_t +pace_setsid () +{ + return setsid (); +} + +PACE_INLINE +int +pace_setuid (uid_t uid) +{ + return setuid (uid); +} + +PACE_INLINE +unsigned int +pace_sleep (unsigned int seconds) +{ + return sleep (seconds); +} + +PACE_INLINE +long +pace_sysconf (int name) +{ + return sysconf (name); +} + +PACE_INLINE +char * +pace_ttyname (int fildes) +{ + return ttyname (fildes); +} + +PACE_INLINE +int +pace_ttyname_r (int fildes, + char * name, + size_t namesize) +{ +#if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS) + return ttyname_r (fildes, name, namesize); +#else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ + PACE_UNUSED_ARG (fildes); + PACE_UNUSED_ARG (name); + PACE_UNUSED_ARG (namesize); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +#endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */ +} + +PACE_INLINE +int +pace_unlink (const char * path) +{ + return unlink (path); +} + +PACE_INLINE +ssize_t +pace_write (int fildes, const void * buf, size_t nbyte) +{ + return write (fildes, buf, nbyte); +} diff --git a/PACE/pace/win32/utime.c b/PACE/pace/win32/utime.c new file mode 100644 index 00000000000..864e8d422b1 --- /dev/null +++ b/PACE/pace/win32/utime.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/utime.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/utime.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/utime.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/utime.h b/PACE/pace/win32/utime.h new file mode 100644 index 00000000000..1a2e283cf57 --- /dev/null +++ b/PACE/pace/win32/utime.h @@ -0,0 +1,37 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/utime.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_UTIME_H +#define PACE_UTIME_H + +#include "pace/sys/types.h" +#include <utime.h> + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE int pace_utime (const char * path, + const struct utimbuf * times); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/utime.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_UTIME_H */ diff --git a/PACE/pace/win32/utime.inl b/PACE/pace/win32/utime.inl new file mode 100644 index 00000000000..8b4b4b88f6e --- /dev/null +++ b/PACE/pace/win32/utime.inl @@ -0,0 +1,22 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/utime.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_utime (const char * path, + const struct utimbuf * times) +{ + return utime (path, times); +} diff --git a/PACE/pace/win32/utsname.c b/PACE/pace/win32/utsname.c new file mode 100644 index 00000000000..1fa1461795e --- /dev/null +++ b/PACE/pace/win32/utsname.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/utsname.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/sys/utsname.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/utsname.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/utsname.h b/PACE/pace/win32/utsname.h new file mode 100644 index 00000000000..169c5235da6 --- /dev/null +++ b/PACE/pace/win32/utsname.h @@ -0,0 +1,35 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/utsname.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_SYS_UTSNAME_H +#define PACE_SYS_UTSNAME_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 "pace/posix/utsname.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_SYS_UTSNAME_H */ diff --git a/PACE/pace/win32/utsname.inl b/PACE/pace/win32/utsname.inl new file mode 100644 index 00000000000..23a8d7f0db8 --- /dev/null +++ b/PACE/pace/win32/utsname.inl @@ -0,0 +1,21 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/utsname.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +PACE_INLINE +int +pace_uname (struct utsname * name) +{ + return uname (name); +} diff --git a/PACE/pace/win32/wait.c b/PACE/pace/win32/wait.c new file mode 100644 index 00000000000..03e5530e0e4 --- /dev/null +++ b/PACE/pace/win32/wait.c @@ -0,0 +1,20 @@ +/* $Id$ + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/wait.c + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include "pace/wait.h" + +#if !defined (PACE_HAS_INLINE) +# include "pace/posix/wait.inl" +#endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/win32/wait.h b/PACE/pace/win32/wait.h new file mode 100644 index 00000000000..551bd87698f --- /dev/null +++ b/PACE/pace/win32/wait.h @@ -0,0 +1,39 @@ +/* $Id$ + + * ============================================================================ + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/wait.h + * + * = AUTHOR + * Luther Baker + * + * ============================================================================ */ + +#ifndef PACE_WAIT_H +#define PACE_WAIT_H + +#include "pace/sys/types.h" + +#if defined (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif /* PACE_HAS_CPLUSPLUS */ + + PACE_INLINE pid_t pace_wait (int * statloc); + + PACE_INLINE pid_t pace_waitpid (pid_t pid, + int * statloc, + int options); + +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_INLINE) +# include "pace/posix/wait.inl" +#endif /* PACE_HAS_INLINE */ + +#endif /* PACE_WAIT_H */ diff --git a/PACE/pace/win32/wait.inl b/PACE/pace/win32/wait.inl new file mode 100644 index 00000000000..aef28e51396 --- /dev/null +++ b/PACE/pace/win32/wait.inl @@ -0,0 +1,30 @@ +/* $Id$ -*- C -*- + + * ============================================================================= + * + * = LIBRARY + * pace + * + * = FILENAME + * pace/posix/wait.inl + * + * = AUTHOR + * Luther Baker + * + * ============================================================================= */ + +#include <sys/wait.h> + +PACE_INLINE +pid_t +pace_wait (int * statloc) +{ + return wait (statloc); +} + +PACE_INLINE +pid_t +pace_waitpid (pid_t pid, int * statloc, int options) +{ + return waitpid (pid, statloc, options); +} |