Commit 0d667716 by Kaveh R. Ghazi Committed by Kaveh Ghazi

configure.ac (fixincludes_UNLOCKED_FUNCS): New.

fixincludes:
	* configure.ac (fixincludes_UNLOCKED_FUNCS): New.
	(AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for fixincludes_UNLOCKED_FUNCS.
	* system.h (putchar, getc, getchar, clearerr, feof, fileno,
	fflush, fgetc, fgets, ferror, fread): Redefine to the associated
	_unlocked function.
	(fwrite_unlocked): Fix prototype.

	* configure, config.h.in: Regenerate.

gcc:
	PR/17092
	* configure.ac (gcc_UNLOCKED_FUNCS): New.
	(AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for gcc_UNLOCKED_FUNCS.
	* system.h (putchar, getc, getchar, clearerr, feof, fileno,
	fflush, fgetc, fgets, ferror, fread): Redefine to the associated
	_unlocked function.
	(fwrite_unlocked): Fix prototype.

	* configure, config.in: Regenerate.

libcpp:
	* configure.ac (libcpp_UNLOCKED_FUNCS): New.
	(AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
	* system.h (putchar, getc, getchar, clearerr, feof, fileno,
	fflush, fgetc, fgets, ferror, fread): Redefine to the associated
	_unlocked function.
	(fwrite_unlocked): Fix prototype.

	* configure, config.in: Regenerate.

From-SVN: r97986
parent 37cca405
2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.ac (fixincludes_UNLOCKED_FUNCS): New.
(AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for fixincludes_UNLOCKED_FUNCS.
* system.h (putchar, getc, getchar, clearerr, feof, fileno,
fflush, fgetc, fgets, ferror, fread): Redefine to the associated
_unlocked function.
(fwrite_unlocked): Fix prototype.
* configure, config.h.in: Regenerate.
2005-03-21 Zack Weinberg <zack@codesourcery.com> 2005-03-21 Zack Weinberg <zack@codesourcery.com>
* Makefile.in: Set gcc_version directly, not via substitution. * Makefile.in: Set gcc_version directly, not via substitution.
......
...@@ -3,14 +3,45 @@ ...@@ -3,14 +3,45 @@
/* Defined to the executable file extension on the host system */ /* Defined to the executable file extension on the host system */
#undef EXE_EXT #undef EXE_EXT
/* Define to 1 if you have the `clearerr_unlocked' function. */
#undef HAVE_CLEARERR_UNLOCKED
/* Define to 1 if you have the declaration of `abort', and to 0 if you don't. /* Define to 1 if you have the declaration of `abort', and to 0 if you don't.
*/ */
#undef HAVE_DECL_ABORT #undef HAVE_DECL_ABORT
/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_CLEARERR_UNLOCKED
/* Define to 1 if you have the declaration of `errno', and to 0 if you don't. /* Define to 1 if you have the declaration of `errno', and to 0 if you don't.
*/ */
#undef HAVE_DECL_ERRNO #undef HAVE_DECL_ERRNO
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_FEOF_UNLOCKED
/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FERROR_UNLOCKED
/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FFLUSH_UNLOCKED
/* Define to 1 if you have the declaration of `fgetc_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FGETC_UNLOCKED
/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FGETS_UNLOCKED
/* Define to 1 if you have the declaration of `fileno_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FILENO_UNLOCKED
/* Define to 1 if you have the declaration of `fprintf_unlocked', and to 0 if /* Define to 1 if you have the declaration of `fprintf_unlocked', and to 0 if
you don't. */ you don't. */
#undef HAVE_DECL_FPRINTF_UNLOCKED #undef HAVE_DECL_FPRINTF_UNLOCKED
...@@ -23,10 +54,26 @@ ...@@ -23,10 +54,26 @@
you don't. */ you don't. */
#undef HAVE_DECL_FPUTS_UNLOCKED #undef HAVE_DECL_FPUTS_UNLOCKED
/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FREAD_UNLOCKED
/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if /* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
you don't. */ you don't. */
#undef HAVE_DECL_FWRITE_UNLOCKED #undef HAVE_DECL_FWRITE_UNLOCKED
/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_GETCHAR_UNLOCKED
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_GETC_UNLOCKED
/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_PUTCHAR_UNLOCKED
/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you /* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
don't. */ don't. */
#undef HAVE_DECL_PUTC_UNLOCKED #undef HAVE_DECL_PUTC_UNLOCKED
...@@ -34,6 +81,24 @@ ...@@ -34,6 +81,24 @@
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
/* Define to 1 if you have the `feof_unlocked' function. */
#undef HAVE_FEOF_UNLOCKED
/* Define to 1 if you have the `ferror_unlocked' function. */
#undef HAVE_FERROR_UNLOCKED
/* Define to 1 if you have the `fflush_unlocked' function. */
#undef HAVE_FFLUSH_UNLOCKED
/* Define to 1 if you have the `fgetc_unlocked' function. */
#undef HAVE_FGETC_UNLOCKED
/* Define to 1 if you have the `fgets_unlocked' function. */
#undef HAVE_FGETS_UNLOCKED
/* Define to 1 if you have the `fileno_unlocked' function. */
#undef HAVE_FILENO_UNLOCKED
/* Define to 1 if you have the `fprintf_unlocked' function. */ /* Define to 1 if you have the `fprintf_unlocked' function. */
#undef HAVE_FPRINTF_UNLOCKED #undef HAVE_FPRINTF_UNLOCKED
...@@ -43,9 +108,18 @@ ...@@ -43,9 +108,18 @@
/* Define to 1 if you have the `fputs_unlocked' function. */ /* Define to 1 if you have the `fputs_unlocked' function. */
#undef HAVE_FPUTS_UNLOCKED #undef HAVE_FPUTS_UNLOCKED
/* Define to 1 if you have the `fread_unlocked' function. */
#undef HAVE_FREAD_UNLOCKED
/* Define to 1 if you have the `fwrite_unlocked' function. */ /* Define to 1 if you have the `fwrite_unlocked' function. */
#undef HAVE_FWRITE_UNLOCKED #undef HAVE_FWRITE_UNLOCKED
/* Define to 1 if you have the `getchar_unlocked' function. */
#undef HAVE_GETCHAR_UNLOCKED
/* Define to 1 if you have the `getc_unlocked' function. */
#undef HAVE_GETC_UNLOCKED
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
...@@ -61,6 +135,9 @@ ...@@ -61,6 +135,9 @@
/* Define if read-only mmap of a plain file works. */ /* Define if read-only mmap of a plain file works. */
#undef HAVE_MMAP_FILE #undef HAVE_MMAP_FILE
/* Define to 1 if you have the `putchar_unlocked' function. */
#undef HAVE_PUTCHAR_UNLOCKED
/* Define to 1 if you have the `putc_unlocked' function. */ /* Define to 1 if you have the `putc_unlocked' function. */
#undef HAVE_PUTC_UNLOCKED #undef HAVE_PUTC_UNLOCKED
......
...@@ -3098,8 +3098,19 @@ done ...@@ -3098,8 +3098,19 @@ done
for ac_func in putc_unlocked fputc_unlocked fputs_unlocked \
fwrite_unlocked fprintf_unlocked
for ac_func in clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5 echo "$as_me:$LINENO: checking for $ac_func" >&5
...@@ -3340,9 +3351,9 @@ _ACEOF ...@@ -3340,9 +3351,9 @@ _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5 echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5
echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -3355,8 +3366,8 @@ $ac_includes_default ...@@ -3355,8 +3366,8 @@ $ac_includes_default
int int
main () main ()
{ {
#ifndef putc_unlocked #ifndef clearerr_unlocked
char *p = (char *) putc_unlocked; char *p = (char *) clearerr_unlocked;
#endif #endif
; ;
...@@ -3385,34 +3396,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -3385,34 +3396,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_have_decl_putc_unlocked=yes ac_cv_have_decl_clearerr_unlocked=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_putc_unlocked=no ac_cv_have_decl_clearerr_unlocked=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5 echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6 echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
if test $ac_cv_have_decl_putc_unlocked = yes; then if test $ac_cv_have_decl_clearerr_unlocked = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 1 #define HAVE_DECL_CLEARERR_UNLOCKED 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 0 #define HAVE_DECL_CLEARERR_UNLOCKED 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5 echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -3425,8 +3436,8 @@ $ac_includes_default ...@@ -3425,8 +3436,8 @@ $ac_includes_default
int int
main () main ()
{ {
#ifndef fputc_unlocked #ifndef feof_unlocked
char *p = (char *) fputc_unlocked; char *p = (char *) feof_unlocked;
#endif #endif
; ;
...@@ -3455,34 +3466,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -3455,34 +3466,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_have_decl_fputc_unlocked=yes ac_cv_have_decl_feof_unlocked=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fputc_unlocked=no ac_cv_have_decl_feof_unlocked=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5 echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6 echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
if test $ac_cv_have_decl_fputc_unlocked = yes; then if test $ac_cv_have_decl_feof_unlocked = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTC_UNLOCKED 1 #define HAVE_DECL_FEOF_UNLOCKED 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTC_UNLOCKED 0 #define HAVE_DECL_FEOF_UNLOCKED 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5 echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5
echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -3495,8 +3506,8 @@ $ac_includes_default ...@@ -3495,8 +3506,8 @@ $ac_includes_default
int int
main () main ()
{ {
#ifndef fputs_unlocked #ifndef ferror_unlocked
char *p = (char *) fputs_unlocked; char *p = (char *) ferror_unlocked;
#endif #endif
; ;
...@@ -3525,34 +3536,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -3525,34 +3536,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_have_decl_fputs_unlocked=yes ac_cv_have_decl_ferror_unlocked=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fputs_unlocked=no ac_cv_have_decl_ferror_unlocked=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5 echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6 echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
if test $ac_cv_have_decl_fputs_unlocked = yes; then if test $ac_cv_have_decl_ferror_unlocked = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 1 #define HAVE_DECL_FERROR_UNLOCKED 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 0 #define HAVE_DECL_FERROR_UNLOCKED 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5 echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5
echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -3565,8 +3576,8 @@ $ac_includes_default ...@@ -3565,8 +3576,8 @@ $ac_includes_default
int int
main () main ()
{ {
#ifndef fwrite_unlocked #ifndef fflush_unlocked
char *p = (char *) fwrite_unlocked; char *p = (char *) fflush_unlocked;
#endif #endif
; ;
...@@ -3595,27 +3606,237 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -3595,27 +3606,237 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_have_decl_fwrite_unlocked=yes ac_cv_have_decl_fflush_unlocked=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fwrite_unlocked=no ac_cv_have_decl_fflush_unlocked=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6 echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
if test $ac_cv_have_decl_fwrite_unlocked = yes; then if test $ac_cv_have_decl_fflush_unlocked = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 1 #define HAVE_DECL_FFLUSH_UNLOCKED 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 0 #define HAVE_DECL_FFLUSH_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fgetc_unlocked is declared" >&5
echo $ECHO_N "checking whether fgetc_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fgetc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fgetc_unlocked
char *p = (char *) fgetc_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fgetc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fgetc_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgetc_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fgetc_unlocked" >&6
if test $ac_cv_have_decl_fgetc_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FGETC_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FGETC_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fgets_unlocked
char *p = (char *) fgets_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fgets_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fgets_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
if test $ac_cv_have_decl_fgets_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FGETS_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FGETS_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fileno_unlocked is declared" >&5
echo $ECHO_N "checking whether fileno_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fileno_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fileno_unlocked
char *p = (char *) fileno_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fileno_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fileno_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fileno_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fileno_unlocked" >&6
if test $ac_cv_have_decl_fileno_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FILENO_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FILENO_UNLOCKED 0
_ACEOF _ACEOF
...@@ -3690,6 +3911,566 @@ _ACEOF ...@@ -3690,6 +3911,566 @@ _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5
echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fputc_unlocked
char *p = (char *) fputc_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fputc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fputc_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
if test $ac_cv_have_decl_fputc_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTC_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTC_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5
echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fputs_unlocked
char *p = (char *) fputs_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fputs_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fputs_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
if test $ac_cv_have_decl_fputs_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5
echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fread_unlocked
char *p = (char *) fread_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fread_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fread_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
if test $ac_cv_have_decl_fread_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FREAD_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FREAD_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5
echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fwrite_unlocked
char *p = (char *) fwrite_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fwrite_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fwrite_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
if test $ac_cv_have_decl_fwrite_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5
echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef getchar_unlocked
char *p = (char *) getchar_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_getchar_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_getchar_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
if test $ac_cv_have_decl_getchar_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_GETCHAR_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_GETCHAR_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef getc_unlocked
char *p = (char *) getc_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_getc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_getc_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
if test $ac_cv_have_decl_getc_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_GETC_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_GETC_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5
echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef putchar_unlocked
char *p = (char *) putchar_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_putchar_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_putchar_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
if test $ac_cv_have_decl_putchar_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTCHAR_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTCHAR_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5
echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef putc_unlocked
char *p = (char *) putc_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_putc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_putc_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
if test $ac_cv_have_decl_putc_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 0
_ACEOF
fi
......
...@@ -66,10 +66,13 @@ AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeext", ...@@ -66,10 +66,13 @@ AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeext",
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \ AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
sys/stat.h]) sys/stat.h])
AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \ define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
fwrite_unlocked fprintf_unlocked) ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked, fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
fputs_unlocked, fwrite_unlocked, fprintf_unlocked]) fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
putchar_unlocked putc_unlocked)
AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS)
AC_CHECK_DECLS(m4_split(m4_normalize(abort errno fixincludes_UNLOCKED_FUNCS)))
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
......
...@@ -57,11 +57,65 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -57,11 +57,65 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
# undef putc # undef putc
# define putc(C, Stream) putc_unlocked (C, Stream) # define putc(C, Stream) putc_unlocked (C, Stream)
# endif # endif
# ifdef HAVE_PUTCHAR_UNLOCKED
# undef putchar
# define putchar(C) putchar_unlocked (C)
# endif
# ifdef HAVE_GETC_UNLOCKED
# undef getc
# define getc(Stream) getc_unlocked (Stream)
# endif
# ifdef HAVE_GETCHAR_UNLOCKED
# undef getchar
# define getchar() getchar_unlocked ()
# endif
# ifdef HAVE_FPUTC_UNLOCKED # ifdef HAVE_FPUTC_UNLOCKED
# undef fputc # undef fputc
# define fputc(C, Stream) fputc_unlocked (C, Stream) # define fputc(C, Stream) fputc_unlocked (C, Stream)
# endif # endif
# ifdef HAVE_CLEARERR_UNLOCKED
# undef clearerr
# define clearerr(Stream) clearerr_unlocked (Stream)
# if defined (HAVE_DECL_CLEARERR_UNLOCKED) && !HAVE_DECL_CLEARERR_UNLOCKED
extern void clearerr_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FEOF_UNLOCKED
# undef feof
# define feof(Stream) feof_unlocked (Stream)
# if defined (HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED
extern int feof_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FILENO_UNLOCKED
# undef fileno
# define fileno(Stream) fileno_unlocked (Stream)
# if defined (HAVE_DECL_FILENO_UNLOCKED) && !HAVE_DECL_FILENO_UNLOCKED
extern int fileno_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FFLUSH_UNLOCKED
# undef fflush
# define fflush(Stream) fflush_unlocked (Stream)
# if defined (HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED
extern int fflush_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FGETC_UNLOCKED
# undef fgetc
# define fgetc(Stream) fgetc_unlocked (Stream)
# if defined (HAVE_DECL_FGETC_UNLOCKED) && !HAVE_DECL_FGETC_UNLOCKED
extern int fgetc_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FGETS_UNLOCKED
# undef fgets
# define fgets(S, n, Stream) fgets_unlocked (S, n, Stream)
# if defined (HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED
extern char *fgets_unlocked (char *, int, FILE *);
# endif
# endif
# ifdef HAVE_FPUTS_UNLOCKED # ifdef HAVE_FPUTS_UNLOCKED
# undef fputs # undef fputs
# define fputs(String, Stream) fputs_unlocked (String, Stream) # define fputs(String, Stream) fputs_unlocked (String, Stream)
...@@ -69,11 +123,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -69,11 +123,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
extern int fputs_unlocked (const char *, FILE *); extern int fputs_unlocked (const char *, FILE *);
# endif # endif
# endif # endif
# ifdef HAVE_FERROR_UNLOCKED
# undef ferror
# define ferror(Stream) ferror_unlocked (Stream)
# if defined (HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED
extern int ferror_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FREAD_UNLOCKED
# undef fread
# define fread(Ptr, Size, N, Stream) fread_unlocked (Ptr, Size, N, Stream)
# if defined (HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED
extern size_t fread_unlocked (void *, size_t, size_t, FILE *);
# endif
# endif
# ifdef HAVE_FWRITE_UNLOCKED # ifdef HAVE_FWRITE_UNLOCKED
# undef fwrite # undef fwrite
# define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream) # define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream)
# if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED # if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
extern int fwrite_unlocked (const void *, size_t, size_t, FILE *); extern size_t fwrite_unlocked (const void *, size_t, size_t, FILE *);
# endif # endif
# endif # endif
# ifdef HAVE_FPRINTF_UNLOCKED # ifdef HAVE_FPRINTF_UNLOCKED
......
2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR/17092
* configure.ac (gcc_UNLOCKED_FUNCS): New.
(AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for gcc_UNLOCKED_FUNCS.
* system.h (putchar, getc, getchar, clearerr, feof, fileno,
fflush, fgetc, fgets, ferror, fread): Redefine to the associated
_unlocked function.
(fwrite_unlocked): Fix prototype.
* configure, config.in: Regenerate.
2005-04-11 David Edelsohn <edelsohn@gnu.org> 2005-04-11 David Edelsohn <edelsohn@gnu.org>
* tree-ssa-loop-im.c: Include real.h. * tree-ssa-loop-im.c: Include real.h.
......
...@@ -145,6 +145,9 @@ ...@@ -145,6 +145,9 @@
/* Define to 1 if you have the `atoq' function. */ /* Define to 1 if you have the `atoq' function. */
#undef HAVE_ATOQ #undef HAVE_ATOQ
/* Define to 1 if you have the `clearerr_unlocked' function. */
#undef HAVE_CLEARERR_UNLOCKED
/* Define to 1 if you have the `clock' function. */ /* Define to 1 if you have the `clock' function. */
#undef HAVE_CLOCK #undef HAVE_CLOCK
...@@ -169,6 +172,10 @@ ...@@ -169,6 +172,10 @@
*/ */
#undef HAVE_DECL_CALLOC #undef HAVE_DECL_CALLOC
/* Define to 1 if we found a declaration for 'clearerr_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_CLEARERR_UNLOCKED
/* Define to 1 if we found a declaration for 'clock', otherwise define to 0. /* Define to 1 if we found a declaration for 'clock', otherwise define to 0.
*/ */
#undef HAVE_DECL_CLOCK #undef HAVE_DECL_CLOCK
...@@ -177,14 +184,46 @@ ...@@ -177,14 +184,46 @@
*/ */
#undef HAVE_DECL_ERRNO #undef HAVE_DECL_ERRNO
/* Define to 1 if we found a declaration for 'feof_unlocked', otherwise define
to 0. */
#undef HAVE_DECL_FEOF_UNLOCKED
/* Define to 1 if we found a declaration for 'ferror_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FERROR_UNLOCKED
/* Define to 1 if we found a declaration for 'fflush_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FFLUSH_UNLOCKED
/* Define to 1 if we found a declaration for 'fgetc_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FGETC_UNLOCKED
/* Define to 1 if we found a declaration for 'fgets_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FGETS_UNLOCKED
/* Define to 1 if we found a declaration for 'fileno_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FILENO_UNLOCKED
/* Define to 1 if we found a declaration for 'fprintf_unlocked', otherwise /* Define to 1 if we found a declaration for 'fprintf_unlocked', otherwise
define to 0. */ define to 0. */
#undef HAVE_DECL_FPRINTF_UNLOCKED #undef HAVE_DECL_FPRINTF_UNLOCKED
/* Define to 1 if we found a declaration for 'fputc_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FPUTC_UNLOCKED
/* Define to 1 if we found a declaration for 'fputs_unlocked', otherwise /* Define to 1 if we found a declaration for 'fputs_unlocked', otherwise
define to 0. */ define to 0. */
#undef HAVE_DECL_FPUTS_UNLOCKED #undef HAVE_DECL_FPUTS_UNLOCKED
/* Define to 1 if we found a declaration for 'fread_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FREAD_UNLOCKED
/* Define to 1 if we found a declaration for 'free', otherwise define to 0. */ /* Define to 1 if we found a declaration for 'free', otherwise define to 0. */
#undef HAVE_DECL_FREE #undef HAVE_DECL_FREE
...@@ -192,10 +231,18 @@ ...@@ -192,10 +231,18 @@
define to 0. */ define to 0. */
#undef HAVE_DECL_FWRITE_UNLOCKED #undef HAVE_DECL_FWRITE_UNLOCKED
/* Define to 1 if we found a declaration for 'getchar_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_GETCHAR_UNLOCKED
/* Define to 1 if we found a declaration for 'getcwd', otherwise define to 0. /* Define to 1 if we found a declaration for 'getcwd', otherwise define to 0.
*/ */
#undef HAVE_DECL_GETCWD #undef HAVE_DECL_GETCWD
/* Define to 1 if we found a declaration for 'getc_unlocked', otherwise define
to 0. */
#undef HAVE_DECL_GETC_UNLOCKED
/* Define to 1 if we found a declaration for 'getenv', otherwise define to 0. /* Define to 1 if we found a declaration for 'getenv', otherwise define to 0.
*/ */
#undef HAVE_DECL_GETENV #undef HAVE_DECL_GETENV
...@@ -228,6 +275,10 @@ ...@@ -228,6 +275,10 @@
*/ */
#undef HAVE_DECL_MALLOC #undef HAVE_DECL_MALLOC
/* Define to 1 if we found a declaration for 'putchar_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_PUTCHAR_UNLOCKED
/* Define to 1 if we found a declaration for 'putc_unlocked', otherwise define /* Define to 1 if we found a declaration for 'putc_unlocked', otherwise define
to 0. */ to 0. */
#undef HAVE_DECL_PUTC_UNLOCKED #undef HAVE_DECL_PUTC_UNLOCKED
...@@ -272,6 +323,24 @@ ...@@ -272,6 +323,24 @@
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
/* Define to 1 if you have the `feof_unlocked' function. */
#undef HAVE_FEOF_UNLOCKED
/* Define to 1 if you have the `ferror_unlocked' function. */
#undef HAVE_FERROR_UNLOCKED
/* Define to 1 if you have the `fflush_unlocked' function. */
#undef HAVE_FFLUSH_UNLOCKED
/* Define to 1 if you have the `fgetc_unlocked' function. */
#undef HAVE_FGETC_UNLOCKED
/* Define to 1 if you have the `fgets_unlocked' function. */
#undef HAVE_FGETS_UNLOCKED
/* Define to 1 if you have the `fileno_unlocked' function. */
#undef HAVE_FILENO_UNLOCKED
/* Define to 1 if you have the `fork' function. */ /* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK #undef HAVE_FORK
...@@ -284,6 +353,9 @@ ...@@ -284,6 +353,9 @@
/* Define to 1 if you have the `fputs_unlocked' function. */ /* Define to 1 if you have the `fputs_unlocked' function. */
#undef HAVE_FPUTS_UNLOCKED #undef HAVE_FPUTS_UNLOCKED
/* Define to 1 if you have the `fread_unlocked' function. */
#undef HAVE_FREAD_UNLOCKED
/* Define to 1 if you have the `fwrite_unlocked' function. */ /* Define to 1 if you have the `fwrite_unlocked' function. */
#undef HAVE_FWRITE_UNLOCKED #undef HAVE_FWRITE_UNLOCKED
...@@ -321,6 +393,12 @@ ...@@ -321,6 +393,12 @@
/* Define if your assembler supports .weak. */ /* Define if your assembler supports .weak. */
#undef HAVE_GAS_WEAK #undef HAVE_GAS_WEAK
/* Define to 1 if you have the `getchar_unlocked' function. */
#undef HAVE_GETCHAR_UNLOCKED
/* Define to 1 if you have the `getc_unlocked' function. */
#undef HAVE_GETC_UNLOCKED
/* Define to 1 if you have the `getrlimit' function. */ /* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT #undef HAVE_GETRLIMIT
...@@ -421,6 +499,9 @@ ...@@ -421,6 +499,9 @@
/* Define if printf supports "%p". */ /* Define if printf supports "%p". */
#undef HAVE_PRINTF_PTR #undef HAVE_PRINTF_PTR
/* Define to 1 if you have the `putchar_unlocked' function. */
#undef HAVE_PUTCHAR_UNLOCKED
/* Define to 1 if you have the `putc_unlocked' function. */ /* Define to 1 if you have the `putc_unlocked' function. */
#undef HAVE_PUTC_UNLOCKED #undef HAVE_PUTC_UNLOCKED
......
...@@ -9011,11 +9011,22 @@ fi ...@@ -9011,11 +9011,22 @@ fi
for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ sysconf strsignal getrusage nl_langinfo scandir alphasort \
fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ gettimeofday mbstowcs wcswidth mmap mincore setlocale \
scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
setlocale
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5 echo "$as_me:$LINENO: checking for $ac_func" >&5
...@@ -11158,10 +11169,21 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" ...@@ -11158,10 +11169,21 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
for ac_func in getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
fprintf_unlocked strstr errno snprintf vasprintf \
malloc realloc calloc free basename getopt clock getpagesize
for ac_func in getenv atol sbrk abort atof getcwd getwd strsignal \
strstr errno snprintf vasprintf malloc realloc calloc free \
basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
do do
ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
......
...@@ -977,11 +977,15 @@ fi ...@@ -977,11 +977,15 @@ fi
dnl Disabled until we have a complete test for buggy enum bitfields. dnl Disabled until we have a complete test for buggy enum bitfields.
dnl gcc_AC_C_ENUM_BF_UNSIGNED dnl gcc_AC_C_ENUM_BF_UNSIGNED
define(gcc_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
putchar_unlocked putc_unlocked)
AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \ AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \
sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ sysconf strsignal getrusage nl_langinfo scandir alphasort \
fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ gettimeofday mbstowcs wcswidth mmap mincore setlocale \
scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ gcc_UNLOCKED_FUNCS)
setlocale)
if test x$ac_cv_func_mbstowcs = xyes; then if test x$ac_cv_func_mbstowcs = xyes; then
AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works, AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works,
...@@ -1048,10 +1052,9 @@ AM_LANGINFO_CODESET ...@@ -1048,10 +1052,9 @@ AM_LANGINFO_CODESET
# We will need to find libiberty.h and ansidecl.h # We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \ gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd strsignal \
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ strstr errno snprintf vasprintf malloc realloc calloc free \
fprintf_unlocked strstr errno snprintf vasprintf \ basename getopt clock getpagesize gcc_UNLOCKED_FUNCS, , ,[
malloc realloc calloc free basename getopt clock getpagesize, , ,[
#include "ansidecl.h" #include "ansidecl.h"
#include "system.h"]) #include "system.h"])
......
...@@ -65,11 +65,65 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -65,11 +65,65 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
# undef putc # undef putc
# define putc(C, Stream) putc_unlocked (C, Stream) # define putc(C, Stream) putc_unlocked (C, Stream)
# endif # endif
# ifdef HAVE_PUTCHAR_UNLOCKED
# undef putchar
# define putchar(C) putchar_unlocked (C)
# endif
# ifdef HAVE_GETC_UNLOCKED
# undef getc
# define getc(Stream) getc_unlocked (Stream)
# endif
# ifdef HAVE_GETCHAR_UNLOCKED
# undef getchar
# define getchar() getchar_unlocked ()
# endif
# ifdef HAVE_FPUTC_UNLOCKED # ifdef HAVE_FPUTC_UNLOCKED
# undef fputc # undef fputc
# define fputc(C, Stream) fputc_unlocked (C, Stream) # define fputc(C, Stream) fputc_unlocked (C, Stream)
# endif # endif
# ifdef HAVE_CLEARERR_UNLOCKED
# undef clearerr
# define clearerr(Stream) clearerr_unlocked (Stream)
# if defined (HAVE_DECL_CLEARERR_UNLOCKED) && !HAVE_DECL_CLEARERR_UNLOCKED
extern void clearerr_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FEOF_UNLOCKED
# undef feof
# define feof(Stream) feof_unlocked (Stream)
# if defined (HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED
extern int feof_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FILENO_UNLOCKED
# undef fileno
# define fileno(Stream) fileno_unlocked (Stream)
# if defined (HAVE_DECL_FILENO_UNLOCKED) && !HAVE_DECL_FILENO_UNLOCKED
extern int fileno_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FFLUSH_UNLOCKED
# undef fflush
# define fflush(Stream) fflush_unlocked (Stream)
# if defined (HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED
extern int fflush_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FGETC_UNLOCKED
# undef fgetc
# define fgetc(Stream) fgetc_unlocked (Stream)
# if defined (HAVE_DECL_FGETC_UNLOCKED) && !HAVE_DECL_FGETC_UNLOCKED
extern int fgetc_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FGETS_UNLOCKED
# undef fgets
# define fgets(S, n, Stream) fgets_unlocked (S, n, Stream)
# if defined (HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED
extern char *fgets_unlocked (char *, int, FILE *);
# endif
# endif
# ifdef HAVE_FPUTS_UNLOCKED # ifdef HAVE_FPUTS_UNLOCKED
# undef fputs # undef fputs
# define fputs(String, Stream) fputs_unlocked (String, Stream) # define fputs(String, Stream) fputs_unlocked (String, Stream)
...@@ -77,11 +131,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -77,11 +131,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
extern int fputs_unlocked (const char *, FILE *); extern int fputs_unlocked (const char *, FILE *);
# endif # endif
# endif # endif
# ifdef HAVE_FERROR_UNLOCKED
# undef ferror
# define ferror(Stream) ferror_unlocked (Stream)
# if defined (HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED
extern int ferror_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FREAD_UNLOCKED
# undef fread
# define fread(Ptr, Size, N, Stream) fread_unlocked (Ptr, Size, N, Stream)
# if defined (HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED
extern size_t fread_unlocked (void *, size_t, size_t, FILE *);
# endif
# endif
# ifdef HAVE_FWRITE_UNLOCKED # ifdef HAVE_FWRITE_UNLOCKED
# undef fwrite # undef fwrite
# define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream) # define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream)
# if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED # if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
extern int fwrite_unlocked (const void *, size_t, size_t, FILE *); extern size_t fwrite_unlocked (const void *, size_t, size_t, FILE *);
# endif # endif
# endif # endif
# ifdef HAVE_FPRINTF_UNLOCKED # ifdef HAVE_FPRINTF_UNLOCKED
......
2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.ac (libcpp_UNLOCKED_FUNCS): New.
(AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
* system.h (putchar, getc, getchar, clearerr, feof, fileno,
fflush, fgetc, fgets, ferror, fread): Redefine to the associated
_unlocked function.
(fwrite_unlocked): Fix prototype.
* configure, config.in: Regenerate.
2005-04-05 Jakub Jelinek <jakub@redhat.com> 2005-04-05 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/19475 PR preprocessor/19475
......
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
*/ */
#undef HAVE_ALLOCA_H #undef HAVE_ALLOCA_H
/* Define to 1 if you have the `clearerr_unlocked' function. */
#undef HAVE_CLEARERR_UNLOCKED
/* Define to 1 if you have the declaration of `abort', and to 0 if you don't. /* Define to 1 if you have the declaration of `abort', and to 0 if you don't.
*/ */
#undef HAVE_DECL_ABORT #undef HAVE_DECL_ABORT
...@@ -30,10 +33,38 @@ ...@@ -30,10 +33,38 @@
don't. */ don't. */
#undef HAVE_DECL_BASENAME #undef HAVE_DECL_BASENAME
/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_CLEARERR_UNLOCKED
/* Define to 1 if you have the declaration of `errno', and to 0 if you don't. /* Define to 1 if you have the declaration of `errno', and to 0 if you don't.
*/ */
#undef HAVE_DECL_ERRNO #undef HAVE_DECL_ERRNO
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_FEOF_UNLOCKED
/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FERROR_UNLOCKED
/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FFLUSH_UNLOCKED
/* Define to 1 if you have the declaration of `fgetc_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FGETC_UNLOCKED
/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FGETS_UNLOCKED
/* Define to 1 if you have the declaration of `fileno_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FILENO_UNLOCKED
/* Define to 1 if you have the declaration of `fprintf_unlocked', and to 0 if /* Define to 1 if you have the declaration of `fprintf_unlocked', and to 0 if
you don't. */ you don't. */
#undef HAVE_DECL_FPRINTF_UNLOCKED #undef HAVE_DECL_FPRINTF_UNLOCKED
...@@ -46,14 +77,30 @@ ...@@ -46,14 +77,30 @@
you don't. */ you don't. */
#undef HAVE_DECL_FPUTS_UNLOCKED #undef HAVE_DECL_FPUTS_UNLOCKED
/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FREAD_UNLOCKED
/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if /* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
you don't. */ you don't. */
#undef HAVE_DECL_FWRITE_UNLOCKED #undef HAVE_DECL_FWRITE_UNLOCKED
/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_GETCHAR_UNLOCKED
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_GETC_UNLOCKED
/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't. /* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
*/ */
#undef HAVE_DECL_GETOPT #undef HAVE_DECL_GETOPT
/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_PUTCHAR_UNLOCKED
/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you /* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
don't. */ don't. */
#undef HAVE_DECL_PUTC_UNLOCKED #undef HAVE_DECL_PUTC_UNLOCKED
...@@ -61,6 +108,24 @@ ...@@ -61,6 +108,24 @@
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
/* Define to 1 if you have the `feof_unlocked' function. */
#undef HAVE_FEOF_UNLOCKED
/* Define to 1 if you have the `ferror_unlocked' function. */
#undef HAVE_FERROR_UNLOCKED
/* Define to 1 if you have the `fflush_unlocked' function. */
#undef HAVE_FFLUSH_UNLOCKED
/* Define to 1 if you have the `fgetc_unlocked' function. */
#undef HAVE_FGETC_UNLOCKED
/* Define to 1 if you have the `fgets_unlocked' function. */
#undef HAVE_FGETS_UNLOCKED
/* Define to 1 if you have the `fileno_unlocked' function. */
#undef HAVE_FILENO_UNLOCKED
/* Define to 1 if you have the `fprintf_unlocked' function. */ /* Define to 1 if you have the `fprintf_unlocked' function. */
#undef HAVE_FPRINTF_UNLOCKED #undef HAVE_FPRINTF_UNLOCKED
...@@ -70,9 +135,18 @@ ...@@ -70,9 +135,18 @@
/* Define to 1 if you have the `fputs_unlocked' function. */ /* Define to 1 if you have the `fputs_unlocked' function. */
#undef HAVE_FPUTS_UNLOCKED #undef HAVE_FPUTS_UNLOCKED
/* Define to 1 if you have the `fread_unlocked' function. */
#undef HAVE_FREAD_UNLOCKED
/* Define to 1 if you have the `fwrite_unlocked' function. */ /* Define to 1 if you have the `fwrite_unlocked' function. */
#undef HAVE_FWRITE_UNLOCKED #undef HAVE_FWRITE_UNLOCKED
/* Define to 1 if you have the `getchar_unlocked' function. */
#undef HAVE_GETCHAR_UNLOCKED
/* Define to 1 if you have the `getc_unlocked' function. */
#undef HAVE_GETC_UNLOCKED
/* Define if you have the iconv() function. */ /* Define if you have the iconv() function. */
#undef HAVE_ICONV #undef HAVE_ICONV
...@@ -97,6 +171,9 @@ ...@@ -97,6 +171,9 @@
/* Define to 1 if libc includes obstacks. */ /* Define to 1 if libc includes obstacks. */
#undef HAVE_OBSTACK #undef HAVE_OBSTACK
/* Define to 1 if you have the `putchar_unlocked' function. */
#undef HAVE_PUTCHAR_UNLOCKED
/* Define to 1 if you have the `putc_unlocked' function. */ /* Define to 1 if you have the `putc_unlocked' function. */
#undef HAVE_PUTC_UNLOCKED #undef HAVE_PUTC_UNLOCKED
......
...@@ -4894,8 +4894,19 @@ _ACEOF ...@@ -4894,8 +4894,19 @@ _ACEOF
for ac_func in putc_unlocked fputc_unlocked fputs_unlocked \
fwrite_unlocked fprintf_unlocked
for ac_func in clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5 echo "$as_me:$LINENO: checking for $ac_func" >&5
...@@ -5276,9 +5287,9 @@ _ACEOF ...@@ -5276,9 +5287,9 @@ _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5 echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5
echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -5291,8 +5302,8 @@ $ac_includes_default ...@@ -5291,8 +5302,8 @@ $ac_includes_default
int int
main () main ()
{ {
#ifndef putc_unlocked #ifndef clearerr_unlocked
char *p = (char *) putc_unlocked; char *p = (char *) clearerr_unlocked;
#endif #endif
; ;
...@@ -5321,34 +5332,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -5321,34 +5332,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_have_decl_putc_unlocked=yes ac_cv_have_decl_clearerr_unlocked=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_putc_unlocked=no ac_cv_have_decl_clearerr_unlocked=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5 echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6 echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
if test $ac_cv_have_decl_putc_unlocked = yes; then if test $ac_cv_have_decl_clearerr_unlocked = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 1 #define HAVE_DECL_CLEARERR_UNLOCKED 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 0 #define HAVE_DECL_CLEARERR_UNLOCKED 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5 echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -5361,8 +5372,8 @@ $ac_includes_default ...@@ -5361,8 +5372,8 @@ $ac_includes_default
int int
main () main ()
{ {
#ifndef fputc_unlocked #ifndef feof_unlocked
char *p = (char *) fputc_unlocked; char *p = (char *) feof_unlocked;
#endif #endif
; ;
...@@ -5391,34 +5402,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -5391,34 +5402,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_have_decl_fputc_unlocked=yes ac_cv_have_decl_feof_unlocked=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fputc_unlocked=no ac_cv_have_decl_feof_unlocked=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5 echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6 echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
if test $ac_cv_have_decl_fputc_unlocked = yes; then if test $ac_cv_have_decl_feof_unlocked = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTC_UNLOCKED 1 #define HAVE_DECL_FEOF_UNLOCKED 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTC_UNLOCKED 0 #define HAVE_DECL_FEOF_UNLOCKED 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5 echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5
echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -5431,8 +5442,8 @@ $ac_includes_default ...@@ -5431,8 +5442,8 @@ $ac_includes_default
int int
main () main ()
{ {
#ifndef fputs_unlocked #ifndef ferror_unlocked
char *p = (char *) fputs_unlocked; char *p = (char *) ferror_unlocked;
#endif #endif
; ;
...@@ -5461,34 +5472,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -5461,34 +5472,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_have_decl_fputs_unlocked=yes ac_cv_have_decl_ferror_unlocked=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fputs_unlocked=no ac_cv_have_decl_ferror_unlocked=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5 echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6 echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
if test $ac_cv_have_decl_fputs_unlocked = yes; then if test $ac_cv_have_decl_ferror_unlocked = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 1 #define HAVE_DECL_FERROR_UNLOCKED 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 0 #define HAVE_DECL_FERROR_UNLOCKED 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5 echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5
echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
...@@ -5501,8 +5512,8 @@ $ac_includes_default ...@@ -5501,8 +5512,8 @@ $ac_includes_default
int int
main () main ()
{ {
#ifndef fwrite_unlocked #ifndef fflush_unlocked
char *p = (char *) fwrite_unlocked; char *p = (char *) fflush_unlocked;
#endif #endif
; ;
...@@ -5531,27 +5542,237 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ...@@ -5531,27 +5542,237 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_cv_have_decl_fwrite_unlocked=yes ac_cv_have_decl_fflush_unlocked=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fwrite_unlocked=no ac_cv_have_decl_fflush_unlocked=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6 echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
if test $ac_cv_have_decl_fwrite_unlocked = yes; then if test $ac_cv_have_decl_fflush_unlocked = yes; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 1 #define HAVE_DECL_FFLUSH_UNLOCKED 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 0 #define HAVE_DECL_FFLUSH_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fgetc_unlocked is declared" >&5
echo $ECHO_N "checking whether fgetc_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fgetc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fgetc_unlocked
char *p = (char *) fgetc_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fgetc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fgetc_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgetc_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fgetc_unlocked" >&6
if test $ac_cv_have_decl_fgetc_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FGETC_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FGETC_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fgets_unlocked
char *p = (char *) fgets_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fgets_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fgets_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
if test $ac_cv_have_decl_fgets_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FGETS_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FGETS_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fileno_unlocked is declared" >&5
echo $ECHO_N "checking whether fileno_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fileno_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fileno_unlocked
char *p = (char *) fileno_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fileno_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fileno_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fileno_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fileno_unlocked" >&6
if test $ac_cv_have_decl_fileno_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FILENO_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FILENO_UNLOCKED 0
_ACEOF _ACEOF
...@@ -5626,6 +5847,566 @@ _ACEOF ...@@ -5626,6 +5847,566 @@ _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5
echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fputc_unlocked
char *p = (char *) fputc_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fputc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fputc_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
if test $ac_cv_have_decl_fputc_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTC_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTC_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5
echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fputs_unlocked
char *p = (char *) fputs_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fputs_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fputs_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
if test $ac_cv_have_decl_fputs_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FPUTS_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5
echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fread_unlocked
char *p = (char *) fread_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fread_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fread_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
if test $ac_cv_have_decl_fread_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FREAD_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FREAD_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5
echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef fwrite_unlocked
char *p = (char *) fwrite_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_fwrite_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_fwrite_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
if test $ac_cv_have_decl_fwrite_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FWRITE_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5
echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef getchar_unlocked
char *p = (char *) getchar_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_getchar_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_getchar_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
if test $ac_cv_have_decl_getchar_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_GETCHAR_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_GETCHAR_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef getc_unlocked
char *p = (char *) getc_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_getc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_getc_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
if test $ac_cv_have_decl_getc_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_GETC_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_GETC_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5
echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef putchar_unlocked
char *p = (char *) putchar_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_putchar_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_putchar_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
if test $ac_cv_have_decl_putchar_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTCHAR_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTCHAR_UNLOCKED 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5
echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
#ifndef putc_unlocked
char *p = (char *) putc_unlocked;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_putc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_putc_unlocked=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
if test $ac_cv_have_decl_putc_unlocked = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PUTC_UNLOCKED 0
_ACEOF
fi
......
...@@ -44,10 +44,13 @@ AC_TYPE_SIZE_T ...@@ -44,10 +44,13 @@ AC_TYPE_SIZE_T
AC_STRUCT_TM AC_STRUCT_TM
AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long)
AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \ define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
fwrite_unlocked fprintf_unlocked) ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
AC_CHECK_DECLS([abort, basename, errno, getopt, putc_unlocked, fputc_unlocked, fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
fputs_unlocked, fwrite_unlocked, fprintf_unlocked]) fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
putchar_unlocked putc_unlocked)
AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS)
AC_CHECK_DECLS(m4_split(m4_normalize(abort basename errno getopt libcpp_UNLOCKED_FUNCS)))
# Checks for library functions. # Checks for library functions.
AC_FUNC_ALLOCA AC_FUNC_ALLOCA
......
...@@ -57,11 +57,65 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -57,11 +57,65 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
# undef putc # undef putc
# define putc(C, Stream) putc_unlocked (C, Stream) # define putc(C, Stream) putc_unlocked (C, Stream)
# endif # endif
# ifdef HAVE_PUTCHAR_UNLOCKED
# undef putchar
# define putchar(C) putchar_unlocked (C)
# endif
# ifdef HAVE_GETC_UNLOCKED
# undef getc
# define getc(Stream) getc_unlocked (Stream)
# endif
# ifdef HAVE_GETCHAR_UNLOCKED
# undef getchar
# define getchar() getchar_unlocked ()
# endif
# ifdef HAVE_FPUTC_UNLOCKED # ifdef HAVE_FPUTC_UNLOCKED
# undef fputc # undef fputc
# define fputc(C, Stream) fputc_unlocked (C, Stream) # define fputc(C, Stream) fputc_unlocked (C, Stream)
# endif # endif
# ifdef HAVE_CLEARERR_UNLOCKED
# undef clearerr
# define clearerr(Stream) clearerr_unlocked (Stream)
# if defined (HAVE_DECL_CLEARERR_UNLOCKED) && !HAVE_DECL_CLEARERR_UNLOCKED
extern void clearerr_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FEOF_UNLOCKED
# undef feof
# define feof(Stream) feof_unlocked (Stream)
# if defined (HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED
extern int feof_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FILENO_UNLOCKED
# undef fileno
# define fileno(Stream) fileno_unlocked (Stream)
# if defined (HAVE_DECL_FILENO_UNLOCKED) && !HAVE_DECL_FILENO_UNLOCKED
extern int fileno_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FFLUSH_UNLOCKED
# undef fflush
# define fflush(Stream) fflush_unlocked (Stream)
# if defined (HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED
extern int fflush_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FGETC_UNLOCKED
# undef fgetc
# define fgetc(Stream) fgetc_unlocked (Stream)
# if defined (HAVE_DECL_FGETC_UNLOCKED) && !HAVE_DECL_FGETC_UNLOCKED
extern int fgetc_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FGETS_UNLOCKED
# undef fgets
# define fgets(S, n, Stream) fgets_unlocked (S, n, Stream)
# if defined (HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED
extern char *fgets_unlocked (char *, int, FILE *);
# endif
# endif
# ifdef HAVE_FPUTS_UNLOCKED # ifdef HAVE_FPUTS_UNLOCKED
# undef fputs # undef fputs
# define fputs(String, Stream) fputs_unlocked (String, Stream) # define fputs(String, Stream) fputs_unlocked (String, Stream)
...@@ -69,11 +123,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -69,11 +123,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
extern int fputs_unlocked (const char *, FILE *); extern int fputs_unlocked (const char *, FILE *);
# endif # endif
# endif # endif
# ifdef HAVE_FERROR_UNLOCKED
# undef ferror
# define ferror(Stream) ferror_unlocked (Stream)
# if defined (HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED
extern int ferror_unlocked (FILE *);
# endif
# endif
# ifdef HAVE_FREAD_UNLOCKED
# undef fread
# define fread(Ptr, Size, N, Stream) fread_unlocked (Ptr, Size, N, Stream)
# if defined (HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED
extern size_t fread_unlocked (void *, size_t, size_t, FILE *);
# endif
# endif
# ifdef HAVE_FWRITE_UNLOCKED # ifdef HAVE_FWRITE_UNLOCKED
# undef fwrite # undef fwrite
# define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream) # define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream)
# if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED # if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
extern int fwrite_unlocked (const void *, size_t, size_t, FILE *); extern size_t fwrite_unlocked (const void *, size_t, size_t, FILE *);
# endif # endif
# endif # endif
# ifdef HAVE_FPRINTF_UNLOCKED # ifdef HAVE_FPRINTF_UNLOCKED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment