OSDN Git Service

* configure.in: Test for availability of putc_unlocked, fputc_unlocked,
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Dec 1998 23:40:19 +0000 (23:40 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Dec 1998 23:40:19 +0000 (23:40 +0000)
        and fputs_unlocked.
        * configure: Rebuilt.
        * system.h: If the *_unlocked functions are available use them
        instead of the locked counterparts by defining macros.
        * config.in: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24175 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.in
gcc/configure
gcc/configure.in
gcc/system.h

index a871069..6d57da9 100644 (file)
@@ -1,3 +1,12 @@
+1998-12-08  Ulrich Drepper  <drepper@cygnus.com>
+
+       * configure.in: Test for availability of putc_unlocked, fputc_unlocked,
+       and fputs_unlocked.
+       * configure: Rebuilt.
+       * system.h: If the *_unlocked functions are available use them
+       instead of the locked counterparts by defining macros.
+       * config.in: Regenerated.
+
 Tue Dec  8 00:34:05 1998  Mike Stump  <mrs@wrs.com>
 
        * i386/bsd.h (ASM_FILE_START): Don't use dump_base_name, it is
index bacead5..13f0772 100644 (file)
 /* Define if you have the bzero function.  */
 #undef HAVE_BZERO
 
+/* Define if you have the fputc_unlocked function.  */
+#undef HAVE_FPUTC_UNLOCKED
+
+/* Define if you have the fputs_unlocked function.  */
+#undef HAVE_FPUTS_UNLOCKED
+
 /* Define if you have the getrlimit function.  */
 #undef HAVE_GETRLIMIT
 
 /* Define if you have the popen function.  */
 #undef HAVE_POPEN
 
+/* Define if you have the putc_unlocked function.  */
+#undef HAVE_PUTC_UNLOCKED
+
 /* Define if you have the putenv function.  */
 #undef HAVE_PUTENV
 
index d2a998c..1208d59 100755 (executable)
@@ -2045,15 +2045,16 @@ fi
 
 for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
        index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
-       sysconf isascii gettimeofday strsignal
+       sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
+       fputs_unlocked
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2052: checking for $ac_func" >&5
+echo "configure:2053: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2057 "configure"
+#line 2058 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2076,7 +2077,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2105,12 +2106,12 @@ done
 #AC_CHECK_TYPE(wchar_t, unsigned int)
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2109: checking for vprintf" >&5
+echo "configure:2110: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2114 "configure"
+#line 2115 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -2133,7 +2134,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -2157,12 +2158,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2161: checking for _doprnt" >&5
+echo "configure:2162: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2166 "configure"
+#line 2167 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -2185,7 +2186,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -2221,7 +2222,7 @@ fi
 
 
 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
-echo "configure:2225: checking whether the printf functions support %p" >&5
+echo "configure:2226: checking whether the printf functions support %p" >&5
 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2229,7 +2230,7 @@ else
   gcc_cv_func_printf_ptr=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2233 "configure"
+#line 2234 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 
@@ -2242,7 +2243,7 @@ main()
   exit (p != q);
 }
 EOF
-if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   gcc_cv_func_printf_ptr=yes
 else
@@ -2266,12 +2267,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2270: checking for pid_t" >&5
+echo "configure:2271: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2275 "configure"
+#line 2276 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2300,17 +2301,17 @@ fi
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2304: checking for vfork.h" >&5
+echo "configure:2305: checking for vfork.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2309 "configure"
+#line 2310 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2335,18 +2336,18 @@ else
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2339: checking for working vfork" >&5
+echo "configure:2340: checking for working vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2345: checking for vfork" >&5
+echo "configure:2346: checking for vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2350 "configure"
+#line 2351 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -2369,7 +2370,7 @@ vfork();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -2391,7 +2392,7 @@ fi
 ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 2395 "configure"
+#line 2396 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -2486,7 +2487,7 @@ main() {
   }
 }
 EOF
-if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -2514,12 +2515,12 @@ for ac_func in malloc realloc calloc free bcopy bzero bcmp \
        strsignal
 do
 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
-echo "configure:2518: checking whether $ac_func must be declared" >&5
+echo "configure:2519: checking whether $ac_func must be declared" >&5
 if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2523 "configure"
+#line 2524 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -2552,7 +2553,7 @@ int main() {
 char *(*pfn) = (char *(*)) $ac_func
 ; return 0; }
 EOF
-if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "gcc_cv_decl_needed_$ac_func=no"
 else
@@ -2581,12 +2582,12 @@ done
 for ac_func in getrlimit setrlimit
 do
 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
-echo "configure:2585: checking whether $ac_func must be declared" >&5
+echo "configure:2586: checking whether $ac_func must be declared" >&5
 if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2590 "configure"
+#line 2591 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -2623,7 +2624,7 @@ int main() {
 char *(*pfn) = (char *(*)) $ac_func
 ; return 0; }
 EOF
-if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "gcc_cv_decl_needed_$ac_func=no"
 else
@@ -2650,12 +2651,12 @@ done
 
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2654: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:2655: checking for sys_siglist declaration in signal.h or unistd.h" >&5
 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2659 "configure"
+#line 2660 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2667,7 +2668,7 @@ int main() {
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:2671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -3002,9 +3003,9 @@ for machine in $build $host $target; do
                tmake_file=arm/t-bare
                ;;
         arm*-*-ecos-elf)
-                tm_file=arm/ecos-elf.h
-                tmake_file=arm/t-elf
-                ;;
+               tm_file=arm/ecos-elf.h
+               tmake_file=arm/t-elf
+               ;; 
        arm*-*-elf)
                tm_file=arm/unknown-elf.h
                tmake_file=arm/t-arm-elf
@@ -4476,10 +4477,13 @@ for machine in $build $host $target; do
                fixincludes=fixinc.wrap
                tmake_file=t-netbsd
                ;;
-       mipsel-*-linux*)                        # Little endian Linux MIPS
+       mips*-*-linux*)                         # Linux MIPS, either endian.
                xmake_file=x-linux
                xm_file="xm-siglist.h ${xm_file}"
-               tm_file="mips/elfl.h mips/linux.h"
+               case $machine in
+                       mipsel-*)  tm_file="mips/elfl.h mips/linux.h" ;;
+                       *)         tm_file="mips/elf.h mips/linux.h" ;;
+               esac
                extra_parts="crtbegin.o crtend.o"
                gnu_ld=yes
                gas=yes
@@ -5908,7 +5912,7 @@ fi
 
 # Figure out what assembler alignment features are present.
 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:5908: checking assembler alignment features" >&5
+echo "configure:5916: checking assembler alignment features" >&5
 gcc_cv_as=
 gcc_cv_as_alignment_features=
 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
@@ -5981,7 +5985,7 @@ fi
 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
 
 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
-echo "configure:5981: checking assembler subsection support" >&5
+echo "configure:5989: checking assembler subsection support" >&5
 gcc_cv_as_subsections=
 if test x$gcc_cv_as != x; then
        # Check if we have .subsection
@@ -6253,7 +6257,7 @@ fi
 
 # Warn if using init_priority.
 echo $ac_n "checking whether to enable init_priority by default""... $ac_c" 1>&6
-echo "configure:6253: checking whether to enable init_priority by default" >&5
+echo "configure:6261: checking whether to enable init_priority by default" >&5
 if test x$enable_init_priority != xyes; then
   enable_init_priority=no
 fi
index b05578f..d8ec9f1 100644 (file)
@@ -371,7 +371,8 @@ fi
 
 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
        index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
-       sysconf isascii gettimeofday strsignal)
+       sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
+       fputs_unlocked)
 
 # Make sure wchar_t is available
 #AC_CHECK_TYPE(wchar_t, unsigned int)
index 47a3b40..daa47eb 100644 (file)
 #define NULL 0
 #endif
 
+/* The compiler is not a multi-threaded application and therefore we
+   do not have to use the locking functions.  */
+#ifdef HAVE_PUTC_UNLOCKED
+# undef putc
+# define putc(C, Stream) putc_unlocked (C, Stream)
+#endif
+#ifdef HAVE_FPUTC_UNLOCKED
+# undef fputc
+# define fputc(C, Stream) fputc_unlocked (C, Stream)
+#endif
+#ifdef HAVE_FPUTS_UNLOCKED
+# undef fputs
+# define fputs(String, Stream) fputs_unlocked (String, Stream)
+#endif
+
 #include <ctype.h>
 
 /* Jim Meyering writes: