From: Ulrich Drepper Date: Thu, 8 Aug 2002 04:44:47 +0000 (+0000) Subject: (get_null_defines): Treat NOT_IN_libc special. It is known to be defined. X-Git-Tag: upstream/2.30~21465 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec6170f59b44bb0e9c40c263cba3d88f80db884c;p=external%2Fglibc.git (get_null_defines): Treat NOT_IN_libc special. It is known to be defined. --- diff --git a/include/string.h b/include/string.h index b4ccb1b..d9a5eeb 100644 --- a/include/string.h +++ b/include/string.h @@ -72,11 +72,13 @@ libc_hidden_proto (__strndup) libc_hidden_proto (__strerror_r) libc_hidden_proto (__strverscmp) -# ifndef index -# define index(s, c) (strchr ((s), (c))) -# endif -# ifndef rindex -# define rindex(s, c) (strrchr ((s), (c))) +# ifndef _ISOMAC +# ifndef index +# define index(s, c) (strchr ((s), (c))) +# endif +# ifndef rindex +# define rindex(s, c) (strrchr ((s), (c))) +# endif # endif #endif diff --git a/stdlib/isomac.c b/stdlib/isomac.c index 0229b3f..c0b9ad1 100644 --- a/stdlib/isomac.c +++ b/stdlib/isomac.c @@ -303,14 +303,18 @@ get_null_defines (void) start = &line[8]; for (end = start + 1; !isspace (*end) && *end != '\0'; ++end) ; - result[result_len++] = xstrndup (start, end - start); + result[result_len] = xstrndup (start, end - start); - if (first) + if (strcmp (result[result_len], "NOT_IN_libc") != 0) { - fputs ("The following identifiers will be ignored since the compiler defines them\nby default:\n", stdout); - first = 0; + if (first) + { + fputs ("The following identifiers will be ignored since the compiler defines them\nby default:\n", stdout); + first = 0; + } + puts (result[result_len]); } - puts (result[result_len - 1]); + ++result_len; } if (result_len == result_max) {