aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplex.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2001-09-28 07:00:27 +0000
committerZack Weinberg <zack@gcc.gnu.org>2001-09-28 07:00:27 +0000
commit3b681e9dccc5cbbddecbcc1a0c41c51f7fbef57d (patch)
tree206ad049b411ef90070a3486a0832ecc5adf0c79 /gcc/cpplex.c
parentc0636171dba6e1d76e6ab328182797d370f0ec91 (diff)
downloadgcc-3b681e9dccc5cbbddecbcc1a0c41c51f7fbef57d.zip
gcc-3b681e9dccc5cbbddecbcc1a0c41c51f7fbef57d.tar.gz
gcc-3b681e9dccc5cbbddecbcc1a0c41c51f7fbef57d.tar.bz2
cpplex.c (cpp_output_token): Use a putc loop for SPELL_OPERATOR, and fwrite for SPELL_IDENT.
* cpplex.c (cpp_output_token): Use a putc loop for SPELL_OPERATOR, and fwrite for SPELL_IDENT. * configure.in: Detect fwrite_unlocked and fprintf_unlocked. * configure, config.in: Regenerate. * system.h: Replace fwrite and fprintf with their unlocked variants if available. From-SVN: r45855
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r--gcc/cpplex.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index 1c6d0dd..dbef9b5 100644
--- a/gcc/cpplex.c
+++ b/gcc/cpplex.c
@@ -1514,6 +1514,7 @@ cpp_output_token (token, fp)
case SPELL_OPERATOR:
{
const unsigned char *spelling;
+ int c;
if (token->flags & DIGRAPH)
spelling
@@ -1523,13 +1524,16 @@ cpp_output_token (token, fp)
else
spelling = TOKEN_NAME (token);
- ufputs (spelling, fp);
+ c = *spelling;
+ do
+ putc (c, fp);
+ while ((c = *++spelling) != '\0');
}
break;
spell_ident:
case SPELL_IDENT:
- ufputs (NODE_NAME (token->val.node), fp);
+ fwrite (NODE_NAME (token->val.node), 1, NODE_LEN (token->val.node), fp);
break;
case SPELL_STRING: