mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
Avoid c-ctype.h in libinproctrace.so
libinproctrace.so doesn't link against gnulib, and some versions of clang won't inline the c-ctype.h functions. This causes link failures. This patch works around the problem by reverting to <ctype.h> in this case. Tested-By: Guinevere Larsen <guinevere@redhat.com>
This commit is contained in:
@@ -21,6 +21,22 @@
|
|||||||
#include "host-defs.h"
|
#include "host-defs.h"
|
||||||
#include "gdbsupport/gdb-xfree.h"
|
#include "gdbsupport/gdb-xfree.h"
|
||||||
|
|
||||||
|
/* When compiling for the in-process agent, we can't use c-ctype.h,
|
||||||
|
because (1) libinproctrace.so doesn't link against gnulib and (2)
|
||||||
|
some versions of clang won't inline all the functions. So,
|
||||||
|
redefine them here. */
|
||||||
|
#ifdef IN_PROCESS_AGENT
|
||||||
|
#include <ctype.h>
|
||||||
|
#undef c_isspace
|
||||||
|
#define c_isspace(X) (isspace (X))
|
||||||
|
#undef c_isalnum
|
||||||
|
#define c_isalnum(X) (isalnum (X))
|
||||||
|
#undef c_isdigit
|
||||||
|
#define c_isdigit(X) (isdigit (X))
|
||||||
|
#undef c_tolower
|
||||||
|
#define c_tolower(X) (tolower (X))
|
||||||
|
#endif /* IN_PROCESS_AGENT */
|
||||||
|
|
||||||
void *
|
void *
|
||||||
xzalloc (size_t size)
|
xzalloc (size_t size)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user