Commit 9c30c0e7 by Zack Weinberg Committed by Jeff Law

system.h: Use putc_unlocked...

        * system.h: Use putc_unlocked, fputc_unlocked, and
        fputs_unlocked only if putc_unlocked has a prototype already.
        Prototype fputs_unlocked if necessary.
        * configure.in: Check for prototypes of putc_unlocked and
        fputs_unlocked.
        * acconfig.h: Updated.
        * config.in, configure: Rebuilt.

From-SVN: r25855
parent 21677228
Fri Mar 19 01:42:05 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
* system.h: Use putc_unlocked, fputc_unlocked, and
fputs_unlocked only if putc_unlocked has a prototype already.
Prototype fputs_unlocked if necessary.
* configure.in: Check for prototypes of putc_unlocked and
fputs_unlocked.
* acconfig.h: Updated.
* config.in, configure: Rebuilt.
Fri Mar 19 02:45:12 1999 Alexandre Oliva <oliva@dcc.unicamp.br> Fri Mar 19 02:45:12 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
* Makefile.in (INTL_TARGETS): new macro * Makefile.in (INTL_TARGETS): new macro
......
...@@ -75,6 +75,9 @@ ...@@ -75,6 +75,9 @@
/* Whether atol must be declared even if <stdlib.h> is included. */ /* Whether atol must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_ATOL #undef NEED_DECLARATION_ATOL
/* Whether atof must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_ATOF
/* Whether sbrk must be declared even if <stdlib.h> is included. */ /* Whether sbrk must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_SBRK #undef NEED_DECLARATION_SBRK
...@@ -99,6 +102,12 @@ ...@@ -99,6 +102,12 @@
/* Whether setrlimit must be declared even if <sys/resource.h> is included. */ /* Whether setrlimit must be declared even if <sys/resource.h> is included. */
#undef NEED_DECLARATION_SETRLIMIT #undef NEED_DECLARATION_SETRLIMIT
/* Whether putc_unlocked must be declared even if <stdio.h> is included. */
#undef NEED_DECLARATION_PUTC_UNLOCKED
/* Whether fputs_unlocked must be declared even if <stdio.h> is included. */
#undef NEED_DECLARATION_FPUTS_UNLOCKED
/* Define if you want expensive run-time checks. */ /* Define if you want expensive run-time checks. */
#undef ENABLE_CHECKING #undef ENABLE_CHECKING
......
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
/* Whether atol must be declared even if <stdlib.h> is included. */ /* Whether atol must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_ATOL #undef NEED_DECLARATION_ATOL
/* Whether atof must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_ATOF
/* Whether sbrk must be declared even if <stdlib.h> is included. */ /* Whether sbrk must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_SBRK #undef NEED_DECLARATION_SBRK
...@@ -100,6 +103,12 @@ ...@@ -100,6 +103,12 @@
/* Whether setrlimit must be declared even if <sys/resource.h> is included. */ /* Whether setrlimit must be declared even if <sys/resource.h> is included. */
#undef NEED_DECLARATION_SETRLIMIT #undef NEED_DECLARATION_SETRLIMIT
/* Whether putc_unlocked must be declared even if <stdio.h> is included. */
#undef NEED_DECLARATION_PUTC_UNLOCKED
/* Whether fputs_unlocked must be declared even if <stdio.h> is included. */
#undef NEED_DECLARATION_FPUTS_UNLOCKED
/* Define if you want expensive run-time checks. */ /* Define if you want expensive run-time checks. */
#undef ENABLE_CHECKING #undef ENABLE_CHECKING
......
...@@ -2593,7 +2593,7 @@ fi ...@@ -2593,7 +2593,7 @@ fi
for ac_func in malloc realloc calloc free bcopy bzero bcmp \ for ac_func in malloc realloc calloc free bcopy bzero bcmp \
index rindex getenv atol sbrk abort atof strerror getcwd getwd \ index rindex getenv atol sbrk abort atof strerror getcwd getwd \
strsignal strsignal putc_unlocked fputs_unlocked
do do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
echo "configure:2600: checking whether $ac_func must be declared" >&5 echo "configure:2600: checking whether $ac_func must be declared" >&5
......
...@@ -383,7 +383,7 @@ AC_FUNC_VFORK ...@@ -383,7 +383,7 @@ AC_FUNC_VFORK
GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \ GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
index rindex getenv atol sbrk abort atof strerror getcwd getwd \ index rindex getenv atol sbrk abort atof strerror getcwd getwd \
strsignal) strsignal putc_unlocked fputs_unlocked)
GCC_NEED_DECLARATIONS(getrlimit setrlimit, [ GCC_NEED_DECLARATIONS(getrlimit setrlimit, [
#include <sys/types.h> #include <sys/types.h>
......
...@@ -37,18 +37,28 @@ Boston, MA 02111-1307, USA. */ ...@@ -37,18 +37,28 @@ Boston, MA 02111-1307, USA. */
#endif #endif
/* The compiler is not a multi-threaded application and therefore we /* The compiler is not a multi-threaded application and therefore we
do not have to use the locking functions. */ do not have to use the locking functions.
#ifdef HAVE_PUTC_UNLOCKED
NEED_DECLARATION_PUTC_UNLOCKED actually indicates whether or not
the IO code is multi-thread safe by default. If it is not declared,
then do not worry about using the _unlocked functions.
fputs_unlocked is an extension and needs to be prototyped specially. */
#if defined HAVE_PUTC_UNLOCKED && !defined NEED_DECLARATION_PUTC_UNLOCKED
# undef putc # undef putc
# define putc(C, Stream) putc_unlocked (C, Stream) # define putc(C, Stream) putc_unlocked (C, Stream)
#endif #endif
#ifdef HAVE_FPUTC_UNLOCKED #if defined HAVE_FPUTC_UNLOCKED && !defined NEED_DECLARATION_PUTC_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_FPUTS_UNLOCKED #if defined HAVE_FPUTS_UNLOCKED && !defined NEED_DECLARATION_PUTC_UNLOCKED
# undef fputs # undef fputs
# define fputs(String, Stream) fputs_unlocked (String, Stream) # define fputs(String, Stream) fputs_unlocked (String, Stream)
# ifdef NEED_DECLARATION_FPUTS_UNLOCKED
extern int fputs_unlocked PROTO ((const char *, FILE *));
# endif
#endif #endif
#include <ctype.h> #include <ctype.h>
......
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