diff options
author | joeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-28 21:34:29 +0000 |
---|---|---|
committer | joeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-28 21:34:29 +0000 |
commit | aeb9a9e42c723b8e788480b7018e013658690ecb (patch) | |
tree | 1dd8d0848deba293e769104cee4b37700956b426 /PACE | |
parent | f965b61797281143bb2b72bf46368363d0a737ad (diff) | |
download | ATCD-aeb9a9e42c723b8e788480b7018e013658690ecb.tar.gz |
Fri Jul 28 15:54:38 2000 Joe Hoffert <joeh@cs.wustl.edu>
Diffstat (limited to 'PACE')
-rw-r--r-- | PACE/ChangeLog | 38 | ||||
-rw-r--r-- | PACE/include/makeinclude/rules.common.GNU | 9 | ||||
-rw-r--r-- | PACE/pace/Makefile | 4 | ||||
-rw-r--r-- | PACE/pace/config/config.h | 104 | ||||
-rw-r--r-- | PACE/pace/posix/dirent.inl | 4 | ||||
-rw-r--r-- | PACE/pace/posix/grp.inl | 13 | ||||
-rw-r--r-- | PACE/pace/posix/pwd.inl | 33 | ||||
-rw-r--r-- | PACE/pace/posix/signal.h | 8 | ||||
-rw-r--r-- | PACE/pace/posix/signal.inl | 10 | ||||
-rw-r--r-- | PACE/pace/posix/time.inl | 4 | ||||
-rw-r--r-- | PACE/tests/Makefile | 2 |
11 files changed, 159 insertions, 70 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog index 6e4273ddd53..98b21e2611a 100644 --- a/PACE/ChangeLog +++ b/PACE/ChangeLog @@ -1,3 +1,41 @@ +Fri Jul 28 15:54:38 2000 Joe Hoffert <joeh@cs.wustl.edu> + + * tests/Makefile: + Modified to use ace_components rather than + pace_components. + + * pace/posix/signal.h: + Changed pace_sig_pf typedef to compile for LynxOS. Still + need to fix it to compile for ACE with PACE for LynxOS. + + * pace/posix/signal.inl: + Fixed sigwait and signal for LynxOS (at least for building + pace). + + * pace/posix/time.inl: + * pace/posix/pwd.inl: + * pace/posix/grp.inl: + * pace/posix/dirent.inl: + Changed LynxOS workarounds for the reentrant functions + and deleted the check for SUNOS since now it can use + the POSIX calls (with _POSIX_PTHREAD_SEMANTICS being + defined properly). + + * pace/config/config.h: + Deleted definition of _REENTRANT (and put it in + include/makeinclude/rules.common.GNU) and defined + the different POSIX UoF macros to be 0 if we're + not using all of them. + + * pace/Makefile: + Modified to use bin/ace_components rather than + bin/pace_components (which is going away). + + * include/makeinclude/rules.common.GNU: + Adding -D_POSIX_PTHREAD_SEMANTICS (if threads == 1) + and -D_REENTRANT for SunOS so they get defined before + any include files. + Fri Jul 28 11:29:08 2000 David L. Levine <levine@cs.wustl.edu> * README: added brief discussion of how PACE helps diff --git a/PACE/include/makeinclude/rules.common.GNU b/PACE/include/makeinclude/rules.common.GNU index 79ef9588050..256e0e38b17 100644 --- a/PACE/include/makeinclude/rules.common.GNU +++ b/PACE/include/makeinclude/rules.common.GNU @@ -45,12 +45,15 @@ ifeq ($(PACE_SYSNAME),SunOS) # need a 3 digit version number for comparison purposes. ifeq ($(PACE_SYSVER),57) PACE_SYSVER := $(PACE_SYSVER)0 - endif # PACE_SYSVER + endif # PACE_SYSVER == 57 ifeq ($(PACE_SYSVER),56) PACE_SYSVER := $(PACE_SYSVER)0 - endif # PACE_SYSVER + endif # PACE_SYSVER == 56 VPATH :=.:posix:$(VPATH) - CFLAGS += -DPACE_SUNOS=$(PACE_SYSVER) + CFLAGS += -DPACE_SUNOS=$(PACE_SYSVER) -D_REENTRANT + ifeq ($(threads),1) + CFLAGS += -D_POSIX_PTHREAD_SEMANTICS + endif # ! ($(threads),0) endif ifeq ($(PACE_SYSNAME),NT) diff --git a/PACE/pace/Makefile b/PACE/pace/Makefile index 4ed48be822e..b871361105b 100644 --- a/PACE/pace/Makefile +++ b/PACE/pace/Makefile @@ -434,10 +434,10 @@ include $(ACE_ROOT)/PACE/include/makeinclude/rules.common.GNU .PHONY: PACE_COMPONENTS PACE_COMPONENTS: - @sh $(ACE_ROOT)/bin/pace_components --pace --set ' $(PACE_COMPONENTS) ' + @sh $(ACE_ROOT)/bin/ace_components --pace --set ' $(PACE_COMPONENTS) ' realclean: - @sh $(ACE_ROOT)/bin/pace_components --pace --remove + @sh $(ACE_ROOT)/bin/ace_components --pace --remove # AIX template compilation speedup hack # Not added for PACE - can always be added later if needed diff --git a/PACE/pace/config/config.h b/PACE/pace/config/config.h index 0aaf45919e5..5dbd3b73cf2 100644 --- a/PACE/pace/config/config.h +++ b/PACE/pace/config/config.h @@ -16,12 +16,6 @@ #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 @@ -63,33 +57,93 @@ #if PACE_HAS_POSIX == PACE_LYNXOS # define PACE_NONCONST_ARG_CAST(TYPE) (TYPE) +# define PACE_VOIDSTARTSTAR_ARG_CAST(TYPE) (TYPE) #else /* ! PACE_LYNXOS */ # define PACE_NONCONST_ARG_CAST(TYPE) +# define PACE_VOIDSTARTSTAR_ARG_CAST(TYPE) #endif /* ! PACE_LYNXOS */ /* Adding appropriate macros for the different POSIX units of functionality that PACE supports. */ #if PACE_HAS_ALL_POSIX_FUNCS -#define PACE_HAS_POSIX_SP_UOF 1 -#define PACE_HAS_POSIX_MP_UOF 1 -#define PACE_HAS_POSIX_SIG_UOF 1 -#define PACE_HAS_POSIX_UG_UOF 1 -#define PACE_HAS_POSIX_FS_UOF 1 -#define PACE_HAS_POSIX_FA_UOF 1 -#define PACE_HAS_POSIX_F_UOF 1 -#define PACE_HAS_POSIX_DI_UOF 1 -#define PACE_HAS_POSIX_FM_UOF 1 -#define PACE_HAS_POSIX_P_UOF 1 -#define PACE_HAS_POSIX_DS_UOF 1 -#define PACE_HAS_POSIX_SD_UOF 1 -#define PACE_HAS_POSIX_CLS_UOF 1 -#define PACE_HAS_POSIX_JC_UOF 1 -#define PACE_HAS_POSIX_UGR_UOF 1 -#define PACE_HAS_POSIX_FL_UOF 1 -#define PACE_HAS_POSIX_CLSR_UOF 1 -#define PACE_HAS_POSIX_SDR_UOF 1 -#define PACE_HAS_POSIX_NONUOF_FUNCS 1 +# define PACE_HAS_POSIX_SP_UOF 1 +# define PACE_HAS_POSIX_MP_UOF 1 +# define PACE_HAS_POSIX_SIG_UOF 1 +# define PACE_HAS_POSIX_UG_UOF 1 +# define PACE_HAS_POSIX_FS_UOF 1 +# define PACE_HAS_POSIX_FA_UOF 1 +# define PACE_HAS_POSIX_F_UOF 1 +# define PACE_HAS_POSIX_DI_UOF 1 +# define PACE_HAS_POSIX_FM_UOF 1 +# define PACE_HAS_POSIX_P_UOF 1 +# define PACE_HAS_POSIX_DS_UOF 1 +# define PACE_HAS_POSIX_SD_UOF 1 +# define PACE_HAS_POSIX_CLS_UOF 1 +# define PACE_HAS_POSIX_JC_UOF 1 +# define PACE_HAS_POSIX_UGR_UOF 1 +# define PACE_HAS_POSIX_FL_UOF 1 +# define PACE_HAS_POSIX_CLSR_UOF 1 +# define PACE_HAS_POSIX_SDR_UOF 1 +# define PACE_HAS_POSIX_NONUOF_FUNCS 1 +#else +# if !defined PACE_HAS_POSIX_SP_UOF +# define PACE_HAS_POSIX_SP_UOF 0 +# endif /* ! PACE_HAS_POSIX_SP_UOF */ +# if !defined PACE_HAS_POSIX_MP_UOF +# define PACE_HAS_POSIX_MP_UOF 0 +# endif /* ! PACE_HAS_POSIX_MP_UOF */ +# if !defined PACE_HAS_POSIX_SIG_UOF +# define PACE_HAS_POSIX_SIG_UOF 0 +# endif /* ! PACE_HAS_POSIX_SIG_UOF */ +# if !defined PACE_HAS_POSIX_UG_UOF +# define PACE_HAS_POSIX_UG_UOF 0 +# endif /* ! PACE_HAS_POSIX_UG_UOF */ +# if !defined PACE_HAS_POSIX_FS_UOF +# define PACE_HAS_POSIX_FS_UOF 0 +# endif /* ! PACE_HAS_POSIX_FS_UOF */ +# if !defined PACE_HAS_POSIX_FA_UOF +# define PACE_HAS_POSIX_FA_UOF 0 +# endif /* ! PACE_HAS_POSIX_FA_UOF */ +# if !defined PACE_HAS_POSIX_F_UOF +# define PACE_HAS_POSIX_F_UOF 0 +# endif /* ! PACE_HAS_POSIX_F_UOF */ +# if !defined PACE_HAS_POSIX_DI_UOF +# define PACE_HAS_POSIX_DI_UOF 0 +# endif /* ! PACE_HAS_POSIX_DI_UOF */ +# if !defined PACE_HAS_POSIX_FM_UOF +# define PACE_HAS_POSIX_FM_UOF 0 +# endif /* ! PACE_HAS_POSIX_FM_UOF */ +# if !defined PACE_HAS_POSIX_P_UOF +# define PACE_HAS_POSIX_P_UOF 0 +# endif /* ! PACE_HAS_POSIX_P_UOF */ +# if !defined PACE_HAS_POSIX_DS_UOF +# define PACE_HAS_POSIX_DS_UOF 0 +# endif /* ! PACE_HAS_POSIX_DS_UOF */ +# if !defined PACE_HAS_POSIX_SD_UOF +# define PACE_HAS_POSIX_SD_UOF 0 +# endif /* ! PACE_HAS_POSIX_SD_UOF */ +# if !defined PACE_HAS_POSIX_CLS_UOF +# define PACE_HAS_POSIX_CLS_UOF 0 +# endif /* ! PACE_HAS_POSIX_CLS_UOF */ +# if !defined PACE_HAS_POSIX_JC_UOF +# define PACE_HAS_POSIX_JC_UOF 0 +# endif /* ! PACE_HAS_POSIX_JC_UOF */ +# if !defined PACE_HAS_POSIX_UGR_UOF +# define PACE_HAS_POSIX_UGR_UOF 0 +# endif /* ! PACE_HAS_POSIX_UGR_UOF */ +# if !defined PACE_HAS_POSIX_FL_UOF +# define PACE_HAS_POSIX_FL_UOF 0 +# endif /* ! PACE_HAS_POSIX_FL_UOF */ +# if !defined PACE_HAS_POSIX_CLSR_UOF +# define PACE_HAS_POSIX_CLSR_UOF 0 +# endif /* ! PACE_HAS_POSIX_CLSR_UOF */ +# if !defined PACE_HAS_POSIX_SDR_UOF +# define PACE_HAS_POSIX_SDR_UOF 0 +# endif /* ! PACE_HAS_POSIX_SDR_UOF */ +# if !defined PACE_HAS_POSIX_NONUOF_FUNCS +# define PACE_HAS_POSIX_NONUOF_FUNCS 0 +# endif /* ! PACE_HAS_POSIX_NONUOF_FUNCS */ #endif /* PACE_HAS_ALL_POSIX_FUNCS */ #endif /* PACE_CONFIG_CONFIG_H */ diff --git a/PACE/pace/posix/dirent.inl b/PACE/pace/posix/dirent.inl index 87b2cdf3a27..084b43e591c 100644 --- a/PACE/pace/posix/dirent.inl +++ b/PACE/pace/posix/dirent.inl @@ -37,14 +37,14 @@ int pace_readdir_r (PACE_DIR * dirp, pace_dirent * entry, pace_dirent ** result) { -#if (PACE_SUNOS) +#if (PACE_LYNXOS) *result = readdir_r (dirp, entry); if (*result == 0) return errno; return 0; #else return readdir_r (dirp, entry, result); -#endif /* PACE_SUNOS */ +#endif /* PACE_LYNXOS */ } #endif /* PACE_HAS_POSIX_CLSR_UOF */ diff --git a/PACE/pace/posix/grp.inl b/PACE/pace/posix/grp.inl index 740376de935..fcac3d5f1fd 100644 --- a/PACE/pace/posix/grp.inl +++ b/PACE/pace/posix/grp.inl @@ -31,14 +31,14 @@ pace_getgrgid_r (pace_gid_t gid, size_t bufsize, pace_group ** result) { -#if (PACE_SUNOS) - *result = getgrgid_r (gid, grp, buffer, bufsize); +#if (PACE_LYNXOS) + *result = getgrgid_r (grp, gid, buffer, bufsize); if (*result == 0) return errno; return 0; #else return getgrgid_r (gid, grp, buffer, bufsize, result); -#endif /* PACE_SUNOS */ +#endif /* ! PACE_LYNXOS */ } #endif /* PACE_HAS_POSIX_SDR_UOF */ @@ -60,13 +60,14 @@ pace_getgrnam_r (const char * name, size_t bufsize, pace_group ** result) { -#if (PACE_SUNOS) - *result = getgrnam_r (name, grp, buffer, bufsize); +#if (PACE_LYNXOS) + *result = getgrnam_r (grp, PACE_NONCONST_ARG_CAST (char *) name, + buffer, bufsize); if (*result == 0) return errno; return 0; #else return getgrnam_r (name, grp, buffer, bufsize, result); -#endif /* PACE_SUNOS */ +#endif /* ! PACE_LYNXOS */ } #endif /* PACE_HAS_POSIX_SDR_UOF */ diff --git a/PACE/pace/posix/pwd.inl b/PACE/pace/posix/pwd.inl index a8d0d25d69c..ee52fd2be0d 100644 --- a/PACE/pace/posix/pwd.inl +++ b/PACE/pace/posix/pwd.inl @@ -31,14 +31,18 @@ pace_getpwuid_r (pace_uid_t uid, pace_size_t bufsize, pace_passwd ** result) { -#if (PACE_SUNOS) - *result = getpwuid_r (uid, pwd, buffer, bufsize); - if (*result == 0) - return errno; - return 0; +#if (PACE_LYNXOS) + if (getpwuid_r (pwd, uid, buffer, bufsize) == 0) + /* Successful search */ + { + **result = *pwd; + return 0; + } + + return -1; #else return getpwuid_r (uid, pwd, buffer, bufsize, result); -#endif /* PACE_SUNOS */ +#endif /* ! PACE_LYNXOS */ } #endif /* PACE_HAS_POSIX_SDR_UOF */ @@ -60,13 +64,18 @@ pace_getpwnam_r (const char * name, pace_size_t bufsize, pace_passwd ** result) { -# if (PACE_SUNOS) - *result = getpwnam_r (name, pwd, buffer, bufsize); - if (*result == 0) - return errno; - return 0; +# if (PACE_LYNXOS) + if (getpwnam_r (pwd, PACE_NONCONST_ARG_CAST (char *) name, + buffer, bufsize) == 0) + /* Successful search */ + { + **result = *pwd; + return 0; + } + + return -1; #else return getpwnam_r (name, pwd, buffer, bufsize, result); -#endif /* PACE_SUNOS */ +#endif /* ! PACE_LYNXOS */ } #endif /* PACE_HAS_POSIX_SDR_UOF */ diff --git a/PACE/pace/posix/signal.h b/PACE/pace/posix/signal.h index f561be3da17..6362595ae31 100644 --- a/PACE/pace/posix/signal.h +++ b/PACE/pace/posix/signal.h @@ -26,15 +26,7 @@ extern "C" { #ifndef PACE_SIG_PF # define PACE_SIG_PF -# if (PACE_LYNXOS) -# if defined (PACE_HAS_CPLUSPLUS) - typedef void (*pace_sig_pf)(...); -# else - typedef void (*pace_sig_pf)(); -# endif /* PACE_HAS_CPLUSPLUS */ -# else typedef void (*pace_sig_pf)(int); -# endif /* PACE_LYNXOS */ #endif /* PACE_SIG_PF */ #ifndef PACE_SIG_ATOMIC_T diff --git a/PACE/pace/posix/signal.inl b/PACE/pace/posix/signal.inl index 6eca86e9fbf..ce591600baa 100644 --- a/PACE/pace/posix/signal.inl +++ b/PACE/pace/posix/signal.inl @@ -152,14 +152,8 @@ PACE_INLINE int pace_sigwait (const pace_sigset_t * set, int * sig) { -#if (PACE_SUNOS) - *sig = sigwait ((pace_sigset_t *)set); - if (*sig == -1) - return -1; - return 0; -#else - return sigwait (set, sig); -#endif /* PACE_SUNOS */ + return sigwait (PACE_NONCONST_ARG_CAST (pace_sigset_t *) set, + PACE_VOIDSTARTSTAR_ARG_CAST (void**) sig); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ diff --git a/PACE/pace/posix/time.inl b/PACE/pace/posix/time.inl index 91845cf8461..2c8caadd847 100644 --- a/PACE/pace/posix/time.inl +++ b/PACE/pace/posix/time.inl @@ -36,8 +36,6 @@ pace_asctime_r (const pace_tm * time, char * buf) 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); #endif /* PACE_LYNXOS */ @@ -127,7 +125,7 @@ PACE_INLINE char * pace_ctime_r (const pace_time_t * clock, char * buf) { -# if (PACE_SUNOS) || (PACE_LYNXOS) +# if (PACE_LYNXOS) return ctime_r (clock, buf, 26); # else return ctime_r (clock, buf); diff --git a/PACE/tests/Makefile b/PACE/tests/Makefile index e6af0d99462..65d3795d0ab 100644 --- a/PACE/tests/Makefile +++ b/PACE/tests/Makefile @@ -37,7 +37,7 @@ BIN = Stdio_Test \ #### If the PACE library wasn't built with all components, don't #### try to build certain tests. -PACE_BUILD_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/pace_components --pace) +PACE_BUILD_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components --pace) PSRC=$(addsuffix .c,$(BIN)) |