diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-21 22:43:24 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-21 22:43:24 +0000 |
commit | 1b2276da2110d08dfb38bf6f64000a293e1fe421 (patch) | |
tree | 2547fd491d04980a0407e42fa48de5d98d172c25 /PACE | |
parent | 993bea83732043d16f512b0423f3a0f3669c48f5 (diff) | |
download | ATCD-1b2276da2110d08dfb38bf6f64000a293e1fe421.tar.gz |
ChangeLogTag:Sat Apr 21 15:31:27 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'PACE')
-rw-r--r-- | PACE/pace/config/compiler.h | 6 | ||||
-rw-r--r-- | PACE/pace/config/platform.h | 1 | ||||
-rw-r--r-- | PACE/pace/ctype.h | 10 | ||||
-rw-r--r-- | PACE/pace/win32/pthread.c | 19 | ||||
-rw-r--r-- | PACE/pace/win32/pthread.inl | 5 | ||||
-rw-r--r-- | PACE/pace/win32/semaphore.c | 2 | ||||
-rw-r--r-- | PACE/pace/win32/semaphore.h | 2 | ||||
-rw-r--r-- | PACE/pace/win32/signal.inl | 1 | ||||
-rw-r--r-- | PACE/pace/win32/socket.c | 5 | ||||
-rw-r--r-- | PACE/pace/win32/socket.h | 5 | ||||
-rw-r--r-- | PACE/pace/win32/socket.inl | 3 | ||||
-rw-r--r-- | PACE/pace/win32/stdlib.inl | 11 | ||||
-rw-r--r-- | PACE/pace/win32/unistd.h | 2 | ||||
-rw-r--r-- | PACE/pace/win32/unistd.inl | 28 | ||||
-rw-r--r-- | PACE/pace/win32/utime.c | 8 | ||||
-rw-r--r-- | PACE/pace/win32/utsname.c | 1 | ||||
-rw-r--r-- | PACE/pace/win32/utsname.inl | 1 | ||||
-rw-r--r-- | PACE/pace/win32/wait.inl | 18 |
18 files changed, 90 insertions, 38 deletions
diff --git a/PACE/pace/config/compiler.h b/PACE/pace/config/compiler.h index 92e25c97a05..6928db40a93 100644 --- a/PACE/pace/config/compiler.h +++ b/PACE/pace/config/compiler.h @@ -28,7 +28,11 @@ * static. Otherwise, we want PACE_INLINE to be defined as nothing. */ # if defined (PACE_HAS_INLINE) -# define PACE_INLINE static +# if defined (__GNUC__) +# define PACE_INLINE static inline +# else +# define PACE_INLINE static +# endif # else # define PACE_INLINE # endif /* ! PACE_HAS_INLINE */ diff --git a/PACE/pace/config/platform.h b/PACE/pace/config/platform.h index 333e845197e..ec206c25599 100644 --- a/PACE/pace/config/platform.h +++ b/PACE/pace/config/platform.h @@ -64,6 +64,7 @@ # define PACE_WIN32 0 /* Doesn't use the makefile! */ #elif defined (WIN32) +# undef PACE_WIN32 # define PACE_WIN32 2000 # define PACE_LACKS_POSIX PACE_WIN32 # define PACE_LINUX 0 diff --git a/PACE/pace/ctype.h b/PACE/pace/ctype.h index ff8ca36b242..10a457f51ba 100644 --- a/PACE/pace/ctype.h +++ b/PACE/pace/ctype.h @@ -147,16 +147,6 @@ extern "C" { PACE_INLINE int pace_toupper (int c); #endif /* PACE_HAS_POSIX_CLS_UOF */ -#if defined (PACE_HAS_INLINE) -# if (PACE_HAS_POSIX) -# include "pace/posix/ctype.inl" -# elif (PACE_VXWORKS) -# include "pace/vxworks/ctype.inl" -# elif (PACE_WIN32) -# include "pace/win32/ctype.inl" -# endif -#endif /* PACE_HAS_INLINE */ - #if defined (PACE_HAS_CPLUSPLUS) } #endif /* PACE_HAS_CPLUSPLUS */ diff --git a/PACE/pace/win32/pthread.c b/PACE/pace/win32/pthread.c index 790add37a53..a314c903e9c 100644 --- a/PACE/pace/win32/pthread.c +++ b/PACE/pace/win32/pthread.c @@ -31,6 +31,9 @@ pthread_create (pace_pthread_t * thread, void * (*start_routine) (void*), void * arg) { + /* Get around a gcc bug. */ + typedef unsigned (__stdcall *bthrexr)(void*); + unsigned flags = 0x0, thr_addr = 0x0; if (attr->sparam_.sched_priority != THREAD_PRIORITY_NORMAL) { @@ -38,12 +41,13 @@ pthread_create (pace_pthread_t * thread, flags = CREATE_SUSPENDED; } - thread = (pace_pthread_t) _beginthreadex (0, - attr->stack_size_, - (unsigned (__stdcall *)(void*))start_routine, - arg, - flags, - &thr_addr); + thread = (pace_pthread_t) + _beginthreadex (0, + attr->stack_size_, + (bthrexr) start_routine, + arg, + flags, + &thr_addr); if (flags == CREATE_SUSPENDED && thread != 0) { @@ -77,6 +81,7 @@ pthread_getschedparam (pace_pthread_t thread, int * policy, pace_sched_param * param) { + PACE_UNUSED_ARG (policy) if (param != (pace_sched_param*)0) { param->sched_priority = GetThreadPriority (thread); @@ -92,6 +97,8 @@ pthread_getschedparam (pace_pthread_t thread, int policy, const pace_sched_param * param) { + PACE_UNUSED_ARG(policy); + if (SetThreadPriority (thread, param->sched_priority)) { return 0; diff --git a/PACE/pace/win32/pthread.inl b/PACE/pace/win32/pthread.inl index 7a61a99d66f..3fea1729342 100644 --- a/PACE/pace/win32/pthread.inl +++ b/PACE/pace/win32/pthread.inl @@ -37,6 +37,11 @@ pace_pthread_create (pace_pthread_t * thread, void * (*start_routine) (void*), void * arg) { + PACE_UNUSED_ARG (thread); + PACE_UNUSED_ARG (attr); + PACE_UNUSED_ARG (start_routine); + PACE_UNUSED_ARG (arg); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ diff --git a/PACE/pace/win32/semaphore.c b/PACE/pace/win32/semaphore.c index 401ebddc5a5..23728df5c29 100644 --- a/PACE/pace/win32/semaphore.c +++ b/PACE/pace/win32/semaphore.c @@ -47,6 +47,8 @@ sem_destroy (pace_sem_t * sem) int sem_init (pace_sem_t * sem, int pshared, unsigned int value) { + PACE_UNUSED_ARG (pshared); + /* Create the semaphore with its value initialized to <count> and its maximum value initialized to <max>. diff --git a/PACE/pace/win32/semaphore.h b/PACE/pace/win32/semaphore.h index d7e395f7fc6..7abd89211f0 100644 --- a/PACE/pace/win32/semaphore.h +++ b/PACE/pace/win32/semaphore.h @@ -40,7 +40,7 @@ extern "C" { #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) - pace_sem_t * sem_open (const char * name, int oflag, ...); + PACE_INLINE pace_sem_t * sem_open (const char * name, int oflag, ...); #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) diff --git a/PACE/pace/win32/signal.inl b/PACE/pace/win32/signal.inl index 57c4fd87ad7..437d609f926 100644 --- a/PACE/pace/win32/signal.inl +++ b/PACE/pace/win32/signal.inl @@ -142,6 +142,7 @@ pace_sigqueue (pace_pid_t pid, int signo, { PACE_UNUSED_ARG (pid); PACE_UNUSED_ARG (signo); + PACE_UNUSED_ARG (value); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ diff --git a/PACE/pace/win32/socket.c b/PACE/pace/win32/socket.c new file mode 100644 index 00000000000..9b9450e3886 --- /dev/null +++ b/PACE/pace/win32/socket.c @@ -0,0 +1,5 @@ +#include "pace/sys/socket.h" + +/* + * Empty for win32. + */ diff --git a/PACE/pace/win32/socket.h b/PACE/pace/win32/socket.h new file mode 100644 index 00000000000..bfaaaab9953 --- /dev/null +++ b/PACE/pace/win32/socket.h @@ -0,0 +1,5 @@ +/* + * $Id$ + * + * Empty for win32. + */ diff --git a/PACE/pace/win32/socket.inl b/PACE/pace/win32/socket.inl new file mode 100644 index 00000000000..72935ceee77 --- /dev/null +++ b/PACE/pace/win32/socket.inl @@ -0,0 +1,3 @@ +/* + * Empty for win32. + */ diff --git a/PACE/pace/win32/stdlib.inl b/PACE/pace/win32/stdlib.inl index 455943da667..3597e1954dc 100644 --- a/PACE/pace/win32/stdlib.inl +++ b/PACE/pace/win32/stdlib.inl @@ -230,6 +230,17 @@ pace_strtoul (const char* nptr, #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE +int +pace_system (const char* string) +{ + PACE_UNUSED_ARG (string); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); +} + +#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ + +#if (PACE_HAS_POSIX_NONUOF_FUNCS) +PACE_INLINE pace_size_t pace_wcstombs (char* s, const pace_wchar_t* pwcs, diff --git a/PACE/pace/win32/unistd.h b/PACE/pace/win32/unistd.h index 7751ddcf509..1292cea5bd9 100644 --- a/PACE/pace/win32/unistd.h +++ b/PACE/pace/win32/unistd.h @@ -104,7 +104,7 @@ typedef ssize_t pace_ssize_t; #if (PACE_HAS_POSIX_DI_UOF) pace_ssize_t pace_win32_read (PACE_HANDLE fildes, - const void * buf, + void * buf, pace_size_t nbyte); #endif /* PACE_HAS_POSIX_DI_UOF */ diff --git a/PACE/pace/win32/unistd.inl b/PACE/pace/win32/unistd.inl index 29599b5ee22..83f3f2a9e14 100644 --- a/PACE/pace/win32/unistd.inl +++ b/PACE/pace/win32/unistd.inl @@ -109,11 +109,11 @@ int pace_execv (const char * path, char * const argv[]) { -#if defined (__BORLANDC__) +#if defined (__BORLANDC__) || defined(__MINGW32__) return execv (path, argv); -#else /* __BORLANDC__ */ +#else /* __BORLANDC__ || __MINGW32__ */ return _execv (path, (const char * const *) argv); -#endif /* __BORLANDC__ */ +#endif /* __BORLANDC__ || __MINGW32__ */ /* if successful, this operation does NOT return */ } #endif /* PACE_HAS_POSIX_MP_UOF */ @@ -125,12 +125,12 @@ pace_execve (const char * path, char * const argv[], char * const envp[]) { -#if defined (__BORLANDC__) +#if defined (__BORLANDC__) || defined (__MINGW32__) return execve (path, argv, envp); -#else /* __BORLANDC__ */ +#else /* __BORLANDC__ || __MINGW32__ */ return _execve (path, (const char *const *) argv, (const char *const *) envp); -#endif /* __BORLANDC__ */ +#endif /* __BORLANDC__ || __MINGW32__ */ /* if successful, this operation does NOT return */ } #endif /* PACE_HAS_POSIX_MP_UOF */ @@ -141,11 +141,11 @@ int pace_execvp (const char * file, char * const argv[]) { -#if defined (__BORLANDC__) +#if defined (__BORLANDC__) || defined (__MINGW32__) return execvp (file, argv); -#else /* __BORLANDC__ */ +#else /* __BORLANDC__ || __MINGW32__ */ return _execvp (file, (const char *const *) argv); -#endif /* __BORLANDC__ */ +#endif /* __BORLANDC__ || __MINGW32__ */ /* if successful, this operation does NOT return */ } #endif /* PACE_HAS_POSIX_MP_UOF */ @@ -262,6 +262,8 @@ PACE_INLINE int pace_getlogin_r (char * name, size_t namesize) { + PACE_UNUSED_ARG (name); + PACE_UNUSED_ARG (namesize); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_UGR_UOF */ @@ -310,11 +312,11 @@ PACE_INLINE int pace_isatty (int fildes) { -#if defined (__BORLANDC__) +#if defined (__BORLANDC__) || defined (__MINGW32__) return isatty (fildes); -#else /* __BORLANDC__ */ +#else /* __BORLANDC__ || __MINGW32__ */ return _isatty (fildes); -#endif /* __BORLANDC__ */ +#endif /* __BORLANDC__ || __MINGW32__ */ } #endif /* PACE_HAS_POSIX_DS_UOF */ @@ -473,7 +475,7 @@ PACE_INLINE char * pace_ttyname (PACE_HANDLE fildes) { - char * retval = (void*)0; + char * retval = (char*) 0; PACE_UNUSED_ARG (fildes); PACE_ERRNO_NO_SUPPORT_RETURN (retval); } diff --git a/PACE/pace/win32/utime.c b/PACE/pace/win32/utime.c index 1ee2542885b..cafec0eb6cb 100644 --- a/PACE/pace/win32/utime.c +++ b/PACE/pace/win32/utime.c @@ -23,15 +23,19 @@ int win32_utime (const char * path, const pace_utimbuf * times) { + PACE_UNUSED_ARG (path); + PACE_UNUSED_ARG (times); + PACE_ERRNO_NO_SUPPORT_RETURN (-1); - /* Not yet working +#if 0 + /* Not yet working */ char * path2 = (char*) malloc (sizeof (path)); pace_strcpy (path2, path); pace_utimbuf * times2 = (pace_utimbuf*) malloc (sizeof (pace_utimbuf); memcpy (times2, times, sizeof times); return _utime (path2, times2); - */ +#endif } #endif /* PACE_HAS_POSIX_FS_UOF */ diff --git a/PACE/pace/win32/utsname.c b/PACE/pace/win32/utsname.c index 208b3f2f142..9963f1ff624 100644 --- a/PACE/pace/win32/utsname.c +++ b/PACE/pace/win32/utsname.c @@ -23,6 +23,7 @@ int uname (pace_utsname * name) { + PACE_UNUSED_ARG (name); PACE_ERRNO_NO_SUPPORT_RETURN (-1); #if 0 /* Emulation: Not bug free! :-/ */ diff --git a/PACE/pace/win32/utsname.inl b/PACE/pace/win32/utsname.inl index e906fc1e131..bc79bb80db4 100644 --- a/PACE/pace/win32/utsname.inl +++ b/PACE/pace/win32/utsname.inl @@ -20,6 +20,7 @@ PACE_INLINE int pace_uname (pace_utsname * name) { + PACE_UNUSED_ARG (name); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_SP_UOF */ diff --git a/PACE/pace/win32/wait.inl b/PACE/pace/win32/wait.inl index 02c1aca2ce7..166a0936d10 100644 --- a/PACE/pace/win32/wait.inl +++ b/PACE/pace/win32/wait.inl @@ -18,8 +18,12 @@ PACE_INLINE pace_pid_t pace_wait (int * statloc) { - pace_pid_t retval = -1; - PACE_ERRNO_NO_SUPPORT_RETURN (retval); + PACE_UNUSED_ARG (statloc); + + { + pace_pid_t retval = -1; + PACE_ERRNO_NO_SUPPORT_RETURN (retval); + } } #endif /* PACE_HAS_POSIX_MP_UOF */ @@ -28,8 +32,14 @@ PACE_INLINE pace_pid_t pace_waitpid (pace_pid_t pid, int * statloc, int options) { + PACE_UNUSED_ARG (pid); + PACE_UNUSED_ARG (statloc); + PACE_UNUSED_ARG (options); + /* ACE version uses a HANDLE */ - pace_pid_t retval = -1; - PACE_ERRNO_NO_SUPPORT_RETURN (retval); + { + pace_pid_t retval = -1; + PACE_ERRNO_NO_SUPPORT_RETURN (retval); + } } #endif /* PACE_HAS_POSIX_MP_UOF */ |