diff --git a/bin/doname.cc b/bin/doname.cc index 9073de1..165c72c 100644 --- a/bin/doname.cc +++ b/bin/doname.cc @@ -43,7 +43,7 @@ #include #include #include -#if defined(sun) || defined(__sun) +#ifdef __sun // XXX really needed, even on Solaris? #include #else diff --git a/bin/main.cc b/bin/main.cc index 257e168..3f807aa 100644 --- a/bin/main.cc +++ b/bin/main.cc @@ -50,7 +50,7 @@ #include /* open() */ #include -#if defined(sun) || defined(__sun) +#ifdef __sun # include /* sysinfo() */ #else #include @@ -206,7 +206,7 @@ main(int argc, char *argv[]) struct stat out_stat, err_stat; hostid = gethostid(); -#if defined(sun) || defined(__sun) +#ifdef __sun bsd_signals(); #else // XXX necessary on linux? @@ -488,7 +488,7 @@ main(int argc, char *argv[]) /* * Enable interrupt handler for alarms */ -#if defined(sun) || defined(__sun) +#ifdef __sun (void) bsd_signal(SIGALRM, (SIG_PF)doalarm); #else (void) bsd_signal(SIGALRM, doalarm); @@ -926,7 +926,7 @@ read_command_options(register int argc, register char **argv) // between Solaris and GNU libc. // Also, the '+' is probably a good idea for GNU libc to avoid // reording of arguments. -#if defined(sun) || defined(__sun) +#ifdef __sun #define SUNPRO_CMD_OPTS "-~Bbc:Ddef:g:ij:K:kM:m:NnO:o:PpqRrSsTtuVvwx:" #define SVR4_CMD_OPTS "-c:ef:g:ij:km:nO:o:pqrsTtVv" #else @@ -1623,7 +1623,7 @@ make_install_prefix(void) char *dir; if ((ret = readlink( -#if defined(sun) || defined(__sun) +#ifdef __sun "/proc/self/path/a.out", #else "/proc/self/exe", diff --git a/bin/parallel.cc b/bin/parallel.cc index a7ffd00..1e25c8b 100644 --- a/bin/parallel.cc +++ b/bin/parallel.cc @@ -255,7 +255,7 @@ execute_parallel(Property line, Boolean waitflg, Boolean local) #include /* ftok() */ #include /* shmget(), shmat(), shmdt(), shmctl() */ #include /* sem_init(), sem_trywait(), sem_post(), sem_destroy() */ -#if defined(sun) || defined(__sun) +#ifdef __sun #include /* getloadavg() */ #else #include // getloadavg() diff --git a/bin/state.cc b/bin/state.cc index 955fb7d..46f553e 100644 --- a/bin/state.cc +++ b/bin/state.cc @@ -39,7 +39,7 @@ #include /* errno */ #include /* MB_CUR_MAX */ -#if defined(sun) || defined(__sun) +#ifdef __sun #else #include // gettext() #endif diff --git a/comp/namelen.h b/comp/namelen.h index b2bee8f..4ab37ad 100644 --- a/comp/namelen.h +++ b/comp/namelen.h @@ -2,7 +2,7 @@ #ifndef COMP_NAMELEN_H #define COMP_NAMELEN_H -#if defined(sun) || defined(__sun) +#ifdef __sun #else #define MAXNAMELEN 1024 #endif diff --git a/comp/timestruc_t.h b/comp/timestruc_t.h index 6e1c7e1..ca04c84 100644 --- a/comp/timestruc_t.h +++ b/comp/timestruc_t.h @@ -2,7 +2,7 @@ #ifndef COMP_TIMESTRUC_T_H #define COMP_TIMESTRUC_T_H -#if defined(sun) || defined(__sun) +#ifdef __sun #else typedef struct timespec timestruc_t; #endif diff --git a/include/bsd/bsd.h b/include/bsd/bsd.h index fdba250..92736d6 100644 --- a/include/bsd/bsd.h +++ b/include/bsd/bsd.h @@ -32,7 +32,7 @@ #include -#if defined(sun) || defined(__sun) +#ifdef __sun #ifndef __cplusplus typedef void (*SIG_PF) (int); diff --git a/include/mk/defs.h b/include/mk/defs.h index a929e03..022dc88 100644 --- a/include/mk/defs.h +++ b/include/mk/defs.h @@ -294,7 +294,7 @@ extern long int hostid; * Declarations of system defined variables */ /* On linux this variable is defined in 'signal.h' */ -#if defined(sun) || defined(__sun) +#ifdef __sun extern char *sys_siglist[]; #else #include @@ -357,7 +357,7 @@ extern wchar_t *getmem_wc(register int size); #ifdef __cplusplus extern "C" { #endif -#if defined(sun) || defined(__sun) +#ifdef __sun extern char *getwd(char *); #endif #ifdef __cplusplus diff --git a/lib/mksh/dosys.cc b/lib/mksh/dosys.cc index 7c30a28..25cd550 100644 --- a/lib/mksh/dosys.cc +++ b/lib/mksh/dosys.cc @@ -93,7 +93,7 @@ redirect_io(char *stdout_file, char *stderr_file) { int i; -#if defined(sun) || defined(__sun) +#ifdef __sun (void) closefrom(3); #else // XXX not available on Linux diff --git a/lib/mksh/misc.cc b/lib/mksh/misc.cc index db2cf29..b476b0b 100644 --- a/lib/mksh/misc.cc +++ b/lib/mksh/misc.cc @@ -272,28 +272,28 @@ void enable_interrupt(register void (*handler) (int)) { if (sigivalue != SIG_IGN) { -#if defined(sun) || defined(__sun) +#ifdef __sun (void) bsd_signal(SIGINT, (SIG_PF) handler); #else (void) bsd_signal(SIGINT, handler); #endif } if (sigqvalue != SIG_IGN) { -#if defined(sun) || defined(__sun) +#ifdef __sun (void) bsd_signal(SIGQUIT, (SIG_PF) handler); #else (void) bsd_signal(SIGQUIT, handler); #endif } if (sigtvalue != SIG_IGN) { -#if defined(sun) || defined(__sun) +#ifdef __sun (void) bsd_signal(SIGTERM, (SIG_PF) handler); #else (void) bsd_signal(SIGTERM, handler); #endif } if (sighvalue != SIG_IGN) { -#if defined(sun) || defined(__sun) +#ifdef __sun (void) bsd_signal(SIGHUP, (SIG_PF) handler); #else (void) bsd_signal(SIGHUP, handler); diff --git a/lib/vroot/lock.cc b/lib/vroot/lock.cc index d31cb5e..c70f84f 100644 --- a/lib/vroot/lock.cc +++ b/lib/vroot/lock.cc @@ -36,7 +36,7 @@ #include /* errno */ #include -#if defined(sun) || defined(__sun) +#ifdef __sun extern char *sys_errlist[]; extern int sys_nerr; #endif