mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-31 15:11:04 +08:00
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
This commit is contained in:
parent
c0636171db
commit
3b681e9dcc
@ -1,3 +1,13 @@
|
||||
2001-09-27 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2001-09-27 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* dwarf2out.c (dwarf2out_frame_finish): Never elide .debug_frame
|
||||
@ -5,7 +15,7 @@
|
||||
|
||||
2001-09-27 Aldy Hernandez <aldyh@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.h (FUNCTION_VALUE): Change hardcoded 33 and 3
|
||||
* config/rs6000/rs6000.h (FUNCTION_VALUE): Change hardcoded 33 and 3
|
||||
to macros.
|
||||
(LIBCALL_VALUE): Likewise.
|
||||
|
||||
@ -160,7 +170,7 @@ Tue Sep 25 17:13:56 CEST 2001 Jan Hubicka <jh@suse.cz>
|
||||
(bdesc_2srg): Likewise.
|
||||
(bdesc_1arg): Likewise.
|
||||
|
||||
* config/i386/i386.c (ix86_init_builtins): Correct return type
|
||||
* config/i386/i386.c (ix86_init_builtins): Correct return type
|
||||
building v4hi_ftype_v4hi_int_int tree node.
|
||||
(ix86_expand_sse_comi): Fix typo swapping operands.
|
||||
Don't swap comparision condition, it is already swapped.
|
||||
@ -252,7 +262,7 @@ Mon Sep 24 18:57:59 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
2001-09-24 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
* doc/install.texi (Final install): Request additional information
|
||||
in mail about successful builds.
|
||||
in mail about successful builds.
|
||||
|
||||
2001-09-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* config.in. Generated automatically from configure.in by autoheader. */
|
||||
/* config.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
#undef const
|
||||
@ -104,12 +104,18 @@
|
||||
/* Define if you have the dcgettext function. */
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define if you have the fprintf_unlocked function. */
|
||||
#undef HAVE_FPRINTF_UNLOCKED
|
||||
|
||||
/* 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 fwrite_unlocked function. */
|
||||
#undef HAVE_FWRITE_UNLOCKED
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#undef HAVE_GETCWD
|
||||
|
||||
@ -395,6 +401,12 @@
|
||||
/* Define to 1 if we found this declaration otherwise define to 0. */
|
||||
#undef HAVE_DECL_FPUTS_UNLOCKED
|
||||
|
||||
/* Define to 1 if we found this declaration otherwise define to 0. */
|
||||
#undef HAVE_DECL_FWRITE_UNLOCKED
|
||||
|
||||
/* Define to 1 if we found this declaration otherwise define to 0. */
|
||||
#undef HAVE_DECL_FPRINTF_UNLOCKED
|
||||
|
||||
/* Define to 1 if we found this declaration otherwise define to 0. */
|
||||
#undef HAVE_DECL_STRSTR
|
||||
|
||||
|
331
gcc/configure
vendored
331
gcc/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -578,7 +578,8 @@ dnl gcc_AC_C_ENUM_BF_UNSIGNED
|
||||
AC_CHECK_FUNCS(strtoul bsearch popen times clock \
|
||||
strchr strrchr kill getrlimit setrlimit atoll atoq \
|
||||
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
|
||||
fputs_unlocked getrusage nl_langinfo lstat)
|
||||
fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
|
||||
lstat)
|
||||
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
|
||||
@ -623,7 +624,8 @@ AM_ICONV
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
|
||||
gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \
|
||||
strsignal putc_unlocked fputs_unlocked strstr environ errno \
|
||||
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
|
||||
fprintf_unlocked strstr environ errno \
|
||||
malloc realloc calloc free basename getopt clock, , ,[
|
||||
#include "ansidecl.h"
|
||||
#include "system.h"])
|
||||
|
@ -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:
|
||||
|
57
gcc/system.h
57
gcc/system.h
@ -55,28 +55,53 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#endif
|
||||
|
||||
/* 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. In fact, using the locking
|
||||
functions can cause the compiler to be significantly slower under
|
||||
I/O bound conditions (such as -g -O0 on very large source files).
|
||||
|
||||
HAVE_DECL_PUTC_UNLOCKED actually indicates whether or not the IO
|
||||
HAVE_DECL_PUTC_UNLOCKED actually indicates whether or not the stdio
|
||||
code is multi-thread safe by default. If it is set to 0, then do
|
||||
not worry about using the _unlocked functions.
|
||||
|
||||
fputs_unlocked is an extension and needs to be prototyped specially. */
|
||||
fputs_unlocked, fwrite_unlocked, and fprintf_unlocked are
|
||||
extensions and need to be prototyped by hand (since we do not
|
||||
define _GNU_SOURCE). */
|
||||
|
||||
#if defined HAVE_PUTC_UNLOCKED && (defined (HAVE_DECL_PUTC_UNLOCKED) && HAVE_DECL_PUTC_UNLOCKED)
|
||||
# undef putc
|
||||
# define putc(C, Stream) putc_unlocked (C, Stream)
|
||||
#endif
|
||||
#if defined HAVE_FPUTC_UNLOCKED && (defined (HAVE_DECL_PUTC_UNLOCKED) && HAVE_DECL_PUTC_UNLOCKED)
|
||||
# undef fputc
|
||||
# define fputc(C, Stream) fputc_unlocked (C, Stream)
|
||||
#endif
|
||||
#if defined HAVE_FPUTS_UNLOCKED && (defined (HAVE_DECL_PUTC_UNLOCKED) && HAVE_DECL_PUTC_UNLOCKED)
|
||||
# undef fputs
|
||||
# define fputs(String, Stream) fputs_unlocked (String, Stream)
|
||||
# if defined (HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
|
||||
extern int fputs_unlocked PARAMS ((const char *, FILE *));
|
||||
#if defined HAVE_DECL_PUTC_UNLOCKED && HAVE_DECL_PUTC_UNLOCKED
|
||||
|
||||
# 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)
|
||||
# if defined (HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
|
||||
extern int fputs_unlocked PARAMS ((const char *, FILE *));
|
||||
# endif
|
||||
# endif
|
||||
# ifdef HAVE_FWRITE_UNLOCKED
|
||||
# undef fwrite
|
||||
# define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream)
|
||||
# if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
|
||||
extern int fwrite_unlocked PARAMS ((const PTR, size_t, size_t, FILE *));
|
||||
# endif
|
||||
# endif
|
||||
# ifdef HAVE_FPRINTF_UNLOCKED
|
||||
# undef fprintf
|
||||
/* We can't use a function-like macro here because we don't know if
|
||||
we have varargs macros. */
|
||||
# define fprintf fprintf_unlocked
|
||||
# if defined (HAVE_DECL_FPRINTF_UNLOCKED) && !HAVE_DECL_FPRINTF_UNLOCKED
|
||||
extern int fprintf_unlocked PARAMS ((FILE *, const char *, ...));
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/* There are an extraordinary number of issues with <ctype.h>.
|
||||
|
Loading…
x
Reference in New Issue
Block a user