aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@cygnus.com>1998-12-07 23:40:19 +0000
committerJeff Law <law@gcc.gnu.org>1998-12-07 16:40:19 -0700
commit54953b66c5540d7671efaa66764bcc20722bab8a (patch)
tree92ea63ec5cc5860eecb13fd72d51074de7032172 /gcc/system.h
parent872936ad0b64f529c953e86d1be1928cc29b902e (diff)
downloadgcc-54953b66c5540d7671efaa66764bcc20722bab8a.zip
gcc-54953b66c5540d7671efaa66764bcc20722bab8a.tar.gz
gcc-54953b66c5540d7671efaa66764bcc20722bab8a.tar.bz2
configure.in: Test for availability of putc_unlocked, fputc_unlocked, and fputs_unlocked.
* 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. From-SVN: r24175
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 47a3b40..daa47eb 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -21,6 +21,21 @@
#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: