summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-07 08:16:37 +0000
committerjwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-07 08:16:37 +0000
commitebf08fd1123a1c6c1ac59011dff1396fd21e72dc (patch)
tree7660c6fe55839c58c80b2e1913ed083f5d1348ba
parent5bf7c76c67379f43141adebb058d8c5e1de1b2ba (diff)
downloadATCD-ebf08fd1123a1c6c1ac59011dff1396fd21e72dc.tar.gz
Fri Jul 7 02:18:02 2000 John Heitmann <jwh1@cs.wustl.edu>
-rw-r--r--PACE/pace/posix/dirent.h4
-rw-r--r--PACE/pace/posix/dirent.inl4
-rw-r--r--PACE/pace/posix/pthread.h17
-rw-r--r--PACE/pace/posix/pthread.inl10
-rw-r--r--PACE/pace/posix/sched.h6
-rw-r--r--PACE/pace/posix/signal.h7
-rw-r--r--PACE/pace/posix/signal.inl3
-rw-r--r--PACE/pace/posix/stat.h7
-rw-r--r--PACE/pace/posix/stat.inl4
-rw-r--r--PACE/pace/posix/time.h7
-rw-r--r--PACE/pace/posix/time.inl41
-rw-r--r--PACE/pace/posix/utsname.inl2
12 files changed, 66 insertions, 46 deletions
diff --git a/PACE/pace/posix/dirent.h b/PACE/pace/posix/dirent.h
index d387f7a7520..29bb818d4c1 100644
--- a/PACE/pace/posix/dirent.h
+++ b/PACE/pace/posix/dirent.h
@@ -38,14 +38,14 @@ typedef struct dirent pace_dirent;
See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
IEEE Std 1003.1, 1996 Edition), Section 5.1.2.
*/
- PACE_INLINE DIR * pace_opendir (const char * dirname);
+ PACE_INLINE PACE_DIR * pace_opendir (const char * dirname);
/**
PACE's implementation of the POSIX function readdir.
See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
IEEE Std 1003.1, 1996 Edition), Section 5.1.2.
*/
- PACE_INLINE struct dirent * pace_readdir (PACE_DIR * dirp);
+ PACE_INLINE pace_dirent * pace_readdir (PACE_DIR * dirp);
/**
PACE's implementation of the POSIX function readdir_r.
diff --git a/PACE/pace/posix/dirent.inl b/PACE/pace/posix/dirent.inl
index ad9f205fc8c..0072bb81c98 100644
--- a/PACE/pace/posix/dirent.inl
+++ b/PACE/pace/posix/dirent.inl
@@ -14,14 +14,14 @@
* ============================================================================= */
PACE_INLINE
-DIR *
+PACE_DIR *
pace_opendir (const char * dirname)
{
return opendir (dirname);
}
PACE_INLINE
-struct dirent *
+pace_dirent *
pace_readdir (PACE_DIR * dirp)
{
return readdir (dirp);
diff --git a/PACE/pace/posix/pthread.h b/PACE/pace/posix/pthread.h
index bde61a3cc37..8f6979a10ac 100644
--- a/PACE/pace/posix/pthread.h
+++ b/PACE/pace/posix/pthread.h
@@ -45,6 +45,11 @@ extern "C" {
#define PACE_PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
#define PACE_PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
+#ifndef PACE_SCHED_PARAM
+#define PACE_SCHED_PARAM
+ typedef struct sched_param pace_sched_param;
+#endif /* PACE_SCHED_PARAM */
+
/**
PACE's implementation of the POSIX function pthread_atfork.
See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
@@ -83,7 +88,7 @@ extern "C" {
IEEE Std 1003.1, 1996 Edition), Section 13.5.1.
*/
PACE_INLINE int pace_pthread_attr_getschedparam (const pace_pthread_attr_t * attr,
- struct sched_param * param);
+ pace_sched_param * param);
/**
PACE's implementation of the POSIX function pthread_attr_getschedpolicy.
@@ -146,8 +151,8 @@ extern "C" {
IEEE Std 1003.1, 1996 Edition), Section 13.5.1.
*/
PACE_INLINE int pace_pthread_attr_setschedparam (pace_pthread_attr_t * attr,
- const struct
- sched_param * param);
+ const
+ pace_sched_param * param);
/**
PACE's implementation of the POSIX function pthread_attr_setschedpolicy.
@@ -242,7 +247,7 @@ extern "C" {
*/
PACE_INLINE int pace_pthread_cond_timedwait (pthread_cond_t * cond,
pace_pthread_mutex_t * mutex,
- const struct timespec * abstime);
+ const pace_timespec * abstime);
/**
PACE's implementation of the POSIX function pthread_cond_wait.
@@ -320,7 +325,7 @@ extern "C" {
*/
PACE_INLINE int pace_pthread_getschedparam (pace_pthread_t thread,
int * policy,
- struct sched_param * param);
+ pace_sched_param * param);
/**
PACE's implementation of the POSIX function pthread_getspecific.
@@ -515,7 +520,7 @@ extern "C" {
*/
PACE_INLINE int pace_pthread_setschedparam (pace_pthread_t thread,
int policy,
- const struct sched_param * param);
+ const pace_sched_param * param);
/**
PACE's implementation of the POSIX function pthread_setspecific.
diff --git a/PACE/pace/posix/pthread.inl b/PACE/pace/posix/pthread.inl
index 1949550bdfb..8b40a634c27 100644
--- a/PACE/pace/posix/pthread.inl
+++ b/PACE/pace/posix/pthread.inl
@@ -56,7 +56,7 @@ pace_pthread_attr_getinheritsched (const pace_pthread_attr_t * attr,
PACE_INLINE
int
pace_pthread_attr_getschedparam (const pace_pthread_attr_t * attr,
- struct sched_param * param)
+ pace_sched_param * param)
{
return pthread_attr_getschedparam (attr, param);
}
@@ -124,7 +124,7 @@ pace_pthread_attr_setinheritsched (pace_pthread_attr_t * attr,
PACE_INLINE
int
pace_pthread_attr_setschedparam (pace_pthread_attr_t * attr,
- const struct sched_param * param)
+ const pace_sched_param * param)
{
return pthread_attr_setschedparam (attr, param);
}
@@ -201,7 +201,7 @@ PACE_INLINE
int
pace_pthread_cond_timedwait (pthread_cond_t * cond,
pace_pthread_mutex_t * mutex,
- const struct timespec * abstime)
+ const pace_timespec * abstime)
{
#if PACE_HAS_POSIX == PACE_LYNXOS
/* Cast away const since LynxOS' prototypes aren't const */
@@ -291,7 +291,7 @@ PACE_INLINE
int
pace_pthread_getschedparam (pace_pthread_t thread,
int * policy,
- struct sched_param * param)
+ pace_sched_param * param)
{
return pthread_getschedparam (thread, policy, param);
}
@@ -501,7 +501,7 @@ PACE_INLINE
int
pace_pthread_setschedparam (pace_pthread_t thread,
int policy,
- const struct sched_param * param)
+ const pace_sched_param * param)
{
return pthread_setschedparam (thread, policy, param);
}
diff --git a/PACE/pace/posix/sched.h b/PACE/pace/posix/sched.h
index 5747d35f6c0..58432ebb3b5 100644
--- a/PACE/pace/posix/sched.h
+++ b/PACE/pace/posix/sched.h
@@ -26,8 +26,10 @@ extern "C" {
#define PACE_SCHED_FIFO SCHED_FIFO
#define PACE_SCHED_OTHER SCHED_RR
-typedef struct sched_param pace_sched_param;
-
+#ifndef PACE_SCHED_PARAM
+#define PACE_SCHED_PARAM
+ typedef struct sched_param pace_sched_param;
+#endif /* PACE_SCHED_PARAM */
/**
PACE's implementation of the POSIX function sched_get_priority_max.
See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
diff --git a/PACE/pace/posix/signal.h b/PACE/pace/posix/signal.h
index 4995f5f52c1..23226994fe0 100644
--- a/PACE/pace/posix/signal.h
+++ b/PACE/pace/posix/signal.h
@@ -54,6 +54,11 @@ extern "C" {
typedef union sigval pace_sigval;
#endif /* PACE_SIGVAL */
+#ifndef PACE_TIMESPEC
+#define PACE_TIMESPEC
+ typedef struct timespec pace_timespec;
+#endif /* PACE_TIMESPEC */
+
/**
PACE's implementation of the POSIX function kill.
See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
@@ -154,7 +159,7 @@ extern "C" {
*/
PACE_INLINE int pace_sigtimedwait (const pace_sigset_t * set,
pace_siginfo_t * info,
- const struct timespec * timeout);
+ const pace_timespec * timeout);
/**
PACE's implementation of the POSIX function sigwait.
diff --git a/PACE/pace/posix/signal.inl b/PACE/pace/posix/signal.inl
index e584222483b..e5d09f6f7e9 100644
--- a/PACE/pace/posix/signal.inl
+++ b/PACE/pace/posix/signal.inl
@@ -14,6 +14,7 @@
* ============================================================================= */
#include "pace/pthread.h"
+#include "pace/time.h"
PACE_INLINE
int
@@ -113,7 +114,7 @@ pace_sigsuspend (const pace_sigset_t * sigmask)
PACE_INLINE
int
pace_sigtimedwait (const pace_sigset_t * set, pace_siginfo_t * info,
- const struct timespec * timeout)
+ const pace_timespec * timeout)
{
return sigtimedwait (set, info, timeout);
}
diff --git a/PACE/pace/posix/stat.h b/PACE/pace/posix/stat.h
index 11314c95bad..2ed14841c6b 100644
--- a/PACE/pace/posix/stat.h
+++ b/PACE/pace/posix/stat.h
@@ -49,20 +49,21 @@ extern "C" {
#ifndef PACE_STAT
#define PACE_STAT
- /*typedef struct stat pace_stat;*/
+ /* Kludge since there is a func and a type of the same name */
+ typedef struct stat pace_stat_s;
#endif /* PACE_STAT */
PACE_INLINE int pace_chmod (const char * path, pace_mode_t mode);
PACE_INLINE int pace_fchmod (int fildes, pace_mode_t mode);
- PACE_INLINE int pace_fstat (int fildes, struct stat * buf);
+ PACE_INLINE int pace_fstat (int fildes, pace_stat_s * buf);
PACE_INLINE int pace_mkdir (const char * path, pace_mode_t mode);
PACE_INLINE int pace_mkfifo (const char * path, pace_mode_t mode);
- PACE_INLINE int pace_stat (const char * path, struct stat * buf);
+ PACE_INLINE int pace_stat (const char * path, pace_stat_s * buf);
PACE_INLINE pace_mode_t pace_umask (pace_mode_t cmask);
diff --git a/PACE/pace/posix/stat.inl b/PACE/pace/posix/stat.inl
index fc5eac836ac..7c4c6867dd7 100644
--- a/PACE/pace/posix/stat.inl
+++ b/PACE/pace/posix/stat.inl
@@ -29,7 +29,7 @@ pace_fchmod (int fildes, pace_mode_t mode)
PACE_INLINE
int
-pace_fstat (int fildes, struct stat * buf)
+pace_fstat (int fildes, pace_stat_s * buf)
{
return fstat (fildes, buf);
}
@@ -50,7 +50,7 @@ pace_mkfifo (const char * path, pace_mode_t mode)
PACE_INLINE
int
-pace_stat (const char * path, struct stat * buf)
+pace_stat (const char * path, pace_stat_s * buf)
{
return stat (path, buf);
}
diff --git a/PACE/pace/posix/time.h b/PACE/pace/posix/time.h
index 86c8d82a23d..6dcba12032c 100644
--- a/PACE/pace/posix/time.h
+++ b/PACE/pace/posix/time.h
@@ -69,6 +69,11 @@ extern "C" {
typedef struct itimerspec pace_itimerspec;
#endif /* PACE_ITIMERSPEC */
+#ifndef PACE_SIGEVENT
+#define PACE_SIGEVENT
+ typedef struct sigevent pace_sigevent;
+#endif /* PACE_SIGEVENT */
+
/**
PACE's implementation of the POSIX function asctime.
See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
@@ -203,7 +208,7 @@ extern "C" {
IEEE Std 1003.1, 1996 Edition), Section 14.2.2.
*/
PACE_INLINE int pace_timer_create (pace_clockid_t clock_id,
- struct sigevent * evp,
+ pace_sigevent * evp,
pace_timer_t * timerid);
/**
diff --git a/PACE/pace/posix/time.inl b/PACE/pace/posix/time.inl
index e2af831bbfd..f0b920e056e 100644
--- a/PACE/pace/posix/time.inl
+++ b/PACE/pace/posix/time.inl
@@ -13,19 +13,20 @@
*
* ============================================================================= */
-#include <errno.h>
+#include "pace/errno.h"
+#include "pace/signal.h"
extern int errno;
PACE_INLINE
char *
-pace_asctime (const struct tm * time)
+pace_asctime (const pace_tm * time)
{
return asctime (time);
}
PACE_INLINE
char *
-pace_asctime_r (const struct tm * time, char * buf)
+pace_asctime_r (const pace_tm * time, char * buf)
{
# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
return asctime_r (time, buf);
@@ -54,7 +55,7 @@ pace_difftime (pace_time_t time1, pace_time_t time2)
PACE_INLINE
int
pace_clock_getres (clockid_t clock_id,
- struct timespec * res)
+ pace_timespec * res)
{
return clock_getres (clock_id, res);
}
@@ -62,7 +63,7 @@ pace_clock_getres (clockid_t clock_id,
PACE_INLINE
int
pace_clock_gettime (clockid_t clock_id,
- struct timespec * tp)
+ pace_timespec * tp)
{
return clock_gettime (clock_id, tp);
}
@@ -70,7 +71,7 @@ pace_clock_gettime (clockid_t clock_id,
PACE_INLINE
int
pace_clock_settime (clockid_t clock_id,
- const struct timespec * tp)
+ const pace_timespec * tp)
{
#if PACE_HAS_POSIX == PACE_LYNXOS
/* Cast away const for Lynx prototype compatability. */
@@ -102,15 +103,15 @@ pace_ctime_r (const time_t * clock, char * buf)
}
PACE_INLINE
-struct tm *
+pace_tm *
pace_gmtime (const time_t * clock)
{
return gmtime (clock);
}
PACE_INLINE
-struct tm *
-pace_gmtime_r (const time_t * clock, struct tm * result)
+pace_tm *
+pace_gmtime_r (const time_t * clock, pace_tm * result)
{
# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
return gmtime_r (clock, result);
@@ -123,15 +124,15 @@ pace_gmtime_r (const time_t * clock, struct tm * result)
}
PACE_INLINE
-struct tm *
+pace_tm *
pace_localtime (const time_t * clock)
{
return localtime (clock);
}
PACE_INLINE
-struct tm *
-pace_localtime_r (const time_t * clock, struct tm * result)
+pace_tm *
+pace_localtime_r (const time_t * clock, pace_tm * result)
{
# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
return localtime_r (clock, result);
@@ -145,15 +146,15 @@ pace_localtime_r (const time_t * clock, struct tm * result)
PACE_INLINE
time_t
-pace_mktime (struct tm * timeptr)
+pace_mktime (pace_tm * timeptr)
{
return mktime (timeptr);
}
PACE_INLINE
int
-pace_nanosleep (const struct timespec * rqtp,
- struct timespec * rmtp)
+pace_nanosleep (const pace_timespec * rqtp,
+ pace_timespec * rmtp)
{
return nanosleep (rqtp, rmtp);
}
@@ -162,7 +163,7 @@ PACE_INLINE
size_t
pace_strftime (char *s, size_t maxsize,
const char *format,
- const struct tm *timeptr)
+ const pace_tm *timeptr)
{
return strftime (s, maxsize, format, timeptr);
}
@@ -177,7 +178,7 @@ pace_time (time_t * tloc)
PACE_INLINE
int
pace_timer_create (clockid_t clock_id,
- struct sigevent *evp,
+ pace_sigevent * evp,
timer_t *timerid)
{
return timer_create (clock_id, evp, timerid);
@@ -200,7 +201,7 @@ pace_timer_getoverrun (timer_t timerid)
PACE_INLINE
int
pace_timer_gettime (timer_t timerid,
- struct itimerspec * value)
+ pace_itimerspec * value)
{
return timer_gettime (timerid, value);
}
@@ -209,8 +210,8 @@ PACE_INLINE
int
pace_timer_settime (timer_t timerid,
int flags,
- const struct itimerspec * value,
- struct itimerspec * ovalue)
+ const pace_itimerspec * value,
+ pace_itimerspec * ovalue)
{
return timer_settime (timerid, flags, value, ovalue);
}
diff --git a/PACE/pace/posix/utsname.inl b/PACE/pace/posix/utsname.inl
index 23a8d7f0db8..57df4620b12 100644
--- a/PACE/pace/posix/utsname.inl
+++ b/PACE/pace/posix/utsname.inl
@@ -15,7 +15,7 @@
PACE_INLINE
int
-pace_uname (struct utsname * name)
+pace_uname (pace_utsname * name)
{
return uname (name);
}