diff options
author | joeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-01-12 13:49:04 +0000 |
---|---|---|
committer | joeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-01-12 13:49:04 +0000 |
commit | a072134bbaf5fce5623c7152f617fd56e0956ac7 (patch) | |
tree | f057bb5175403615e4bf6649a8fac1c898f0f244 /PACE | |
parent | 39821fb9b116e2a54f2458e58de8b40eda8ccdd3 (diff) | |
download | ATCD-a072134bbaf5fce5623c7152f617fd56e0956ac7.tar.gz |
Fri Jan 12 07:35:31 2001 Joe Hoffert <joeh@cs.wustl.edu>
Diffstat (limited to 'PACE')
-rw-r--r-- | PACE/ChangeLog | 24 | ||||
-rw-r--r-- | PACE/Makefile | 6 | ||||
-rw-r--r-- | PACE/include/makeinclude/rules.common.GNU | 3 | ||||
-rw-r--r-- | PACE/pace/posix/pthread.inl | 32 | ||||
-rw-r--r-- | PACE/pace/posix/socket.h | 11 | ||||
-rw-r--r-- | PACE/tests/Posix_SP_Test.c | 9 | ||||
-rw-r--r-- | PACE/tests/Stdio_Test.c | 30 | ||||
-rw-r--r-- | PACE/tests/mqueue_test.c | 10 |
8 files changed, 106 insertions, 19 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog index 738525a5836..929091f3d9a 100644 --- a/PACE/ChangeLog +++ b/PACE/ChangeLog @@ -1,3 +1,27 @@ +Fri Jan 12 07:35:31 2001 Joe Hoffert <joeh@cs.wustl.edu> + + * Makefile: + Changed to ignore VxWorks platforms (not currently + supported by PACE). + + * include/makeinclude/rules.common.GNU: + Added CFLAGS for LynxOS 3.0.0 so that the PACE library + will compile and not break nightly builds. + + * tests/mqueue_test.c: + * tests/Stdio_Test.c: + * tests/Posix_SP_Test.c: + Changed to compile (i.e., do nothing) for LynxOS 3.0.0 + to keep nightly builds from breaking. + + * pace/posix/pthread.inl: + Added support for LynxOS 3.0.0. + + * pace/posix/socket.h: + Fixed problems with LynxOS support (i.e., Lynx doesn't + use socklen_t structs - it uses ints instead - and Lynx + doesn't use family_t structs at all.) + Thu Jan 04 17:10:09 2001 Luther Baker <luther@cs.wustl.edu> * pace/win32/pace.dsw diff --git a/PACE/Makefile b/PACE/Makefile index 0a9bd0cd01d..1dfa4c80039 100644 --- a/PACE/Makefile +++ b/PACE/Makefile @@ -32,6 +32,12 @@ DIRS = pace \ include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU include $(ACE_ROOT)/include/makeinclude/macros.GNU +ifdef VXWORKS +DIRS = + all clean realclean: + @echo PACE won\'t run or build for VxWorks. +else include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU +endif # VXWORKS diff --git a/PACE/include/makeinclude/rules.common.GNU b/PACE/include/makeinclude/rules.common.GNU index 0eba603e787..4d7f5a5e061 100644 --- a/PACE/include/makeinclude/rules.common.GNU +++ b/PACE/include/makeinclude/rules.common.GNU @@ -65,6 +65,9 @@ endif ifeq ($(PACE_SYSNAME),LynxOS) VPATH :=.:posix:$(VPATH) CFLAGS += -DPACE_LYNXOS=$(PACE_SYSVER) + ifeq ($(PACE_SYSVER),0x300) + CFLAGS += -D_POSIX_THREADS_CALLS + endif # ($(PACE_SYSVER),0x300) endif ifeq ($(PACE_SYSNAME),OSF1) diff --git a/PACE/pace/posix/pthread.inl b/PACE/pace/posix/pthread.inl index 9ff8b41e3f6..cb16f5b9575 100644 --- a/PACE/pace/posix/pthread.inl +++ b/PACE/pace/posix/pthread.inl @@ -62,8 +62,12 @@ int pace_pthread_attr_getinheritsched (const pace_pthread_attr_t * attr, int * inheritsched) { +#if PACE_LYNXOS == 0x300 + return pthread_attr_getinheritsched (PACE_NONCONST_ARG_CAST (pace_pthread_attr_t *) attr); +#else return pthread_attr_getinheritsched (PACE_NONCONST_ARG_CAST (pace_pthread_attr_t *) attr, inheritsched); +#endif /* PACE_LYNXOS != 0x300 */ } #endif /* PACE_HAS_NONUOF_FUNCS */ @@ -113,8 +117,12 @@ int pace_pthread_attr_getstacksize (const pace_pthread_attr_t * attr, size_t * stacksize) { +#if PACE_LYNXOS == 0x300 + return pthread_attr_getstacksize (PACE_NONCONST_ARG_CAST (pace_pthread_attr_t *) attr); +#else return pthread_attr_getstacksize (PACE_NONCONST_ARG_CAST (pace_pthread_attr_t *) attr, stacksize); +#endif /* PACE_LYNXOS != 0x300 */ } #endif /* PACE_HAS_NONUOF_FUNCS */ @@ -230,7 +238,11 @@ int pace_pthread_cond_init (pace_pthread_cond_t * cond, const pace_pthread_condattr_t * attr) { +#if PACE_LYNXOS == 0x300 + return pthread_cond_init (cond, *attr); +#else return pthread_cond_init (cond, attr); +#endif /* PACE_LYNXOS != 0x300 */ } #endif /* PACE_HAS_NONUOF_FUNCS */ @@ -335,7 +347,11 @@ pace_pthread_create (pace_pthread_t * thread, void * (*start_routine) (void*), void * arg) { +#if PACE_LYNXOS == 0x300 + return pthread_create (thread, *attr, start_routine, arg); +#else return pthread_create (thread, attr, start_routine, arg); +#endif /* PACE_LYNXOS != 0x300 */ } # endif /*! PACE_HAS_CPLUSPLUS */ #endif /* PACE_HAS_NONUOF_FUNCS */ @@ -345,7 +361,11 @@ PACE_INLINE int pace_pthread_detach (pace_pthread_t thread) { +#if PACE_LYNXOS == 0x300 + return pthread_detach (&thread); +#else return pthread_detach (thread); +#endif /* PACE_LYNXOS != 0x300 */ } #endif /* PACE_HAS_NONUOF_FUNCS */ @@ -384,7 +404,15 @@ PACE_INLINE void * pace_pthread_getspecific (pace_pthread_key_t key) { +#if PACE_LYNXOS == 0x300 + void *value; + if (pthread_getspecific (key, &value) != 0) + return 0; + + return value; +#else return pthread_getspecific (key); +#endif /* PACE_LYNXOS != 0x300 */ } #endif /* PACE_HAS_NONUOF_FUNCS */ @@ -469,7 +497,11 @@ int pace_pthread_mutex_init (pace_pthread_mutex_t * mutex, const pace_pthread_mutexattr_t * attr) { +#if PACE_LYNXOS == 0x300 + return pthread_mutex_init (mutex, *attr); +#else return pthread_mutex_init (mutex, attr); +#endif /* PACE_LYNXOS != 0x300 */ } #endif /* PACE_HAS_NONUOF_FUNCS */ diff --git a/PACE/pace/posix/socket.h b/PACE/pace/posix/socket.h index e628d26418d..32497d4cc14 100644 --- a/PACE/pace/posix/socket.h +++ b/PACE/pace/posix/socket.h @@ -17,8 +17,13 @@ #define PACE_SOCKET_H_POSIX #include <sys/types.h> +#if PACE_LYNXOS == 0x300 || PACE_LYNXOS == 0x310 +#include <socket.h> +#include <uio.h> +#else #include <sys/socket.h> #include <sys/uio.h> +#endif /* PACE_LYNXOS != 0x300 && PACE_LYNXOS != 0x310 */ #if defined (PACE_HAS_CPLUSPLUS) extern "C" { @@ -30,12 +35,18 @@ extern "C" { #ifndef PACE_SOCKLEN_T #define PACE_SOCKLEN_T +# if PACE_LYNXOS == 0x300 || PACE_LYNXOS == 0x310 + typedef int pace_socklen_t; +# else typedef socklen_t pace_socklen_t; +# endif /* PACE_LYNXOS != 0x300 && PACE_LYNXOS != 0x310 */ #endif /* PACE_SOCKLEN_T */ #ifndef PACE_SA_FAMILY_T #define PACE_SA_FAMILY_T +# if PACE_LYNXOS != 0x300 && PACE_LYNXOS != 0x310 typedef sa_family_t pace_family_t; +# endif /* PACE_LYNXOS != 0x300 && PACE_LYNXOS != 0x310 */ #endif /* PACE_SA_FAMILY_T */ #ifndef PACE_MSGHDR diff --git a/PACE/tests/Posix_SP_Test.c b/PACE/tests/Posix_SP_Test.c index 12d8ff5b89a..ded757111c0 100644 --- a/PACE/tests/Posix_SP_Test.c +++ b/PACE/tests/Posix_SP_Test.c @@ -18,6 +18,7 @@ * ===================================================================== */ +#if PACE_LYNXOS != 0x300 #include "pace/stdio.h" #include "pace/unistd.h" #include "pace/time.h" @@ -126,6 +127,7 @@ check_sysconf () "_SC_PRIORITY_SCHEDULING", "_SC_REALTIME_SIGNALS"}; + /* Success indicated by compilation for this function. */ printf("pace_sysconf %s\n", success); for (index = 0; index < confnamessize; index++) { @@ -236,3 +238,10 @@ main (int argc, char **argv) PACE_UNUSED_ARG (argv); return 0; } +#else +int +main (int argc, char **argv) +{ + printf("PACE does not support LynxOS 3.0.0.\n"); +} +#endif /* PACE_LYNXOS == 0x300 */ diff --git a/PACE/tests/Stdio_Test.c b/PACE/tests/Stdio_Test.c index e4249d83512..d84cfd9af39 100644 --- a/PACE/tests/Stdio_Test.c +++ b/PACE/tests/Stdio_Test.c @@ -29,6 +29,7 @@ const char * success = "SUCCEEDED"; const char * failure = "***FAILED***"; const int SLEEPTIME = 20; +#if PACE_LYNXOS != 0x300 int main (int argc, char **argv) { @@ -46,8 +47,6 @@ main (int argc, char **argv) return -1; } - printf("pace_fopen %s\n", success); - /* Test writing to a file. */ retval = pace_fputs (string1, file); @@ -57,8 +56,6 @@ main (int argc, char **argv) return -1; } - printf("pace_fputs %s\n", success); - /* Test flushing a file. */ retval = pace_fflush (file); if (retval != 0) @@ -67,8 +64,6 @@ main (int argc, char **argv) return -1; } - printf("pace_fflush %s\n", success); - /* Test seeking in a file. */ retval = pace_fseek (file, 0, @@ -79,8 +74,6 @@ main (int argc, char **argv) return -1; } - printf("pace_fseek %s\n", success); - /* Test reading from a file. */ retval2 = pace_fgets (buffer, sizeof(buffer), @@ -91,16 +84,12 @@ main (int argc, char **argv) return -1; } - printf("pace_fgets %s\n", success); - if (pace_strcmp(buffer, string1) != 0) { printf("strcmp of pace_fgets %s\n", failure); return -1; } - printf("strcmp of pace_fgets %s\n", success); - /* Test closing a file. */ retval = pace_fclose (file); if (retval != 0) @@ -109,16 +98,21 @@ main (int argc, char **argv) return -1; } - printf("pace_fclose %s\n", success); - - /* use this to pause the program to test the size of the exe - * Cntr-Alt-Del and then look at the task manager to - * find the size - */ + /* uncomment this line to pause the program to test the size + * of the exe Cntr-Alt-Del and then look at the task manager to + * find the size pace_sleep (SLEEPTIME); + */ PACE_UNUSED_ARG (argc); PACE_UNUSED_ARG (argv); return 0; } +#else +int +main (int argc, char **argv) +{ + printf("PACE does not support LynxOS 3.0.0.\n"); +} +#endif /* PACE_LYNXOS == 0x300 */ diff --git a/PACE/tests/mqueue_test.c b/PACE/tests/mqueue_test.c index f7cf87b093b..3874564b1a9 100644 --- a/PACE/tests/mqueue_test.c +++ b/PACE/tests/mqueue_test.c @@ -1,5 +1,6 @@ /* $Id$ */ +#if PACE_LYNXOS != 0x300 #include "pace/stdio.h" #include "pace/fcntl.h" #include "pace/mqueue.h" @@ -33,7 +34,7 @@ int main (int argc, char** argv) { #if PACE_LYNXOS - pace_printf ("No errors, have occurred. On the other hand no operations have been performed either. Take what you can get I guess.\n"); + pace_printf ("mqueue_test not supported on LynxOS.\n"); PACE_UNUSED_ARG (argc); PACE_UNUSED_ARG (argv); return EXIT_SUCCESS; @@ -120,3 +121,10 @@ main (int argc, char** argv) return EXIT_SUCCESS; #endif /* ! PACE_LYNXOS */ } +#else +int +main (int argc, char **argv) +{ + printf("PACE does not support LynxOS 3.0.0.\n"); +} +#endif /* PACE_LYNXOS == 0x300 */ |