ctime_r_proto=''
d_ctime_r=''
d_cuserid=''
+d_c99_variadic_macros=''
d_dbl_dig=''
d_dbminitproto=''
d_difftime=''
;;
esac
+: see if the Compiler supports C99 variadic macros
+case "$i_stdarg$i_stdlib" in
+ "$define$define")
+ echo "You have <stdarg.h> and <stdlib.h>, so checking for C99 variadic macros." >&4
+ $cat >try.c <<EOCP
+#include <stdio.h>
+#include <stdarg.h>
+
+#define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
+
+int main() {
+ char buf[20];
+ foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
+ puts(buf);
+ return 0;
+}
+EOCP
+ set try
+ if eval $compile && $run ./try 2>&1 >/dev/null; then
+ case "`$run ./try`" in
+ "123 456 789")
+ echo "You have C99 variadic macros." >&4
+ d_c99_variadic_macros="$define"
+ ;;
+ *)
+ echo "You don't have functional C99 variadic macros." >&4
+ d_c99_variadic_macros="$undef"
+ ;;
+ esac
+ else
+ echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
+ d_c99_variadic_macros="$undef"
+ fi
+ ;;
+ *)
+ echo "You don't have <stdarg.h> and <stdlib.h>, so not checking for C99 variadic macros." >&4
+ d_c99_variadic_macros="$undef"
+ ;;
+esac
+
: see what type is used for size_t
rp="What is the type used for the length parameter for string functions?"
set size_t sizetype 'unsigned int' stdio.h sys/types.h
d_ctermid_r='$d_ctermid_r'
d_ctime_r='$d_ctime_r'
d_cuserid='$d_cuserid'
+d_c99_variadic_macros='$d_c99_variadic_macros'
d_dbl_dig='$d_dbl_dig'
d_dbminitproto='$d_dbminitproto'
d_difftime='$d_difftime'
which indicates to the C program that the ctime_r()
routine is available.
+d_c99_variadic_macros (d_c99_variadic_macros.U):
+ This variable conditionally defines the HAS_C99_VARIADIC_MACROS
+ symbol, which indicates to the C program that C99 variadic macros
+ are available.
+
d_cuserid (d_cuserid.U):
This variable conditionally defines the HAS_CUSERID symbol, which
indicates to the C program that the cuserid() routine is available
$ WC "d_crypt='define'"
$ WC "d_csh='undef'"
$ WC "d_cuserid='define'"
+$ WC "d_c99_variadic_macros='undef'"
$ WC "d_dbl_dig='define'"
$ WC "d_dbminitproto='undef'"
$ WC "d_difftime='define'"