aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2005-12-01 22:46:14 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2005-12-01 22:46:14 +0000
commitb53b5aa509786809f86def654ff8a9867a99bf14 (patch)
treed02ec5271549541d95514c49e7d5f0d0245690c4
parentf860c253dfd42d6473f5f44c3b98f7c3244bf05d (diff)
downloadgcc-b53b5aa509786809f86def654ff8a9867a99bf14.zip
gcc-b53b5aa509786809f86def654ff8a9867a99bf14.tar.gz
gcc-b53b5aa509786809f86def654ff8a9867a99bf14.tar.bz2
builtins.def (BUILT_IN_PUTC, [...]): New.
* builtins.def (BUILT_IN_PUTC, BUILT_IN_PUTC_UNLOCKED): New. * config/pa/pa.c (pa_init_builtins): If we detect DONT_HAVE_FPUTC_UNLOCKED, set builtin fputc_unlocked to putc_unlocked. From-SVN: r107833
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/builtins.def2
-rw-r--r--gcc/config/pa/pa.c6
3 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b7ba1b6..7eb20a3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2005-12-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtins.def (BUILT_IN_PUTC, BUILT_IN_PUTC_UNLOCKED): New.
+
+ * config/pa/pa.c (pa_init_builtins): If we detect
+ DONT_HAVE_FPUTC_UNLOCKED, set builtin fputc_unlocked to
+ putc_unlocked.
+
2005-12-01 Richard Guenther <rguenther@suse.de>
* fold-const.c (fold_binary): Use fold_build2, not
diff --git a/gcc/builtins.def b/gcc/builtins.def
index e7b7a45..063ca1c 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -510,6 +510,8 @@ DEF_LIB_BUILTIN (BUILT_IN_STRSTR, "strstr", BT_FN_STRING_CONST_STRING_CON
/* Category: stdio builtins. */
DEF_LIB_BUILTIN (BUILT_IN_FPRINTF, "fprintf", BT_FN_INT_FILEPTR_CONST_STRING_VAR, ATTR_FORMAT_PRINTF_2_3)
DEF_EXT_LIB_BUILTIN (BUILT_IN_FPRINTF_UNLOCKED, "fprintf_unlocked", BT_FN_INT_FILEPTR_CONST_STRING_VAR, ATTR_FORMAT_PRINTF_2_3)
+DEF_LIB_BUILTIN (BUILT_IN_PUTC, "putc", BT_FN_INT_INT_FILEPTR, ATTR_NONNULL_LIST)
+DEF_EXT_LIB_BUILTIN (BUILT_IN_PUTC_UNLOCKED, "putc_unlocked", BT_FN_INT_INT_FILEPTR, ATTR_NONNULL_LIST)
DEF_LIB_BUILTIN (BUILT_IN_FPUTC, "fputc", BT_FN_INT_INT_FILEPTR, ATTR_NONNULL_LIST)
DEF_EXT_LIB_BUILTIN (BUILT_IN_FPUTC_UNLOCKED, "fputc_unlocked", BT_FN_INT_INT_FILEPTR, ATTR_NONNULL_LIST)
DEF_LIB_BUILTIN (BUILT_IN_FPUTS, "fputs", BT_FN_INT_CONST_STRING_FILEPTR, ATTR_NONNULL_LIST)
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 4dcd828..595577d 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -501,8 +501,10 @@ static void
pa_init_builtins (void)
{
#ifdef DONT_HAVE_FPUTC_UNLOCKED
- built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = NULL_TREE;
- implicit_built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = NULL_TREE;
+ built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] =
+ built_in_decls[(int) BUILT_IN_PUTC_UNLOCKED];
+ implicit_built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED]
+ = implicit_built_in_decls[(int) BUILT_IN_PUTC_UNLOCKED];
#endif
}