Index: mpe/slog_api/CFLAGS.txt =================================================================== RCS file: /MPIhome/mpich/mpe/slog_api/CFLAGS.txt,v retrieving revision 1.3 diff -r1.3 CFLAGS.txt 9a10 > # -DGCC296_VA_ARG_FIX Index: mpe/slog_api/acconfig.h =================================================================== RCS file: /MPIhome/mpich/mpe/slog_api/acconfig.h,v retrieving revision 1.1 diff -r1.1 acconfig.h 27a28,30 > > /* GCC296_VA_ARG_FIX : Turn on the workaround for the va_arg bug in gcc-2.96 */ > #undef GCC296_VA_ARG_FIX Index: mpe/slog_api/configure =================================================================== RCS file: /MPIhome/mpich/mpe/slog_api/configure,v retrieving revision 1.20 diff -r1.20 configure 1942c1942,1996 < # --- > > # Try to workaround the va_arg bug found gcc-2.96 > echo $ac_n "checking if the C compiler treats stdarg consistently""... $ac_c" 1>&1 > echo "configure:1946: checking if the C compiler treats stdarg consistently" >&2 > cat > conftest.$ac_ext < #line 1948 "configure" > #include "confdefs.h" > > #include > > typedef unsigned int uint32; > typedef unsigned short uint16; > typedef unsigned char uint8; > > void test_fn( const uint32 ui32, ... ) > { > va_list ap; > uint16 ui16; > uint8 ui8; > > va_start( ap, ui32 ); > ui16 = va_arg( ap, uint16 ); > ui8 = va_arg( ap, uint8 ); > va_end( ap ); > } > int main() { > > uint32 ui32; > uint16 ui16; > uint8 ui8; > > test_fn( ui32, ui16, ui8 ); > > ; return 0; } > EOF > if { (eval echo configure:1978: \"$ac_compile\") 1>&2; (eval $ac_compile) 2>&2; }; then > rm -rf conftest* > prompt_va_arg_to_int=no > else > echo "configure: failed program was:" >&2 > cat conftest.$ac_ext >&2 > rm -rf conftest* > prompt_va_arg_to_int=yes > fi > rm -f conftest* > if test "$prompt_va_arg_to_int" = "yes" ; then > echo "$ac_t""no" 1>&1 > cat >> confdefs.h <<\EOF > #define GCC296_VA_ARG_FIX 1 > EOF > > else > echo "$ac_t""yes" 1>&1 > fi > 1946c2000 < echo "configure:1947: checking for malloc in -lefence" >&2 --- > echo "configure:2001: checking for malloc in -lefence" >&2 1954c2008 < #line 1955 "configure" --- > #line 2009 "configure" 1965c2019 < if { (eval echo configure:1966: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2020: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then 2006c2060 < echo "configure:2007: checking for working alloca.h" >&2 --- > echo "configure:2061: checking for working alloca.h" >&2 2011c2065 < #line 2012 "configure" --- > #line 2066 "configure" 2018c2072 < if { (eval echo configure:2019: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2073: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then 2039c2093 < echo "configure:2040: checking for alloca" >&2 --- > echo "configure:2094: checking for alloca" >&2 2044c2098 < #line 2045 "configure" --- > #line 2099 "configure" 2072c2126 < if { (eval echo configure:2073: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2127: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then 2104c2158 < echo "configure:2105: checking whether alloca needs Cray hooks" >&2 --- > echo "configure:2159: checking whether alloca needs Cray hooks" >&2 2109c2163 < #line 2110 "configure" --- > #line 2164 "configure" 2134c2188 < echo "configure:2135: checking for $ac_func" >&2 --- > echo "configure:2189: checking for $ac_func" >&2 2136c2190 < #line 2137 "configure" --- > #line 2191 "configure" 2157c2211 < if { (eval echo configure:2158: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then --- > if { (eval echo configure:2212: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext}; then 2182c2236 < echo "configure:2183: checking stack direction for C alloca" >&2 --- > echo "configure:2237: checking stack direction for C alloca" >&2 2190c2244 < #line 2191 "configure" --- > #line 2245 "configure" 2209c2263 < if { (eval echo configure:2210: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --- > if { (eval echo configure:2264: \"$ac_link\") 1>&2; (eval $ac_link) 2>&2; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null Index: mpe/slog_api/configure.in =================================================================== RCS file: /MPIhome/mpich/mpe/slog_api/configure.in,v retrieving revision 1.22 diff -r1.22 configure.in 189c189,223 < # --- > > # Try to workaround the va_arg bug found gcc-2.96 > AC_MSG_CHECKING([if the C compiler treats stdarg consistently]) > AC_TRY_COMPILE( [ > #include > > typedef unsigned int uint32; > typedef unsigned short uint16; > typedef unsigned char uint8; > > void test_fn( const uint32 ui32, ... ) > { > va_list ap; > uint16 ui16; > uint8 ui8; > > va_start( ap, ui32 ); > ui16 = va_arg( ap, uint16 ); > ui8 = va_arg( ap, uint8 ); > va_end( ap ); > } ], > [ > uint32 ui32; > uint16 ui16; > uint8 ui8; > > test_fn( ui32, ui16, ui8 ); > ], prompt_va_arg_to_int=no, prompt_va_arg_to_int=yes ) > if test "$prompt_va_arg_to_int" = "yes" ; then > AC_MSG_RESULT(no) > AC_DEFINE(GCC296_VA_ARG_FIX) > else > AC_MSG_RESULT(yes) > fi > Index: mpe/slog_api/slog_config.h.in =================================================================== RCS file: /MPIhome/mpich/mpe/slog_api/slog_config.h.in,v retrieving revision 1.4 diff -r1.4 slog_config.h.in 53a54,56 > /* GCC296_VA_ARG_FIX : Turn on the workaround for the va_arg bug in gcc-2.96 */ > #undef GCC296_VA_ARG_FIX > Index: mpe/slog_api/src/slog_irec_write.c =================================================================== RCS file: /MPIhome/mpich/mpe/slog_api/src/slog_irec_write.c,v retrieving revision 1.7 diff -r1.7 slog_irec_write.c 1170a1171,1175 > #if defined( GCC296_VA_ARG_FIX ) > dest_node_id = va_arg( ap, SLOG_uint32 ); > dest_cpu_id = va_arg( ap, SLOG_uint32 ); > dest_thread_id = va_arg( ap, SLOG_uint32 ); > #else 1173a1179 > #endif