summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-27 13:42:41 +0000
committerjwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-27 13:42:41 +0000
commitb67b8b5497a043141e0563b0fc51e9a137e5dce4 (patch)
tree7146f725519c0b1c379dfd985d98aa9ca1ec729b
parent9cffa3424d1edbdcf06ae511d6216fa180d698f5 (diff)
downloadATCD-b67b8b5497a043141e0563b0fc51e9a137e5dce4.tar.gz
Thu Jul 27 08:36:01 2000 John Heitmann <jwh1@cs.wustl.edu>
-rw-r--r--PACE/ChangeLog23
-rw-r--r--PACE/pace/config/config.h8
-rw-r--r--PACE/pace/fcntl.h12
-rw-r--r--PACE/pace/mqueue.h6
-rw-r--r--PACE/pace/posix/time.inl55
-rw-r--r--PACE/pace/posix/unistd.inl25
-rw-r--r--PACE/pace/semaphore.h7
-rw-r--r--PACE/pace/stdio.h6
8 files changed, 95 insertions, 47 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog
index 76c256b7e56..888b3eff07e 100644
--- a/PACE/ChangeLog
+++ b/PACE/ChangeLog
@@ -1,3 +1,26 @@
+Thu Jul 27 08:36:01 2000 John Heitmann <jwh1@cs.wustl.edu>
+
+ * pace/fcntl.h
+ * pace/mqueue.h
+ * pace/semaphore.h
+ * pace/stdio.h
+ Added :: qualifier to macros, but of course these should
+ be defined by the user, so these will go away once
+ I update OS.*.
+
+ * pace/config/config.h
+ Added _REENTRANT for solaris.
+
+ * pace/posix/time.inl
+ * pace/posix/unistd.inl
+ Took away PACE_HAS_PTHREAD_SEMANTICS in favor of platform
+ specific code. It appears PAC_HAS_PTHREAD_SEMANTICS is now
+ superfluous.
+
+ * ../ace/OS.i
+ Qualified two functions with pace_ as they should
+ have been originally. Paceified ACE_OS::gettimeofday.
+
Wed Jul 26 17:13:51 2000 John Heitmann <jwh1@cs.wustl.edu>
* pace/emulation/mqueue.c:
diff --git a/PACE/pace/config/config.h b/PACE/pace/config/config.h
index f4ea25daa50..0aaf45919e5 100644
--- a/PACE/pace/config/config.h
+++ b/PACE/pace/config/config.h
@@ -16,6 +16,12 @@
#ifndef PACE_CONFIG_CONFIG_H
#define PACE_CONFIG_CONFIG_H
+#if (PACE_SUNOS)
+# if !defined (_REENTRANT)
+# define _REENTRANT
+# endif /* _REENTRANT */
+#endif /* PACE_SUNOS */
+
#if !defined (PACE_HAS_POSIX_C_SOURCE)
# if defined (_POSIX_C_SOURCE)
# define PACE_HAS_POSIX_C_SOURCE _POSIX_C_SOURCE
@@ -47,12 +53,14 @@
# endif /* other POSIX */
#endif /* ! PACE_HAS_REENTRANT */
+
#if !defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
# if defined (_POSIX_PTHREAD_SEMANTICS)
# define PACE_HAS_POSIX_PTHREAD_SEMANTICS _POSIX_PTHREAD_SEMANTICS
# endif /* _POSIX_PTHREAD_SEMANTICS */
#endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
+
#if PACE_HAS_POSIX == PACE_LYNXOS
# define PACE_NONCONST_ARG_CAST(TYPE) (TYPE)
#else /* ! PACE_LYNXOS */
diff --git a/PACE/pace/fcntl.h b/PACE/pace/fcntl.h
index fa71ebd13ee..b1e9afae442 100644
--- a/PACE/pace/fcntl.h
+++ b/PACE/pace/fcntl.h
@@ -49,7 +49,11 @@ extern "C" {
IEEE Std 1003.1, 1996 Edition), Section 6.5.2.
*/
#if (PACE_HAS_POSIX_FM_UOF)
-# define pace_fcntl fcntl
+# if defined (PACE_HAS_CPLUSPLUS)
+# define pace_fcntl ::fcntl
+# else
+# define pace_fcntl fcntl
+# endif /* PACE_HAS_CPLUSPLUS */
#endif /* PACE_HAS_POSIX_FM_UOF */
/* int fcntl (int fildes, int cmd, *//* arg *//* ... ); */
@@ -59,7 +63,11 @@ extern "C" {
IEEE Std 1003.1, 1996 Edition), Section 5.3.1.
*/
#if (PACE_HAS_POSIX_DI_UOF)
-# define pace_open open
+# if defined (PACE_HAS_CPLUPLUS)
+# define pace_open ::open
+# else
+# define pace_open open
+# endif /* PACE_HAS_CPLUSPLUS */
#endif /* PACE_HAS_POSIX_DI_UOF */
/* int open (const char *path, int oflag, *//* pace_mode_t mode *//* ... );*/
diff --git a/PACE/pace/mqueue.h b/PACE/pace/mqueue.h
index 7f2cd6b2315..aaa3447ea91 100644
--- a/PACE/pace/mqueue.h
+++ b/PACE/pace/mqueue.h
@@ -66,7 +66,11 @@ extern "C" {
IEEE Std 1003.1, 1996 Edition), Section 15.2.1.
*/
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
- # define pace_mq_open mq_open
+# if defined (PACE_HAS_CPLUSPLUS)
+# define pace_mq_open ::mq_open
+# else
+# define pace_mq_open mq_open
+# endif /* PACE_HAS_CPLUSPLUS */
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */
/* mqd_t mq_open (const char *name, int oflag, (*//* args *//*) ... ); */
diff --git a/PACE/pace/posix/time.inl b/PACE/pace/posix/time.inl
index 6a3a04c2d30..91845cf8461 100644
--- a/PACE/pace/posix/time.inl
+++ b/PACE/pace/posix/time.inl
@@ -31,14 +31,16 @@ PACE_INLINE
char *
pace_asctime_r (const pace_tm * time, char * buf)
{
-# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
+#if (PACE_LYNXOS)
+ /*lynxos 3.1 has POSIX.4 Draft 9 versions of this */
+ if (asctime_r (time, buf, 26) == -1) /* ??? */
+ return (char*) 0;
+ return buf;
+#elif (PACE_SUNOS)
+ return asctime_r (time, buf, 26);
+#else
return asctime_r (time, buf);
-# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
- PACE_UNUSED_ARG (time);
- PACE_UNUSED_ARG (buf);
- PACE_ERRNO_NO_SUPPORT ();
- return 0;
-# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
+#endif /* PACE_LYNXOS */
}
#endif /* PACE_HAS_POSIX_CLSR_UOF */
@@ -125,14 +127,11 @@ PACE_INLINE
char *
pace_ctime_r (const pace_time_t * clock, char * buf)
{
-# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
+# if (PACE_SUNOS) || (PACE_LYNXOS)
+ return ctime_r (clock, buf, 26);
+# else
return ctime_r (clock, buf);
-# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
- PACE_UNUSED_ARG (clock);
- PACE_UNUSED_ARG (buf);
- PACE_ERRNO_NO_SUPPORT ();
- return 0;
-# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
+# endif /* PACE_SUNOS */
}
#endif /* PACE_HAS_POSIX_CLSR_UOF */
@@ -150,14 +149,14 @@ PACE_INLINE
pace_tm *
pace_gmtime_r (const pace_time_t * clock, pace_tm * result)
{
-# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
+#if (PACE_LYNXOS)
+ /*lynxos 3.1 has POSIX.4 Draft 9 versions of these */
+ if (gmtime_r (result, clock) == 0)
+ return (pace_tm*)0;
+ return result; /* ????? */
+#else
return gmtime_r (clock, result);
-# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
- PACE_UNUSED_ARG (clock);
- PACE_UNUSED_ARG (result);
- PACE_ERRNO_NO_SUPPORT ();
- return 0;
-# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
+#endif /* PACE_LYNXOS */
}
#endif /* PACE_HAS_POSIX_CLSR_UOF */
@@ -175,14 +174,14 @@ PACE_INLINE
pace_tm *
pace_localtime_r (const pace_time_t * clock, pace_tm * result)
{
-# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
+#if (PACE_LYNXOS)
+ /*lynxos 3.1 has POSIX.4 Draft 9 versions of these */
+ if (localtime_r (result, clock) == 0)
+ return (pace_tm*)0;
+ return result; /* ????? */
+#else
return localtime_r (clock, result);
-# else /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
- PACE_UNUSED_ARG (clock);
- PACE_UNUSED_ARG (result);
- PACE_ERRNO_NO_SUPPORT ();
- return 0;
-# endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
+#endif /* PACE_LYNXOS */
}
#endif /* PACE_HAS_POSIX_CLSR_UOF */
diff --git a/PACE/pace/posix/unistd.inl b/PACE/pace/posix/unistd.inl
index 01ffc365603..d06564e25d0 100644
--- a/PACE/pace/posix/unistd.inl
+++ b/PACE/pace/posix/unistd.inl
@@ -227,13 +227,13 @@ PACE_INLINE
int
pace_getlogin_r (char * name, size_t namesize)
{
-# if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
+#if (PACE_SUNOS) || (PACE_LYNXOS)
+ if (getlogin_r (name, (int) namesize) == 0)
+ return errno;
+ return 0;
+#else
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 */
+#endif /* SUN_OS */
}
#endif /* PACE_HAS_POSIX_UGR_UOF */
@@ -433,14 +433,13 @@ pace_ttyname_r (PACE_HANDLE fildes,
char * name,
size_t namesize)
{
-#if defined (PACE_HAS_POSIX_PTHREAD_SEMANTICS)
+#if (PACE_SUNOS) || (PACE_LYNXOS)
+ if (ttyname_r (fildes, name, (int) namesize) == 0)
+ return errno;
+ return 0;
+#else
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 */
+#endif /* PACE_SUNOS */
}
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */
diff --git a/PACE/pace/semaphore.h b/PACE/pace/semaphore.h
index d69c7635b34..fd4bc1fcebe 100644
--- a/PACE/pace/semaphore.h
+++ b/PACE/pace/semaphore.h
@@ -72,9 +72,12 @@ extern "C" {
IEEE Std 1003.1, 1996 Edition), Section 11.2.3.
*/
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
- # define pace_sem_open sem_open
+# if defined (PACE_HAS_CPLUSPLUS)
+# define pace_sem_open ::sem_open
+# else
+# define pace_sem_open sem_open
+# endif /* PACE_HAS_CPLUSPLUS */
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */
- /* int fprintf (FILE *stream, const char *format, (*//* args *//*) ... ); */
/**
PACE's implementation of the POSIX function sem_post.
diff --git a/PACE/pace/stdio.h b/PACE/pace/stdio.h
index b1680fb84b6..a35c636c2b6 100644
--- a/PACE/pace/stdio.h
+++ b/PACE/pace/stdio.h
@@ -204,7 +204,11 @@ extern "C" {
IEEE Std 1003.1, 1996 Edition), Section 8.1.
*/
#if (PACE_HAS_POSIX_DI_UOF)
- #define pace_fscanf fscanf
+# if defined (PACE_HAS_CPLUSPLUS)
+# define pace_fscanf ::fscanf
+# else
+# define pace_fscanf fscanf
+# endif /* PACE_HAS_CPLUSPLUS */
#endif /* PACE_HAS_POSIX_DI_UOF */
/* int pace_scanf (const char *format, ... ); */