diff --git a/MultiSource/Applications/ClamAV/clamscan_clamscan.c b/MultiSource/Applications/ClamAV/clamscan_clamscan.c --- a/MultiSource/Applications/ClamAV/clamscan_clamscan.c +++ b/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; @@ -208,7 +208,9 @@ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); } -#endif +#endif +#endif +#if defined(C_WINDOWS) || (defined(_AIX) && !defined(_ALL_SOURCE)) gettimeofday(&t1, NULL); #else gettimeofday(&t1, &tz); @@ -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); diff --git a/MultiSource/Benchmarks/MallocBench/espresso/port.h b/MultiSource/Benchmarks/MallocBench/espresso/port.h --- a/MultiSource/Benchmarks/MallocBench/espresso/port.h +++ b/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 diff --git a/MultiSource/Benchmarks/MallocBench/gs/gp_unix.c b/MultiSource/Benchmarks/MallocBench/gs/gp_unix.c --- a/MultiSource/Benchmarks/MallocBench/gs/gp_unix.c +++ b/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 diff --git a/MultiSource/Benchmarks/MiBench/consumer-lame/formatBitstream.h b/MultiSource/Benchmarks/MiBench/consumer-lame/formatBitstream.h --- a/MultiSource/Benchmarks/MiBench/consumer-lame/formatBitstream.h +++ b/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 diff --git a/MultiSource/Benchmarks/MiBench/consumer-lame/util.h b/MultiSource/Benchmarks/MiBench/consumer-lame/util.h --- a/MultiSource/Benchmarks/MiBench/consumer-lame/util.h +++ b/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 diff --git a/MultiSource/Benchmarks/MiBench/office-ispell/term.c b/MultiSource/Benchmarks/MiBench/office-ispell/term.c --- a/MultiSource/Benchmarks/MiBench/office-ispell/term.c +++ b/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)); diff --git a/MultiSource/Benchmarks/Prolangs-C/archie-client/support.c b/MultiSource/Benchmarks/Prolangs-C/archie-client/support.c --- a/MultiSource/Benchmarks/Prolangs-C/archie-client/support.c +++ b/MultiSource/Benchmarks/Prolangs-C/archie-client/support.c @@ -4,6 +4,7 @@ * For copying and distribution information, please see the file * . * + * V1.2.3 - 06/18/20 (sw) - add IBM AIX fix * v1.2.2 - 11/19/91 (mmt) - added MSDOS & OS2 stuff * v1.2.1 - 09/23/91 (gf) - made it use regex.h---much nicer * v1.2.0 - 09/17/91 (bpk) - added BULL & USG stuff, thanks to Jim Sillas @@ -42,6 +43,11 @@ # include # endif # if !defined(MSDOS) || defined(OS2) +// The header implicitly uses 'ushort', which is an +// unknown type name to AIX when '_ALL_SOURCE' is not defined. +# if _AIX && !defined(_ALL_SOURCE) + typedef unsigned short ushort; +# endif # include # include # endif