Index: MultiSource/Applications/ClamAV/clamscan_clamscan.c =================================================================== --- MultiSource/Applications/ClamAV/clamscan_clamscan.c +++ MultiSource/Applications/ClamAV/clamscan_clamscan.c @@ -60,7 +60,7 @@ int ds, dms, ret; double mb; struct timeval t1, t2; -#ifndef C_WINDOWS +#if !defined(C_WINDOWS) && (!defined(_AIX) || defined(_ALL_SOURCE)) struct timezone tz; #endif struct optstruct *opt; @@ -210,6 +210,8 @@ } #endif gettimeofday(&t1, NULL); +#elif _AIX && !defined(_ALL_SOURCE) + gettimeofday(&t1, NULL); #else gettimeofday(&t1, &tz); #endif @@ -217,7 +219,7 @@ ret = scanmanager(opt); if(!opt_check(opt, "disable-summary") && !opt_check(opt, "no-summary")) { -#ifdef C_WINDOWS +#if defined(C_WINDOWS) || (defined(_AIX) && !defined(_ALL_SOURCE)) gettimeofday(&t2, NULL); #else gettimeofday(&t2, &tz); Index: MultiSource/Applications/d/d.h =================================================================== --- MultiSource/Applications/d/d.h +++ MultiSource/Applications/d/d.h @@ -76,7 +76,9 @@ typedef unsigned long long uint64; typedef short int16; typedef unsigned short uint16; -/* typedef uint32 uint; * already part of most systems */ +#if _AIX && !defined(_ALL_SOURCE) +typedef uint32 uint; /* already part of most systems */ +#endif typedef unsigned long ulong; #include "dparse.h" Index: MultiSource/Applications/viterbi/common.h =================================================================== --- MultiSource/Applications/viterbi/common.h +++ MultiSource/Applications/viterbi/common.h @@ -128,18 +128,28 @@ static inline double sTime() -#if !defined(_MSC_VER) && !defined(__MINGW32__) -{ static struct timeval this_tv; - static struct timezone dumbTZ; +#if defined(_MSC_VER) || defined(__MINGW32__) +{ + return clock() / (double)CLOCKS_PER_SEC; +} +#elif _AIX && !defined(_ALL_SOURCE) +{ + static struct timeval this_tv; double t; - - gettimeofday(&this_tv, &dumbTZ); + + gettimeofday(&this_tv, NULL); t = this_tv.tv_sec + 0.000001*this_tv.tv_usec; return t; } #else { - return clock() / (double)CLOCKS_PER_SEC; + static struct timeval this_tv; + static struct timezone dumbTZ; + double t; + + gettimeofday(&this_tv, &dumbTZ); + t = this_tv.tv_sec + 0.000001*this_tv.tv_usec; + return t; } #endif Index: MultiSource/Benchmarks/MallocBench/espresso/port.h =================================================================== --- MultiSource/Benchmarks/MallocBench/espresso/port.h +++ MultiSource/Benchmarks/MallocBench/espresso/port.h @@ -5,19 +5,6 @@ #define volatile #endif -#ifdef _IBMR2 -#define _BSD -#ifndef _POSIX_SOURCE -#define _POSIX_SOURCE /* Argh! IBM strikes again */ -#endif -#ifndef _ALL_SOURCE -#define _ALL_SOURCE /* Argh! IBM strikes again */ -#endif -#ifndef _ANSI_C_SOURCE -#define _ANSI_C_SOURCE /* Argh! IBM strikes again */ -#endif -#endif - /* * int32 should be defined as the most economical sized integer capable of * holding a 32 bit quantity Index: MultiSource/Benchmarks/MallocBench/gs/gp_unix.c =================================================================== --- MultiSource/Benchmarks/MallocBench/gs/gp_unix.c +++ MultiSource/Benchmarks/MallocBench/gs/gp_unix.c @@ -23,6 +23,12 @@ #include "gx.h" #include #include +#if _AIX && !defined(_ALL_SOURCE) +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; +#endif /* Do platform-dependent initialization */ void Index: MultiSource/Benchmarks/MiBench/consumer-lame/formatBitstream.h =================================================================== --- MultiSource/Benchmarks/MiBench/consumer-lame/formatBitstream.h +++ MultiSource/Benchmarks/MiBench/consumer-lame/formatBitstream.h @@ -24,6 +24,11 @@ #define MAX_GRANULES 2 #endif +#if _AIX && !defined(_ALL_SOURCE) +typedef unsigned int u_int; +typedef unsigned short u_short; +#endif + /* This is the prototype for the function pointer you must provide to write bits to the bitstream. It should write Index: MultiSource/Benchmarks/MiBench/consumer-lame/util.h =================================================================== --- MultiSource/Benchmarks/MiBench/consumer-lame/util.h +++ MultiSource/Benchmarks/MiBench/consumer-lame/util.h @@ -125,6 +125,13 @@ #include "l3side.h" +#if _AIX && !defined(_ALL_SOURCE) +typedef unsigned char u_char; +typedef unsigned int u_int; +typedef unsigned short u_short; +typedef unsigned long u_long; +#endif + /*********************************************************************** * * Global Variable External Declarations Index: MultiSource/Benchmarks/MiBench/office-ispell/term.c =================================================================== --- MultiSource/Benchmarks/MiBench/office-ispell/term.c +++ MultiSource/Benchmarks/MiBench/office-ispell/term.c @@ -47,6 +47,10 @@ /* * $Log$ + * + * Revision 1.2 2020/03/23 12:59:43 stevenwan + * Add IBM AIX workaround. + * * Revision 1.1 2007/01/09 23:57:18 lattner * initial recheckin of mibench * @@ -87,6 +91,12 @@ #endif #endif +#if _AIX && !defined(_ALL_SOURCE) +#ifdef TIOCGWINSZ +#undef TIOCGWINSZ +#endif +#endif + void erase P ((void)); void move P ((int row, int col)); void inverse P ((void)); Index: MultiSource/Benchmarks/Prolangs-C/archie-client/support.c =================================================================== --- MultiSource/Benchmarks/Prolangs-C/archie-client/support.c +++ MultiSource/Benchmarks/Prolangs-C/archie-client/support.c @@ -42,6 +42,9 @@ # include # endif # if !defined(MSDOS) || defined(OS2) +# if _AIX && !defined(_ALL_SOURCE) + typedef unsigned short ushort; +# endif # include # include # endif