Compare commits

..

No commits in common. "ff372a8d82113726415041d7db394d1ed815d387" and "1ed09307a74f94dfe83ef69cb7521916f64d8118" have entirely different histories.

3 changed files with 24 additions and 18 deletions

View File

@ -194,6 +194,28 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
#undef fread_unlocked
#undef fwrite_unlocked
/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
the ctype macros through safe-ctype.h */
#ifdef __cplusplus
#ifdef INCLUDE_STRING
# include <string>
#endif
#endif
/* There are an extraordinary number of issues with <ctype.h>.
The last straw is that it varies with the locale. Use libiberty's
replacement instead. */
#include "safe-ctype.h"
#include <sys/types.h>
#include <errno.h>
#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
extern int errno;
#endif
#ifdef __cplusplus
#if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
# include <algorithm>
@ -207,11 +229,6 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
#ifdef INCLUDE_SET
# include <set>
#endif
/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
the ctype macros through safe-ctype.h */
#ifdef INCLUDE_STRING
# include <string>
#endif
#ifdef INCLUDE_VECTOR
# include <vector>
#endif
@ -228,17 +245,6 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
# include <type_traits>
#endif
/* There are an extraordinary number of issues with <ctype.h>.
The last straw is that it varies with the locale. Use libiberty's
replacement instead. */
#include "safe-ctype.h"
#include <sys/types.h>
#include <errno.h>
#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
extern int errno;
#endif
/* Some of glibc's string inlines cause warnings. Plus we'd rather
rely on (and therefore test) GCC's string builtins. */
#define __NO_STRING_INLINES

View File

@ -31,7 +31,6 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#define INCLUDE_VECTOR
#define INCLUDE_MEMORY
#include "gcc-plugin.h"
#include "system.h"
@ -70,6 +69,7 @@
#include "gcc-c-interface.h"
#include "context.hh"
#include <vector>
using namespace cc1_plugin;

View File

@ -33,7 +33,6 @@
#undef PACKAGE_VERSION
#define INCLUDE_MEMORY
#define INCLUDE_VECTOR
#include "gcc-plugin.h"
#include "system.h"
#include "coretypes.h"
@ -72,6 +71,7 @@
#include "rpc.hh"
#include "context.hh"
#include <vector>
using namespace cc1_plugin;