This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch siddhesh/posix-wundef created. glibc-2.20-174-gc1e8bee


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, siddhesh/posix-wundef has been created
        at  c1e8beef46d23d747648fb8324c5f8e7ebb7739d (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1e8beef46d23d747648fb8324c5f8e7ebb7739d

commit c1e8beef46d23d747648fb8324c5f8e7ebb7739d
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Wed Oct 1 14:36:03 2014 +0530

    Use conf.list to generate spec array
    
    This patch adds support to generate the spec array in getconf from the
    conf.list.  The generated code is mostly unchanged.  the only changes
    are due to the change in layout of the spec and val arrays in the ELF.
    
    The val array can also be auto-generated from conf.list once the
    remaining macros are added to it.
    
    	* posix/conf.list (SPEC:XBS5): Add sysconf prefix.
    	* posix/confstr.c: Define NEED_SPEC_ARRAY to 0.
    	* posix/posix-envs.def: Likewise.
    	* sysdeps/posix/sysconf.c: Likewise.
    	* posix/getconf.c: Define NEED_SPEC_ARRAY to 1.
    	(specs): Remove array.
    	* scripts/gen-conf.awk: Support generation of specs array.

diff --git a/posix/conf.list b/posix/conf.list
index 000b908..0a17666 100644
--- a/posix/conf.list
+++ b/posix/conf.list
@@ -1,7 +1,8 @@
 # Configuration variables identified by getconf.  The heading of each section
-# is of the format TYPE:PREFIX with the opening curly brace on the same line.
-# TYPE can either be SYSCONF, PATHCONF, CONFSTR or SPEC.  Variable names are
-# put one on each line with a curly brace on its own line ending the section.
+# is of the format TYPE:PREFIX:SC_PREFIX with the opening curly brace on the
+# same line.  TYPE can either be SYSCONF, PATHCONF, CONFSTR or SPEC.  In the
+# absence of SC_PREFIX, _SC is used as the SC_PREFIX.  Variable names are put
+# one on each line with a curly brace on its own line ending the section.
 
 SPEC:POSIX {
   V6_ILP32_OFF32
@@ -103,7 +104,7 @@ SYSCONF:POSIX {
   RAW_SOCKETS
 }
 
-SPEC:XBS5 {
+SPEC:XBS5:_SC_XBS5 {
   ILP32_OFF32
   ILP32_OFFBIG
   LP64_OFF64
diff --git a/posix/confstr.c b/posix/confstr.c
index 1accfee..0400d7f 100644
--- a/posix/confstr.c
+++ b/posix/confstr.c
@@ -21,7 +21,9 @@
 #include <string.h>
 #include <confstr.h>
 #include "../version.h"
-#include "confdefs.h"
+
+#define NEED_SPEC_ARRAY 0
+#include <confdefs.h>
 
 /* If BUF is not NULL and LEN > 0, fill in at most LEN - 1 bytes
    of BUF with the value corresponding to NAME and zero-terminate BUF.
diff --git a/posix/getconf.c b/posix/getconf.c
index 14d51d8..3c08688 100644
--- a/posix/getconf.c
+++ b/posix/getconf.c
@@ -26,6 +26,9 @@
 #include "../version.h"
 #define PACKAGE _libc_intl_domainname
 
+#define NEED_SPEC_ARRAY 1
+#include <confdefs.h>
+
 struct conf
   {
     const char *name;
@@ -387,23 +390,6 @@ static const struct conf vars[] =
   };
 
 
-static const struct { const char *name; int num; } specs[] =
-  {
-    { "XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32 },
-    { "XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG },
-    { "XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64 },
-    { "XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG },
-    { "POSIX_V6_ILP32_OFF32", _SC_V6_ILP32_OFF32 },
-    { "POSIX_V6_ILP32_OFFBIG", _SC_V6_ILP32_OFFBIG },
-    { "POSIX_V6_LP64_OFF64", _SC_V6_LP64_OFF64 },
-    { "POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG },
-    { "POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32 },
-    { "POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG },
-    { "POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64 },
-    { "POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG },
-  };
-static const int nspecs = sizeof (specs) / sizeof (specs[0]);
-
 extern const char *__progname;
 
 
diff --git a/posix/posix-envs.def b/posix/posix-envs.def
index 9047d0c..0b33e02 100644
--- a/posix/posix-envs.def
+++ b/posix/posix-envs.def
@@ -42,7 +42,8 @@
    defined.  These are called with arguments V5, V6, V7 before and
    after the relevant groups of environments.  */
 
-#include "confdefs.h"
+#define NEED_SPEC_ARRAY 0
+#include <confdefs.h>
 
 START_ENV_GROUP (V7)
 
diff --git a/scripts/gen-conf.awk b/scripts/gen-conf.awk
index 45a4d44..1370646 100644
--- a/scripts/gen-conf.awk
+++ b/scripts/gen-conf.awk
@@ -17,12 +17,17 @@ $2 == "{" {
   split ($1, arr, ":")
   type = arr[1]
   prefix = arr[2]
+  if (arr[3] != "")
+    sc_prefix = arr[3]
+  else
+    sc_prefix = "_SC"
   next
 }
 
 $1 == "}" {
   prefix = ""
   type = ""
+  sc_prefix = ""
   next
 }
 
@@ -37,6 +42,7 @@ $1 == "}" {
   # CONFSTR: A configuration string
   # SYSCONF: A numeric value
   # SPEC: A specification
+  sc_prefixes[prefix][$1] = sc_prefix
   conf[prefix][$1] = type
 }
 
@@ -58,6 +64,26 @@ ENDFILE {
 	printf "# endif\n"
       }
       printf "#endif\n\n"
+
+      # Build a name -> sysconf number associative array to print a C array at
+      # the end.
+      if (conf[p][c] == "SPEC") {
+	name = sprintf ("%s_%s", p, c)
+	num = sprintf ("%s_%s", sc_prefixes[p][c], c)
+	spec[name] = num
+      }
     }
   }
+
+  # Print the specification array.  Define the macro NEED_SPEC_ARRAY before
+  # including confdefs.h to make it available in the compilation unit.
+  print "#if NEED_SPEC_ARRAY"
+  print "static const struct { const char *name; int num; } specs[] ="
+  print "  {"
+  for (s in spec) {
+    printf "    { \"%s\", %s },\n", s, spec[s]
+  }
+  print "  };"
+  print "static const int nspecs = sizeof (specs) / sizeof (specs[0]);"
+  print "#endif"
 }
diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c
index c7b748b..bff59f4 100644
--- a/sysdeps/posix/sysconf.c
+++ b/sysdeps/posix/sysconf.c
@@ -31,6 +31,7 @@
 #include <sys/types.h>
 #include <regex.h>
 
+#define NEED_SPEC_ARRAY 0
 #include <confdefs.h>
 
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f980a8ecfaadd040f0d5b2db3f0484545f6693d

commit 1f980a8ecfaadd040f0d5b2db3f0484545f6693d
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Sep 4 00:39:50 2014 +0530

    Use PTHREAD_DESTRUCTOR_ITERATIONS
    
    The _POSIX_THREAD_DESTRUCTOR_ITERATIONS variable is not implemented by
    getconf, so to get both getconf and sysconf on the same page, make the
    latter use PTHREAD_DESTRUCTOR_ITERATIONS.
    
    The generated code is unchanged on x86_64.
    
    Siddhesh
    
    	* posix/conf.list (SYSCONF:POSIX): Remove
    	THREAD_DESTRUCTOR_ITERATIONS.
    	* sysdeps/posix/sysconf.c (__sysconf): Use
    	PTHREAD_DESTRUCTOR_ITERATIONS.

diff --git a/posix/conf.list b/posix/conf.list
index 8e947f4..000b908 100644
--- a/posix/conf.list
+++ b/posix/conf.list
@@ -99,7 +99,6 @@ SYSCONF:POSIX {
   USER_GROUPS_R
   VERSION
 # Additional variables not in getconf.
-  THREAD_DESTRUCTOR_ITERATIONS
   IPV6
   RAW_SOCKETS
 }
diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c
index f5b65bf..c7b748b 100644
--- a/sysdeps/posix/sysconf.c
+++ b/sysdeps/posix/sysconf.c
@@ -555,8 +555,8 @@ __sysconf (name)
 #endif
 
     case _SC_THREAD_DESTRUCTOR_ITERATIONS:
-#if CONF_IS_DEFINED_SET (_POSIX_THREAD_DESTRUCTOR_ITERATIONS)
-      return _POSIX_THREAD_DESTRUCTOR_ITERATIONS;
+#if PTHREAD_DESTRUCTOR_ITERATIONS
+      return PTHREAD_DESTRUCTOR_ITERATIONS;
 #else
       return -1;
 #endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e9f879b86e4e443618fec2728c6bdf9bc231782

commit 3e9f879b86e4e443618fec2728c6bdf9bc231782
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Sep 4 02:17:46 2014 +0530

    Add _POSIX namespace SYSCONF macros to conf.list
    
    This fixes the remaining -Wundef warnings.  Tested on x86_64.
    
    	* posix/conf.list: Add _POSIX sysconf namespace.
    	* sysdeps/posix/sysconf.c: Include confdefs.h.
    	(__sysconf): Use CONF_IS_* macros.

diff --git a/posix/conf.list b/posix/conf.list
index 3470895..8e947f4 100644
--- a/posix/conf.list
+++ b/posix/conf.list
@@ -14,6 +14,96 @@ SPEC:POSIX {
   V7_LPBIG_OFFBIG
 }
 
+SYSCONF:POSIX {
+  ADVISORY_INFO
+  ARG_MAX
+  ASYNCHRONOUS_IO
+  BARRIERS
+  BASE
+  CHILD_MAX
+  C_LANG_SUPPORT
+  C_LANG_SUPPORT_R
+  CLOCK_SELECTION
+  CPUTIME
+  DEVICE_IO
+  DEVICE_SPECIFIC
+  DEVICE_SPECIFIC_R
+  FD_MGMT
+  FIFO
+  FILE_ATTRIBUTES
+  FILE_LOCKING
+  FILE_SYSTEM
+  FSYNC
+  JOB_CONTROL
+  MAPPED_FILES
+  MEMLOCK
+  MEMLOCK_RANGE
+  MEMORY_PROTECTION
+  MESSAGE_PASSING
+  MONOTONIC_CLOCK
+  MULTI_PROCESS
+  NETWORKING
+  NGROUPS_MAX
+  OPEN_MAX
+  PII
+  PII_INTERNET
+  PII_INTERNET_DGRAM
+  PII_INTERNET_STREAM
+  PII_OSI
+  PII_OSI_CLTS
+  PII_OSI_COTS
+  PII_OSI_M
+  PII_SOCKET
+  PII_XTI
+  PIPE
+  POLL
+  PRIORITIZED_IO
+  PRIORITY_SCHEDULING
+  READER_WRITER_LOCKS
+  REALTIME_SIGNALS
+  REGEXP
+  SAVED_IDS
+  SELECT
+  SEMAPHORES
+  SHARED_MEMORY_OBJECTS
+  SHELL
+  SIGNALS
+  SINGLE_PROCESS
+  SPAWN
+  SPIN_LOCKS
+  SPORADIC_SERVER
+  SSIZE_MAX
+  STREAM_MAX
+  SYNCHRONIZED_IO
+  SYSTEM_DATABASE
+  SYSTEM_DATABASE_R
+  THREAD_ATTR_STACKADDR
+  THREAD_ATTR_STACKSIZE
+  THREAD_CPUTIME
+  THREAD_PRIO_INHERIT
+  THREAD_PRIO_PROTECT
+  THREAD_PRIORITY_SCHEDULING
+  THREAD_PROCESS_SHARED
+  THREADS
+  THREAD_SAFE_FUNCTIONS
+  THREAD_SPORADIC_SERVER
+  TIMEOUTS
+  TIMERS
+  TRACE
+  TRACE_EVENT_FILTER
+  TRACE_INHERIT
+  TRACE_LOG
+  TYPED_MEMORY_OBJECTS
+  TZNAME_MAX
+  USER_GROUPS
+  USER_GROUPS_R
+  VERSION
+# Additional variables not in getconf.
+  THREAD_DESTRUCTOR_ITERATIONS
+  IPV6
+  RAW_SOCKETS
+}
+
 SPEC:XBS5 {
   ILP32_OFF32
   ILP32_OFFBIG
diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c
index e815cd5..f5b65bf 100644
--- a/sysdeps/posix/sysconf.c
+++ b/sysdeps/posix/sysconf.c
@@ -31,6 +31,8 @@
 #include <sys/types.h>
 #include <regex.h>
 
+#include <confdefs.h>
+
 
 #define NEED_CHECK_SPEC \
   (!defined _XBS5_ILP32_OFF32 || !defined _XBS5_ILP32_OFFBIG \
@@ -95,112 +97,112 @@ __sysconf (name)
       return MAX (__tzname_max (), _POSIX_TZNAME_MAX);
 
     case _SC_JOB_CONTROL:
-#if _POSIX_JOB_CONTROL > 0
+#if CONF_IS_DEFINED_SET (_POSIX_JOB_CONTROL)
       return _POSIX_JOB_CONTROL;
 #else
       return -1;
 #endif
 
     case _SC_SAVED_IDS:
-#if _POSIX_SAVED_IDS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SAVED_IDS)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_REALTIME_SIGNALS:
-#if _POSIX_REALTIME_SIGNALS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_REALTIME_SIGNALS)
       return _POSIX_REALTIME_SIGNALS;
 #else
       return -1;
 #endif
 
     case _SC_PRIORITY_SCHEDULING:
-#if _POSIX_PRIORITY_SCHEDULING > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PRIORITY_SCHEDULING)
       return _POSIX_PRIORITY_SCHEDULING;
 #else
       return -1;
 #endif
 
     case _SC_TIMERS:
-#if _POSIX_TIMERS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_TIMERS)
       return _POSIX_TIMERS;
 #else
       return -1;
 #endif
 
     case _SC_ASYNCHRONOUS_IO:
-#if _POSIX_ASYNCHRONOUS_IO > 0
+#if CONF_IS_DEFINED_SET (_POSIX_ASYNCHRONOUS_IO)
       return _POSIX_ASYNCHRONOUS_IO;
 #else
       return -1;
 #endif
 
     case _SC_PRIORITIZED_IO:
-#if _POSIX_PRIORITIZED_IO > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PRIORITIZED_IO)
       return _POSIX_PRIORITIZED_IO;
 #else
       return -1;
 #endif
 
     case _SC_SYNCHRONIZED_IO:
-#if _POSIX_SYNCHRONIZED_IO > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SYNCHRONIZED_IO)
       return _POSIX_SYNCHRONIZED_IO;
 #else
       return -1;
 #endif
 
     case _SC_FSYNC:
-#if _POSIX_FSYNC > 0
+#if CONF_IS_DEFINED_SET (_POSIX_FSYNC)
       return _POSIX_FSYNC;
 #else
       return -1;
 #endif
 
     case _SC_MAPPED_FILES:
-#if _POSIX_MAPPED_FILES > 0
+#if CONF_IS_DEFINED_SET (_POSIX_MAPPED_FILES)
       return _POSIX_MAPPED_FILES;
 #else
       return -1;
 #endif
 
     case _SC_MEMLOCK:
-#if _POSIX_MEMLOCK > 0
+#if CONF_IS_DEFINED_SET (_POSIX_MEMLOCK)
       return _POSIX_MEMLOCK;
 #else
       return -1;
 #endif
 
     case _SC_MEMLOCK_RANGE:
-#if _POSIX_MEMLOCK_RANGE > 0
+#if CONF_IS_DEFINED_SET (_POSIX_MEMLOCK_RANGE)
       return _POSIX_MEMLOCK_RANGE;
 #else
       return -1;
 #endif
 
     case _SC_MEMORY_PROTECTION:
-#if _POSIX_MEMORY_PROTECTION > 0
+#if CONF_IS_DEFINED_SET (_POSIX_MEMORY_PROTECTION)
       return _POSIX_MEMORY_PROTECTION;
 #else
       return -1;
 #endif
 
     case _SC_MESSAGE_PASSING:
-#if _POSIX_MESSAGE_PASSING > 0
+#if CONF_IS_DEFINED_SET (_POSIX_MESSAGE_PASSING)
       return _POSIX_MESSAGE_PASSING;
 #else
       return -1;
 #endif
 
     case _SC_SEMAPHORES:
-#if _POSIX_SEMAPHORES > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SEMAPHORES)
       return _POSIX_SEMAPHORES;
 #else
       return -1;
 #endif
 
     case _SC_SHARED_MEMORY_OBJECTS:
-#if _POSIX_SHARED_MEMORY_OBJECTS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SHARED_MEMORY_OBJECTS)
       return _POSIX_SHARED_MEMORY_OBJECTS;
 #else
       return -1;
@@ -353,49 +355,49 @@ __sysconf (name)
 #endif
 
     case _SC_PII:
-#if _POSIX_PII > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_PII_XTI:
-#if _POSIX_PII_XTI > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_XTI)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_PII_SOCKET:
-#if _POSIX_PII_SOCKET > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_SOCKET)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_PII_INTERNET:
-#if _POSIX_PII_INTERNET > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_INTERNET)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_PII_OSI:
-#if _POSIX_PII_OSI > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_OSI)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_POLL:
-#if _POSIX_POLL > 0
+#if CONF_IS_DEFINED_SET (_POSIX_POLL)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_SELECT:
-#if _POSIX_SELECT > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SELECT)
       return 1;
 #else
       return -1;
@@ -410,35 +412,35 @@ __sysconf (name)
 #endif
 
     case _SC_PII_INTERNET_STREAM:
-#if _POSIX_PII_INTERNET_STREAM > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_INTERNET_STREAM)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_PII_INTERNET_DGRAM:
-#if _POSIX_PII_INTERNET_DGRAM > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_INTERNET_DGRAM)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_PII_OSI_COTS:
-#if _POSIX_PII_OSI_COTS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_OSI_COTS)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_PII_OSI_CLTS:
-#if _POSIX_PII_OSI_CLTS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_OSI_CLTS)
       return 1;
 #else
       return -1;
 #endif
 
     case _SC_PII_OSI_M:
-#if _POSIX_PII_OSI_M > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PII_OSI_M)
       return 1;
 #else
       return -1;
@@ -519,14 +521,14 @@ __sysconf (name)
 
       /* POSIX 1003.1c (POSIX Threads).  */
     case _SC_THREADS:
-#if _POSIX_THREADS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREADS)
       return _POSIX_THREADS;
 #else
       return -1;
 #endif
 
     case _SC_THREAD_SAFE_FUNCTIONS:
-#if _POSIX_THREAD_SAFE_FUNCTIONS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_SAFE_FUNCTIONS)
       return _POSIX_THREAD_SAFE_FUNCTIONS;
 #else
       return -1;
@@ -553,7 +555,7 @@ __sysconf (name)
 #endif
 
     case _SC_THREAD_DESTRUCTOR_ITERATIONS:
-#if _POSIX_THREAD_DESTRUCTOR_ITERATIONS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_DESTRUCTOR_ITERATIONS)
       return _POSIX_THREAD_DESTRUCTOR_ITERATIONS;
 #else
       return -1;
@@ -581,42 +583,42 @@ __sysconf (name)
 #endif
 
     case _SC_THREAD_ATTR_STACKADDR:
-#if _POSIX_THREAD_ATTR_STACKADDR > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_ATTR_STACKADDR)
       return _POSIX_THREAD_ATTR_STACKADDR;
 #else
       return -1;
 #endif
 
     case _SC_THREAD_ATTR_STACKSIZE:
-#if _POSIX_THREAD_ATTR_STACKSIZE > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_ATTR_STACKSIZE)
       return _POSIX_THREAD_ATTR_STACKSIZE;
 #else
       return -1;
 #endif
 
     case _SC_THREAD_PRIORITY_SCHEDULING:
-#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_PRIORITY_SCHEDULING)
       return _POSIX_THREAD_PRIORITY_SCHEDULING;
 #else
       return -1;
 #endif
 
     case _SC_THREAD_PRIO_INHERIT:
-#if _POSIX_THREAD_PRIO_INHERIT > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_PRIO_INHERIT)
       return _POSIX_THREAD_PRIO_INHERIT;
 #else
       return -1;
 #endif
 
     case _SC_THREAD_PRIO_PROTECT:
-#if _POSIX_THREAD_PRIO_PROTECT > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_PRIO_PROTECT)
       return _POSIX_THREAD_PRIO_PROTECT;
 #else
       return -1;
 #endif
 
     case _SC_THREAD_PROCESS_SHARED:
-#if _POSIX_THREAD_PROCESS_SHARED > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_PROCESS_SHARED)
       return _POSIX_THREAD_PROCESS_SHARED;
 #else
       return -1;
@@ -833,152 +835,152 @@ __sysconf (name)
 #endif
 
     case _SC_ADVISORY_INFO:
-#if _POSIX_ADVISORY_INFO > 0
+#if CONF_IS_DEFINED_SET (_POSIX_ADVISORY_INFO)
       return _POSIX_ADVISORY_INFO;
 #else
       return -1;
 #endif
 
     case _SC_BARRIERS:
-#if _POSIX_BARRIERS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_BARRIERS)
       return _POSIX_BARRIERS;
 #else
       return -1;
 #endif
 
     case _SC_BASE:
-#if _POSIX_BASE > 0
+#if CONF_IS_DEFINED_SET (_POSIX_BASE)
       return _POSIX_BASE;
 #else
       return -1;
 #endif
     case _SC_C_LANG_SUPPORT:
-#if _POSIX_C_LANG_SUPPORT > 0
+#if CONF_IS_DEFINED_SET (_POSIX_C_LANG_SUPPORT)
       return _POSIX_C_LANG_SUPPORT;
 #else
       return -1;
 #endif
     case _SC_C_LANG_SUPPORT_R:
-#if _POSIX_C_LANG_SUPPORT_R > 0
+#if CONF_IS_DEFINED_SET (_POSIX_C_LANG_SUPPORT_R)
       return _POSIX_C_LANG_SUPPORT_R;
 #else
       return -1;
 #endif
 
     case _SC_CLOCK_SELECTION:
-#if _POSIX_CLOCK_SELECTION > 0
+#if CONF_IS_DEFINED_SET (_POSIX_CLOCK_SELECTION)
       return _POSIX_CLOCK_SELECTION;
 #else
       return -1;
 #endif
 
     case _SC_CPUTIME:
-#if _POSIX_CPUTIME > 0
+#if CONF_IS_DEFINED_SET (_POSIX_CPUTIME)
       return _POSIX_CPUTIME;
 #else
       return -1;
 #endif
 
     case _SC_DEVICE_IO:
-#if _POSIX_DEVICE_IO > 0
+#if CONF_IS_DEFINED_SET (_POSIX_DEVICE_IO)
       return _POSIX_DEVICE_IO;
 #else
       return -1;
 #endif
     case _SC_DEVICE_SPECIFIC:
-#if _POSIX_DEVICE_SPECIFIC > 0
+#if CONF_IS_DEFINED_SET (_POSIX_DEVICE_SPECIFIC)
       return _POSIX_DEVICE_SPECIFIC;
 #else
       return -1;
 #endif
     case _SC_DEVICE_SPECIFIC_R:
-#if _POSIX_DEVICE_SPECIFIC_R > 0
+#if CONF_IS_DEFINED_SET (_POSIX_DEVICE_SPECIFIC_R)
       return _POSIX_DEVICE_SPECIFIC_R;
 #else
       return -1;
 #endif
 
     case _SC_FD_MGMT:
-#if _POSIX_FD_MGMT > 0
+#if CONF_IS_DEFINED_SET (_POSIX_FD_MGMT)
       return _POSIX_FD_MGMT;
 #else
       return -1;
 #endif
 
     case _SC_FIFO:
-#if _POSIX_FIFO > 0
+#if CONF_IS_DEFINED_SET (_POSIX_FIFO)
       return _POSIX_FIFO;
 #else
       return -1;
 #endif
     case _SC_PIPE:
-#if _POSIX_PIPE > 0
+#if CONF_IS_DEFINED_SET (_POSIX_PIPE)
       return _POSIX_PIPE;
 #else
       return -1;
 #endif
 
     case _SC_FILE_ATTRIBUTES:
-#if _POSIX_FILE_ATTRIBUTES > 0
+#if CONF_IS_DEFINED_SET (_POSIX_FILE_ATTRIBUTES)
       return _POSIX_FILE_ATTRIBUTES;
 #else
       return -1;
 #endif
     case _SC_FILE_LOCKING:
-#if _POSIX_FILE_LOCKING > 0
+#if CONF_IS_DEFINED_SET (_POSIX_FILE_LOCKING)
       return _POSIX_FILE_LOCKING;
 #else
       return -1;
 #endif
     case _SC_FILE_SYSTEM:
-#if _POSIX_FILE_SYSTEM > 0
+#if CONF_IS_DEFINED_SET (_POSIX_FILE_SYSTEM)
       return _POSIX_FILE_SYSTEM;
 #else
       return -1;
 #endif
 
     case _SC_MONOTONIC_CLOCK:
-#if _POSIX_MONOTONIC_CLOCK
+#if CONF_IS_DEFINED_SET (_POSIX_MONOTONIC_CLOCK)
       return _POSIX_MONOTONIC_CLOCK;
 #else
       return -1;
 #endif
 
     case _SC_MULTI_PROCESS:
-#if _POSIX_MULTI_PROCESS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_MULTI_PROCESS)
       return _POSIX_MULTI_PROCESS;
 #else
       return -1;
 #endif
     case _SC_SINGLE_PROCESS:
-#if _POSIX_SINGLE_PROCESS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SINGLE_PROCESS)
       return _POSIX_SINGLE_PROCESS;
 #else
       return -1;
 #endif
 
     case _SC_NETWORKING:
-#if _POSIX_NETWORKING > 0
+#if CONF_IS_DEFINED_SET (_POSIX_NETWORKING)
       return _POSIX_NETWORKING;
 #else
       return -1;
 #endif
 
     case _SC_READER_WRITER_LOCKS:
-#if _POSIX_READER_WRITER_LOCKS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_READER_WRITER_LOCKS)
       return _POSIX_READER_WRITER_LOCKS;
 #else
       return -1;
 #endif
     case _SC_SPIN_LOCKS:
-#if _POSIX_SPIN_LOCKS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SPIN_LOCKS)
       return _POSIX_SPIN_LOCKS;
 #else
       return -1;
 #endif
 
     case _SC_REGEXP:
-#if _POSIX_REGEXP > 0
+#if CONF_IS_DEFINED_SET (_POSIX_REGEXP)
       return _POSIX_REGEXP;
 #else
       return -1;
@@ -989,81 +991,81 @@ __sysconf (name)
       return -1;
 
     case _SC_SHELL:
-#if _POSIX_SHELL > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SHELL)
       return _POSIX_SHELL;
 #else
       return -1;
 #endif
 
     case _SC_SIGNALS:
-#ifdef _POSIX_SIGNALS
+#if CONF_IS_DEFINED (_POSIX_SIGNALS)
       return _POSIX_SIGNALS;
 #else
       return -1;
 #endif
 
     case _SC_SPAWN:
-#if _POSIX_SPAWN > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SPAWN)
       return _POSIX_SPAWN;
 #else
       return -1;
 #endif
 
     case _SC_SPORADIC_SERVER:
-#if _POSIX_SPORADIC_SERVER > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SPORADIC_SERVER)
       return _POSIX_SPORADIC_SERVER;
 #else
       return -1;
 #endif
     case _SC_THREAD_SPORADIC_SERVER:
-#if _POSIX_THREAD_SPORADIC_SERVER > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_SPORADIC_SERVER)
       return _POSIX_THREAD_SPORADIC_SERVER;
 #else
       return -1;
 #endif
 
     case _SC_SYSTEM_DATABASE:
-#if _POSIX_SYSTEM_DATABASE > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SYSTEM_DATABASE)
       return _POSIX_SYSTEM_DATABASE;
 #else
       return -1;
 #endif
     case _SC_SYSTEM_DATABASE_R:
-#if _POSIX_SYSTEM_DATABASE_R > 0
+#if CONF_IS_DEFINED_SET (_POSIX_SYSTEM_DATABASE_R)
       return _POSIX_SYSTEM_DATABASE_R;
 #else
       return -1;
 #endif
 
     case _SC_THREAD_CPUTIME:
-#if _POSIX_THREAD_CPUTIME > 0
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_CPUTIME)
       return _POSIX_THREAD_CPUTIME;
 #else
       return -1;
 #endif
 
     case _SC_TIMEOUTS:
-#if _POSIX_TIMEOUTS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_TIMEOUTS)
       return _POSIX_TIMEOUTS;
 #else
       return -1;
 #endif
 
     case _SC_TYPED_MEMORY_OBJECTS:
-#if _POSIX_TYPED_MEMORY_OBJECTS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_TYPED_MEMORY_OBJECTS)
       return _POSIX_TYPED_MEMORY_OBJECTS;
 #else
       return -1;
 #endif
 
     case _SC_USER_GROUPS:
-#if _POSIX_USER_GROUPS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_USER_GROUPS)
       return _POSIX_USER_GROUPS;
 #else
       return -1;
 #endif
     case _SC_USER_GROUPS_R:
-#if _POSIX_USER_GROUPS_R > 0
+#if CONF_IS_DEFINED_SET (_POSIX_USER_GROUPS_R)
       return _POSIX_USER_GROUPS_R;
 #else
       return -1;
@@ -1128,25 +1130,25 @@ __sysconf (name)
 #endif
 
     case _SC_TRACE:
-#if _POSIX_TRACE > 0
+#if CONF_IS_DEFINED_SET (_POSIX_TRACE)
       return _POSIX_TRACE;
 #else
       return -1;
 #endif
     case _SC_TRACE_EVENT_FILTER:
-#if _POSIX_TRACE_EVENT_FILTER > 0
+#if CONF_IS_DEFINED_SET (_POSIX_TRACE_EVENT_FILTER)
       return _POSIX_TRACE_EVENT_FILTER;
 #else
       return -1;
 #endif
     case _SC_TRACE_INHERIT:
-#if _POSIX_TRACE_INHERIT > 0
+#if CONF_IS_DEFINED_SET (_POSIX_TRACE_INHERIT)
       return _POSIX_TRACE_INHERIT;
 #else
       return -1;
 #endif
     case _SC_TRACE_LOG:
-#if _POSIX_TRACE_LOG > 0
+#if CONF_IS_DEFINED_SET (_POSIX_TRACE_LOG)
       return _POSIX_TRACE_LOG;
 #else
       return -1;
@@ -1183,14 +1185,14 @@ __sysconf (name)
       return 0;
 
     case _SC_IPV6:
-#if _POSIX_IPV6 > 0
+#if CONF_IS_DEFINED_SET (_POSIX_IPV6)
       return _POSIX_IPV6;
 #else
       return -1;
 #endif
 
     case _SC_RAW_SOCKETS:
-#if _POSIX_RAW_SOCKETS > 0
+#if CONF_IS_DEFINED_SET (_POSIX_RAW_SOCKETS)
       return _POSIX_RAW_SOCKETS;
 #else
       return -1;

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=525a97b790b3738fed7ee3b0beab4d69021dd6aa

commit 525a97b790b3738fed7ee3b0beab4d69021dd6aa
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Wed Oct 1 14:34:08 2014 +0530

    Remove Wundef warnings for specification macros
    
    This patch adds a file conf.list that is used to generate macros to
    determine if a macro is defined as set, unset or not defined.
    gen-conf.awk processes this file and generates a header
    (confdefs-defs.h) with these macros.  A new header confdefs.h includes
    this generated header and defines accessor macros for the generated
    macros.
    
    Tested on x86_64.
    
    	* posix/Makefile (before-compile): Add confdefs-defs.h.
    	($(objpfx)confdefs-defs.h): New target.
    	* posix/conf.list: New file.
    	* posix/confdefs.h: New file.
    	* posix/confstr.c: Include confdefs.h.
    	(confstr): Use CONF_IS_* macros.
    	* posix/posix-envs.def: Include confdefs.h.  Use CONF_IS_*
    	macros.
    	* scripts/gen-conf.awk: New file.

diff --git a/posix/Makefile b/posix/Makefile
index e6b69b4..bdf6e73 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -99,7 +99,7 @@ others		:= getconf
 install-bin	:= getconf
 install-others-programs	:= $(inst_libexecdir)/getconf
 
-before-compile	+= testcases.h ptestcases.h
+before-compile	+= testcases.h ptestcases.h confdefs-defs.h
 
 # So they get cleaned up.
 generated += $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
@@ -325,3 +325,8 @@ $(objpfx)getconf.speclist: getconf-speclist.c posix-envs.def
 # be built both makes it available for eyeball inspection and avoids the
 # surprise of things that look like compilation being done by 'make install'.
 others: $(objpfx)getconf.speclist
+
+$(objpfx)confdefs-defs.h: conf.list Makefile $(..)scripts/gen-conf.awk
+	$(make-target-directory)
+	$(AWK) -f $(..)scripts/gen-conf.awk $< > $@.tmp
+	mv -f $@.tmp $@
diff --git a/posix/conf.list b/posix/conf.list
new file mode 100644
index 0000000..3470895
--- /dev/null
+++ b/posix/conf.list
@@ -0,0 +1,22 @@
+# Configuration variables identified by getconf.  The heading of each section
+# is of the format TYPE:PREFIX with the opening curly brace on the same line.
+# TYPE can either be SYSCONF, PATHCONF, CONFSTR or SPEC.  Variable names are
+# put one on each line with a curly brace on its own line ending the section.
+
+SPEC:POSIX {
+  V6_ILP32_OFF32
+  V6_ILP32_OFFBIG
+  V6_LP64_OFF64
+  V6_LPBIG_OFFBIG
+  V7_ILP32_OFF32
+  V7_ILP32_OFFBIG
+  V7_LP64_OFF64
+  V7_LPBIG_OFFBIG
+}
+
+SPEC:XBS5 {
+  ILP32_OFF32
+  ILP32_OFFBIG
+  LP64_OFF64
+  LPBIG_OFFBIG
+}
diff --git a/posix/confdefs.h b/posix/confdefs.h
new file mode 100644
index 0000000..64f0e03
--- /dev/null
+++ b/posix/confdefs.h
@@ -0,0 +1,15 @@
+#ifndef __CONFDEFS_H__
+#define __CONFDEFS_H__
+
+#include <posix/confdefs-defs.h>
+
+#define CONF_DEF_UNDEFINED 1
+#define CONF_DEF_DEFINED_SET 2
+#define CONF_DEF_DEFINED_UNSET 3
+
+#define CONF_IS_DEFINED_SET(conf) (conf##_DEF == CONF_DEF_DEFINED_SET)
+#define CONF_IS_DEFINED_UNSET(conf) (conf##_DEF == CONF_DEF_DEFINED_UNSET)
+#define CONF_IS_UNDEFINED(conf) (conf##_DEF == CONF_DEF_UNDEFINED)
+#define CONF_IS_DEFINED(conf) (conf##_DEF != CONF_DEF_UNDEFINED)
+
+#endif
diff --git a/posix/confstr.c b/posix/confstr.c
index a2a1bf2..1accfee 100644
--- a/posix/confstr.c
+++ b/posix/confstr.c
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <confstr.h>
 #include "../version.h"
+#include "confdefs.h"
 
 /* If BUF is not NULL and LEN > 0, fill in at most LEN - 1 bytes
    of BUF with the value corresponding to NAME and zero-terminate BUF.
@@ -100,9 +101,9 @@ confstr (name, buf, len)
     case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
     case _CS_POSIX_V7_ILP32_OFF32_CFLAGS:
 #ifdef __ILP32_OFF32_CFLAGS
-# if _POSIX_V7_ILP32_OFF32 == -1
+# if CONF_IS_DEFINED_UNSET (_POSIX_V7_ILP32_OFF32)
 #  error "__ILP32_OFF32_CFLAGS should not be defined"
-# elif !defined _POSIX_V7_ILP32_OFF32
+# elif CONF_IS_UNDEFINED (_POSIX_V7_ILP32_OFF32)
       if (__sysconf (_SC_V7_ILP32_OFF32) < 0)
 	break;
 # endif
@@ -115,9 +116,9 @@ confstr (name, buf, len)
     case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
     case _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS:
 #ifdef __ILP32_OFFBIG_CFLAGS
-# if _POSIX_V7_ILP32_OFFBIG == -1
+# if CONF_IS_DEFINED_UNSET (_POSIX_V7_ILP32_OFFBIG)
 #  error "__ILP32_OFFBIG_CFLAGS should not be defined"
-# elif !defined _POSIX_V7_ILP32_OFFBIG
+# elif CONF_IS_UNDEFINED (_POSIX_V7_ILP32_OFFBIG)
       if (__sysconf (_SC_V7_ILP32_OFFBIG) < 0)
 	break;
 # endif
@@ -130,9 +131,9 @@ confstr (name, buf, len)
     case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
     case _CS_POSIX_V7_LP64_OFF64_CFLAGS:
 #ifdef __LP64_OFF64_CFLAGS
-# if _POSIX_V7_LP64_OFF64 == -1
+# if CONF_IS_DEFINED_UNSET (_POSIX_V7_LP64_OFF64)
 #  error "__LP64_OFF64_CFLAGS should not be defined"
-# elif !defined _POSIX_V7_LP64_OFF64
+# elif CONF_IS_UNDEFINED (_POSIX_V7_LP64_OFF64)
       if (__sysconf (_SC_V7_LP64_OFF64) < 0)
 	break;
 # endif
@@ -145,9 +146,9 @@ confstr (name, buf, len)
     case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
     case _CS_POSIX_V7_ILP32_OFF32_LDFLAGS:
 #ifdef __ILP32_OFF32_LDFLAGS
-# if _POSIX_V7_ILP32_OFF32 == -1
+# if CONF_IS_DEFINED_UNSET (_POSIX_V7_ILP32_OFF32 )
 #  error "__ILP32_OFF32_LDFLAGS should not be defined"
-# elif !defined _POSIX_V7_ILP32_OFF32
+# elif CONF_IS_UNDEFINED (_POSIX_V7_ILP32_OFF32)
       if (__sysconf (_SC_V7_ILP32_OFF32) < 0)
 	break;
 # endif
@@ -160,9 +161,9 @@ confstr (name, buf, len)
     case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
     case _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS:
 #ifdef __ILP32_OFFBIG_LDFLAGS
-# if _POSIX_V7_ILP32_OFFBIG == -1
+# if CONF_IS_DEFINED_UNSET (_POSIX_V7_ILP32_OFFBIG)
 #  error "__ILP32_OFFBIG_LDFLAGS should not be defined"
-# elif !defined _POSIX_V7_ILP32_OFFBIG
+# elif CONF_IS_UNDEFINED (_POSIX_V7_ILP32_OFFBIG)
       if (__sysconf (_SC_V7_ILP32_OFFBIG) < 0)
 	break;
 # endif
@@ -175,9 +176,9 @@ confstr (name, buf, len)
     case _CS_POSIX_V6_LP64_OFF64_LDFLAGS:
     case _CS_POSIX_V7_LP64_OFF64_LDFLAGS:
 #ifdef __LP64_OFF64_LDFLAGS
-# if _POSIX_V7_LP64_OFF64 == -1
+# if CONF_IS_DEFINED_UNSET (_POSIX_V7_LP64_OFF64)
 #  error "__LP64_OFF64_LDFLAGS should not be defined"
-# elif !defined _POSIX_V7_LP64_OFF64
+# elif CONF_IS_UNDEFINED (_POSIX_V7_LP64_OFF64)
       if (__sysconf (_SC_V7_LP64_OFF64) < 0)
 	break;
 # endif
@@ -188,7 +189,8 @@ confstr (name, buf, len)
 
     case _CS_LFS_CFLAGS:
     case _CS_LFS_LINTFLAGS:
-#if _POSIX_V6_ILP32_OFF32 == 1 && _POSIX_V6_ILP32_OFFBIG == 1
+#if (CONF_IS_DEFINED_SET (_POSIX_V6_ILP32_OFF32) \
+     && CONF_IS_DEFINED_SET (_POSIX_V6_ILP32_OFFBIG))
 # define __LFS_CFLAGS "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
       /* Signal that we want the new ABI.  */
       string = __LFS_CFLAGS;
diff --git a/posix/posix-envs.def b/posix/posix-envs.def
index 05043e9..9047d0c 100644
--- a/posix/posix-envs.def
+++ b/posix/posix-envs.def
@@ -42,35 +42,37 @@
    defined.  These are called with arguments V5, V6, V7 before and
    after the relevant groups of environments.  */
 
+#include "confdefs.h"
+
 START_ENV_GROUP (V7)
 
-#if _POSIX_V7_ILP32_OFF32 > 0
+#if CONF_IS_DEFINED_SET (_POSIX_V7_ILP32_OFF32)
 KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
-#elif defined _POSIX_V7_ILP32_OFF32
+#elif CONF_IS_DEFINED (_POSIX_V7_ILP32_OFF32)
 KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
 #else
 UNKNOWN_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
 #endif
 
-#if _POSIX_V7_ILP32_OFFBIG > 0
+#if CONF_IS_DEFINED_SET (_POSIX_V7_ILP32_OFFBIG)
 KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
-#elif defined _POSIX_V7_ILP32_OFFBIG
+#elif CONF_IS_DEFINED (_POSIX_V7_ILP32_OFFBIG)
 KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
 #else
 UNKNOWN_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
 #endif
 
-#if _POSIX_V7_LP64_OFF64 > 0
+#if CONF_IS_DEFINED_SET (_POSIX_V7_LP64_OFF64)
 KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
-#elif defined _POSIX_V7_LP64_OFF64
+#elif CONF_IS_DEFINED (_POSIX_V7_LP64_OFF64)
 KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
 #else
 UNKNOWN_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
 #endif
 
-#if _POSIX_V7_LPBIG_OFFBIG > 0
+#if CONF_IS_DEFINED_SET (_POSIX_V7_LPBIG_OFFBIG)
 KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
-#elif defined _POSIX_V7_LPBIG_OFFBIG
+#elif CONF_IS_DEFINED (_POSIX_V7_LPBIG_OFFBIG)
 KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
 #else
 UNKNOWN_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
@@ -80,33 +82,33 @@ END_ENV_GROUP (V7)
 
 START_ENV_GROUP (V6)
 
-#if _POSIX_V6_ILP32_OFF32 > 0
+#if CONF_IS_DEFINED_SET (_POSIX_V6_ILP32_OFF32)
 KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
-#elif defined _POSIX_V6_ILP32_OFF32
+#elif CONF_IS_DEFINED (_POSIX_V6_ILP32_OFF32)
 KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
 #else
 UNKNOWN_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
 #endif
 
-#if _POSIX_V6_ILP32_OFFBIG > 0
+#if CONF_IS_DEFINED_SET (_POSIX_V6_ILP32_OFFBIG)
 KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
-#elif defined _POSIX_V6_ILP32_OFFBIG
+#elif CONF_IS_DEFINED (_POSIX_V6_ILP32_OFFBIG)
 KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
 #else
 UNKNOWN_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
 #endif
 
-#if _POSIX_V6_LP64_OFF64 > 0
+#if CONF_IS_DEFINED_SET (_POSIX_V6_LP64_OFF64)
 KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
-#elif defined _POSIX_V6_LP64_OFF64
+#elif CONF_IS_DEFINED (_POSIX_V6_LP64_OFF64)
 KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
 #else
 UNKNOWN_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
 #endif
 
-#if _POSIX_V6_LPBIG_OFFBIG > 0
+#if CONF_IS_DEFINED_SET (_POSIX_V6_LPBIG_OFFBIG)
 KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
-#elif defined _POSIX_V6_LPBIG_OFFBIG
+#elif CONF_IS_DEFINED (_POSIX_V6_LPBIG_OFFBIG)
 KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
 #else
 UNKNOWN_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
@@ -116,33 +118,33 @@ END_ENV_GROUP (V6)
 
 START_ENV_GROUP (V5)
 
-#if _XBS5_ILP32_OFF32 > 0
+#if CONF_IS_DEFINED_SET (_XBS5_ILP32_OFF32)
 KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
-#elif defined _XBS5_ILP32_OFF32
+#elif CONF_IS_DEFINED (_XBS5_ILP32_OFF32)
 KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
 #else
 UNKNOWN_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
 #endif
 
-#if _XBS5_ILP32_OFFBIG > 0
+#if CONF_IS_DEFINED_SET (_XBS5_ILP32_OFFBIG)
 KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
-#elif defined _XBS5_ILP32_OFFBIG
+#elif CONF_IS_DEFINED (_XBS5_ILP32_OFFBIG)
 KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
 #else
 UNKNOWN_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
 #endif
 
-#if _XBS5_LP64_OFF64 > 0
+#if CONF_IS_DEFINED_SET (_XBS5_LP64_OFF64)
 KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
-#elif defined _XBS5_LP64_OFF64
+#elif CONF_IS_DEFINED (_XBS5_LP64_OFF64)
 KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
 #else
 UNKNOWN_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
 #endif
 
-#if _XBS5_LPBIG_OFFBIG > 0
+#if CONF_IS_DEFINED_SET (_XBS5_LPBIG_OFFBIG)
 KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
-#elif defined _XBS5_LPBIG_OFFBIG
+#elif CONF_IS_DEFINED (_XBS5_LPBIG_OFFBIG)
 KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
 #else
 UNKNOWN_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
diff --git a/scripts/gen-conf.awk b/scripts/gen-conf.awk
new file mode 100644
index 0000000..45a4d44
--- /dev/null
+++ b/scripts/gen-conf.awk
@@ -0,0 +1,63 @@
+# Generate confdefs-defs.h with definitions for {CONF}_DEF for each
+# configuration variable that getconf or sysconf may use.  Currently it is
+# equipped only to generate such macros for specification macros and for
+# SYSCONF macros in the _POSIX namespace.
+
+BEGIN {
+  PROCINFO["sorted_in"] = "@val_type_asc"
+  prefix = ""
+}
+
+$1 ~ /^#/ || $0 ~ /^\s*$/ {
+  next
+}
+
+# Begin a new prefix.
+$2 == "{" {
+  split ($1, arr, ":")
+  type = arr[1]
+  prefix = arr[2]
+  next
+}
+
+$1 == "}" {
+  prefix = ""
+  type = ""
+  next
+}
+
+{
+  if (prefix == "" && type == "" && sc_prefix == "") {
+    print "Syntax error" > "/dev/stderr"
+    exit 1
+  }
+
+  # The prefix and variable names are indices and the value indicates what type
+  # of variable it is.  The possible options are:
+  # CONFSTR: A configuration string
+  # SYSCONF: A numeric value
+  # SPEC: A specification
+  conf[prefix][$1] = type
+}
+
+ENDFILE {
+  print "/* Autogenerated by gen-conf.awk.  */\n"
+
+  # Generate macros that specify if a sysconf macro is defined and/or set.
+  for (p in conf) {
+    for (c in conf[p]) {
+      printf "#ifndef _%s_%s\n", p, c
+      printf "# define _%s_%s_DEF CONF_DEF_UNDEFINED\n", p, c
+      # CONFSTR have string values and they are not set or unset.
+      if (conf[p][c] != "CONFSTR") {
+	printf "#else\n"
+	printf "# if _%s_%s > 0\n", p, c
+	printf "#  define _%s_%s_DEF CONF_DEF_DEFINED_SET\n", p, c
+	printf "# else\n"
+	printf "#  define _%s_%s_DEF CONF_DEF_DEFINED_UNSET\n", p, c
+	printf "# endif\n"
+      }
+      printf "#endif\n\n"
+    }
+  }
+}

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=06195e5139c9136ed81c299562395a9f9f9f64df

commit 06195e5139c9136ed81c299562395a9f9f9f64df
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Mon Sep 1 22:55:04 2014 +0530

    Use IS_IN internally only
    
    This change is only useful for the conformance tests since the headers
    changed are not installed.  The conformance tests fail due to IS_IN
    not being defined, so wrap it with a check to make sure that _ISOMAC
    is defined.
    
    	* include/bits/stdlib-float.h: Use IS_IN only if _ISOMAC is
    	defined.
    	* include/mqueue.h: Likewise.
    	* include/stdlib.h: Likewise.

diff --git a/include/bits/stdlib-float.h b/include/bits/stdlib-float.h
index 3466314..54ab571 100644
--- a/include/bits/stdlib-float.h
+++ b/include/bits/stdlib-float.h
@@ -1,4 +1,8 @@
-/* No floating-point inline functions in rtld.  */
-#if !IS_IN (rtld)
+/* No floating-point inline functions in rtld and for the conform tests.  */
+#ifdef _ISOMAC
 # include <stdlib/bits/stdlib-float.h>
+#else
+# if !IS_IN (rtld)
+#  include <stdlib/bits/stdlib-float.h>
+# endif
 #endif
diff --git a/include/mqueue.h b/include/mqueue.h
index aba788e..eb47b9b 100644
--- a/include/mqueue.h
+++ b/include/mqueue.h
@@ -1,7 +1,9 @@
 #include <rt/mqueue.h>
 
-#if IS_IN (librt)
+#ifndef _ISOMAC
+# if IS_IN (librt)
 hidden_proto (mq_timedsend)
 hidden_proto (mq_timedreceive)
 hidden_proto (mq_setattr)
+# endif
 #endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0c2927d48f779aec107def1e3ee47adf54fefc8d

commit 0c2927d48f779aec107def1e3ee47adf54fefc8d
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 15:13:39 2014 +0530

    Remove NOT_IN_libc
    
    Replace with !IS_IN (libc).  This completes the transition from
    the IS_IN/NOT_IN macros to the IN_MODULE macro set.
    
    The generated code is unchanged on x86_64.
    
    	* stdlib/isomac.c (fmt): Replace NOT_IN_libc with IN_MODULE.
    	(get_null_defines): Adjust.
    	* sunrpc/Makefile: Adjust comment.
    	* Makerules (CPPFLAGS-nonlib): Remove NOT_IN_libc.
    	* elf/Makefile (CPPFLAGS-sotruss-lib): Likewise.
    	(CFLAGS-interp.c): Likewise.
    	(CFLAGS-ldconfig.c): Likewise.
    	(CPPFLAGS-.os): Likewise.
    	* elf/rtld-Rules (rtld-CPPFLAGS): Likewise.
    	* extra-lib.mk (CPPFLAGS-$(lib)): Likewise.
    	* extra-modules.mk (extra-modules.mk): Likewise.
    	* iconv/Makefile (CPPFLAGS-iconvprogs): Likewise.
    	* locale/Makefile (CPPFLAGS-locale_programs): Likewise.
    	* malloc/Makefile (CPPFLAGS-memusagestat): Likewise.
    	* nscd/Makefile (CPPFLAGS-nscd): Likewise.
    	* nss/Makefile (CPPFLAGS-nss_test1): Likewise.
    	* stdlib/Makefile (CFLAGS-tst-putenvmod.c): Likewise.
    	* sysdeps/gnu/Makefile ($(objpfx)errlist-compat.c): Likewise.
    	* sysdeps/unix/sysv/linux/Makefile (CPPFLAGS-lddlibc4): Likewise.
    	* iconvdata/Makefile (CPPFLAGS): Likewise.
    	(cpp-srcs-left): Add libof for all iconvdata routines.
    	* bits/stdio-lock.h: Replace NOT_IN_libc with IS_IN.
    	* include/assert.h: Likewise.
    	* include/ctype.h: Likewise.
    	* include/errno.h: Likewise.
    	* include/libc-symbols.h: Likewise.
    	* include/math.h: Likewise.
    	* include/netdb.h: Likewise.
    	* include/resolv.h: Likewise.
    	* include/stdio.h: Likewise.
    	* include/stdlib.h: Likewise.
    	* include/string.h: Likewise.
    	* include/sys/stat.h: Likewise.
    	* include/wctype.h: Likewise.
    	* intl/l10nflist.c: Likewise.
    	* libidn/idn-stub.c: Likewise.
    	* libio/libioP.h: Likewise.
    	* nptl/libc_multiple_threads.c: Likewise.
    	* nptl/pthreadP.h: Likewise.
    	* posix/regex_internal.h: Likewise.
    	* resolv/res_hconf.c: Likewise.
    	* sysdeps/arm/armv7/multiarch/memcpy.S: Likewise.
    	* sysdeps/arm/memmove.S: Likewise.
    	* sysdeps/arm/sysdep.h: Likewise.
    	* sysdeps/generic/_itoa.h: Likewise.
    	* sysdeps/generic/symbol-hacks.h: Likewise.
    	* sysdeps/gnu/errlist.awk: Likewise.
    	* sysdeps/gnu/errlist.c: Likewise.
    	* sysdeps/i386/i586/memcpy.S: Likewise.
    	* sysdeps/i386/i586/memset.S: Likewise.
    	* sysdeps/i386/i686/memcpy.S: Likewise.
    	* sysdeps/i386/i686/memmove.S: Likewise.
    	* sysdeps/i386/i686/mempcpy.S: Likewise.
    	* sysdeps/i386/i686/memset.S: Likewise.
    	* sysdeps/i386/i686/multiarch/bcopy.S: Likewise.
    	* sysdeps/i386/i686/multiarch/bzero.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memchr-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memchr.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memcmp-sse4.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memcmp-ssse3.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memcmp.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memcpy.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memmove.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise.
    	* sysdeps/i386/i686/multiarch/mempcpy.S: Likewise.
    	* sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memrchr-c.c: Likewise.
    	* sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memrchr-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memrchr.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memset-sse2-rep.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memset-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memset.S: Likewise.
    	* sysdeps/i386/i686/multiarch/memset_chk.S: Likewise.
    	* sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcat-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcat-ssse3.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcat.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strchr-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strchr.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcmp-sse4.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcmp.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcpy-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcpy-ssse3.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcpy.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strcspn.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strlen-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strlen.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strnlen.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strrchr-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strrchr.S: Likewise.
    	* sysdeps/i386/i686/multiarch/strspn.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcschr-c.c: Likewise.
    	* sysdeps/i386/i686/multiarch/wcschr-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcschr.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcscmp-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcscmp.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcscpy-c.c: Likewise.
    	* sysdeps/i386/i686/multiarch/wcscpy-ssse3.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcscpy.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcslen-c.c: Likewise.
    	* sysdeps/i386/i686/multiarch/wcslen-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcslen.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcsrchr-c.c: Likewise.
    	* sysdeps/i386/i686/multiarch/wcsrchr-sse2.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise.
    	* sysdeps/i386/i686/multiarch/wmemcmp-c.c: Likewise.
    	* sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise.
    	* sysdeps/ia64/fpu/libm-symbols.h: Likewise.
    	* sysdeps/nptl/bits/libc-lock.h: Likewise.
    	* sysdeps/nptl/bits/libc-lockP.h: Likewise.
    	* sysdeps/nptl/bits/stdio-lock.h: Likewise.
    	* sysdeps/posix/closedir.c: Likewise.
    	* sysdeps/posix/opendir.c: Likewise.
    	* sysdeps/posix/readdir.c: Likewise.
    	* sysdeps/posix/rewinddir.c: Likewise.
    	* sysdeps/powerpc/novmx-sigjmp.c: Likewise.
    	* sysdeps/powerpc/powerpc32/__longjmp.S: Likewise.
    	* sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Likewise.
    	* sysdeps/powerpc/powerpc32/fpu/__longjmp.S: Likewise.
    	* sysdeps/powerpc/powerpc32/fpu/setjmp.S: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/memset.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power6/memset.S: Likewise.
    	* sysdeps/powerpc/powerpc32/setjmp.S: Likewise.
    	* sysdeps/powerpc/powerpc64/__longjmp.S: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/bzero.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memchr.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memcmp-ppc64.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memcmp.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memcpy.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memmove.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/mempcpy.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memrchr.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/memset.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/stpcpy-ppc64.S: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/stpncpy.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strcat.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strchr.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strchrnul.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strcmp.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strcpy-ppc64.S: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strcpy.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strcspn.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strlen.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strncase.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strncase_l.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strncat.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strncmp.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strncpy-ppc64.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strncpy.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strnlen.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strpbrk.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strrchr-ppc64.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strrchr.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/strspn.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/wcschr.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/wcscpy.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c: Likewise.
    	* sysdeps/powerpc/powerpc64/multiarch/wordcopy.c: Likewise.
    	* sysdeps/powerpc/powerpc64/setjmp.S: Likewise.
    	* sysdeps/s390/s390-32/multiarch/ifunc-resolve.c: Likewise.
    	* sysdeps/s390/s390-32/multiarch/memcmp.S: Likewise.
    	* sysdeps/s390/s390-32/multiarch/memcpy.S: Likewise.
    	* sysdeps/s390/s390-32/multiarch/memset.S: Likewise.
    	* sysdeps/s390/s390-64/multiarch/ifunc-resolve.c: Likewise.
    	* sysdeps/s390/s390-64/multiarch/memcmp.S: Likewise.
    	* sysdeps/s390/s390-64/multiarch/memcpy.S: Likewise.
    	* sysdeps/s390/s390-64/multiarch/memset.S: Likewise.
    	* sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S: Likewise.
    	* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Likewise.
    	* sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: Likewise.
    	* sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: Likewise.
    	* sysdeps/sparc/sparc64/multiarch/memcpy.S: Likewise.
    	* sysdeps/sparc/sparc64/multiarch/memset-niagara1.S: Likewise.
    	* sysdeps/sparc/sparc64/multiarch/memset-niagara4.S: Likewise.
    	* sysdeps/sparc/sparc64/multiarch/memset.S: Likewise.
    	* sysdeps/unix/alpha/sysdep.S: Likewise.
    	* sysdeps/unix/alpha/sysdep.h: Likewise.
    	* sysdeps/unix/make-syscalls.sh: Likewise.
    	* sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
    	* sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/getpid.c: Likewise.
    	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
    	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
    	* sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise.
    	* sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Likewise.
    	* sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/not-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/longjmp_chk.c: Likewise.
    	* sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
    	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
    	* sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/sh/vfork.S: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/tile/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
    	* sysdeps/wordsize-32/symbol-hacks.h: Likewise.
    	* sysdeps/x86_64/memcpy.S: Likewise.
    	* sysdeps/x86_64/memmove.c: Likewise.
    	* sysdeps/x86_64/memset.S: Likewise.
    	* sysdeps/x86_64/multiarch/init-arch.h: Likewise.
    	* sysdeps/x86_64/multiarch/memcmp-sse4.S: Likewise.
    	* sysdeps/x86_64/multiarch/memcmp-ssse3.S: Likewise.
    	* sysdeps/x86_64/multiarch/memcmp.S: Likewise.
    	* sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: Likewise.
    	* sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise.
    	* sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise.
    	* sysdeps/x86_64/multiarch/memcpy.S: Likewise.
    	* sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise.
    	* sysdeps/x86_64/multiarch/memmove.c: Likewise.
    	* sysdeps/x86_64/multiarch/mempcpy.S: Likewise.
    	* sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise.
    	* sysdeps/x86_64/multiarch/memset-avx2.S: Likewise.
    	* sysdeps/x86_64/multiarch/memset.S: Likewise.
    	* sysdeps/x86_64/multiarch/memset_chk.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcat-ssse3.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcat.S: Likewise.
    	* sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S: Likewise.
    	* sysdeps/x86_64/multiarch/strchr.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcmp-ssse3.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcmp.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcpy-ssse3.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcpy.S: Likewise.
    	* sysdeps/x86_64/multiarch/strcspn.S: Likewise.
    	* sysdeps/x86_64/multiarch/strspn.S: Likewise.
    	* sysdeps/x86_64/multiarch/wcscpy-c.c: Likewise.
    	* sysdeps/x86_64/multiarch/wcscpy-ssse3.S: Likewise.
    	* sysdeps/x86_64/multiarch/wcscpy.S: Likewise.
    	* sysdeps/x86_64/multiarch/wmemcmp-c.c: Likewise.
    	* sysdeps/x86_64/multiarch/wmemcmp.S: Likewise.
    	* sysdeps/x86_64/strcmp.S: Likewise.

diff --git a/Makerules b/Makerules
index 3cf4c40..46ec197 100644
--- a/Makerules
+++ b/Makerules
@@ -1228,9 +1228,6 @@ lib := nonlib
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 endif
 
-# The include magic above causes those files to use this variable for flags.
-CPPFLAGS-nonlib = -DNOT_IN_libc=1
-
 
 ifeq ($(build-shared),yes)
 # Generate normalized lists of symbols, versions, and data sizes.
diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h
index 198cb67..f68b13e 100644
--- a/bits/stdio-lock.h
+++ b/bits/stdio-lock.h
@@ -44,7 +44,7 @@ __libc_lock_define_recursive (typedef, _IO_lock_t)
 #define _IO_cleanup_region_end(_doit) \
   __libc_cleanup_region_end (_doit)
 
-#if defined _LIBC && !defined NOT_IN_libc
+#if defined _LIBC && IS_IN (libc)
 # define _IO_acquire_lock(_fp) \
   _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp));      \
   _IO_flockfile (_fp)
diff --git a/elf/Makefile b/elf/Makefile
index 3286aa8..e18658b 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -97,7 +97,6 @@ install-others += $(inst_auditdir)/sotruss-lib.so
 install-bin-script += sotruss
 generated += sotruss
 libof-sotruss-lib = extramodules
-CPPFLAGS-sotruss-lib = -DNOT_IN_libc
 $(objpfx)sotruss-lib.so: $(objpfx)sotruss-lib.os
 	$(build-module-asneeded)
 $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
@@ -437,15 +436,12 @@ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
 
 SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
 CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
-		    -D'SLIBDIR="$(slibdir)"' -DNOT_IN_libc
+		    -D'SLIBDIR="$(slibdir)"'
 libof-ldconfig = ldconfig
 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-rtld.c = $(SYSCONF-FLAGS)
 
-CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-		     -DNOT_IN_libc=1)
-
 cpp-srcs-left := $(all-rtld-routines:=.os)
 lib := rtld
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
diff --git a/elf/rtld-Rules b/elf/rtld-Rules
index 4e7c9ef..d2dc606 100644
--- a/elf/rtld-Rules
+++ b/elf/rtld-Rules
@@ -138,12 +138,10 @@ ifdef rtld-depfiles
 -include $(rtld-depfiles)
 endif
 
+# This here is the whole point of all the shenanigans.
 # Set libof-* for each routine.
 cpp-srcs-left := $(subst .os,,$(rtld-modules))
 lib := rtld
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
-# This here is the whole point of all the shenanigans.
-rtld-CPPFLAGS := -DNOT_IN_libc=1
-
 endif
diff --git a/extra-lib.mk b/extra-lib.mk
index 7cdf823..b10748d 100644
--- a/extra-lib.mk
+++ b/extra-lib.mk
@@ -105,5 +105,3 @@ cpp-srcs-left := $($(lib)-routines) $($(lib)-sysdep_routines)
 ifneq (,$(cpp-srcs-left))
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 endif
-
-CPPFLAGS-$(lib) := -DNOT_IN_libc=1
diff --git a/extra-modules.mk b/extra-modules.mk
index 9c2e4d2..5f8e693 100644
--- a/extra-modules.mk
+++ b/extra-modules.mk
@@ -7,4 +7,3 @@ module := $(firstword $(extra-modules-left))
 extra-modules-left := $(filter-out $(module),$(extra-modules-left))
 
 libof-$(notdir $(module)) := extramodules
-CPPFLAGS-$(module).c += -DNOT_IN_libc
diff --git a/iconv/Makefile b/iconv/Makefile
index 8031a88..d1a9011 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -52,8 +52,6 @@ CFLAGS-gconv_cache.c += -DGCONV_DIR='"$(gconvdir)"'
 CFLAGS-gconv_conf.c = -DGCONV_PATH='"$(gconvdir)"'
 CFLAGS-iconvconfig.c = -DGCONV_PATH='"$(gconvdir)"' -DGCONV_DIR='"$(gconvdir)"'
 
-CPPFLAGS-iconvprogs = -DNOT_IN_libc
-
 # Set libof-* for each routine.
 cpp-srcs-left := $(iconv_prog-modules) $(iconvconfig-modules)
 lib := iconvprogs
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index e0252ee..5595a3c 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -75,9 +75,6 @@ endif
 test-srcs := tst-table-from tst-table-to
 endif
 
-# No code here is in libc.so.
-CPPFLAGS += -DNOT_IN_libc
-
 libJIS-routines := jis0201 jis0208 jis0212
 libKSC-routines := ksc5601
 libGB-routines := gb2312
@@ -275,7 +272,9 @@ endif
 include ../Rules
 
 # Set libof-* for each routine.
-cpp-srcs-left := $(modules) $(generated-modules)
+cpp-srcs-left := $(modules) $(generated-modules) $(libJIS-routines) \
+		 $(libKSC-routines) $(libGB-routines) $(libCNS-routines) \
+		 $(libISOIR165-routines) $(libJISX0213-routines)
 lib := iconvdata
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
diff --git a/include/assert.h b/include/assert.h
index abe182f..c452667 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -20,7 +20,7 @@ extern void __assert_fail_base (const char *fmt, const char *assertion,
 				const char *function)
      __THROW  __attribute__ ((__noreturn__));
 
-# if !defined NOT_IN_libc || IS_IN (rtld)
+# if IS_IN (libc) || IS_IN (rtld)
 hidden_proto (__assert_fail)
 hidden_proto (__assert_perror_fail)
 # endif
diff --git a/include/ctype.h b/include/ctype.h
index 2ef2bd2..ba1fdde 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -11,7 +11,7 @@ libc_hidden_proto (__ctype_init)
    So defeat macro expansion with parens for this declaration.  */
 extern int (__isctype) (int __c, int __mask);
 
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 
 /* These accessors are used by the optimized macros to find the
    thread-local cache of ctype information from the current thread's
diff --git a/include/errno.h b/include/errno.h
index d650a15..7df41df 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -22,19 +22,19 @@
 #  define errno rtld_errno
 extern int rtld_errno attribute_hidden;
 
-# elif !defined NOT_IN_libc || IS_IN_LIB
+# elif IS_IN_LIB
 
 #  include <tls.h>
 
 #  undef  errno
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define errno __libc_errno
 #  else
 #   define errno errno		/* For #ifndef errno tests.  */
 #  endif
 extern __thread int errno attribute_tls_model_ie;
 
-# endif	/* !NOT_IN_libc || IS_IN_LIB */
+# endif	/* IS_IN_LIB */
 
 # define __set_errno(val) (errno = (val))
 
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 1dfcf2c..407fed0 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -565,7 +565,7 @@ for linking")
 # define hidden_nolink(name, lib, version)
 #endif
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define libc_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs)
 # define libc_hidden_def(name) hidden_def (name)
diff --git a/include/math.h b/include/math.h
index b10bfa0..42bb55e 100644
--- a/include/math.h
+++ b/include/math.h
@@ -6,7 +6,7 @@
 /* Now define the internal interfaces.  */
 extern int __matherr (struct exception *__exc);
 
-# if !defined NOT_IN_libc || IS_IN (libm)
+# if IS_IN (libc) || IS_IN (libm)
 hidden_proto (__finite)
 hidden_proto (__isinf)
 hidden_proto (__isnan)
diff --git a/include/netdb.h b/include/netdb.h
index eccdbe6..9e64a15 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -4,15 +4,15 @@
 
 #ifndef _ISOMAC
 /* Macros for accessing h_errno from inside libc.  */
-# if !defined NOT_IN_libc || IS_IN_LIB
+# if IS_IN_LIB
 #  undef  h_errno
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define h_errno __libc_h_errno
 #  else
 #   define h_errno h_errno	/* For #ifndef h_errno tests.  */
 #  endif
 extern __thread int h_errno attribute_tls_model_ie;
-# endif /* !NOT_IN_libc || IS_IN_LIB */
+# endif /* IS_IN_LIB */
 # define __set_h_errno(x) (h_errno = (x))
 
 libc_hidden_proto (hstrerror)
diff --git a/include/resolv.h b/include/resolv.h
index 3904cb7..4c61476 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -13,7 +13,7 @@
 
 #ifdef _RESOLV_H_
 
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  define __resp __libc_resp
 # endif
 extern __thread struct __res_state *__resp attribute_tls_model_ie;
diff --git a/include/stdio.h b/include/stdio.h
index 9f2ea31..53a2c58 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -117,7 +117,7 @@ extern const char *const _sys_errlist_internal[] attribute_hidden;
 extern int _sys_nerr_internal attribute_hidden;
 
 libc_hidden_proto (__asprintf)
-#  if !defined NOT_IN_libc
+#  if IS_IN (libc)
 extern _IO_FILE *_IO_new_fopen (const char*, const char*);
 #   define fopen(fname, mode) _IO_new_fopen (fname, mode)
 extern _IO_FILE *_IO_new_fdopen (int, const char*);
diff --git a/include/stdlib.h b/include/stdlib.h
index 8d8c753..af7b821 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -225,7 +225,7 @@ extern int __qfcvt_r (long double __value, int __ndigit,
 		      int *__restrict __decpt, int *__restrict __sign,
 		      char *__restrict __buf, size_t __len);
 
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  undef MB_CUR_MAX
 #  define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX))
 # endif
diff --git a/include/string.h b/include/string.h
index 8323412..0d40682 100644
--- a/include/string.h
+++ b/include/string.h
@@ -57,7 +57,7 @@ extern __typeof (strcasecmp_l) __strcasecmp_l;
 extern __typeof (strncasecmp_l) __strncasecmp_l;
 
 /* Alternative version which doesn't pollute glibc's namespace.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # undef strndupa
 # define strndupa(s, n)							      \
   (__extension__							      \
diff --git a/include/sys/stat.h b/include/sys/stat.h
index a44fbec..873562a 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -12,7 +12,7 @@ extern __mode_t __umask (__mode_t __mask);
 extern int __mkdir (const char *__path, __mode_t __mode);
 extern int __mknod (const char *__path,
 		    __mode_t __mode, __dev_t __dev);
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 hidden_proto (__fxstat)
 hidden_proto (__fxstat64)
 hidden_proto (__lxstat)
diff --git a/include/wctype.h b/include/wctype.h
index 676c043..b29e824 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -80,7 +80,7 @@ libc_hidden_proto (__towupper_l)
 
 /* The spec says that isdigit must only match the decimal digits.  We
    can check this without a memory access.  */
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  undef iswdigit
 #  define iswdigit(c) ({ wint_t __c = (c); __c >= L'0' && __c <= L'9'; })
 #  undef iswdigit_l
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
index 428a3f1..ca04ad3 100644
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -324,7 +324,7 @@ _nl_normalize_codeset (codeset, name_len)
   char *retval;
   char *wp;
   size_t cnt;
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
   locale_t locale = newlocale (0, "C", NULL);
 #else
 # define locale _nl_C_locobj_ptr
diff --git a/libidn/idn-stub.c b/libidn/idn-stub.c
index 9361b25..afd93ca 100644
--- a/libidn/idn-stub.c
+++ b/libidn/idn-stub.c
@@ -130,7 +130,7 @@ __idna_to_ascii_lz (const char *input, char **output, int flags)
 }
 
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 libc_freeres_fn (unload_libidn)
 {
   if (h != NULL && h != (void *) 1l)
diff --git a/libio/libioP.h b/libio/libioP.h
index bd94041..08b77ca 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -902,7 +902,7 @@ _IO_acquire_lock_clear_flags2_fct (_IO_FILE **p)
     _IO_funlockfile (fp);
 }
 
-#if !defined _IO_MTSAFE_IO && !defined NOT_IN_libc
+#if !defined _IO_MTSAFE_IO && IS_IN (libc)
 # define _IO_acquire_lock(_fp)						      \
   do {									      \
     _IO_FILE *_IO_acquire_lock_file = NULL
diff --git a/locale/Makefile b/locale/Makefile
index 5cd18e0..2364d54 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -88,14 +88,13 @@ locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \
 CPPFLAGS-locale_programs = -DLOCALE_PATH='$(localepath)' \
 			   -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
 			   -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
-			   -DLOCSRCDIR='"$(i18ndir)/locales"' \
-			   -DNOT_IN_libc
+			   -DLOCSRCDIR='"$(i18ndir)/locales"'
 
 CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
 CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
 CFLAGS-charmap-dir.c = -Wno-write-strings
 
-# This makes sure -DNOT_IN_libc et al are passed for all these modules.
+# Set libof-* for each routine.
 cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \
 		 $(lib-modules)
 lib := locale_programs
diff --git a/malloc/Makefile b/malloc/Makefile
index fbfada2..6df6f16 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -48,8 +48,6 @@ extra-objs = mcheck-init.o libmcheck.a
 # Include the cleanup handler.
 aux := set-freeres thread-freeres
 
-CPPFLAGS-memusagestat = -DNOT_IN_libc
-
 # The Perl script to analyze the output of the mtrace functions.
 ifneq ($(PERL),no)
 install-bin-script = mtrace
diff --git a/nptl/libc_multiple_threads.c b/nptl/libc_multiple_threads.c
index acf3594..0361f6c 100644
--- a/nptl/libc_multiple_threads.c
+++ b/nptl/libc_multiple_threads.c
@@ -18,7 +18,7 @@
 
 #include <pthreadP.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifndef TLS_MULTIPLE_THREADS_IN_TCB
 /* Variable set to a nonzero value either if more than one thread runs or ran,
    or if a single-threaded process is trying to cancel itself.  See
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 3185056..a26a68b 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -292,7 +292,7 @@ __do_cancel (void)
 #define CANCEL_RESET(oldtype) \
   __pthread_disable_asynccancel (oldtype)
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 /* Same as CANCEL_ASYNC, but for use in libc.so.  */
 # define LIBC_CANCEL_ASYNC() \
   __libc_enable_asynccancel ()
diff --git a/nscd/Makefile b/nscd/Makefile
index 40e99aa..8e03e9e 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -79,7 +79,7 @@ CFLAGS-nscd_gethst_r.c = -fexceptions
 CFLAGS-nscd_getai.c = -fexceptions
 CFLAGS-nscd_initgroups.c = -fexceptions
 
-CPPFLAGS-nscd += -D_FORTIFY_SOURCE=2 -DNOT_IN_libc
+CPPFLAGS-nscd += -D_FORTIFY_SOURCE=2
 
 ifeq (yesyes,$(have-fpie)$(build-shared))
 CFLAGS-nscd += $(pie-ccflag)
diff --git a/nss/Makefile b/nss/Makefile
index 7114d74..e0adf90 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -106,7 +106,6 @@ $(inst_vardbdir)/Makefile: db-Makefile $(+force)
 	$(do-install)
 
 libof-nss_test1 = extramodules
-CPPFLAGS-nss_test1 = -DNOT_IN_libc=1
 $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps)
 	$(build-module)
 ifdef libnss_test1.so-version
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index 5c39f05..284b236 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -381,7 +381,7 @@ typedef struct re_dfa_t re_dfa_t;
 # endif
 #endif
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
 						int new_buf_len)
      internal_function;
@@ -731,7 +731,7 @@ re_string_wchar_at (const re_string_t *pstr, int idx)
   return (wint_t) pstr->wcs[idx];
 }
 
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  ifdef _LIBC
 #   include <locale/weight.h>
 #  endif
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c
index b4c8622..cde0229 100644
--- a/resolv/res_hconf.c
+++ b/resolv/res_hconf.c
@@ -358,7 +358,7 @@ _res_hconf_init (void)
 }
 
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # if defined SIOCGIFCONF && defined SIOCGIFNETMASK
 /* List of known interfaces.  */
 libc_freeres_ptr (
diff --git a/stdlib/Makefile b/stdlib/Makefile
index da6e076..76b7ca7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -146,7 +146,6 @@ LDFLAGS-tst-putenv = $(no-as-needed)
 $(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os $(link-libc-deps)
 	$(build-module)
 libof-tst-putenvmod = extramodules
-CFLAGS-tst-putenvmod.c = -DNOT_IN_libc=1
 
 $(objpfx)bug-getcontext: $(libm)
 $(objpfx)tst-strtod-round: $(libm)
diff --git a/stdlib/isomac.c b/stdlib/isomac.c
index 13accb5..6fc97cd 100644
--- a/stdlib/isomac.c
+++ b/stdlib/isomac.c
@@ -176,7 +176,8 @@ static char *macros[] =
 /* Format string to build command to invoke compiler.  */
 static const char fmt[] = "\
 echo \"#include <%s>\" |\
-%s -E -dM -ansi -pedantic %s -D_LIBC -D_ISOMAC -DNOT_IN_libc -I. \
+%s -E -dM -ansi -pedantic %s -D_LIBC -D_ISOMAC \
+-DIN_MODULE=MODULE_extramodules -I. \
 -isystem `%s --print-prog-name=include` - 2> /dev/null > %s";
 
 
@@ -305,7 +306,7 @@ get_null_defines (void)
 	;
       result[result_len] = xstrndup (start, end - start);
 
-      if (strcmp (result[result_len], "NOT_IN_libc") != 0)
+      if (strcmp (result[result_len], "IN_MODULE") != 0)
 	{
 	  if (first)
 	    {
diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index a2722af..d7de8ae 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -166,7 +166,7 @@ $(cross-rpcgen-objs): $(objpfx)cross-%.o: %.c $(before-compile)
 $(objpfx)cross-rpcgen: $(cross-rpcgen-objs)
 	$(BUILD_CC) $^ $(BUILD_LDFLAGS) -o $@
 
-# This makes sure -DNOT_IN_libc is passed for all these modules.
+# This makes sure -DIN_MODULE is passed for all these modules.
 cpp-srcs-left := $(rpcgen-objs:.o=.c)
 lib := nonlib
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
diff --git a/sysdeps/arm/armv7/multiarch/memcpy.S b/sysdeps/arm/armv7/multiarch/memcpy.S
index c4f4e80..3439cb7 100644
--- a/sysdeps/arm/armv7/multiarch/memcpy.S
+++ b/sysdeps/arm/armv7/multiarch/memcpy.S
@@ -22,7 +22,7 @@
 #include <sysdep.h>
 #include <rtld-global-offsets.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 /* Under __ARM_NEON__, memcpy_neon.S defines the name memcpy.  */
 # ifndef __ARM_NEON__
 	.text
diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S
index 04aa7db..488e156 100644
--- a/sysdeps/arm/memmove.S
+++ b/sysdeps/arm/memmove.S
@@ -69,7 +69,7 @@ ENTRY(memmove)
 
 		subs	ip, r0, r1
 		cmphi	r2, ip
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 		bls	memcpy
 #else
 		bls	HIDDEN_JUMPTARGET(memcpy)
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index ef37ae1..256223b 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -359,7 +359,7 @@
 
 /* Pointer mangling support.  */
 #if (IS_IN (rtld) || \
-     (!defined SHARED && (!defined NOT_IN_libc || IS_IN (libpthread))))
+     (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread))))
 # ifdef __ASSEMBLER__
 #  define PTR_MANGLE_LOAD(guard, tmp)					\
   LDR_HIDDEN (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local), 0)
diff --git a/sysdeps/generic/_itoa.h b/sysdeps/generic/_itoa.h
index 8360baf..ed84e56 100644
--- a/sysdeps/generic/_itoa.h
+++ b/sysdeps/generic/_itoa.h
@@ -46,12 +46,12 @@ extern char *_itoa (unsigned long long int value, char *buflim,
 
 extern const char _itoa_upper_digits[];
 extern const char _itoa_lower_digits[];
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 hidden_proto (_itoa_upper_digits)
 hidden_proto (_itoa_lower_digits)
 #endif
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 extern char *_itoa_word (_ITOA_WORD_TYPE value, char *buflim,
 			 unsigned int base, int upper_case);
 #else
diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 6bec24b..ce576c9 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -1,6 +1,6 @@
 /* Some compiler optimizations may transform loops into memset/memmove
    calls and without proper declaration it may generate PLT calls.  */
-#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED
+#if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED
 asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index b5b2cf0..ba495ed 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -40,7 +40,7 @@ $(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
 endif
 	$(make-target-directory)
 	$(AWK) -v maxerr=`\
-	  $(CC) -S $(CPPFLAGS) $(CFLAGS) -DNOT_IN_libc -DEMIT_ERR_MAX $< -o - \
+	  $(CC) -S $(CPPFLAGS) $(CFLAGS) -DEMIT_ERR_MAX $< -o - \
 	  | sed -n 's/^.*@@@[^0-9]*\([0-9]*\)[^0-9]*@@@.*$$/\1/p'` \
 	       -f $(..)sysdeps/gnu/errlist-compat.awk \
 	       $(wildcard $(sysdirs:=/Versions)) > $@T
diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk
index 7fa5305..6da844a 100644
--- a/sysdeps/gnu/errlist.awk
+++ b/sysdeps/gnu/errlist.awk
@@ -110,7 +110,7 @@ END {
   print "  (sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0])";
   print "const int _sys_nerr_internal = NERR;"
   print "";
-  print "#if !defined NOT_IN_libc && !defined ERRLIST_NO_COMPAT";
+  print "#if IS_IN (libc) && !defined ERRLIST_NO_COMPAT";
   print "# include <errlist-compat.c>";
   print "#endif";
   print "";
diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c
index 8381434..a9a5960 100644
--- a/sysdeps/gnu/errlist.c
+++ b/sysdeps/gnu/errlist.c
@@ -1480,7 +1480,7 @@ TRANS error; @pxref{Cancel AIO Operations}. */
   (sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0])
 const int _sys_nerr_internal = NERR;
 
-#if !defined NOT_IN_libc && !defined ERRLIST_NO_COMPAT
+#if IS_IN (libc) && !defined ERRLIST_NO_COMPAT
 # include <errlist-compat.c>
 #endif
 
diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S
index edd9f08..6e0cc4c 100644
--- a/sysdeps/i386/i586/memcpy.S
+++ b/sysdeps/i386/i586/memcpy.S
@@ -32,7 +32,7 @@
 #define LEN	SRC+4
 
         .text
-#if defined PIC && !defined NOT_IN_libc
+#if defined PIC && IS_IN (libc)
 ENTRY (__memcpy_chk)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S
index 910d7bb..50b498b 100644
--- a/sysdeps/i386/i586/memset.S
+++ b/sysdeps/i386/i586/memset.S
@@ -35,7 +35,7 @@
 #endif
 
         .text
-#if defined PIC && !defined NOT_IN_libc && !BZERO_P
+#if defined PIC && IS_IN (libc) && !BZERO_P
 ENTRY (__memset_chk)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S
index 17e815e..6a15004 100644
--- a/sysdeps/i386/i686/memcpy.S
+++ b/sysdeps/i386/i686/memcpy.S
@@ -28,7 +28,7 @@
 #define LEN	SRC+4
 
 	.text
-#if defined PIC && !defined NOT_IN_libc
+#if defined PIC && IS_IN (libc)
 ENTRY_CHK (__memcpy_chk)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S
index 4b8785f..561f2fc 100644
--- a/sysdeps/i386/i686/memmove.S
+++ b/sysdeps/i386/i686/memmove.S
@@ -35,7 +35,7 @@
 # define SRC	DEST+4
 # define LEN	SRC+4
 
-# if defined PIC && !defined NOT_IN_libc
+# if defined PIC && IS_IN (libc)
 ENTRY_CHK (__memmove_chk)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S
index ec4b42b..8e51a13 100644
--- a/sysdeps/i386/i686/mempcpy.S
+++ b/sysdeps/i386/i686/mempcpy.S
@@ -28,7 +28,7 @@
 #define LEN	SRC+4
 
 	.text
-#if defined PIC && !defined NOT_IN_libc
+#if defined PIC && IS_IN (libc)
 ENTRY_CHK (__mempcpy_chk)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S
index 72d21fa..877bdda 100644
--- a/sysdeps/i386/i686/memset.S
+++ b/sysdeps/i386/i686/memset.S
@@ -36,7 +36,7 @@
 #endif
 
         .text
-#if defined PIC && !defined NOT_IN_libc && !BZERO_P
+#if defined PIC && IS_IN (libc) && !BZERO_P
 ENTRY_CHK (__memset_chk)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
@@ -99,7 +99,7 @@ ENTRY (memset)
 END (memset)
 libc_hidden_builtin_def (memset)
 
-#if defined PIC && !defined NOT_IN_libc && !BZERO_P
+#if defined PIC && IS_IN (libc) && !BZERO_P
 strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
 	.section .gnu.warning.__memset_zero_constant_len_parameter
 	.string "memset used with constant zero length parameter; this could be due to transposed parameters"
diff --git a/sysdeps/i386/i686/multiarch/bcopy.S b/sysdeps/i386/i686/multiarch/bcopy.S
index 4f50035..a0fca88 100644
--- a/sysdeps/i386/i686/multiarch/bcopy.S
+++ b/sysdeps/i386/i686/multiarch/bcopy.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in lib.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(bcopy)
diff --git a/sysdeps/i386/i686/multiarch/bzero.S b/sysdeps/i386/i686/multiarch/bzero.S
index cd59940..2dc1d8a 100644
--- a/sysdeps/i386/i686/multiarch/bzero.S
+++ b/sysdeps/i386/i686/multiarch/bzero.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in lib.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(__bzero)
diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S
index 8f5ccca..a0083a3 100644
--- a/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S
+++ b/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2.S b/sysdeps/i386/i686/multiarch/memchr-sse2.S
index 8d2c159..59a8a7c 100644
--- a/sysdeps/i386/i686/multiarch/memchr-sse2.S
+++ b/sysdeps/i386/i686/multiarch/memchr-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/memchr.S b/sysdeps/i386/i686/multiarch/memchr.S
index 1bdf0e7..b2a22f3 100644
--- a/sysdeps/i386/i686/multiarch/memchr.S
+++ b/sysdeps/i386/i686/multiarch/memchr.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 # define CFI_POP(REG) \
 	cfi_adjust_cfa_offset (-4); \
 	cfi_restore (REG)
diff --git a/sysdeps/i386/i686/multiarch/memcmp-sse4.S b/sysdeps/i386/i686/multiarch/memcmp-sse4.S
index a238615..570fec0 100644
--- a/sysdeps/i386/i686/multiarch/memcmp-sse4.S
+++ b/sysdeps/i386/i686/multiarch/memcmp-sse4.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
index 4a0bd67..5463428 100644
--- a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/memcmp.S b/sysdeps/i386/i686/multiarch/memcmp.S
index e4d56fa..1c5e30c 100644
--- a/sysdeps/i386/i686/multiarch/memcmp.S
+++ b/sysdeps/i386/i686/multiarch/memcmp.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in libc. */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(memcmp)
diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
index c4cdcfd..a7a8f98 100644
--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
+++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc \
+#if IS_IN (libc) \
     && (defined SHARED \
 	|| defined USE_AS_MEMMOVE \
 	|| !defined USE_MULTIARCH)
diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
index c0d718b..d190ba0 100644
--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined NOT_IN_libc \
+#if IS_IN (libc) \
     && (defined SHARED \
 	|| defined USE_AS_MEMMOVE \
 	|| !defined USE_MULTIARCH)
diff --git a/sysdeps/i386/i686/multiarch/memcpy.S b/sysdeps/i386/i686/multiarch/memcpy.S
index f583482..76195a5 100644
--- a/sysdeps/i386/i686/multiarch/memcpy.S
+++ b/sysdeps/i386/i686/multiarch/memcpy.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  In static binaries we need memcpy before the initialization
    happened.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 	.text
 ENTRY(memcpy)
 	.type	memcpy, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/memcpy_chk.S b/sysdeps/i386/i686/multiarch/memcpy_chk.S
index bf93b68..c67968e 100644
--- a/sysdeps/i386/i686/multiarch/memcpy_chk.S
+++ b/sysdeps/i386/i686/multiarch/memcpy_chk.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  There are no multiarch memcpy functions for static binaries.
  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(__memcpy_chk)
diff --git a/sysdeps/i386/i686/multiarch/memmove.S b/sysdeps/i386/i686/multiarch/memmove.S
index 90cf167..d8de7c6 100644
--- a/sysdeps/i386/i686/multiarch/memmove.S
+++ b/sysdeps/i386/i686/multiarch/memmove.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in lib.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(memmove)
diff --git a/sysdeps/i386/i686/multiarch/memmove_chk.S b/sysdeps/i386/i686/multiarch/memmove_chk.S
index 182aeb3..3442ce1 100644
--- a/sysdeps/i386/i686/multiarch/memmove_chk.S
+++ b/sysdeps/i386/i686/multiarch/memmove_chk.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in lib.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(__memmove_chk)
diff --git a/sysdeps/i386/i686/multiarch/mempcpy.S b/sysdeps/i386/i686/multiarch/mempcpy.S
index 56b50bb..3aab63d 100644
--- a/sysdeps/i386/i686/multiarch/mempcpy.S
+++ b/sysdeps/i386/i686/multiarch/mempcpy.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  In static binaries we need mempcpy before the initialization
    happened.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 	.text
 ENTRY(__mempcpy)
 	.type	__mempcpy, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.S b/sysdeps/i386/i686/multiarch/mempcpy_chk.S
index a76341c..5d81f4e 100644
--- a/sysdeps/i386/i686/multiarch/mempcpy_chk.S
+++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  There are no multiarch mempcpy functions for static binaries.
  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(__mempcpy_chk)
diff --git a/sysdeps/i386/i686/multiarch/memrchr-c.c b/sysdeps/i386/i686/multiarch/memrchr-c.c
index 44ec1a6..ef7bbbe 100644
--- a/sysdeps/i386/i686/multiarch/memrchr-c.c
+++ b/sysdeps/i386/i686/multiarch/memrchr-c.c
@@ -1,4 +1,4 @@
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define MEMRCHR  __memrchr_ia32
 # include <string.h>
 extern void *__memrchr_ia32 (const void *, int, size_t);
diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S
index 303ef9d..bc62775 100644
--- a/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S
+++ b/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2.S b/sysdeps/i386/i686/multiarch/memrchr-sse2.S
index 90ba738..ef605d1 100644
--- a/sysdeps/i386/i686/multiarch/memrchr-sse2.S
+++ b/sysdeps/i386/i686/multiarch/memrchr-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 # define CFI_PUSH(REG)	\
diff --git a/sysdeps/i386/i686/multiarch/memrchr.S b/sysdeps/i386/i686/multiarch/memrchr.S
index 0dff8b6..5ffcc26 100644
--- a/sysdeps/i386/i686/multiarch/memrchr.S
+++ b/sysdeps/i386/i686/multiarch/memrchr.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 # define CFI_POP(REG) \
 	cfi_adjust_cfa_offset (-4); \
 	cfi_restore (REG)
diff --git a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
index 8655a8c..2a064a1 100644
--- a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
+++ b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 #include <sysdep.h>
 #include "asm-syntax.h"
@@ -79,7 +79,7 @@
 #endif
 
 	.section .text.sse2,"ax",@progbits
-#if defined SHARED && !defined NOT_IN_libc && !defined USE_AS_BZERO
+#if defined SHARED && IS_IN (libc) && !defined USE_AS_BZERO
 ENTRY (__memset_chk_sse2_rep)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
diff --git a/sysdeps/i386/i686/multiarch/memset-sse2.S b/sysdeps/i386/i686/multiarch/memset-sse2.S
index cd94e4e..a48f9fa 100644
--- a/sysdeps/i386/i686/multiarch/memset-sse2.S
+++ b/sysdeps/i386/i686/multiarch/memset-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 #include <sysdep.h>
 #include "asm-syntax.h"
@@ -79,7 +79,7 @@
 #endif
 
 	.section .text.sse2,"ax",@progbits
-#if defined SHARED && !defined NOT_IN_libc && !defined USE_AS_BZERO
+#if defined SHARED && IS_IN (libc) && !defined USE_AS_BZERO
 ENTRY (__memset_chk_sse2)
 	movl	12(%esp), %eax
 	cmpl	%eax, 16(%esp)
diff --git a/sysdeps/i386/i686/multiarch/memset.S b/sysdeps/i386/i686/multiarch/memset.S
index ecec1ea..c818002 100644
--- a/sysdeps/i386/i686/multiarch/memset.S
+++ b/sysdeps/i386/i686/multiarch/memset.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in lib.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(memset)
diff --git a/sysdeps/i386/i686/multiarch/memset_chk.S b/sysdeps/i386/i686/multiarch/memset_chk.S
index 92c6099..f980520 100644
--- a/sysdeps/i386/i686/multiarch/memset_chk.S
+++ b/sysdeps/i386/i686/multiarch/memset_chk.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in lib.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(__memset_chk)
diff --git a/sysdeps/i386/i686/multiarch/rawmemchr.S b/sysdeps/i386/i686/multiarch/rawmemchr.S
index 01850cf..db4d461 100644
--- a/sysdeps/i386/i686/multiarch/rawmemchr.S
+++ b/sysdeps/i386/i686/multiarch/rawmemchr.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 # define CFI_POP(REG) \
 	cfi_adjust_cfa_offset (-4); \
 	cfi_restore (REG)
diff --git a/sysdeps/i386/i686/multiarch/strcat-sse2.S b/sysdeps/i386/i686/multiarch/strcat-sse2.S
index efd3f67..ae82e9a 100644
--- a/sysdeps/i386/i686/multiarch/strcat-sse2.S
+++ b/sysdeps/i386/i686/multiarch/strcat-sse2.S
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/strcat-ssse3.S b/sysdeps/i386/i686/multiarch/strcat-ssse3.S
index 8527166..0c506c1 100644
--- a/sysdeps/i386/i686/multiarch/strcat-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/strcat-ssse3.S
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/strcat.S b/sysdeps/i386/i686/multiarch/strcat.S
index 598c3f0..267ad13 100644
--- a/sysdeps/i386/i686/multiarch/strcat.S
+++ b/sysdeps/i386/i686/multiarch/strcat.S
@@ -43,7 +43,7 @@
 /* Define multiple versions only for the definition in libc.  Don't
    define multiple versions for strncat in static library since we
    need strncat before the initialization happened.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # ifdef SHARED
 	.text
diff --git a/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S
index 3357f53..9ab6c82 100644
--- a/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S
+++ b/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/strchr-sse2.S b/sysdeps/i386/i686/multiarch/strchr-sse2.S
index e0f3a2e..37867af 100644
--- a/sysdeps/i386/i686/multiarch/strchr-sse2.S
+++ b/sysdeps/i386/i686/multiarch/strchr-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/strchr.S b/sysdeps/i386/i686/multiarch/strchr.S
index 0fc4d8c..cc0ab9d 100644
--- a/sysdeps/i386/i686/multiarch/strchr.S
+++ b/sysdeps/i386/i686/multiarch/strchr.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(strchr)
 	.type	strchr, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
index 42d308a..ad15aa8 100644
--- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S
+++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 #include <sysdep.h>
 #include "asm-syntax.h"
diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
index c3107e5..1b32a8d 100644
--- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 #include <sysdep.h>
 #include "asm-syntax.h"
diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S
index 23cbd6f..536e87e 100644
--- a/sysdeps/i386/i686/multiarch/strcmp.S
+++ b/sysdeps/i386/i686/multiarch/strcmp.S
@@ -50,7 +50,7 @@
 /* Define multiple versions only for the definition in libc.  Don't
    define multiple versions for strncmp in static library since we
    need strncmp before the initialization happened.  */
-#if (defined SHARED || !defined USE_AS_STRNCMP) && !defined NOT_IN_libc
+#if (defined SHARED || !defined USE_AS_STRNCMP) && IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(STRCMP)
diff --git a/sysdeps/i386/i686/multiarch/strcpy-sse2.S b/sysdeps/i386/i686/multiarch/strcpy-sse2.S
index cbe040c..640fd06 100644
--- a/sysdeps/i386/i686/multiarch/strcpy-sse2.S
+++ b/sysdeps/i386/i686/multiarch/strcpy-sse2.S
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/strcpy-ssse3.S b/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
index 2d67994..ad3f7fa 100644
--- a/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # ifndef USE_AS_STRCAT
 #  include <sysdep.h>
diff --git a/sysdeps/i386/i686/multiarch/strcpy.S b/sysdeps/i386/i686/multiarch/strcpy.S
index f44ddf7..54e5b24 100644
--- a/sysdeps/i386/i686/multiarch/strcpy.S
+++ b/sysdeps/i386/i686/multiarch/strcpy.S
@@ -59,7 +59,7 @@
 /* Define multiple versions only for the definition in libc.  Don't
    define multiple versions for strncpy in static library since we
    need strncpy before the initialization happened.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # ifdef SHARED
 	.text
diff --git a/sysdeps/i386/i686/multiarch/strcspn.S b/sysdeps/i386/i686/multiarch/strcspn.S
index c35f4bf..d60874b 100644
--- a/sysdeps/i386/i686/multiarch/strcspn.S
+++ b/sysdeps/i386/i686/multiarch/strcspn.S
@@ -41,7 +41,7 @@
 /* Define multiple versions only for the definition in libc.  Don't
    define multiple versions for strpbrk in static library since we
    need strpbrk before the initialization happened.  */
-#if (defined SHARED || !defined USE_AS_STRPBRK) && !defined NOT_IN_libc
+#if (defined SHARED || !defined USE_AS_STRPBRK) && IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(STRCSPN)
diff --git a/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S
index 8f9b149..7617946 100644
--- a/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S
+++ b/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 
 #include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/strlen-sse2.S b/sysdeps/i386/i686/multiarch/strlen-sse2.S
index 20e82a6..b2f8973 100644
--- a/sysdeps/i386/i686/multiarch/strlen-sse2.S
+++ b/sysdeps/i386/i686/multiarch/strlen-sse2.S
@@ -19,7 +19,7 @@
 
 /* for strlen only SHARED version is optimized, for strcat, strncat, strnlen both STATIC and SHARED are optimized */
 
-#if (defined USE_AS_STRNLEN || defined USE_AS_STRCAT || defined SHARED) && !defined NOT_IN_libc
+#if (defined USE_AS_STRNLEN || defined USE_AS_STRCAT || defined SHARED) && IS_IN (libc)
 
 # ifndef USE_AS_STRCAT
 
diff --git a/sysdeps/i386/i686/multiarch/strlen.S b/sysdeps/i386/i686/multiarch/strlen.S
index 5b262a2..6d4eb68 100644
--- a/sysdeps/i386/i686/multiarch/strlen.S
+++ b/sysdeps/i386/i686/multiarch/strlen.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in libc and for the
    DSO.  In static binaries, we need strlen before the initialization
    happened.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 	.text
 ENTRY(strlen)
 	.type	strlen, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/strnlen.S b/sysdeps/i386/i686/multiarch/strnlen.S
index 63357d7..73854d5 100644
--- a/sysdeps/i386/i686/multiarch/strnlen.S
+++ b/sysdeps/i386/i686/multiarch/strnlen.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(__strnlen)
 	.type	__strnlen, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S
index 622b9f2..09724b5 100644
--- a/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S
+++ b/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/strrchr-sse2.S b/sysdeps/i386/i686/multiarch/strrchr-sse2.S
index 1644d5d..6cfb9a3 100644
--- a/sysdeps/i386/i686/multiarch/strrchr-sse2.S
+++ b/sysdeps/i386/i686/multiarch/strrchr-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/strrchr.S b/sysdeps/i386/i686/multiarch/strrchr.S
index 323f3f4..24c0493 100644
--- a/sysdeps/i386/i686/multiarch/strrchr.S
+++ b/sysdeps/i386/i686/multiarch/strrchr.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(strrchr)
 	.type	strrchr, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/strspn.S b/sysdeps/i386/i686/multiarch/strspn.S
index 703fc17..e55e224 100644
--- a/sysdeps/i386/i686/multiarch/strspn.S
+++ b/sysdeps/i386/i686/multiarch/strspn.S
@@ -26,7 +26,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(strspn)
diff --git a/sysdeps/i386/i686/multiarch/wcschr-c.c b/sysdeps/i386/i686/multiarch/wcschr-c.c
index c23af26..4c5f0f6 100644
--- a/sysdeps/i386/i686/multiarch/wcschr-c.c
+++ b/sysdeps/i386/i686/multiarch/wcschr-c.c
@@ -1,6 +1,6 @@
 #include <wchar.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 #  undef libc_hidden_def
 #  define libc_hidden_def(name) \
diff --git a/sysdeps/i386/i686/multiarch/wcschr-sse2.S b/sysdeps/i386/i686/multiarch/wcschr-sse2.S
index 332bdb0..f0294bc 100644
--- a/sysdeps/i386/i686/multiarch/wcschr-sse2.S
+++ b/sysdeps/i386/i686/multiarch/wcschr-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <sysdep.h>
 
 # define CFI_PUSH(REG)	\
diff --git a/sysdeps/i386/i686/multiarch/wcschr.S b/sysdeps/i386/i686/multiarch/wcschr.S
index 7622085..9a80a33 100644
--- a/sysdeps/i386/i686/multiarch/wcschr.S
+++ b/sysdeps/i386/i686/multiarch/wcschr.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(wcschr)
 	.type	wcschr, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/wcscmp-sse2.S b/sysdeps/i386/i686/multiarch/wcscmp-sse2.S
index 926bdcf..6e273d2 100644
--- a/sysdeps/i386/i686/multiarch/wcscmp-sse2.S
+++ b/sysdeps/i386/i686/multiarch/wcscmp-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/i386/i686/multiarch/wcscmp.S b/sysdeps/i386/i686/multiarch/wcscmp.S
index 37dd07f..ed36d6b 100644
--- a/sysdeps/i386/i686/multiarch/wcscmp.S
+++ b/sysdeps/i386/i686/multiarch/wcscmp.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in libc and for the
    DSO.  In static binaries, we need wcscmp before the initialization
    happened.  */
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(wcscmp)
 	.type	wcscmp, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/wcscpy-c.c b/sysdeps/i386/i686/multiarch/wcscpy-c.c
index a3c4024..fb30003 100644
--- a/sysdeps/i386/i686/multiarch/wcscpy-c.c
+++ b/sysdeps/i386/i686/multiarch/wcscpy-c.c
@@ -1,4 +1,4 @@
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define wcscpy  __wcscpy_ia32
 #endif
 
diff --git a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S
index f404252..8b2f910 100644
--- a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <sysdep.h>
 
 # define CFI_PUSH(REG)	\
diff --git a/sysdeps/i386/i686/multiarch/wcscpy.S b/sysdeps/i386/i686/multiarch/wcscpy.S
index 54a4325..b87500c 100644
--- a/sysdeps/i386/i686/multiarch/wcscpy.S
+++ b/sysdeps/i386/i686/multiarch/wcscpy.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in libc. */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(wcscpy)
 	.type	wcscpy, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/wcslen-c.c b/sysdeps/i386/i686/multiarch/wcslen-c.c
index 8cebfea..a335dc0 100644
--- a/sysdeps/i386/i686/multiarch/wcslen-c.c
+++ b/sysdeps/i386/i686/multiarch/wcslen-c.c
@@ -1,6 +1,6 @@
 #include <wchar.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define WCSLEN  __wcslen_ia32
 #endif
 
diff --git a/sysdeps/i386/i686/multiarch/wcslen-sse2.S b/sysdeps/i386/i686/multiarch/wcslen-sse2.S
index 8e94545..70b73b4 100644
--- a/sysdeps/i386/i686/multiarch/wcslen-sse2.S
+++ b/sysdeps/i386/i686/multiarch/wcslen-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <sysdep.h>
 # define STR	4
 
diff --git a/sysdeps/i386/i686/multiarch/wcslen.S b/sysdeps/i386/i686/multiarch/wcslen.S
index ba97cc4..d42a419 100644
--- a/sysdeps/i386/i686/multiarch/wcslen.S
+++ b/sysdeps/i386/i686/multiarch/wcslen.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(__wcslen)
 	.type	__wcslen, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/wcsrchr-c.c b/sysdeps/i386/i686/multiarch/wcsrchr-c.c
index c7444ce..8d8a335 100644
--- a/sysdeps/i386/i686/multiarch/wcsrchr-c.c
+++ b/sysdeps/i386/i686/multiarch/wcsrchr-c.c
@@ -1,4 +1,4 @@
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define wcsrchr  __wcsrchr_ia32
 #endif
 
diff --git a/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S b/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S
index f6abd6b..0e1b291 100644
--- a/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S
+++ b/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <sysdep.h>
 # define CFI_PUSH(REG)	\
 	cfi_adjust_cfa_offset (4);	\
diff --git a/sysdeps/i386/i686/multiarch/wcsrchr.S b/sysdeps/i386/i686/multiarch/wcsrchr.S
index 4d80b54..3ab1735 100644
--- a/sysdeps/i386/i686/multiarch/wcsrchr.S
+++ b/sysdeps/i386/i686/multiarch/wcsrchr.S
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <init-arch.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(wcsrchr)
 	.type	wcsrchr, @gnu_indirect_function
diff --git a/sysdeps/i386/i686/multiarch/wmemcmp-c.c b/sysdeps/i386/i686/multiarch/wmemcmp-c.c
index bd37660..75ab4b9 100644
--- a/sysdeps/i386/i686/multiarch/wmemcmp-c.c
+++ b/sysdeps/i386/i686/multiarch/wmemcmp-c.c
@@ -1,6 +1,6 @@
 #include <wchar.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define WMEMCMP  __wmemcmp_ia32
 #endif
 
diff --git a/sysdeps/i386/i686/multiarch/wmemcmp.S b/sysdeps/i386/i686/multiarch/wmemcmp.S
index 1b5a211..6790fa4 100644
--- a/sysdeps/i386/i686/multiarch/wmemcmp.S
+++ b/sysdeps/i386/i686/multiarch/wmemcmp.S
@@ -23,7 +23,7 @@
 
 /* Define multiple versions only for the definition in libc. */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(wmemcmp)
 	.type	wmemcmp, @gnu_indirect_function
diff --git a/sysdeps/ia64/fpu/libm-symbols.h b/sysdeps/ia64/fpu/libm-symbols.h
index 0df8076..3cbc6c4 100644
--- a/sysdeps/ia64/fpu/libm-symbols.h
+++ b/sysdeps/ia64/fpu/libm-symbols.h
@@ -53,6 +53,6 @@
  ASM_SIZE_DIRECTIVE(__ieee754_##name);			\
  .type __ieee754_##name, @function
 
-#if defined ASSEMBLER && !defined NOT_IN_libc
+#if defined ASSEMBLER && IS_IN (libc)
 # define __libm_error_support	HIDDEN_JUMPTARGET(__libm_error_support)
 #endif
diff --git a/sysdeps/nptl/bits/libc-lock.h b/sysdeps/nptl/bits/libc-lock.h
index 2acc6bf..d9a82ad 100644
--- a/sysdeps/nptl/bits/libc-lock.h
+++ b/sysdeps/nptl/bits/libc-lock.h
@@ -26,7 +26,7 @@
 
 /* Mutex type.  */
 #if defined _LIBC || defined _IO_MTSAFE_IO
-# if (defined NOT_IN_libc && !IS_IN (libpthread)) || !defined _LIBC
+# if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC
 typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;
 # else
 typedef struct { int lock; int cnt; void *owner; } __libc_lock_recursive_t;
@@ -47,7 +47,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 
 /* Define an initialized recursive lock variable NAME with storage
    class CLASS.  */
-#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
+#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
 # define __libc_lock_define_initialized_recursive(CLASS, NAME) \
   CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
 # define _LIBC_LOCK_RECURSIVE_INITIALIZER \
@@ -60,7 +60,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Initialize a recursive mutex.  */
-#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
+#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
 # define __libc_lock_init_recursive(NAME) \
   ((void) ((NAME) = (__libc_lock_recursive_t) _LIBC_LOCK_RECURSIVE_INITIALIZER))
 #else
@@ -78,7 +78,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Finalize recursive named lock.  */
-#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
+#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
 # define __libc_lock_fini_recursive(NAME) ((void) 0)
 #else
 # define __libc_lock_fini_recursive(NAME) \
@@ -86,7 +86,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Lock the recursive named lock variable.  */
-#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
+#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
 # define __libc_lock_lock_recursive(NAME) \
   do {									      \
     void *self = THREAD_SELF;						      \
@@ -103,7 +103,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Try to lock the recursive named lock variable.  */
-#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
+#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
 # define __libc_lock_trylock_recursive(NAME) \
   ({									      \
     int result = 0;							      \
@@ -128,7 +128,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Unlock the recursive named lock variable.  */
-#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
+#if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
 /* We do no error checking here.  */
 # define __libc_lock_unlock_recursive(NAME) \
   do {									      \
diff --git a/sysdeps/nptl/bits/libc-lockP.h b/sysdeps/nptl/bits/libc-lockP.h
index ae17507..78c5453 100644
--- a/sysdeps/nptl/bits/libc-lockP.h
+++ b/sysdeps/nptl/bits/libc-lockP.h
@@ -35,7 +35,7 @@
 #include <pthread-functions.h>
 
 /* Mutex type.  */
-#if defined NOT_IN_libc && !IS_IN (libpthread)
+#if !IS_IN (libc) && !IS_IN (libpthread)
 typedef pthread_mutex_t __libc_lock_t;
 #else
 typedef int __libc_lock_t;
@@ -69,7 +69,7 @@ typedef pthread_key_t __libc_key_t;
    initialized locks must be set to one due to the lack of normal
    atomic operations.) */
 
-#if !defined NOT_IN_libc || IS_IN (libpthread)
+#if IS_IN (libc) || IS_IN (libpthread)
 # if LLL_LOCK_INITIALIZER == 0
 #  define __libc_lock_define_initialized(CLASS,NAME) \
   CLASS __libc_lock_t NAME;
@@ -108,7 +108,7 @@ typedef pthread_key_t __libc_key_t;
 #endif
 
 /* Call thread functions through the function pointer table.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # define PTFAVAIL(NAME) __libc_pthread_functions_init
 # define __libc_ptf_call(FUNC, ARGS, ELSE) \
   (__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE)
@@ -125,14 +125,14 @@ typedef pthread_key_t __libc_key_t;
 
 /* Initialize the named lock variable, leaving it in a consistent, unlocked
    state.  */
-#if !defined NOT_IN_libc || IS_IN (libpthread)
+#if IS_IN (libc) || IS_IN (libpthread)
 # define __libc_lock_init(NAME) \
   ((void) ((NAME) = LLL_LOCK_INITIALIZER))
 #else
 # define __libc_lock_init(NAME) \
   __libc_maybe_call (__pthread_mutex_init, (&(NAME), NULL), 0)
 #endif
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 /* ((NAME) = (__libc_rwlock_t) PTHREAD_RWLOCK_INITIALIZER) is inefficient.  */
 # define __libc_rwlock_init(NAME) \
   ((void) __builtin_memset (&(NAME), '\0', sizeof (NAME)))
@@ -144,13 +144,13 @@ typedef pthread_key_t __libc_key_t;
 /* Finalize the named lock variable, which must be locked.  It cannot be
    used again until __libc_lock_init is called again on it.  This must be
    called on a lock variable before the containing storage is reused.  */
-#if !defined NOT_IN_libc || IS_IN (libpthread)
+#if IS_IN (libc) || IS_IN (libpthread)
 # define __libc_lock_fini(NAME) ((void) 0)
 #else
 # define __libc_lock_fini(NAME) \
   __libc_maybe_call (__pthread_mutex_destroy, (&(NAME)), 0)
 #endif
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # define __libc_rwlock_fini(NAME) ((void) 0)
 #else
 # define __libc_rwlock_fini(NAME) \
@@ -158,7 +158,7 @@ typedef pthread_key_t __libc_key_t;
 #endif
 
 /* Lock the named lock variable.  */
-#if !defined NOT_IN_libc || IS_IN (libpthread)
+#if IS_IN (libc) || IS_IN (libpthread)
 # ifndef __libc_lock_lock
 #  define __libc_lock_lock(NAME) \
   ({ lll_lock (NAME, LLL_PRIVATE); 0; })
@@ -174,7 +174,7 @@ typedef pthread_key_t __libc_key_t;
   __libc_ptf_call (__pthread_rwlock_wrlock, (&(NAME)), 0)
 
 /* Try to lock the named lock variable.  */
-#if !defined NOT_IN_libc || IS_IN (libpthread)
+#if IS_IN (libc) || IS_IN (libpthread)
 # ifndef __libc_lock_trylock
 #  define __libc_lock_trylock(NAME) \
   lll_trylock (NAME)
@@ -193,7 +193,7 @@ typedef pthread_key_t __libc_key_t;
   __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0)
 
 /* Unlock the named lock variable.  */
-#if !defined NOT_IN_libc || IS_IN (libpthread)
+#if IS_IN (libc) || IS_IN (libpthread)
 # define __libc_lock_unlock(NAME) \
   lll_unlock (NAME, LLL_PRIVATE)
 #else
diff --git a/sysdeps/nptl/bits/stdio-lock.h b/sysdeps/nptl/bits/stdio-lock.h
index 269df5e..848f417 100644
--- a/sysdeps/nptl/bits/stdio-lock.h
+++ b/sysdeps/nptl/bits/stdio-lock.h
@@ -84,7 +84,7 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t;
 #define _IO_cleanup_region_end(_doit) \
   __libc_cleanup_region_end (_doit)
 
-#if defined _LIBC && !defined NOT_IN_libc
+#if defined _LIBC && IS_IN (libc)
 
 # ifdef __EXCEPTIONS
 #  define _IO_acquire_lock(_fp) \
diff --git a/sysdeps/posix/closedir.c b/sysdeps/posix/closedir.c
index 24ba1a5..0b57a0d 100644
--- a/sysdeps/posix/closedir.c
+++ b/sysdeps/posix/closedir.c
@@ -43,7 +43,7 @@ __closedir (DIR *dirp)
 
   fd = dirp->fd;
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
   __libc_lock_fini (dirp->lock);
 #endif
 
diff --git a/sysdeps/posix/opendir.c b/sysdeps/posix/opendir.c
index be234bd..1ae5c0d 100644
--- a/sysdeps/posix/opendir.c
+++ b/sysdeps/posix/opendir.c
@@ -224,7 +224,7 @@ __alloc_dir (int fd, bool close_fd, int flags, const struct stat64 *statp)
     }
 
   dirp->fd = fd;
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
   __libc_lock_init (dirp->lock);
 #endif
   dirp->allocation = allocation;
diff --git a/sysdeps/posix/readdir.c b/sysdeps/posix/readdir.c
index 7bb956a..84d7f6a 100644
--- a/sysdeps/posix/readdir.c
+++ b/sysdeps/posix/readdir.c
@@ -40,7 +40,7 @@ __READDIR (DIR *dirp)
   DIRENT_TYPE *dp;
   int saved_errno = errno;
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
   __libc_lock_lock (dirp->lock);
 #endif
 
@@ -110,7 +110,7 @@ __READDIR (DIR *dirp)
       /* Skip deleted files.  */
     } while (dp->d_ino == 0);
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
   __libc_lock_unlock (dirp->lock);
 #endif
 
diff --git a/sysdeps/posix/rewinddir.c b/sysdeps/posix/rewinddir.c
index 5a4a715..a86c4cc 100644
--- a/sysdeps/posix/rewinddir.c
+++ b/sysdeps/posix/rewinddir.c
@@ -26,7 +26,7 @@ void
 rewinddir (dirp)
      DIR *dirp;
 {
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
   __libc_lock_lock (dirp->lock);
 #endif
   (void) __lseek (dirp->fd, (off_t) 0, SEEK_SET);
@@ -34,7 +34,7 @@ rewinddir (dirp)
   dirp->offset = 0;
   dirp->size = 0;
   dirp->errcode = 0;
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
   __libc_lock_unlock (dirp->lock);
 #endif
 }
diff --git a/sysdeps/powerpc/novmx-sigjmp.c b/sysdeps/powerpc/novmx-sigjmp.c
index c651f42..1f370bf 100644
--- a/sysdeps/powerpc/novmx-sigjmp.c
+++ b/sysdeps/powerpc/novmx-sigjmp.c
@@ -20,7 +20,7 @@
 
 #include <bits/wordsize.h>
 #include <shlib-compat.h>
-#if !defined NOT_IN_libc && defined SHARED
+#if IS_IN (libc) && defined SHARED
 # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
 #  include <stddef.h>
 #  include <novmxsetjmp.h>
@@ -41,4 +41,4 @@ __novmx__sigjmp_save (__novmx__sigjmp_buf env, int savemask)
 }
 
 # endif /* SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) */
-#endif /* !NOT_IN_libc && SHARED  */
+#endif /* IS_IN (libc) && SHARED  */
diff --git a/sysdeps/powerpc/powerpc32/__longjmp.S b/sysdeps/powerpc/powerpc32/__longjmp.S
index 3371176..9a83369 100644
--- a/sysdeps/powerpc/powerpc32/__longjmp.S
+++ b/sysdeps/powerpc/powerpc32/__longjmp.S
@@ -19,12 +19,12 @@
 #include <libc-symbols.h>
 #include <shlib-compat.h>
 
-#if defined NOT_IN_libc
+#if !IS_IN (libc)
 /* Build a non-versioned object for rtld-*.  */
 # define __longjmp_symbol __longjmp
 # include "__longjmp-common.S"
 
-#else /* !NOT_IN_libc */
+#else /* IS_IN (libc) */
 strong_alias (__vmx__longjmp, __longjmp);
 # define __longjmp_symbol  __vmx__longjmp
 # include "__longjmp-common.S"
@@ -36,4 +36,4 @@ strong_alias (__vmx__longjmp, __longjmp);
 #  define __longjmp_symbol  __novmx__longjmp
 #  include "__longjmp-common.S"
 # endif
-#endif /* !NOT_IN_libc */
+#endif /* IS_IN (libc) */
diff --git a/sysdeps/powerpc/powerpc32/bsd-_setjmp.S b/sysdeps/powerpc/powerpc32/bsd-_setjmp.S
index 71b6c71..b952170 100644
--- a/sysdeps/powerpc/powerpc32/bsd-_setjmp.S
+++ b/sysdeps/powerpc/powerpc32/bsd-_setjmp.S
@@ -19,7 +19,7 @@
 #include <libc-symbols.h>
 #include <sysdep.h>
 
-#if defined NOT_IN_libc
+#if !IS_IN (libc)
 /* Build a non-versioned object for rtld-*.  */
 ENTRY (_setjmp)
 	li r4,0			/* Set second argument to 0.  */
@@ -53,4 +53,4 @@ ENTRY (__vmx_setjmp)
 	b __vmx__sigsetjmp@local
 END (__vmx_setjmp)
 libc_hidden_def (__vmx_setjmp)
-#endif /* !NOT_IN_libc */
+#endif /* IS_IN (libc) */
diff --git a/sysdeps/powerpc/powerpc32/fpu/__longjmp.S b/sysdeps/powerpc/powerpc32/fpu/__longjmp.S
index 08bdd54..e68eb73 100644
--- a/sysdeps/powerpc/powerpc32/fpu/__longjmp.S
+++ b/sysdeps/powerpc/powerpc32/fpu/__longjmp.S
@@ -20,12 +20,12 @@
 #include <rtld-global-offsets.h>
 #include <shlib-compat.h>
 
-#if defined NOT_IN_libc
+#if !IS_IN (libc)
 /* Build a non-versioned object for rtld-*.  */
 # define __longjmp_symbol __longjmp
 # include "__longjmp-common.S"
 
-#else /* !NOT_IN_libc */
+#else /* IS_IN (libc) */
 /* Build a versioned object for libc.  */
 versioned_symbol (libc, __vmx__longjmp, __longjmp, GLIBC_2_3_4);
 # define __longjmp_symbol  __vmx__longjmp
@@ -39,4 +39,4 @@ compat_symbol (libc, __novmx__longjmp, __longjmp, GLIBC_2_0);
 #  define __longjmp_symbol  __novmx__longjmp
 #  include "__longjmp-common.S"
 # endif
-#endif /* !NOT_IN_libc */
+#endif /* IS_IN (libc) */
diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp.S b/sysdeps/powerpc/powerpc32/fpu/setjmp.S
index 333f707..169704f 100644
--- a/sysdeps/powerpc/powerpc32/fpu/setjmp.S
+++ b/sysdeps/powerpc/powerpc32/fpu/setjmp.S
@@ -20,13 +20,13 @@
 #include <rtld-global-offsets.h>
 #include <shlib-compat.h>
 
-#if defined NOT_IN_libc
+#if !IS_IN (libc)
 /* Build a non-versioned object for rtld-*.  */
 # define __sigsetjmp_symbol __sigsetjmp
 # define __sigjmp_save_symbol __sigjmp_save
 # include "setjmp-common.S"
 
-#else /* !NOT_IN_libc */
+#else /* IS_IN (libc) */
 /* Build a versioned object for libc.  */
 versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4)
 # define __sigsetjmp_symbol __vmx__sigsetjmp
@@ -43,4 +43,4 @@ compat_symbol (libc, __novmx__sigsetjmp, __sigsetjmp, GLIBC_2_0)
 #  define __sigjmp_save_symbol __novmx__sigjmp_save
 #  include "setjmp-common.S"
 # endif
-#endif /* !NOT_IN_libc */
+#endif /* IS_IN (libc) */
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c
index baaa6b4..2b54622 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <strings.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c
index 94c22ef..d8c6d4d 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # undef memcpy
 /* Redefine memchr so that the compiler won't make the weak_alias point
    to internal hidden definition (__GI_memchr), since PPC32 does not
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S
index 3b473a3..03c7226 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .globl C_SYMBOL_NAME(__memcmp_ppc);				\
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c
index 79fec67..04ed027 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S
index e525c2f..0f1f404 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .globl C_SYMBOL_NAME(__memcpy_ppc);				\
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c
index f263a38..70b5298 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c
@@ -19,7 +19,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  In static binaries we need memcpy before the initialization
    happened.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c
index 1070148..8b30143 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 /* Redefine memmove so that the compiler won't complain about the type
    mismatch with the IFUNC selector in strong_alias, below.  */
 # include <string.h>
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c
index 38fbcc3..0f811f0 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c
index c30e7d6..435987a 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define MEMRCHR  __memrchr_ppc
 # include <string.h>
 extern void *__memrchr_ppc (const void *, int, size_t);
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c
index 610a957..353a186 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S
index a907eb1..6da001a 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .globl C_SYMBOL_NAME(__memset_ppc);				\
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c
index e4e7982..eb1c0b1 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c
index 3f53cd5..063f12e 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c
index 6d1edf9..f7ef822 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # define strcasecmp __strcasecmp_ppc
 
@@ -27,7 +27,7 @@ extern __typeof (__strcasecmp) __strcasecmp_power7 attribute_hidden;
 #include <string/strcasecmp.c>
 #undef strcasecmp
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c
index 6359bf4..6291233 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # define strcasecmp_l __strcasecmp_l_ppc
 
@@ -27,7 +27,7 @@ extern __typeof (__strcasecmp_l) __strcasecmp_l_power7 attribute_hidden;
 #include <string/strcasecmp_l.c>
 #undef strcasecmp_l
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c
index 74a9d54..99e4e45 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
index dab1cbf..db0aab4 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S
index 3ee9f93..663d4fa 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 
 #include <sysdep.h>
 
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c
index 1b61ba0..cb81f5d 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c
index a2227d8..a5d4ab7 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # define strncasecmp __strncasecmp_ppc
 extern __typeof (__strncasecmp) __strncasecmp_ppc attribute_hidden;
@@ -26,7 +26,7 @@ extern __typeof (__strncasecmp) __strncasecmp_power7 attribute_hidden;
 #include <string/strncase.c>
 #undef strncasecmp
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c
index 9fe3aa0..65309b3 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # define strncasecmp_l __strncasecmp_l_ppc
 extern __typeof (__strncasecmp_l) __strncasecmp_l_ppc attribute_hidden;
@@ -26,7 +26,7 @@ extern __typeof (__strncasecmp_l) __strncasecmp_l_power7 attribute_hidden;
 #include <string/strncase_l.c>
 #undef strncasecmp_l
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S
index 9a857c7..f53ab94 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S
@@ -17,7 +17,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .globl C_SYMBOL_NAME(__strncmp_ppc);			\
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c
index a329f77..9faad6d 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c
index 62d4918..aca4c53 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
index a42f70c..9a067af 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
@@ -17,7 +17,7 @@
 
 #include <wchar.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 #   undef libc_hidden_def
 #   define libc_hidden_def(name)  \
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
index 216d2bc..6b8cd9c 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <wchar.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c
index c135835..148913a 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c
@@ -17,7 +17,7 @@
 
 #include <wchar.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define WCSCPY  __wcscpy_ppc
 #endif
 
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c
index 251660a..7c6edd8 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <wchar.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c
index 9c7fe2d..7b7edfb 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c
@@ -17,7 +17,7 @@
 
 #include <wchar.h>
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define WCSRCHR  __wcsrchr_ppc
 #endif
 
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c
index 42e2d8e..deec86f 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <wchar.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c
index 889be25..54ca039 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <stddef.h>
 # include <memcopy.h>
 # include <shlib-compat.h>
diff --git a/sysdeps/powerpc/powerpc32/power6/memset.S b/sysdeps/powerpc/powerpc32/power6/memset.S
index 445fa44..811a7ef 100644
--- a/sysdeps/powerpc/powerpc32/power6/memset.S
+++ b/sysdeps/powerpc/powerpc32/power6/memset.S
@@ -228,7 +228,7 @@ L(nzCacheAligned128):
 	ori	r1,r1,0
         stw     rCHR,60(rMEMP3)
 	blt	cr6,L(cacheAligned1)
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	lfd	0,-128(rMEMP)
 #endif
 	b	L(nzCacheAligned256)
@@ -236,7 +236,7 @@ L(nzCacheAligned128):
 L(nzCacheAligned256):
 	cmplwi	cr1,rLEN,256
 	addi	rMEMP3,rMEMP,64
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 /* When we are not in libc we should use only GPRs to avoid the FPU lock
    interrupt.  */
 	stw	rCHR,0(rMEMP)
diff --git a/sysdeps/powerpc/powerpc32/setjmp.S b/sysdeps/powerpc/powerpc32/setjmp.S
index 9b587e0..c73e65c 100644
--- a/sysdeps/powerpc/powerpc32/setjmp.S
+++ b/sysdeps/powerpc/powerpc32/setjmp.S
@@ -19,13 +19,13 @@
 #include <shlib-compat.h>
 #include <libc-symbols.h>
 
-#if defined NOT_IN_libc
+#if !IS_IN (libc)
 /* Build a non-versioned object for rtld-*.  */
 # define __sigsetjmp_symbol __sigsetjmp
 # define __sigjmp_save_symbol __sigjmp_save
 # include "setjmp-common.S"
 
-#else /* !NOT_IN_libc */
+#else /* IS_IN (libc) */
 /* Build a versioned object for libc.  */
 versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4)
 # define __sigsetjmp_symbol __vmx__sigsetjmp
@@ -42,4 +42,4 @@ compat_symbol (libc, __novmx__sigsetjmp, __sigsetjmp, GLIBC_2_0)
 #  define __sigjmp_save_symbol __novmx__sigjmp_save
 #  include "setjmp-common.S"
 # endif
-#endif /* !NOT_IN_libc */
+#endif /* IS_IN (libc) */
diff --git a/sysdeps/powerpc/powerpc64/__longjmp.S b/sysdeps/powerpc/powerpc64/__longjmp.S
index 0f44681..9313eab 100644
--- a/sysdeps/powerpc/powerpc64/__longjmp.S
+++ b/sysdeps/powerpc/powerpc64/__longjmp.S
@@ -20,11 +20,11 @@
 #include <rtld-global-offsets.h>
 #include <shlib-compat.h>
 
-#if defined NOT_IN_libc
+#if !IS_IN (libc)
 /* Build a non-versioned object for rtld-*.  */
 # include "__longjmp-common.S"
 
-#else /* !NOT_IN_libc */
+#else /* IS_IN (libc) */
 strong_alias (__vmx__longjmp, __longjmp)
 # define __longjmp  __vmx__longjmp
 # include "__longjmp-common.S"
@@ -36,4 +36,4 @@ strong_alias (__vmx__longjmp, __longjmp)
 #  define __longjmp  __novmx__longjmp
 #  include "__longjmp-common.S"
 # endif
-#endif /* !NOT_IN_libc */
+#endif /* IS_IN (libc) */
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bzero.c b/sysdeps/powerpc/powerpc64/multiarch/bzero.c
index 298cf00..bf67e46 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/bzero.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/bzero.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <strings.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memchr.c b/sysdeps/powerpc/powerpc64/multiarch/memchr.c
index ca0f714..1d763a6 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memchr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memchr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memcmp-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/memcmp-ppc64.c
index 1a39d4a..74626f5 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memcmp-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memcmp-ppc64.c
@@ -22,7 +22,7 @@
 #define weak_alias(name, aliasname) \
   extern __typeof (__memcmp_ppc) aliasname \
     __attribute__ ((weak, alias ("__memcmp_ppc")));
-#if !defined(NOT_IN_libc) && defined(SHARED)
+#if IS_IN (libc) && defined(SHARED)
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name) \
   __hidden_ver1(__memcmp_ppc, __GI_memcmp, __memcmp_ppc);
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memcmp.c b/sysdeps/powerpc/powerpc64/multiarch/memcmp.c
index af90f0a..b0325de 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memcmp.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memcmp.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S
index c630654..8365c27 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .section ".text";						\
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memcpy.c b/sysdeps/powerpc/powerpc64/multiarch/memcpy.c
index 305e963..22bca62 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memcpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memcpy.c
@@ -19,7 +19,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  In static binaries we need memcpy before the initialization
    happened.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 /* Redefine memcpy so that the compiler won't complain about the type
    mismatch with the IFUNC selector in strong_alias, below.  */
 # undef memcpy
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
index ff78fe6..fab0312 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
@@ -18,7 +18,7 @@
 #include <string.h>
 
 #define MEMMOVE __memmove_ppc
-#if !defined(NOT_IN_libc) && defined(SHARED)
+#if IS_IN (libc) && defined(SHARED)
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name)
 #endif
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memmove.c b/sysdeps/powerpc/powerpc64/multiarch/memmove.c
index 9a1ce8f..20a3a9e 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memmove.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memmove.c
@@ -19,7 +19,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  In static binaries we need memmove before the initialization
    happened.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 /* Redefine memmove so that the compiler won't complain about the type
    mismatch with the IFUNC selector in strong_alias, below.  */
 # undef memmove
diff --git a/sysdeps/powerpc/powerpc64/multiarch/mempcpy.c b/sysdeps/powerpc/powerpc64/multiarch/mempcpy.c
index 38fbcc3..0f811f0 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/mempcpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/mempcpy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memrchr.c b/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
index 610a957..353a186 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S
index 3601a77..ff88f48 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S
@@ -29,7 +29,7 @@ ENTRY (__bzero_ppc)
 END_GEN_TB (__bzero_ppc,TB_TOCLESS)
 
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .section ".text";						\
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset.c b/sysdeps/powerpc/powerpc64/multiarch/memset.c
index 9c7ed10..5c07773 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memset.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memset.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 /* Redefine memset so that the compiler won't complain about the type
    mismatch with the IFUNC selector in strong_alias, below.  */
 # undef memset
diff --git a/sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c b/sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c
index 3f53cd5..063f12e 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpcpy-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/stpcpy-ppc64.S
index d80c82f..b2213a8 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpcpy-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpcpy-ppc64.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .section ".text";						\
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
index c7118d5..4e99eaf 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpncpy.c b/sysdeps/powerpc/powerpc64/multiarch/stpncpy.c
index dbf8521..5c3551b 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpncpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpncpy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c b/sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c
index 7f02a25..3e440b5 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # define strcasecmp __strcasecmp_ppc
 extern __typeof (__strcasecmp) __strcasecmp_ppc attribute_hidden;
@@ -26,7 +26,7 @@ extern __typeof (__strcasecmp) __strcasecmp_power7 attribute_hidden;
 #include <string/strcasecmp.c>
 #undef strcasecmp
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c b/sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c
index a3374c3..623d844 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # define strcasecmp_l __strcasecmp_l_ppc
 extern __typeof (__strcasecmp_l) __strcasecmp_l_ppc attribute_hidden;
@@ -26,7 +26,7 @@ extern __typeof (__strcasecmp_l) __strcasecmp_l_power7 attribute_hidden;
 #include <string/strcasecmp_l.c>
 #undef strcasecmp_l
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcat.c b/sysdeps/powerpc/powerpc64/multiarch/strcat.c
index 847a62d..ec21062 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcat.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcat.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchr.c b/sysdeps/powerpc/powerpc64/multiarch/strchr.c
index 74a9d54..99e4e45 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strchr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strchr.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c b/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
index dab1cbf..db0aab4 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S
index 93d1277..e65c11b 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .section ".text";						\
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcmp.c b/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
index 2013301..4d72a4b 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcpy-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/strcpy-ppc64.S
index 33a8b1c..fb38a3a 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcpy-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcpy-ppc64.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef EALIGN
 # define EALIGN(name, alignt, words)				\
   .section ".text";						\
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcpy.c b/sysdeps/powerpc/powerpc64/multiarch/strcpy.c
index 1b6e9e0..8efebcd 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcpy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcspn.c b/sysdeps/powerpc/powerpc64/multiarch/strcspn.c
index 3609d93..156fa6a 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcspn.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcspn.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S
index a195e9a..c9bfed0 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # undef ENTRY
 # define ENTRY(name)						\
   .section ".text";						\
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strlen.c b/sysdeps/powerpc/powerpc64/multiarch/strlen.c
index d2c26e9..bffb039 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strlen.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strlen.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 /* Redefine strlen so that the compiler won't complain about the type
    mismatch with the IFUNC selector in strong_alias, below.  */
 # undef strlen
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase.c b/sysdeps/powerpc/powerpc64/multiarch/strncase.c
index 05eba7c..8956c70 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncase.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncase.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # define strncasecmp __strncasecmp_ppc
 extern __typeof (__strncasecmp) __strncasecmp_ppc attribute_hidden;
@@ -26,7 +26,7 @@ extern __typeof (__strncasecmp) __strncasecmp_power7 attribute_hidden;
 #include <string/strncase.c>
 #undef strncasecmp
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c b/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c
index 4014269..1b4bc68 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # define strncasecmp_l __strncasecmp_l_ppc
 extern __typeof (__strncasecmp_l) __strncasecmp_l_ppc attribute_hidden;
@@ -26,7 +26,7 @@ extern __typeof (__strncasecmp_l) __strncasecmp_l_power7 attribute_hidden;
 #include <string/strncase_l.c>
 #undef strncasecmp_l
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncat.c b/sysdeps/powerpc/powerpc64/multiarch/strncat.c
index db98ec1..cdf8926 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncat.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncat.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S
index 14a2bec..c404977 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S
@@ -17,7 +17,7 @@
 
 #include <sysdep.h>
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 #undef EALIGN
 #define EALIGN(name,alignt,words)				\
   .section ".text";						\
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
index 9829d69..7830eba 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncpy-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/strncpy-ppc64.c
index e3111d2..79ae382 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncpy-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncpy-ppc64.c
@@ -22,7 +22,7 @@
 #define weak_alias(name, aliasname) \
   extern __typeof (__strncpy_ppc) aliasname \
     __attribute__ ((weak, alias ("__strncpy_ppc")));
-#if !defined(NOT_IN_libc) && defined(SHARED)
+#if IS_IN (libc) && defined(SHARED)
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name) \
   __hidden_ver1(__strncpy_ppc, __GI_strncpy, __strncpy_ppc);
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncpy.c b/sysdeps/powerpc/powerpc64/multiarch/strncpy.c
index 8fd5e4b..771b731 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncpy.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/ >.  */
 
 /* Define multiple versions only for definition in libc. */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strnlen.c b/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
index 3926031..02b654f 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strnlen.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strpbrk.c b/sysdeps/powerpc/powerpc64/multiarch/strpbrk.c
index 8b05536..47ab6d3 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strpbrk.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strpbrk.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strrchr-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/strrchr-ppc64.c
index 5633a9f..ef7cc65 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strrchr-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strrchr-ppc64.c
@@ -22,7 +22,7 @@
 #define weak_alias(name, aliasname) \
   extern __typeof (__strrchr_ppc) aliasname \
     __attribute__ ((weak, alias ("__strrchr_ppc")));
-#if !defined(NOT_IN_libc) && defined(SHARED)
+#if IS_IN (libc) && defined(SHARED)
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name) \
   __hidden_ver1(__strrchr_ppc, __GI_strrchr, __strrchr_ppc);
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strrchr.c b/sysdeps/powerpc/powerpc64/multiarch/strrchr.c
index 046162f..11d3f62 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strrchr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strrchr.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c
index d543772..b35af3e 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c
@@ -22,7 +22,7 @@
 #define weak_alias(name, aliasname) \
   extern __typeof (__strspn_ppc) aliasname \
     __attribute__ ((weak, alias ("__strspn_ppc")));
-#if !defined(NOT_IN_libc) && defined(SHARED)
+#if IS_IN (libc) && defined(SHARED)
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name) \
   __hidden_ver1(__strspn_ppc, __GI_strspn, __strspn_ppc);
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strspn.c b/sysdeps/powerpc/powerpc64/multiarch/strspn.c
index bf8c877..dd9ec18 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strspn.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strspn.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcschr.c b/sysdeps/powerpc/powerpc64/multiarch/wcschr.c
index 216d2bc..6b8cd9c 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/wcschr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/wcschr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <wchar.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcscpy.c b/sysdeps/powerpc/powerpc64/multiarch/wcscpy.c
index 5c0a6d3..aadf490 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/wcscpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/wcscpy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <wchar.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c b/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c
index 3d0ab42..91ba389 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <wchar.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/multiarch/wordcopy.c b/sysdeps/powerpc/powerpc64/multiarch/wordcopy.c
index 889be25..54ca039 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/wordcopy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/wordcopy.c
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <stddef.h>
 # include <memcopy.h>
 # include <shlib-compat.h>
diff --git a/sysdeps/powerpc/powerpc64/setjmp.S b/sysdeps/powerpc/powerpc64/setjmp.S
index c15908c..a8de3bb 100644
--- a/sysdeps/powerpc/powerpc64/setjmp.S
+++ b/sysdeps/powerpc/powerpc64/setjmp.S
@@ -20,7 +20,7 @@
 #include <rtld-global-offsets.h>
 #include <shlib-compat.h>
 
-#if defined NOT_IN_libc
+#if !IS_IN (libc)
 /* Build a non-versioned object for rtld-*.  */
 # define setjmp_symbol setjmp
 # define _setjmp_symbol _setjmp
@@ -28,7 +28,7 @@
 # define __sigjmp_save_symbol __sigjmp_save
 # include "setjmp-common.S"
 
-#else /* !NOT_IN_libc */
+#else /* IS_IN (libc) */
 /* Build a versioned object for libc.  */
 versioned_symbol (libc, __vmxsetjmp, setjmp, GLIBC_2_3_4)
 versioned_symbol (libc, __vmx_setjmp, _setjmp, GLIBC_2_3_4)
@@ -58,4 +58,4 @@ compat_symbol (libc, __novmx__sigsetjmp,__sigsetjmp, GLIBC_2_3)
 #  include "setjmp-common.S"
 strong_alias (__novmxsetjmp, __novmx__setjmp)
 # endif
-#endif /* !NOT_IN_libc */
+#endif /* IS_IN (libc) */
diff --git a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
index 2ccfc9c..a46c9a1 100644
--- a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
+++ b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
@@ -23,7 +23,7 @@
 #define STFLE_BITS_Z10  34 /* General instructions extension */
 #define STFLE_BITS_Z196 45 /* Distinct operands, pop ... */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 #define IFUNC_RESOLVE(FUNC)						\
   asm (".globl " #FUNC "\n\t"						\
diff --git a/sysdeps/s390/s390-32/multiarch/memcmp.S b/sysdeps/s390/s390-32/multiarch/memcmp.S
index f298baa..32f08ef 100644
--- a/sysdeps/s390/s390-32/multiarch/memcmp.S
+++ b/sysdeps/s390/s390-32/multiarch/memcmp.S
@@ -27,7 +27,7 @@
 
        .text
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 ENTRY(memcmp_z196)
 	.machine "z196"
@@ -96,7 +96,7 @@ END(memcmp_z10)
 
 #include "../memcmp.S"
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 .globl   memcmp
 .set     memcmp,memcmp_g5
 .weak    bcmp
diff --git a/sysdeps/s390/s390-32/multiarch/memcpy.S b/sysdeps/s390/s390-32/multiarch/memcpy.S
index 78ed737..bc65bd8 100644
--- a/sysdeps/s390/s390-32/multiarch/memcpy.S
+++ b/sysdeps/s390/s390-32/multiarch/memcpy.S
@@ -27,7 +27,7 @@
 
        .text
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 
 ENTRY(memcpy_z196)
 	.machine "z196"
@@ -92,7 +92,7 @@ END(memcpy_z10)
 
 #include "../memcpy.S"
 
-#if !defined SHARED || defined NOT_IN_libc
+#if !defined SHARED || !IS_IN (libc)
 .globl   memcpy
 .set     memcpy,memcpy_g5
 #endif
diff --git a/sysdeps/s390/s390-32/multiarch/memset.S b/sysdeps/s390/s390-32/multiarch/memset.S
index 99d7df0..971c593 100644
--- a/sysdeps/s390/s390-32/multiarch/memset.S
+++ b/sysdeps/s390/s390-32/multiarch/memset.S
@@ -27,7 +27,7 @@
 
        .text
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 ENTRY(memset_z196)
 	.machine "z196"
@@ -107,7 +107,7 @@ END(memset_mvcle)
 
 #include "../memset.S"
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 .globl   memset
 .set     memset,memset_g5
 #endif
diff --git a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
index f8c69ff..f8b9040 100644
--- a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
+++ b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
@@ -23,7 +23,7 @@
 #define STFLE_BITS_Z10  34 /* General instructions extension */
 #define STFLE_BITS_Z196 45 /* Distinct operands, pop ... */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 #define IFUNC_RESOLVE(FUNC)						\
   asm (".globl " #FUNC "\n\t"						\
diff --git a/sysdeps/s390/s390-64/multiarch/memcmp.S b/sysdeps/s390/s390-64/multiarch/memcmp.S
index c31d7c4..8e4eca2 100644
--- a/sysdeps/s390/s390-64/multiarch/memcmp.S
+++ b/sysdeps/s390/s390-64/multiarch/memcmp.S
@@ -27,7 +27,7 @@
 
        .text
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 ENTRY(memcmp_z196)
 	.machine "z196"
@@ -93,7 +93,7 @@ END(memcmp_z10)
 
 #include "../memcmp.S"
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 .globl   memcmp
 .set     memcmp,memcmp_z900
 .weak    bcmp
diff --git a/sysdeps/s390/s390-64/multiarch/memcpy.S b/sysdeps/s390/s390-64/multiarch/memcpy.S
index 6590f43..2536ef4 100644
--- a/sysdeps/s390/s390-64/multiarch/memcpy.S
+++ b/sysdeps/s390/s390-64/multiarch/memcpy.S
@@ -27,7 +27,7 @@
 
        .text
 
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 
 ENTRY(memcpy_z196)
         .machine "z196"
@@ -88,7 +88,7 @@ END(memcpy_z10)
 
 #include "../memcpy.S"
 
-#if !defined SHARED || defined NOT_IN_libc
+#if !defined SHARED || !IS_IN (libc)
 .globl   memcpy
 .set     memcpy,memcpy_z900
 #endif
diff --git a/sysdeps/s390/s390-64/multiarch/memset.S b/sysdeps/s390/s390-64/multiarch/memset.S
index 3b96269..4d52051 100644
--- a/sysdeps/s390/s390-64/multiarch/memset.S
+++ b/sysdeps/s390/s390-64/multiarch/memset.S
@@ -27,7 +27,7 @@
 
        .text
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 ENTRY(memset_z196)
 	.machine "z196"
@@ -103,7 +103,7 @@ END(memset_mvcle)
 
 #include "../memset.S"
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 .globl   memset
 .set     memset,memset_z900
 #endif
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S
index 4b7b22d..a1c5588 100644
--- a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S
@@ -35,7 +35,7 @@
 #define XCC xcc
 #endif
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 
 	.register	%g2,#scratch
 	.register	%g3,#scratch
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
index a1a9642..a77618b 100644
--- a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
@@ -137,7 +137,7 @@
 	LOAD(ldd, base + 0x28, %x5); \
 	LOAD(ldd, base + 0x30, %x6);
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 
 	.register	%g2,#scratch
 	.register	%g3,#scratch
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S
index 63e0d83..24c6c6d 100644
--- a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S
@@ -46,7 +46,7 @@
 #define STORE(type,src,addr)	type src, [addr]
 #define STORE_INIT(src,addr)	stxa src, [addr] STORE_ASI
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 
 	.register	%g2,#scratch
 	.register	%g3,#scratch
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S b/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
index ffb3646..88a58d6 100644
--- a/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
@@ -30,7 +30,7 @@
 #define XCC xcc
 #endif
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 
 	.register	%g2,#scratch
 	.register	%g3,#scratch
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy.S b/sysdeps/sparc/sparc64/multiarch/memcpy.S
index 62977a4..dad39ec 100644
--- a/sysdeps/sparc/sparc64/multiarch/memcpy.S
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy.S
@@ -20,7 +20,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(memcpy)
 	.type	memcpy, @gnu_indirect_function
diff --git a/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S b/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S
index ed53522..ae45f5d 100644
--- a/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S
+++ b/sysdeps/sparc/sparc64/multiarch/memset-niagara1.S
@@ -28,7 +28,7 @@
 #define XCC xcc
 #endif
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 
 	.register	%g2,#scratch
 
diff --git a/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S b/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S
index c090c50..dc17e89 100644
--- a/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S
+++ b/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S
@@ -21,7 +21,7 @@
 
 #define ASI_BLK_INIT_QUAD_LDD_P	0xe2
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 
 	.register	%g2, #scratch
 	.register	%g3, #scratch
diff --git a/sysdeps/sparc/sparc64/multiarch/memset.S b/sysdeps/sparc/sparc64/multiarch/memset.S
index 96c75e0..2f63fe9 100644
--- a/sysdeps/sparc/sparc64/multiarch/memset.S
+++ b/sysdeps/sparc/sparc64/multiarch/memset.S
@@ -20,7 +20,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(memset)
 	.type	memset, @gnu_indirect_function
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index a39ee61..22b8b6c 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -28,7 +28,7 @@
 	.text
 #endif
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define SYSCALL_ERROR_ERRNO __libc_errno
 #else
 # define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 0b5ff20..4a280cd 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -372,7 +372,7 @@ __LABEL(name)						\
 #else
 # include <stdint.h>
 # if (IS_IN (rtld) \
-      || (!defined SHARED && (!defined NOT_IN_libc \
+      || (!defined SHARED && (IS_IN (libc) \
 			      || IS_IN (libpthread))))
 extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
 #  define PTR_MANGLE(var) \
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index fd6ebb4..567081a 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -96,7 +96,7 @@ emit_weak_aliases()
       *@@*)
 	base=`echo $name | sed 's/@@.*//'`
 	ver=`echo $name | sed 's/.*@@//;s/\./_/g'`
-	echo "	 echo '#ifndef NOT_IN_libc'; \\"
+	echo "	 echo '#if IS_IN (libc)'; \\"
 	if test -z "$vcount" ; then
 	  source=$strong
 	  vcount=1
@@ -113,7 +113,7 @@ emit_weak_aliases()
       *@*)
 	base=`echo $name | sed 's/@.*//'`
 	ver=`echo $name | sed 's/.*@//;s/\./_/g'`
-	echo "	 echo '#if defined SHARED && !defined NOT_IN_libc'; \\"
+	echo "	 echo '#if defined SHARED && IS_IN (libc)'; \\"
 	if test -z "$vcount" ; then
 	  source=$strong
 	  vcount=1
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 2d6d8bb..72754b7 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -179,7 +179,6 @@ sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir \
 			dl-fxstatat64
 
 libof-lddlibc4 = lddlibc4
-CPPFLAGS-lddlibc4 += -DNOT_IN_libc
 
 others += pldd
 install-bin += pldd
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
index f2f8009..de88ad2 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				\
@@ -85,7 +85,7 @@ ENTRY (name);								\
 #  define CENABLE	bl __pthread_enable_asynccancel
 #  define CDISABLE	bl __pthread_disable_asynccancel
 #  define __local_multiple_threads __pthread_multiple_threads
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	bl __libc_enable_asynccancel
 #  define CDISABLE	bl __libc_disable_asynccancel
 #  define __local_multiple_threads __libc_multiple_threads
@@ -96,7 +96,7 @@ ENTRY (name);								\
 #  error Unsupported library
 # endif
 
-# if IS_IN (libpthread) || !defined NOT_IN_libc
+# if IS_IN (libpthread) || IS_IN (libc)
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index 3fb6742..45a8636 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -92,7 +92,7 @@
 
 # define ret_ERRVAL ret
 
-# if NOT_IN_libc
+# if !IS_IN (libc)
 #  define SYSCALL_ERROR  .Lsyscall_error
 #  if RTLD_PRIVATE_ERRNO
 #   define SYSCALL_ERROR_HANDLER				\
@@ -310,7 +310,7 @@
 
 /* Pointer mangling is supported for AArch64.  */
 #if (IS_IN (rtld) || \
-     (!defined SHARED && (!defined NOT_IN_libc \
+     (!defined SHARED && (IS_IN (libc) \
 			  || IS_IN (libpthread))))
 # ifdef __ASSEMBLER__
 #  define PTR_MANGLE(dst, src, guard, tmp)                                \
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
index 5479556..d8439bf 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 /* ??? Assumes that nothing comes between PSEUDO and PSEUDO_END
    besides "ret".  */
@@ -117,7 +117,7 @@ __LABEL($multi_error)						\
 #  define __local_enable_asynccancel	__pthread_enable_asynccancel
 #  define __local_disable_asynccancel	__pthread_disable_asynccancel
 #  define __local_multiple_threads	__pthread_multiple_threads
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define __local_enable_asynccancel	__libc_enable_asynccancel
 #  define __local_disable_asynccancel	__libc_disable_asynccancel
 #  define __local_multiple_threads	__libc_multiple_threads
@@ -136,7 +136,7 @@ __LABEL($multi_error)						\
 #  define CDISABLE	jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp)
 # endif
 
-# if IS_IN (libpthread) || !defined NOT_IN_libc
+# if IS_IN (libpthread) || IS_IN (libc)
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P \
diff --git a/sysdeps/unix/sysv/linux/alpha/vfork.S b/sysdeps/unix/sysv/linux/alpha/vfork.S
index befcd78..d18ae27 100644
--- a/sysdeps/unix/sysv/linux/alpha/vfork.S
+++ b/sysdeps/unix/sysv/linux/alpha/vfork.S
@@ -49,7 +49,7 @@ ENTRY(__libc_vfork)
 
 PSEUDO_END (__libc_vfork)
 
-#if !NOT_IN_libc
+#if IS_IN (libc)
 weak_alias (__libc_vfork, vfork)
 strong_alias (__libc_vfork, __vfork)
 libc_hidden_def (__vfork)
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
index 9211d04..f966e95 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 /* NOTE: We do mark syscalls with unwind annotations, for the benefit of
    cancellation; but they're really only accurate at the point of the
@@ -185,7 +185,7 @@
 #  define CENABLE	bl PLTJMP(__pthread_enable_asynccancel)
 #  define CDISABLE	bl PLTJMP(__pthread_disable_asynccancel)
 #  define __local_multiple_threads __pthread_multiple_threads
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	bl PLTJMP(__libc_enable_asynccancel)
 #  define CDISABLE	bl PLTJMP(__libc_disable_asynccancel)
 #  define __local_multiple_threads __libc_multiple_threads
@@ -196,7 +196,7 @@
 #  error Unsupported library
 # endif
 
-# if IS_IN (libpthread) || !defined NOT_IN_libc
+# if IS_IN (libpthread) || IS_IN (libc)
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 91bdca5..f2d3343 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -136,7 +136,7 @@
 
 #define ret_ERRVAL PSEUDO_RET_NOERRNO
 
-#if NOT_IN_libc
+#if !IS_IN (libc)
 # define SYSCALL_ERROR __local_syscall_error
 # if RTLD_PRIVATE_ERRNO
 #  define SYSCALL_ERROR_HANDLER					\
diff --git a/sysdeps/unix/sysv/linux/getpid.c b/sysdeps/unix/sysv/linux/getpid.c
index 937b1d4..af5db44 100644
--- a/sysdeps/unix/sysv/linux/getpid.c
+++ b/sysdeps/unix/sysv/linux/getpid.c
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval);
 
 static inline __attribute__((always_inline)) pid_t
@@ -48,7 +48,7 @@ really_getpid (pid_t oldval)
 pid_t
 __getpid (void)
 {
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
   INTERNAL_SYSCALL_DECL (err);
   pid_t result = INTERNAL_SYSCALL (getpid, err, 0);
 #else
diff --git a/sysdeps/unix/sysv/linux/hppa/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/lowlevellock.h
index 9a60492..2a4d273 100644
--- a/sysdeps/unix/sysv/linux/hppa/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/lowlevellock.h
@@ -58,7 +58,7 @@
 /* Initialize locks to zero.  */
 #define LLL_MUTEX_LOCK_INITIALIZER (0)
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
index 5d4ff34..aec3f37 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # ifndef NO_ERROR
 #  define NO_ERROR -0x1000
@@ -216,7 +216,7 @@ L(pre_end):						ASM_LINE_SEP	\
 #   define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
 			bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
 #  endif
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  ifdef PIC
 #   define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
 			bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
@@ -246,7 +246,7 @@ L(pre_end):						ASM_LINE_SEP	\
 
 # if IS_IN (libpthread)
 #  define __local_multiple_threads __pthread_multiple_threads
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define __local_multiple_threads __libc_multiple_threads
 # elif IS_IN (librt)
 #  define __local_multiple_threads __librt_multiple_threads
@@ -271,7 +271,7 @@ L(pre_end):						ASM_LINE_SEP	\
 # define NO_CANCELLATION 1
 
 #endif
-/* !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt) */
+/* IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt) */
 
 #ifndef __ASSEMBLER__
 # define RTLD_SINGLE_THREAD_P \
diff --git a/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
index 4ed46fc..13596f1 100644
--- a/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
+++ b/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
@@ -115,7 +115,7 @@ __lll_lock_wait_private:
 	cfi_endproc
 	.size	__lll_lock_wait_private,.-__lll_lock_wait_private
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 	.globl	__lll_lock_wait
 	.type	__lll_lock_wait,@function
 	.hidden	__lll_lock_wait
@@ -361,7 +361,7 @@ __lll_unlock_wake_private:
 	cfi_endproc
 	.size	__lll_unlock_wake_private,.-__lll_unlock_wake_private
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 	.globl	__lll_unlock_wake
 	.type	__lll_unlock_wake,@function
 	.hidden	__lll_unlock_wake
diff --git a/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/sysdeps/unix/sysv/linux/i386/lowlevellock.h
index ffae477..1032f4b 100644
--- a/sysdeps/unix/sysv/linux/i386/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/i386/lowlevellock.h
@@ -71,7 +71,7 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
@@ -169,7 +169,7 @@
    value is zero.  In case the operation failed, the cmpxchg instruction
    has loaded the current value of the memory work which is guaranteed
    to be nonzero.  */
-#if defined NOT_IN_libc || defined UP
+#if !IS_IN (libc) || defined UP
 # define __lll_trylock_asm LOCK_INSTR "cmpxchgl %2, %1"
 #else
 # define __lll_trylock_asm "cmpl $0, %%gs:%P5\n\t" \
@@ -198,7 +198,7 @@
 		       : "memory");					      \
      ret; })
 
-#if defined NOT_IN_libc || defined UP
+#if !IS_IN (libc) || defined UP
 # define __lll_lock_asm_start LOCK_INSTR "cmpxchgl %1, %2\n\t"
 #else
 # define __lll_lock_asm_start "cmpl $0, %%gs:%P6\n\t"			      \
@@ -324,7 +324,7 @@ extern int __lll_timedlock_elision (int *futex, short *adapt_count,
 		       : "memory");					      \
      result; })
 
-#if defined NOT_IN_libc || defined UP
+#if !IS_IN (libc) || defined UP
 # define __lll_unlock_asm LOCK_INSTR "subl $1, %0\n\t"
 #else
 # define __lll_unlock_asm "cmpl $0, %%gs:%P3\n\t"			      \
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h b/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
index c17ff6c..ab15b9d 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -111,7 +111,7 @@
 # if IS_IN (libpthread)
 #  define CENABLE	call __pthread_enable_asynccancel;
 #  define CDISABLE	call __pthread_disable_asynccancel
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	call __libc_enable_asynccancel;
 #  define CDISABLE	call __libc_disable_asynccancel
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index b538004..d751c58 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -34,7 +34,7 @@
 #define SYS_ify(syscall_name)	__NR_##syscall_name
 
 #if defined USE_DL_SYSINFO \
-    && (!defined NOT_IN_libc || IS_IN (libpthread))
+    && (IS_IN (libc) || IS_IN (libpthread))
 # define I386_USE_SYSENTER	1
 #else
 # undef I386_USE_SYSENTER
@@ -115,7 +115,7 @@
 
 # elif defined _LIBC_REENTRANT
 
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/ia64/lowlevellock.h b/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
index fe4a90e..b586731 100644
--- a/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
@@ -52,7 +52,7 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
index 0458fce..c402dca 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
@@ -22,11 +22,11 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  define SYSDEP_CANCEL_ERRNO __libc_errno
 # else
 #  define SYSDEP_CANCEL_ERRNO errno
@@ -182,7 +182,7 @@ __GC_##name:								      \
 # if IS_IN (libpthread)
 #  define CENABLE	br.call.sptk.many b0 = __pthread_enable_asynccancel
 #  define CDISABLE	br.call.sptk.many b0 = __pthread_disable_asynccancel
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	br.call.sptk.many b0 = __libc_enable_asynccancel
 #  define CDISABLE	br.call.sptk.many b0 = __libc_disable_asynccancel
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.S b/sysdeps/unix/sysv/linux/ia64/sysdep.S
index 004ade1..9ec8951 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.S
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.S
@@ -34,7 +34,7 @@ ENTRY(__syscall_error)
 	st4	[r2]=r8
 	mov	r8=-1
 #else
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  define SYSCALL_ERROR_ERRNO __libc_errno
 # else
 #  define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 0943852..49684f8 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -61,7 +61,7 @@
 #endif
 
 #if defined USE_DL_SYSINFO \
-	&& (!defined NOT_IN_libc \
+	&& (IS_IN (libc) \
 	    || IS_IN (libpthread) || IS_IN (librt))
 # define IA64_USE_NEW_STUB
 #else
diff --git a/sysdeps/unix/sysv/linux/lowlevellock-futex.h b/sysdeps/unix/sysv/linux/lowlevellock-futex.h
index 11150b3..8927661 100644
--- a/sysdeps/unix/sysv/linux/lowlevellock-futex.h
+++ b/sysdeps/unix/sysv/linux/lowlevellock-futex.h
@@ -49,7 +49,7 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h b/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
index b75bf17..aa116c4 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
@@ -35,7 +35,7 @@
 
 /* We define __rtld_* copies for rtld.
    We need them visible in libc to initialize.  */
-#  if IS_IN (rtld) || !defined NOT_IN_libc
+#  if IS_IN (rtld) || IS_IN (libc)
 extern void *__rtld___vdso_read_tp;
 extern void *__rtld___vdso_atomic_cmpxchg_32;
 extern void *__rtld___vdso_atomic_barrier;
@@ -44,7 +44,7 @@ extern void *__rtld___vdso_atomic_barrier;
 extern void __vdso_read_tp_stub (void);
 extern void __vdso_atomic_cmpxchg_32_stub (void);
 extern void __vdso_atomic_barrier_stub (void);
-#  endif /* IS_IN (rtld) || !NOT_IN_libc */
+#  endif /* IS_IN (rtld) || IS_IN (libc) */
 
 /* RTLD should only use its own copies.  */
 #  if !IS_IN (rtld)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h b/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
index 33ce922..d5b8445 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -103,7 +103,7 @@
 # if IS_IN (libpthread)
 #  define CENABLE	PSEUDO_JMP (__pthread_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__pthread_disable_asynccancel)
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	PSEUDO_JMP (__libc_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__libc_disable_asynccancel)
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 3a91e86..9709088 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -101,7 +101,7 @@ SYSCALL_ERROR_LABEL:							      \
     move.l %d0, %a0;							      \
     rts;
 # elif defined _LIBC_REENTRANT
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/microblaze/lowlevellock.h b/sysdeps/unix/sysv/linux/microblaze/lowlevellock.h
index 9c21eeb..6592484 100644
--- a/sysdeps/unix/sysv/linux/microblaze/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/microblaze/lowlevellock.h
@@ -52,7 +52,7 @@
 #define LLL_SHARED  FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private)                                      \
diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h b/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
index 0fe5b12..5e185a3 100644
--- a/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # if !IS_IN (librt) || !defined(PIC)
 #  define AC_STACK_SIZE  16  /* space for r15, async_cancel arg and 2 temp words */
@@ -106,7 +106,7 @@ L(pseudo_cancel):                                                    \
 #  define CENABLE PSEUDO_JMP (__pthread_enable_asynccancel)
 #  define CDISABLE  PSEUDO_JMP (__pthread_disable_asynccancel)
 #  define __local_multiple_threads __pthread_multiple_threads
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE PSEUDO_JMP (__libc_enable_asynccancel)
 #  define CDISABLE  PSEUDO_JMP (__libc_disable_asynccancel)
 #  define __local_multiple_threads __libc_multiple_threads
@@ -118,7 +118,7 @@ L(pseudo_cancel):                                                    \
 # endif
 
 
-# if IS_IN (libpthread) || !defined NOT_IN_libc
+# if IS_IN (libpthread) || IS_IN (libc)
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
index 6f79b14..40e4225 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
@@ -27,7 +27,7 @@
    happen before any instructions.  So we use cfi_same_value instead of
    cfi_restore.  */
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 #ifdef __PIC__
 # undef PSEUDO
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
index 1d711f7..e12eea7 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # ifdef __PIC__
 #  define PSEUDO_CPLOAD .cpload t9;
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 1d65f20..0858ce8 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 extern int __open_nocancel (const char *, int, ...) attribute_hidden;
 extern int __close_nocancel (int) attribute_hidden;
 extern int __read_nocancel (int, void *, size_t) attribute_hidden;
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
index 25bf797..db1dfb8 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
@@ -23,7 +23,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				\
@@ -84,7 +84,7 @@
 # if IS_IN (libpthread)
 #  define CENABLE	bl __pthread_enable_asynccancel@local
 #  define CDISABLE	bl __pthread_disable_asynccancel@local
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	bl __libc_enable_asynccancel@local
 #  define CDISABLE	bl __libc_disable_asynccancel@local
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
index 8683b6b..9fff750 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
@@ -23,7 +23,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
 #  define DASHDASHPFX(str) .__##str
@@ -107,7 +107,7 @@
 #   define CENABLE	bl JUMPTARGET(__pthread_enable_asynccancel); nop
 #   define CDISABLE	bl JUMPTARGET(__pthread_disable_asynccancel); nop
 #  endif
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  ifdef SHARED
 #   define CENABLE	bl JUMPTARGET(__libc_enable_asynccancel)
 #   define CDISABLE	bl JUMPTARGET(__libc_disable_asynccancel)
diff --git a/sysdeps/unix/sysv/linux/s390/longjmp_chk.c b/sysdeps/unix/sysv/linux/s390/longjmp_chk.c
index 02c96c2..d18fbdf 100644
--- a/sysdeps/unix/sysv/linux/s390/longjmp_chk.c
+++ b/sysdeps/unix/sysv/linux/s390/longjmp_chk.c
@@ -20,7 +20,7 @@
 
 #include <shlib-compat.h>
 
-#if !defined NOT_IN_libc && defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
+#if IS_IN (libc) && defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
 /* this is a copy from debug/longjmp_chk.c because we need an unique name
    for __longjmp_chk, but it is already named via a define
    for __libc_siglongjmp in debug/longjmp_chk.c.  */
diff --git a/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/sysdeps/unix/sysv/linux/s390/lowlevellock.h
index 2c17b2c..14fb4a8 100644
--- a/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/s390/lowlevellock.h
@@ -51,7 +51,7 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
index d19500d..3b027e0 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -78,7 +78,7 @@ L(pseudo_end):
 # if IS_IN (libpthread)
 #  define CENABLE	__pthread_enable_asynccancel
 #  define CDISABLE	__pthread_disable_asynccancel
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	__libc_enable_asynccancel
 #  define CDISABLE	__libc_disable_asynccancel
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S
index de3f8a4..aca7e22 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S
@@ -31,7 +31,7 @@
 	.text
 ENTRY(__syscall_error)
 #ifndef PIC
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  define SYSCALL_ERROR_ERRNO __libc_errno
 # else
 #  define SYSCALL_ERROR_ERRNO errno
@@ -54,7 +54,7 @@ ENTRY(__syscall_error)
 	br	%r14
 1:	.long	rtld_errno - 0b
 # else
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index e6fd96a..f0ef41c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
@@ -105,7 +105,7 @@
     br    %r14;								      \
 2:  .long rtld_errno-1b
 # elif defined _LIBC_REENTRANT
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S b/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
index 290e464..3a368c8 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
@@ -52,7 +52,7 @@ ENTRY (__libc_vfork)
 	br	%r14
 PSEUDO_END (__libc_vfork)
 
-#if !NOT_IN_libc
+#if IS_IN (libc)
 weak_alias (__libc_vfork, vfork)
 strong_alias (__libc_vfork, __vfork)
 libc_hidden_def (__vfork)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
index 9622d5a..4955ec1 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -73,7 +73,7 @@ L(pseudo_end):
 #  define CENABLE	__pthread_enable_asynccancel
 #  define CDISABLE	__pthread_disable_asynccancel
 #  define __local_multiple_threads	__pthread_multiple_threads
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	__libc_enable_asynccancel
 #  define CDISABLE	__libc_disable_asynccancel
 #  define __local_multiple_threads	__libc_multiple_threads
@@ -111,7 +111,7 @@ L(pseudo_end):
 #define LR7_6		lg %r7,56+160(%r15); \
 			cfi_restore (%r7);
 
-# if IS_IN (libpthread) || !defined NOT_IN_libc
+# if IS_IN (libpthread) || IS_IN (libc)
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P \
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
index 0fbfe9c..6b4a613 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
@@ -32,7 +32,7 @@
 .text
 ENTRY(__syscall_error)
 #ifndef PIC
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  define SYSCALL_ERROR_ERRNO __libc_errno
 # else
 #  define SYSCALL_ERROR_ERRNO errno
@@ -55,7 +55,7 @@ ENTRY(__syscall_error)
 	lghi	%r2,-1
 	br	%r14
 # else
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index 917a636..696e4b3 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -113,7 +113,7 @@
     lghi  %r2,-1;							      \
     br    %r14
 # elif defined _LIBC_REENTRANT
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S b/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
index 7de1bb0..54bb272 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
@@ -53,7 +53,7 @@ ENTRY (__libc_vfork)
 	br	%r14
 PSEUDO_END (__libc_vfork)
 
-#if !NOT_IN_libc
+#if IS_IN (libc)
 weak_alias (__libc_vfork, vfork)
 strong_alias (__libc_vfork, __vfork)
 libc_hidden_def (__vfork)
diff --git a/sysdeps/unix/sysv/linux/sh/lowlevellock.S b/sysdeps/unix/sysv/linux/sh/lowlevellock.S
index 84b8edb..3fab373 100644
--- a/sysdeps/unix/sysv/linux/sh/lowlevellock.S
+++ b/sysdeps/unix/sysv/linux/sh/lowlevellock.S
@@ -172,7 +172,7 @@ __lll_lock_wait_private:
 	cfi_endproc
 	.size	__lll_lock_wait_private,.-__lll_lock_wait_private
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 	.globl	__lll_lock_wait
 	.type	__lll_lock_wait,@function
 	.hidden	__lll_lock_wait
@@ -454,7 +454,7 @@ __lll_unlock_wake_private:
 	cfi_endproc
 	.size	__lll_unlock_wake_private,.-__lll_unlock_wake_private
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 	.globl	__lll_unlock_wake
 	.type	__lll_unlock_wake,@function
 	.hidden	__lll_unlock_wake
diff --git a/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/sysdeps/unix/sysv/linux/sh/lowlevellock.h
index 328446c..e6dbab2 100644
--- a/sysdeps/unix/sysv/linux/sh/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/sh/lowlevellock.h
@@ -49,7 +49,7 @@
 #define LLL_SHARED     FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
index 131f42b..9b5911c 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # define _IMM12 #-12
 # define _IMM16 #-16
@@ -108,7 +108,7 @@
 # if IS_IN (libpthread)
 #  define __local_enable_asynccancel	__pthread_enable_asynccancel
 #  define __local_disable_asynccancel	__pthread_disable_asynccancel
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define __local_enable_asynccancel	__libc_enable_asynccancel
 #  define __local_disable_asynccancel	__libc_disable_asynccancel
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h
index 4fc5dd7..6f57854 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.h
@@ -116,7 +116,7 @@
 
 # elif defined _LIBC_REENTRANT
 
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/sh/vfork.S b/sysdeps/unix/sysv/linux/sh/vfork.S
index 76326f5..63ca023 100644
--- a/sysdeps/unix/sysv/linux/sh/vfork.S
+++ b/sysdeps/unix/sysv/linux/sh/vfork.S
@@ -66,7 +66,7 @@ ENTRY (__libc_vfork)
 	.align	2
 PSEUDO_END (__libc_vfork)
 
-#if !NOT_IN_libc
+#if IS_IN (libc)
 weak_alias (__libc_vfork, vfork)
 strong_alias (__libc_vfork, __vfork)
 libc_hidden_def (__vfork)
diff --git a/sysdeps/unix/sysv/linux/sparc/lowlevellock.h b/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
index eebf406..5c8c3f4 100644
--- a/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
@@ -57,7 +57,7 @@ extern void __cpu_relax (void);
 #define BUSY_WAIT_NOP	__cpu_relax ()
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
index cc7adfc..526e875 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)	\
@@ -71,7 +71,7 @@ __##syscall_name##_nocancel:			\
 # if IS_IN (libpthread)
 #  define CENABLE	call __pthread_enable_asynccancel
 #  define CDISABLE	call __pthread_disable_asynccancel
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	call __libc_enable_asynccancel
 #  define CDISABLE	call __libc_disable_asynccancel
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
index e5bb3b5..c9f38f4 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
@@ -79,7 +79,7 @@ ENTRY(name);					\
 	 mov	-1, %o0;
 # elif defined _LIBC_REENTRANT
 
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S b/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S
index 567163f..875ee3d 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S
@@ -89,7 +89,7 @@ ENTRY (__brk)
 #endif
 	st	%o0, [%g1]
 #else
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	call	HIDDEN_JUMPTARGET(__errno_location)
 #else
 	call	__errno_location
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
index aee3dee..e11f7c1 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)	\
@@ -69,7 +69,7 @@ __##syscall_name##_nocancel:			\
 # if IS_IN (libpthread)
 #  define CENABLE	call __pthread_enable_asynccancel
 #  define CDISABLE	call __pthread_disable_asynccancel
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	call __libc_enable_asynccancel
 #  define CDISABLE	call __libc_disable_asynccancel
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
index e9aedce..52b07c2 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
@@ -89,7 +89,7 @@ ENTRY(name);					\
 	 mov	-1, %o0;
 # elif defined _LIBC_REENTRANT
 
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h b/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
index 028c393..6c10552 100644
--- a/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 /* Allow hacking in some extra code if desired. */
 #ifndef PSEUDO_EXTRA
diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.h b/sysdeps/unix/sysv/linux/tile/sysdep.h
index b521351..d3b98bd 100644
--- a/sysdeps/unix/sysv/linux/tile/sysdep.h
+++ b/sysdeps/unix/sysv/linux/tile/sysdep.h
@@ -45,7 +45,7 @@
 #ifndef PIC
 /* For static code, on error jump to __syscall_error directly. */
 # define SYSCALL_ERROR_NAME __syscall_error
-#elif !defined NOT_IN_libc || IS_IN (libpthread)
+#elif IS_IN (libc) || IS_IN (libpthread)
 /* Use the internal name for libc/libpthread shared objects. */
 # define SYSCALL_ERROR_NAME __GI___syscall_error
 #else
diff --git a/sysdeps/unix/sysv/linux/tile/waitpid.S b/sysdeps/unix/sysv/linux/tile/waitpid.S
index e613b1c..58d7205 100644
--- a/sysdeps/unix/sysv/linux/tile/waitpid.S
+++ b/sysdeps/unix/sysv/linux/tile/waitpid.S
@@ -1,7 +1,7 @@
 /*
 extern pid_t __waitpid_nocancel (pid_t, int *, int) attribute_hidden;
 */
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 /* Call __NR_wait4, providing fourth argument (struct rusage *) as NULL. */
 #define PSEUDO_EXTRA move r3, zero;
diff --git a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index f2dca07..5d8e77c 100644
--- a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -108,7 +108,7 @@ __lll_lock_wait_private:
 	cfi_endproc
 	.size	__lll_lock_wait_private,.-__lll_lock_wait_private
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 	.globl	__lll_lock_wait
 	.type	__lll_lock_wait,@function
 	.hidden	__lll_lock_wait
@@ -348,7 +348,7 @@ __lll_unlock_wake_private:
 	cfi_endproc
 	.size	__lll_unlock_wake_private,.-__lll_unlock_wake_private
 
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 	.globl	__lll_unlock_wake
 	.type	__lll_unlock_wake,@function
 	.hidden	__lll_unlock_wake
diff --git a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index 37c0faf..2f0cf5c 100644
--- a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -72,7 +72,7 @@
 
 #ifndef __ASSEMBLER__
 
-#if !defined NOT_IN_libc || IS_IN (rtld)
+#if IS_IN (libc) || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
@@ -145,7 +145,7 @@
    value is zero.  In case the operation failed, the cmpxchg instruction
    has loaded the current value of the memory work which is guaranteed
    to be nonzero.  */
-#if defined NOT_IN_libc || defined UP
+#if !IS_IN (libc) || defined UP
 # define __lll_trylock_asm LOCK_INSTR "cmpxchgl %2, %1"
 #else
 # define __lll_trylock_asm "cmpl $0, __libc_multiple_threads(%%rip)\n\t"      \
@@ -174,7 +174,7 @@
 		       : "memory");					      \
      ret; })
 
-#if defined NOT_IN_libc || defined UP
+#if !IS_IN (libc) || defined UP
 # define __lll_lock_asm_start LOCK_INSTR "cmpxchgl %4, %2\n\t"		      \
 			      "jz 24f\n\t"
 #else
@@ -316,7 +316,7 @@ extern int __lll_timedlock_elision (int *futex, short *adapt_count,
 		       : "memory", "cx", "cc", "r10", "r11");		      \
      result; })
 
-#if defined NOT_IN_libc || defined UP
+#if !IS_IN (libc) || defined UP
 # define __lll_unlock_asm_start LOCK_INSTR "decl %0\n\t"		      \
 				"je 24f\n\t"
 #else
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
index 2667292..cecaec1 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
+#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
 
 /* The code to disable cancellation depends on the fact that the called
    functions are special.  They don't modify registers other than %rax
@@ -63,7 +63,7 @@
 #  define CENABLE	call __pthread_enable_asynccancel;
 #  define CDISABLE	call __pthread_disable_asynccancel;
 #  define __local_multiple_threads __pthread_multiple_threads
-# elif !defined NOT_IN_libc
+# elif IS_IN (libc)
 #  define CENABLE	call __libc_enable_asynccancel;
 #  define CDISABLE	call __libc_disable_asynccancel;
 #  define __local_multiple_threads __libc_multiple_threads
@@ -74,7 +74,7 @@
 #  error Unsupported library
 # endif
 
-# if IS_IN (libpthread) || !defined NOT_IN_libc
+# if IS_IN (libpthread) || IS_IN (libc)
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P \
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 6377183..16c497b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -115,7 +115,7 @@
   neg %eax;					\
   movl %eax, (%rcx)
 # else
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
diff --git a/sysdeps/wordsize-32/symbol-hacks.h b/sysdeps/wordsize-32/symbol-hacks.h
index 11e4701..38b2b74 100644
--- a/sysdeps/wordsize-32/symbol-hacks.h
+++ b/sysdeps/wordsize-32/symbol-hacks.h
@@ -23,7 +23,7 @@
    therefore we get PLTs.  Unnecessarily so.  Changing gcc is a big
    task which might not be worth it so we play tricks with the
    assembler.  */
-#if !defined __ASSEMBLER__ && !defined in_divdi3_c && !defined NOT_IN_libc && defined SHARED
+#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED
 asm ("__divdi3 = __divdi3_internal");
 asm ("__udivdi3 = __udivdi3_internal");
 asm ("__moddi3 = __moddi3_internal");
diff --git a/sysdeps/x86_64/memcpy.S b/sysdeps/x86_64/memcpy.S
index 60f3c65..2c9aa5a 100644
--- a/sysdeps/x86_64/memcpy.S
+++ b/sysdeps/x86_64/memcpy.S
@@ -30,7 +30,7 @@
 #  define RETVAL	(0)
 #else
 #  define RETVAL	(-8)
-#  if defined SHARED && !defined USE_MULTIARCH && !defined NOT_IN_libc
+#  if defined SHARED && !defined USE_MULTIARCH && IS_IN (libc)
 #    define memcpy	__memcpy
 #    undef libc_hidden_builtin_def
 #    define libc_hidden_builtin_def(name) \
@@ -44,7 +44,7 @@
 
         .text
 
-#if defined PIC && !defined NOT_IN_libc
+#if defined PIC && IS_IN (libc)
 ENTRY_CHK (__memcpy_chk)
 
 	cmpq	%rdx, %rcx
@@ -253,14 +253,14 @@ L(32after):
 /* Handle blocks smaller than 1/2 L1. */
 
 L(fasttry):				/* first 1/2 L1 */
-#ifndef NOT_IN_libc			/* only up to this algorithm outside of libc.so */
+#if IS_IN (libc)			/* only up to this algorithm outside of libc.so */
 	mov	__x86_data_cache_size_half(%rip), %R11_LP
 	cmpq	%rdx, %r11		/* calculate the smaller of */
 	cmovaq	%rdx, %r11		/* remaining bytes and 1/2 L1 */
 #endif
 
 L(fast):				/* good ol' MOVS */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	movq	%r11, %rcx
 	andq	$-8, %r11
 #else
@@ -275,7 +275,7 @@ L(fast):				/* good ol' MOVS */
 	.p2align 4,, 4
 
 L(fastskip):
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	subq	%r11, %rdx		/* check for more */
 	testq	$-8, %rdx
 	jnz	L(fastafter)
@@ -294,7 +294,7 @@ L(fastskip):
 #endif
 	retq				/* exit */
 
-#ifndef NOT_IN_libc			/* none of the algorithms below for RTLD */
+#if IS_IN (libc)			/* none of the algorithms below for RTLD */
 
 	.p2align 4
 
@@ -570,13 +570,13 @@ L(NTskip):
 #endif
 	retq				/* exit */
 
-#endif /* !NOT_IN_libc */
+#endif /* IS_IN (libc) */
 
 END(memcpy)
 
 #ifndef USE_AS_MEMPCPY
 libc_hidden_builtin_def (memcpy)
-# if defined SHARED && !defined USE_MULTIARCH && !defined NOT_IN_libc
+# if defined SHARED && !defined USE_MULTIARCH && IS_IN (libc)
 #  undef memcpy
 #  include <shlib-compat.h>
 versioned_symbol (libc, __memcpy, memcpy, GLIBC_2_14);
diff --git a/sysdeps/x86_64/memmove.c b/sysdeps/x86_64/memmove.c
index 202f5b8..d538eba 100644
--- a/sysdeps/x86_64/memmove.c
+++ b/sysdeps/x86_64/memmove.c
@@ -17,7 +17,7 @@
 
 #include "string/memmove.c"
 
-#if !defined memmove && !defined NOT_IN_libc
+#if !defined memmove && IS_IN (libc)
 #include <shlib-compat.h>
 
 #if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
index db4fb84..7fec577 100644
--- a/sysdeps/x86_64/memset.S
+++ b/sysdeps/x86_64/memset.S
@@ -20,7 +20,7 @@
 #include <sysdep.h>
 
 	.text
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 ENTRY(__bzero)
 	movq	%rdi, %rax /* Set return value.  */
 	movq	%rsi, %rdx /* Set n.  */
@@ -42,7 +42,7 @@ ENTRY(__memset_tail)
 END(__memset_tail)
 #endif
 
-#if defined PIC && !defined NOT_IN_libc
+#if defined PIC && IS_IN (libc)
 ENTRY_CHK (__memset_chk)
 	cmpq	%rdx, %rcx
 	jb	HIDDEN_JUMPTARGET (__chk_fail)
@@ -125,7 +125,7 @@ L(between8_16bytes):
 END (memset)
 libc_hidden_builtin_def (memset)
 
-#if defined PIC && !defined NOT_IN_libc && !defined USE_MULTIARCH
+#if defined PIC && IS_IN (libc) && !defined USE_MULTIARCH
 strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
 	.section .gnu.warning.__memset_zero_constant_len_parameter
 	.string "memset used with constant zero length parameter; this could be due to transposed parameters"
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h
index ef0abbd..c701edd 100644
--- a/sysdeps/x86_64/multiarch/init-arch.h
+++ b/sysdeps/x86_64/multiarch/init-arch.h
@@ -122,7 +122,7 @@ extern void __init_cpu_features (void) attribute_hidden;
 extern const struct cpu_features *__get_cpu_features (void)
      __attribute__ ((const));
 
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 #  define __get_cpu_features()	(&__cpu_features)
 # endif
 
diff --git a/sysdeps/x86_64/multiarch/memcmp-sse4.S b/sysdeps/x86_64/multiarch/memcmp-sse4.S
index e753d62..e747e97 100644
--- a/sysdeps/x86_64/multiarch/memcmp-sse4.S
+++ b/sysdeps/x86_64/multiarch/memcmp-sse4.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/x86_64/multiarch/memcmp-ssse3.S b/sysdeps/x86_64/multiarch/memcmp-ssse3.S
index 5f7572f..82297ed 100644
--- a/sysdeps/x86_64/multiarch/memcmp-ssse3.S
+++ b/sysdeps/x86_64/multiarch/memcmp-ssse3.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/x86_64/multiarch/memcmp.S b/sysdeps/x86_64/multiarch/memcmp.S
index 627d8d0..f0beaeb 100644
--- a/sysdeps/x86_64/multiarch/memcmp.S
+++ b/sysdeps/x86_64/multiarch/memcmp.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in libc. */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(memcmp)
 	.type	memcmp, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S b/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S
index 3cac1e3..eb5de25 100644
--- a/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S
+++ b/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc \
+#if IS_IN (libc) \
     && (defined SHARED \
         || defined USE_AS_MEMMOVE \
 	|| !defined USE_MULTIARCH)
diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
index 899ccbc..2fa465b 100644
--- a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
+++ b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc \
+#if IS_IN (libc) \
     && (defined SHARED \
         || defined USE_AS_MEMMOVE \
 	|| !defined USE_MULTIARCH)
diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3.S b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
index 0ad9a00..7d0755e 100644
--- a/sysdeps/x86_64/multiarch/memcpy-ssse3.S
+++ b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc \
+#if IS_IN (libc) \
     && (defined SHARED \
         || defined USE_AS_MEMMOVE \
 	|| !defined USE_MULTIARCH)
diff --git a/sysdeps/x86_64/multiarch/memcpy.S b/sysdeps/x86_64/multiarch/memcpy.S
index e666695..1523313 100644
--- a/sysdeps/x86_64/multiarch/memcpy.S
+++ b/sysdeps/x86_64/multiarch/memcpy.S
@@ -25,7 +25,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  In static binaries we need memcpy before the initialization
    happened.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 	.text
 ENTRY(__new_memcpy)
 	.type	__new_memcpy, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/memcpy_chk.S b/sysdeps/x86_64/multiarch/memcpy_chk.S
index 076b19a..ded14ab 100644
--- a/sysdeps/x86_64/multiarch/memcpy_chk.S
+++ b/sysdeps/x86_64/multiarch/memcpy_chk.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  There are no multiarch memcpy functions for static binaries.
  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(__memcpy_chk)
diff --git a/sysdeps/x86_64/multiarch/memmove.c b/sysdeps/x86_64/multiarch/memmove.c
index 0c9af7e..31d00f8 100644
--- a/sysdeps/x86_64/multiarch/memmove.c
+++ b/sysdeps/x86_64/multiarch/memmove.c
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define MEMMOVE __memmove_sse2
 # ifdef SHARED
 #  undef libc_hidden_builtin_def
@@ -41,7 +41,7 @@ extern __typeof (__redirect_memmove) __memmove_avx_unaligned attribute_hidden;
 
 #include "string/memmove.c"
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <shlib-compat.h>
 # include "init-arch.h"
 
diff --git a/sysdeps/x86_64/multiarch/mempcpy.S b/sysdeps/x86_64/multiarch/mempcpy.S
index 7589d8c..3b7bdb0 100644
--- a/sysdeps/x86_64/multiarch/mempcpy.S
+++ b/sysdeps/x86_64/multiarch/mempcpy.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  In static binaries we need mempcpy before the initialization
    happened.  */
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
 ENTRY(__mempcpy)
 	.type	__mempcpy, @gnu_indirect_function
 	cmpl	$0, KIND_OFFSET+__cpu_features(%rip)
diff --git a/sysdeps/x86_64/multiarch/mempcpy_chk.S b/sysdeps/x86_64/multiarch/mempcpy_chk.S
index 88e0b74..c0d33fe 100644
--- a/sysdeps/x86_64/multiarch/mempcpy_chk.S
+++ b/sysdeps/x86_64/multiarch/mempcpy_chk.S
@@ -24,7 +24,7 @@
 /* Define multiple versions only for the definition in lib and for
    DSO.  There are no multiarch mempcpy functions for static binaries.
  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # ifdef SHARED
 	.text
 ENTRY(__mempcpy_chk)
diff --git a/sysdeps/x86_64/multiarch/memset-avx2.S b/sysdeps/x86_64/multiarch/memset-avx2.S
index b45f8a0..0de0800 100644
--- a/sysdeps/x86_64/multiarch/memset-avx2.S
+++ b/sysdeps/x86_64/multiarch/memset-avx2.S
@@ -18,7 +18,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc
+#if IS_IN (libc)
 
 #include "asm-syntax.h"
 #ifndef MEMSET
diff --git a/sysdeps/x86_64/multiarch/memset.S b/sysdeps/x86_64/multiarch/memset.S
index 00d46d1..61868c7 100644
--- a/sysdeps/x86_64/multiarch/memset.S
+++ b/sysdeps/x86_64/multiarch/memset.S
@@ -23,7 +23,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in lib.  */
-# ifndef NOT_IN_libc
+# if IS_IN (libc)
 ENTRY(memset)
 	.type	memset, @gnu_indirect_function
 	cmpl	$0, __cpu_features+KIND_OFFSET(%rip)
@@ -37,7 +37,7 @@ ENTRY(memset)
 END(memset)
 # endif
 
-# if !defined NOT_IN_libc
+# if IS_IN (libc)
 #  undef memset
 #  define memset __memset_sse2
 
diff --git a/sysdeps/x86_64/multiarch/memset_chk.S b/sysdeps/x86_64/multiarch/memset_chk.S
index 8a607bd..7528a42 100644
--- a/sysdeps/x86_64/multiarch/memset_chk.S
+++ b/sysdeps/x86_64/multiarch/memset_chk.S
@@ -21,7 +21,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in lib.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # if defined SHARED && defined HAVE_AVX2_SUPPORT
 ENTRY(__memset_chk)
 	.type	__memset_chk, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S b/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S
index dc782f2..9b8db7a 100644
--- a/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S
+++ b/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/x86_64/multiarch/strcat-ssse3.S b/sysdeps/x86_64/multiarch/strcat-ssse3.S
index fde7b90..9448125 100644
--- a/sysdeps/x86_64/multiarch/strcat-ssse3.S
+++ b/sysdeps/x86_64/multiarch/strcat-ssse3.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 
diff --git a/sysdeps/x86_64/multiarch/strcat.S b/sysdeps/x86_64/multiarch/strcat.S
index d5c9d84..5318780 100644
--- a/sysdeps/x86_64/multiarch/strcat.S
+++ b/sysdeps/x86_64/multiarch/strcat.S
@@ -43,7 +43,7 @@
 
 
 /* Define multiple versions only for the definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(STRCAT)
 	.type	STRCAT, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S b/sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S
index 0b3f096..7870494 100644
--- a/sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S
+++ b/sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef  NOT_IN_libc
+#if IS_IN (libc)
 
 # include <sysdep.h>
 # include "asm-syntax.h"
diff --git a/sysdeps/x86_64/multiarch/strchr.S b/sysdeps/x86_64/multiarch/strchr.S
index 63a35fa..3f247b6 100644
--- a/sysdeps/x86_64/multiarch/strchr.S
+++ b/sysdeps/x86_64/multiarch/strchr.S
@@ -21,7 +21,7 @@
 
 
 /* Define multiple versions only for the definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(strchr)
 	.type	strchr, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/strcmp-ssse3.S b/sysdeps/x86_64/multiarch/strcmp-ssse3.S
index 43b3f30..1b7fa33 100644
--- a/sysdeps/x86_64/multiarch/strcmp-ssse3.S
+++ b/sysdeps/x86_64/multiarch/strcmp-ssse3.S
@@ -1,4 +1,4 @@
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define USE_SSSE3 1
 # define STRCMP __strcmp_ssse3
 # include "../strcmp.S"
diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S
index bd71714..45b2186 100644
--- a/sysdeps/x86_64/multiarch/strcmp.S
+++ b/sysdeps/x86_64/multiarch/strcmp.S
@@ -80,7 +80,7 @@
 /* Define multiple versions only for the definition in libc.  Don't
    define multiple versions for strncmp in static library since we
    need strncmp before the initialization happened.  */
-#if (defined SHARED || !defined USE_AS_STRNCMP) && !defined NOT_IN_libc
+#if (defined SHARED || !defined USE_AS_STRNCMP) && IS_IN (libc)
 	.text
 ENTRY(STRCMP)
 	.type	STRCMP, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S b/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
index be7513d..d616d1a 100644
--- a/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
+++ b/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # ifndef USE_AS_STRCAT
 #  include <sysdep.h>
diff --git a/sysdeps/x86_64/multiarch/strcpy-ssse3.S b/sysdeps/x86_64/multiarch/strcpy-ssse3.S
index 86569ff..7ca044d 100644
--- a/sysdeps/x86_64/multiarch/strcpy-ssse3.S
+++ b/sysdeps/x86_64/multiarch/strcpy-ssse3.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 # ifndef USE_AS_STRCAT
 #  include <sysdep.h>
diff --git a/sysdeps/x86_64/multiarch/strcpy.S b/sysdeps/x86_64/multiarch/strcpy.S
index 80ed98b..0467b21 100644
--- a/sysdeps/x86_64/multiarch/strcpy.S
+++ b/sysdeps/x86_64/multiarch/strcpy.S
@@ -57,7 +57,7 @@
 
 
 /* Define multiple versions only for the definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(STRCPY)
 	.type	STRCPY, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/strcspn.S b/sysdeps/x86_64/multiarch/strcspn.S
index 24f55e9..1250dc8 100644
--- a/sysdeps/x86_64/multiarch/strcspn.S
+++ b/sysdeps/x86_64/multiarch/strcspn.S
@@ -41,7 +41,7 @@
 /* Define multiple versions only for the definition in libc.  Don't
    define multiple versions for strpbrk in static library since we
    need strpbrk before the initialization happened.  */
-#if (defined SHARED || !defined USE_AS_STRPBRK) && !defined NOT_IN_libc
+#if (defined SHARED || !defined USE_AS_STRPBRK) && IS_IN (libc)
 	.text
 ENTRY(STRCSPN)
 	.type	STRCSPN, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/strspn.S b/sysdeps/x86_64/multiarch/strspn.S
index bf7308e..6630926 100644
--- a/sysdeps/x86_64/multiarch/strspn.S
+++ b/sysdeps/x86_64/multiarch/strspn.S
@@ -26,7 +26,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in libc.  */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(strspn)
 	.type	strspn, @gnu_indirect_function
diff --git a/sysdeps/x86_64/multiarch/wcscpy-c.c b/sysdeps/x86_64/multiarch/wcscpy-c.c
index f27c069..a51a83a 100644
--- a/sysdeps/x86_64/multiarch/wcscpy-c.c
+++ b/sysdeps/x86_64/multiarch/wcscpy-c.c
@@ -1,4 +1,4 @@
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # define wcscpy  __wcscpy_sse2
 #endif
 
diff --git a/sysdeps/x86_64/multiarch/wcscpy-ssse3.S b/sysdeps/x86_64/multiarch/wcscpy-ssse3.S
index c79389e..5b188ac 100644
--- a/sysdeps/x86_64/multiarch/wcscpy-ssse3.S
+++ b/sysdeps/x86_64/multiarch/wcscpy-ssse3.S
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <sysdep.h>
 
 	.section .text.ssse3,"ax",@progbits
diff --git a/sysdeps/x86_64/multiarch/wcscpy.S b/sysdeps/x86_64/multiarch/wcscpy.S
index f12ba27..43ffe6d 100644
--- a/sysdeps/x86_64/multiarch/wcscpy.S
+++ b/sysdeps/x86_64/multiarch/wcscpy.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in libc. */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 
 	.text
 ENTRY(wcscpy)
diff --git a/sysdeps/x86_64/multiarch/wmemcmp-c.c b/sysdeps/x86_64/multiarch/wmemcmp-c.c
index 1074238..46b6715 100644
--- a/sysdeps/x86_64/multiarch/wmemcmp-c.c
+++ b/sysdeps/x86_64/multiarch/wmemcmp-c.c
@@ -1,4 +1,4 @@
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 # include <wchar.h>
 
 # define WMEMCMP  __wmemcmp_sse2
diff --git a/sysdeps/x86_64/multiarch/wmemcmp.S b/sysdeps/x86_64/multiarch/wmemcmp.S
index 37b9bba..c5b211d 100644
--- a/sysdeps/x86_64/multiarch/wmemcmp.S
+++ b/sysdeps/x86_64/multiarch/wmemcmp.S
@@ -22,7 +22,7 @@
 #include <init-arch.h>
 
 /* Define multiple versions only for the definition in libc. */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
 	.text
 ENTRY(wmemcmp)
 	.type	wmemcmp, @gnu_indirect_function
diff --git a/sysdeps/x86_64/strcmp.S b/sysdeps/x86_64/strcmp.S
index fc45a62..b022a04 100644
--- a/sysdeps/x86_64/strcmp.S
+++ b/sysdeps/x86_64/strcmp.S
@@ -32,7 +32,7 @@
 /* The simplified code below is not set up to handle strncmp() so far.
    Should this become necessary it has to be implemented.  For now
    just report the problem.  */
-# ifdef NOT_IN_libc
+# if !IS_IN (libc)
 #  error "strncmp not implemented so far"
 # endif
 
@@ -51,7 +51,7 @@
 # include "locale-defines.h"
 
 /* No support for strcasecmp outside libc so far since it is not needed.  */
-# ifdef NOT_IN_libc
+# if !IS_IN (libc)
 #  error "strcasecmp_l not implemented so far"
 # endif
 
@@ -60,7 +60,7 @@
 # include "locale-defines.h"
 
 /* No support for strncasecmp outside libc so far since it is not needed.  */
-# ifdef NOT_IN_libc
+# if !IS_IN (libc)
 #  error "strncasecmp_l not implemented so far"
 # endif
 
@@ -126,7 +126,7 @@ libc_hidden_def (__strncasecmp)
 #endif
 
 ENTRY (STRCMP)
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
 /* Simple version since we can't use SSE registers in ld.so.  */
 L(oop):	movb	(%rdi), %al
 	cmpb	(%rsi), %al
@@ -144,7 +144,7 @@ L(neq):	movl	$1, %eax
 	cmovbl	%ecx, %eax
 	ret
 END (STRCMP)
-#else	/* NOT_IN_libc */
+#else	/* !IS_IN (libc) */
 # ifdef USE_AS_STRCASECMP_L
 	/* We have to fall back on the C implementation for locales
 	   with encodings not matching ASCII for single bytes.  */
@@ -2300,5 +2300,5 @@ LABEL(unaligned_table):
 	.int	LABEL(ashr_14) - LABEL(unaligned_table)
 	.int	LABEL(ashr_15) - LABEL(unaligned_table)
 	.int	LABEL(ashr_0) - LABEL(unaligned_table)
-#endif /* NOT_IN_libc */
+#endif /* !IS_IN (libc) */
 libc_hidden_builtin_def (STRCMP)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a86144a98347fb587ee58bec44416dca10281b82

commit a86144a98347fb587ee58bec44416dca10281b82
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 15:06:39 2014 +0530

    Remove last place for definition of IS_IN_* macros
    
    Ignoring IS_IN_build, which has a different purpose altogether, this
    patch removes the last bit of IS_IN_* macro definitions.  Now barring
    NOT_IN_libc, all cases use the IN_MODULE scheme.
    
    Generated code unchanged on x86_64.
    
    	* extra-lib.mk (CPPFLAGS-$(lib)): Remove IS_IN_$(lib).

diff --git a/extra-lib.mk b/extra-lib.mk
index c719bd9..7cdf823 100644
--- a/extra-lib.mk
+++ b/extra-lib.mk
@@ -106,4 +106,4 @@ ifneq (,$(cpp-srcs-left))
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 endif
 
-CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
+CPPFLAGS-$(lib) := -DNOT_IN_libc=1

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=57aeb59e8dc9c44cb544084d820db8bfceb8a6f5

commit 57aeb59e8dc9c44cb544084d820db8bfceb8a6f5
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 15:04:02 2014 +0530

    Remove IS_IN_rtld
    
    Replace with IS_IN (rtld).  Generated code is unchanged on
    x86_64.
    
            * elf/Makefile (CPPFLAGS-.os): Remove IS_IN_rtld.
            * elf/dl-open.c: Use IS_IN (rtld) instead if IS_IN_rtld.
            * elf/rtld-Rules: Likewise.
            * elf/setup-vdso.h: Likewise.
            * include/assert.h: Likewise.
            * include/bits/stdlib-float.h: Likewise.
            * include/errno.h: Likewise.
            * include/sys/stat.h: Likewise.
            * include/unistd.h: Likewise.
            * sysdeps/aarch64/setjmp.S: Likewise.
            * sysdeps/alpha/setjmp.S: Likewise.
            * sysdeps/arm/__longjmp.S: Likewise.
            * sysdeps/arm/aeabi_unwind_cpp_pr1.c: Likewise.
            * sysdeps/arm/setjmp.S: Likewise.
            * sysdeps/arm/sysdep.h: Likewise.
            * sysdeps/generic/_itoa.h: Likewise.
            * sysdeps/generic/dl-sysdep.h: Likewise.
            * sysdeps/generic/ldsodefs.h: Likewise.
            * sysdeps/i386/dl-tls.h: Likewise.
            * sysdeps/i386/setjmp.S: Likewise.
            * sysdeps/m68k/setjmp.c: Likewise.
            * sysdeps/mach/hurd/dl-execstack.c: Likewise.
            * sysdeps/mach/hurd/opendir.c: Likewise.
            * sysdeps/posix/getcwd.c: Likewise.
            * sysdeps/posix/opendir.c: Likewise.
            * sysdeps/posix/profil.c: Likewise.
            * sysdeps/powerpc/dl-procinfo.h: Likewise.
            * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise.
            * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise.
            * sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h: Likewise.
            * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise.
            * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise.
            * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise.
            * sysdeps/s390/dl-tls.h: Likewise.
            * sysdeps/s390/s390-32/setjmp.S: Likewise.
            * sysdeps/s390/s390-64/setjmp.S: Likewise.
            * sysdeps/sh/sh3/setjmp.S: Likewise.
            * sysdeps/sh/sh4/setjmp.S: Likewise.
            * sysdeps/unix/alpha/sysdep.h: Likewise.
            * sysdeps/unix/arm/sysdep.S: Likewise.
            * sysdeps/unix/i386/sysdep.S: Likewise.
            * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/getcwd.c: Likewise.
            * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise.
            * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise.
            * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Likewise.
            * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Likewise.
            * sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/tile/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
            * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
            * sysdeps/unix/x86_64/sysdep.S: Likewise.
            * sysdeps/x86_64/setjmp.S: Likewise.

diff --git a/elf/Makefile b/elf/Makefile
index 718a052..3286aa8 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -444,7 +444,7 @@ CFLAGS-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-rtld.c = $(SYSCONF-FLAGS)
 
 CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-		     -DNOT_IN_libc=1 -DIS_IN_rtld=1)
+		     -DNOT_IN_libc=1)
 
 cpp-srcs-left := $(all-rtld-routines:=.os)
 lib := rtld
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 7cc4cc1..dec3d32 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -737,7 +737,7 @@ _dl_show_scope (struct link_map *l, int from)
   _dl_debug_printf ("\n");
 }
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* Return non-zero if ADDR lies within one of L's segments.  */
 int
 internal_function
diff --git a/elf/rtld-Rules b/elf/rtld-Rules
index d106048..4e7c9ef 100644
--- a/elf/rtld-Rules
+++ b/elf/rtld-Rules
@@ -144,6 +144,6 @@ lib := rtld
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
 # This here is the whole point of all the shenanigans.
-rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
+rtld-CPPFLAGS := -DNOT_IN_libc=1
 
 endif
diff --git a/elf/setup-vdso.h b/elf/setup-vdso.h
index 1057cf0..a6dcc4e 100644
--- a/elf/setup-vdso.h
+++ b/elf/setup-vdso.h
@@ -99,7 +99,7 @@ setup_vdso (struct link_map *main_map __attribute__ ((unused)),
       /* Add the vDSO to the object list.  */
       _dl_add_to_namespace_list (l, LM_ID_BASE);
 
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
       /* Rearrange the list so this DSO appears after rtld_map.  */
       assert (l->l_next == NULL);
       assert (l->l_prev == main_map);
diff --git a/include/assert.h b/include/assert.h
index d0d9259..abe182f 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -20,7 +20,7 @@ extern void __assert_fail_base (const char *fmt, const char *assertion,
 				const char *function)
      __THROW  __attribute__ ((__noreturn__));
 
-# if !defined NOT_IN_libc || defined IS_IN_rtld
+# if !defined NOT_IN_libc || IS_IN (rtld)
 hidden_proto (__assert_fail)
 hidden_proto (__assert_perror_fail)
 # endif
diff --git a/include/bits/stdlib-float.h b/include/bits/stdlib-float.h
index d3f5c5b..3466314 100644
--- a/include/bits/stdlib-float.h
+++ b/include/bits/stdlib-float.h
@@ -1,4 +1,4 @@
 /* No floating-point inline functions in rtld.  */
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
 # include <stdlib/bits/stdlib-float.h>
 #endif
diff --git a/include/errno.h b/include/errno.h
index 8e60288..d650a15 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -4,7 +4,7 @@
 
 #if defined _ERRNO_H && !defined _ISOMAC && !defined __cplusplus
 
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 #  include <dl-sysdep.h>
 #  ifndef RTLD_PRIVATE_ERRNO
 #   error "dl-sysdep.h must define RTLD_PRIVATE_ERRNO!"
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 7a65d60..a44fbec 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -12,7 +12,7 @@ extern __mode_t __umask (__mode_t __mask);
 extern int __mkdir (const char *__path, __mode_t __mode);
 extern int __mknod (const char *__path,
 		    __mode_t __mode, __dev_t __dev);
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 hidden_proto (__fxstat)
 hidden_proto (__fxstat64)
 hidden_proto (__lxstat)
diff --git a/sysdeps/aarch64/setjmp.S b/sysdeps/aarch64/setjmp.S
index d548dd5..8251868 100644
--- a/sysdeps/aarch64/setjmp.S
+++ b/sysdeps/aarch64/setjmp.S
@@ -63,7 +63,7 @@ ENTRY (__sigsetjmp)
 	mov	x2,  sp
 	str	x2,  [x0, #JB_SP<<3]
 #endif
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	/* In ld.so we never save the signal mask */
 	mov	w0, #0
 	RET
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 840b560..dfa147b 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -86,7 +86,7 @@ $sigsetjmp_local:
 	ldq	ra, 0(sp)
 	addq	sp, 16, sp
 	ret
-#elif defined IS_IN_rtld
+#elif IS_IN (rtld)
 	/* In ld.so we never save the signal mask.  */
 	mov	0, v0
 	ret
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index a983957..6124631 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -76,7 +76,7 @@ ENTRY (__longjmp)
 #endif
 
 #ifdef NEED_HWCAP
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 	LDST_PCREL (ldr, a4, a3, \
 		    C_SYMBOL_NAME(_rtld_local_ro) \
 		    + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET)
diff --git a/sysdeps/arm/aeabi_unwind_cpp_pr1.c b/sysdeps/arm/aeabi_unwind_cpp_pr1.c
index f650613..fa7e960 100644
--- a/sysdeps/arm/aeabi_unwind_cpp_pr1.c
+++ b/sysdeps/arm/aeabi_unwind_cpp_pr1.c
@@ -27,7 +27,7 @@ attribute_hidden
 void
 __aeabi_unwind_cpp_pr0 (void)
 {
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
   abort ();
 #endif
 }
@@ -36,7 +36,7 @@ attribute_hidden
 void
 __aeabi_unwind_cpp_pr1 (void)
 {
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
   abort ();
 #endif
 }
@@ -45,7 +45,7 @@ attribute_hidden
 void
 __aeabi_unwind_cpp_pr2 (void)
 {
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
   abort ();
 #endif
 }
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 6f54ab3..4dfbf8e 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -57,7 +57,7 @@ ENTRY (__sigsetjmp)
 
 #ifdef NEED_HWCAP
 	/* Check if we have a VFP unit.  */
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 	LDST_PCREL (ldr, a3, a4, \
 		    C_SYMBOL_NAME(_rtld_local_ro) \
 		    + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET)
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index b29fe10..ef37ae1 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -358,7 +358,7 @@
 #endif
 
 /* Pointer mangling support.  */
-#if (defined IS_IN_rtld || \
+#if (IS_IN (rtld) || \
      (!defined SHARED && (!defined NOT_IN_libc || IS_IN (libpthread))))
 # ifdef __ASSEMBLER__
 #  define PTR_MANGLE_LOAD(guard, tmp)					\
diff --git a/sysdeps/generic/_itoa.h b/sysdeps/generic/_itoa.h
index 98e91cc..8360baf 100644
--- a/sysdeps/generic/_itoa.h
+++ b/sysdeps/generic/_itoa.h
@@ -46,7 +46,7 @@ extern char *_itoa (unsigned long long int value, char *buflim,
 
 extern const char _itoa_upper_digits[];
 extern const char _itoa_lower_digits[];
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 hidden_proto (_itoa_upper_digits)
 hidden_proto (_itoa_lower_digits)
 #endif
diff --git a/sysdeps/generic/dl-sysdep.h b/sysdeps/generic/dl-sysdep.h
index ae0e4be..1d76aa6 100644
--- a/sysdeps/generic/dl-sysdep.h
+++ b/sysdeps/generic/dl-sysdep.h
@@ -27,7 +27,7 @@
    all the libc functions that ld.so uses are called without PLT and always
    get the versions linked into ld.so rather than the libc ones.  */
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # define RTLD_PRIVATE_ERRNO 1
 #else
 # define RTLD_PRIVATE_ERRNO 0
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index f339ee3..668c233 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -250,7 +250,7 @@ typedef void (*receiver_fct) (int, const char *, const char *);
 # define GL(name) _##name
 #else
 # define EXTERN
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 #  define GL(name) _rtld_local._##name
 # else
 #  define GL(name) _rtld_global._##name
@@ -409,7 +409,7 @@ struct rtld_global
 #ifdef SHARED
 };
 # define __rtld_global_attribute__
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 #  ifdef HAVE_SDATA_SECTION
 #   define __rtld_local_attribute__ \
 	    __attribute__ ((visibility ("hidden"), section (".sdata")))
@@ -428,7 +428,7 @@ extern struct rtld_global _rtld_global __rtld_global_attribute__;
 #ifndef SHARED
 # define GLRO(name) _##name
 #else
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 #  define GLRO(name) _rtld_local_ro._##name
 # else
 #  define GLRO(name) _rtld_global_ro._##name
@@ -587,7 +587,7 @@ struct rtld_global_ro
   EXTERN int _dl_pointer_guard;
 };
 # define __rtld_global_attribute__
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 #  define __rtld_local_attribute__ __attribute__ ((visibility ("hidden")))
 extern struct rtld_global_ro _rtld_local_ro
     attribute_relro __rtld_local_attribute__;
@@ -610,7 +610,7 @@ extern const ElfW(Phdr) *_dl_phdr;
 extern size_t _dl_phnum;
 #endif
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* This is the initial value of GL(dl_error_catch_tsd).
    A non-TLS libpthread will change it.  */
 extern void **_dl_initial_error_catch_tsd (void) __attribute__ ((const))
@@ -642,7 +642,7 @@ extern char **_dl_argv
 #endif
      ;
 rtld_hidden_proto (_dl_argv)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 extern unsigned int _dl_skip_args attribute_hidden
 # ifndef DL_ARGV_NOT_RELRO
      attribute_relro
@@ -659,7 +659,7 @@ extern unsigned int _dl_skip_args_internal attribute_hidden
 /* Flag set at startup and cleared when the last initializer has run.  */
 extern int _dl_starting_up;
 weak_extern (_dl_starting_up)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 extern int _dl_starting_up_internal attribute_hidden;
 #endif
 
diff --git a/sysdeps/i386/dl-tls.h b/sysdeps/i386/dl-tls.h
index 7361372..48809a5 100644
--- a/sysdeps/i386/dl-tls.h
+++ b/sysdeps/i386/dl-tls.h
@@ -32,7 +32,7 @@ extern void *___tls_get_addr (tls_index *ti)
 extern void *___tls_get_addr_internal (tls_index *ti)
      __attribute__ ((__regparm__ (1))) attribute_hidden;
 
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 /* The special thing about the x86 TLS ABI is that we have two
    variants of the __tls_get_addr function with different calling
    conventions.  The GNU version, which we are mostly concerned here,
diff --git a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S
index 7204ce0..ad4d724 100644
--- a/sysdeps/i386/setjmp.S
+++ b/sysdeps/i386/setjmp.S
@@ -46,7 +46,7 @@ ENTRY (__sigsetjmp)
 	movl %ecx, (JB_PC*4)(%eax)
 	movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer.  */
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	/* In ld.so we never save the signal mask.  */
 	xorl %eax, %eax
 	ret
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 4ba50a1..cc4d8bd 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -57,7 +57,7 @@ __sigsetjmp (jmp_buf env, int savemask)
 		: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
 #endif
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
   /* In ld.so we never save the signal mask.  */
   return 0;
 #else
diff --git a/sysdeps/mach/hurd/dl-execstack.c b/sysdeps/mach/hurd/dl-execstack.c
index 9069efb..c67b534 100644
--- a/sysdeps/mach/hurd/dl-execstack.c
+++ b/sysdeps/mach/hurd/dl-execstack.c
@@ -34,7 +34,7 @@ _dl_make_stack_executable (void **stack_endp)
     return EPERM;
   *stack_endp = NULL;
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
   if (__mprotect ((void *)_dl_hurd_data->stack_base, _dl_hurd_data->stack_size,
 		  PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
     return errno;
diff --git a/sysdeps/mach/hurd/opendir.c b/sysdeps/mach/hurd/opendir.c
index 570f085..a2c73bc 100644
--- a/sysdeps/mach/hurd/opendir.c
+++ b/sysdeps/mach/hurd/opendir.c
@@ -82,7 +82,7 @@ __opendirat (int dfd, const char *name)
 
   int flags = O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC;
   int fd;
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
   assert (dfd == AT_FDCWD);
   fd = open_not_cancel_2 (name, flags);
 #else
diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c
index 6201916..e1f09cf 100644
--- a/sysdeps/posix/getcwd.c
+++ b/sysdeps/posix/getcwd.c
@@ -206,7 +206,7 @@ extern char *alloca ();
 
 #ifdef __ASSUME_ATFCTS
 # define __have_atfcts 1
-#elif defined IS_IN_rtld
+#elif IS_IN (rtld)
 static int __rtld_have_atfcts;
 # define __have_atfcts __rtld_have_atfcts
 #endif
diff --git a/sysdeps/posix/opendir.c b/sysdeps/posix/opendir.c
index 2740b3a..be234bd 100644
--- a/sysdeps/posix/opendir.c
+++ b/sysdeps/posix/opendir.c
@@ -122,7 +122,7 @@ __opendirat (int dfd, const char *name)
   flags |= O_CLOEXEC;
 #endif
   int fd;
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
   assert (dfd == AT_FDCWD);
   fd = open_not_cancel_2 (name, flags);
 #else
diff --git a/sysdeps/posix/profil.c b/sysdeps/posix/profil.c
index 696c7a6..54ace22 100644
--- a/sysdeps/posix/profil.c
+++ b/sysdeps/posix/profil.c
@@ -64,7 +64,7 @@ __profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
 {
   struct sigaction act;
   struct itimerval timer;
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
   static struct sigaction oact;
   static struct itimerval otimer;
 # define oact_ptr &oact
diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h
index 0333831..5f8d9ab 100644
--- a/sysdeps/powerpc/dl-procinfo.h
+++ b/sysdeps/powerpc/dl-procinfo.h
@@ -166,7 +166,7 @@ _dl_string_platform (const char *str)
   return -1;
 }
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 static inline int
 __attribute__ ((unused))
 _dl_procinfo (unsigned int type, unsigned long int word)
diff --git a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
index 088e389..d8e4682 100644
--- a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
+++ b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
@@ -35,7 +35,7 @@ ENTRY (__longjmp_symbol)
 	addis	r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@ha
 	addi	r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@l
 #  ifdef SHARED
-#   ifdef IS_IN_rtld
+#   if IS_IN (rtld)
 	/* Inside ld.so we use the local alias to avoid runtime GOT
 	   relocations.  */
 	lwz     r5,_rtld_local_ro@got(r5)
diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
index 926a1b1..720da09 100644
--- a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
+++ b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
@@ -91,7 +91,7 @@ ENTRY (__sigsetjmp_symbol)
 	mtlr	r6
 	cfi_same_value (lr)
 #  ifdef SHARED
-#   ifdef IS_IN_rtld
+#   if IS_IN (rtld)
 	/* Inside ld.so we use the local alias to avoid runtime GOT
 	   relocations.  */
 	lwz     r5,_rtld_local_ro@got(r5)
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
index 72d720d..ca479d8 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
@@ -21,7 +21,7 @@
    the dl_hwcap field. The assembly is to make the compiler not optimize the
    test (&_rtld_global_ro != NULL), which is always true in ISO C (but not
    in that case since _rtld_global_ro might not been realocated yet).  */
-#if defined(SHARED) && !defined(IS_IN_rtld)
+#if defined(SHARED) && !IS_IN (rtld)
 # define __GLRO(value) \
   ({ volatile void **__p = (volatile void**)(&_rtld_global_ro);	\
     unsigned long int __ret;					\
diff --git a/sysdeps/powerpc/powerpc32/setjmp-common.S b/sysdeps/powerpc/powerpc32/setjmp-common.S
index 681b540..50ff436 100644
--- a/sysdeps/powerpc/powerpc32/setjmp-common.S
+++ b/sysdeps/powerpc/powerpc32/setjmp-common.S
@@ -69,7 +69,7 @@ ENTRY (__sigsetjmp_symbol)
 	SAVE_GP (29)
 	SAVE_GP (30)
 	SAVE_GP (31)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	li   r3,0
 	blr
 #else
diff --git a/sysdeps/powerpc/powerpc64/__longjmp-common.S b/sysdeps/powerpc/powerpc64/__longjmp-common.S
index 9452a3c..e489224 100644
--- a/sysdeps/powerpc/powerpc64/__longjmp-common.S
+++ b/sysdeps/powerpc/powerpc64/__longjmp-common.S
@@ -30,7 +30,7 @@
 	.section	".toc","aw"
 .LC__dl_hwcap:
 # ifdef SHARED
-#  ifdef IS_IN_rtld
+#  if IS_IN (rtld)
 	/* Inside ld.so we use the local alias to avoid runtime GOT
 	   relocations.  */
 	.tc _rtld_local_ro[TC],_rtld_local_ro
@@ -130,7 +130,7 @@ L(no_vmx):
 	ld r0,(JB_LR*8)(r3)
 	ld r14,((JB_GPRS+0)*8)(r3)
 	lfd fp14,((JB_FPRS+0)*8)(r3)
-#if defined SHARED && !defined IS_IN_rtld
+#if defined SHARED && !IS_IN (rtld)
 	std r2,FRAME_TOC_SAVE(r1)	/* Restore the callers TOC save area.  */
 #endif
 	ld r15,((JB_GPRS+1)*8)(r3)
diff --git a/sysdeps/powerpc/powerpc64/setjmp-common.S b/sysdeps/powerpc/powerpc64/setjmp-common.S
index 704ee97..5979cde 100644
--- a/sysdeps/powerpc/powerpc64/setjmp-common.S
+++ b/sysdeps/powerpc/powerpc64/setjmp-common.S
@@ -29,7 +29,7 @@
 	.section	".toc","aw"
 .LC__dl_hwcap:
 # ifdef SHARED
-#  ifdef IS_IN_rtld
+#  if IS_IN (rtld)
 	/* Inside ld.so we use the local alias to avoid runtime GOT
 	   relocations.  */
 	.tc _rtld_local_ro[TC],_rtld_local_ro
@@ -49,7 +49,7 @@ ENTRY (setjmp_symbol)
 	b JUMPTARGET (GLUE(__sigsetjmp_symbol,_ent))
 END (setjmp_symbol)
 
-#if defined SHARED && !defined IS_IN_rtld && !defined __NO_VMX__
+#if defined SHARED && !IS_IN (rtld) && !defined __NO_VMX__
 /* When called from within libc we need a special version of _setjmp
    that saves r2 since the call won't go via a plt call stub.  See
    bugz #269.  __GI__setjmp is used in csu/libc-start.c when
@@ -80,7 +80,7 @@ JUMPTARGET(GLUE(__sigsetjmp_symbol,_ent)):
 	std  r1,(JB_GPR1*8)(3)
 #endif
 	mflr r0
-#if defined SHARED && !defined IS_IN_rtld
+#if defined SHARED && !IS_IN (rtld)
 	ld   r5,FRAME_TOC_SAVE(r1)	/* Retrieve the callers TOC.  */
 	std  r5,(JB_GPR2*8)(3)
 #else
@@ -213,7 +213,7 @@ L(no_vmx):
 #else
 	li	r6,0
 #endif
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	li	r3,0
 	blr
 #elif defined SHARED
diff --git a/sysdeps/s390/dl-tls.h b/sysdeps/s390/dl-tls.h
index 4801bf8..0ceb6f2 100644
--- a/sysdeps/s390/dl-tls.h
+++ b/sysdeps/s390/dl-tls.h
@@ -29,7 +29,7 @@ typedef struct
 
 extern unsigned long __tls_get_offset (unsigned long got_offset);
 
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 
 #  include <shlib-compat.h>
 
@@ -78,9 +78,9 @@ __tls_get_offset:\n\
 1:	.long	__tls_get_addr - 0b\n\
 ");
 #  endif
-# else /* IS_IN_rtld */
+# else /* IS_IN (rtld) */
 extern void *__tls_get_addr_internal (tls_index *ti);
-# endif /* !IS_IN_rtld */
+# endif /* !IS_IN (rtld) */
 
 # define GET_ADDR_OFFSET \
   (ti->ti_offset - (unsigned long) __builtin_thread_pointer ())
diff --git a/sysdeps/s390/s390-32/setjmp.S b/sysdeps/s390/s390-32/setjmp.S
index 3ebc813..ea59cf9 100644
--- a/sysdeps/s390/s390-32/setjmp.S
+++ b/sysdeps/s390/s390-32/setjmp.S
@@ -23,12 +23,12 @@
 #include <bits/setjmp.h>
 #include <shlib-compat.h>
 
-#if !defined IS_IN_rtld
+#if !IS_IN (rtld)
 # if defined SHARED &&  SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
 	/* we need a unique name in case of symbol versioning.  */
 #  define __sigsetjmp __v1__sigsetjmp
 # endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)  */
-#endif /* !defined IS_IN_rtld  */
+#endif /* !IS_IN (rtld)  */
 
 	/* We include the BSD entry points here as well but we make
 	   them weak.  */
@@ -65,7 +65,7 @@ ENTRY(__sigsetjmp)
 #endif
 	std    %f4,40(%r2)
 	std    %f6,48(%r2)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	/* In ld.so we never save the signal mask.  */
 	lhi    %r2,0
 	br     %r14
@@ -87,7 +87,7 @@ ENTRY(__sigsetjmp)
 #endif
 END (__sigsetjmp)
 
-#if !defined IS_IN_rtld
+#if !IS_IN (rtld)
 # if defined SHARED &&  SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
 /* In glibc release 2.19 new versions of setjmp-functions were introduced,
    but were reverted before 2.20. Thus both versions are the same function.  */
@@ -108,4 +108,4 @@ strong_alias (__v1__sigsetjmp, __v2__sigsetjmp);
 versioned_symbol (libc, __v1__sigsetjmp, __sigsetjmp, GLIBC_2_0);
 compat_symbol (libc, __v2__sigsetjmp, __sigsetjmp, GLIBC_2_19);
 # endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)  */
-#endif /* if !defined IS_IN_rtld  */
+#endif /* if !IS_IN (rtld)  */
diff --git a/sysdeps/s390/s390-64/setjmp.S b/sysdeps/s390/s390-64/setjmp.S
index faa2784..e3762e0 100644
--- a/sysdeps/s390/s390-64/setjmp.S
+++ b/sysdeps/s390/s390-64/setjmp.S
@@ -23,12 +23,12 @@
 #include <bits/setjmp.h>
 #include <shlib-compat.h>
 
-#if !defined IS_IN_rtld
+#if !IS_IN (rtld)
 # if defined SHARED &&  SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
 	/* we need a unique name in case of symbol versioning.  */
 #  define __sigsetjmp __v1__sigsetjmp
 # endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)  */
-#endif /* !defined IS_IN_rtld  */
+#endif /* !IS_IN (rtld)  */
 
 	/* We include the BSD entry points here as well but we make
 	   them weak.  */
@@ -71,7 +71,7 @@ ENTRY(__sigsetjmp)
 	std    %f13,120(%r2)
 	std    %f14,128(%r2)
 	std    %f15,136(%r2)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	/* In ld.so we never save the signal mask.  */
 	lghi   %r2,0
 	br     %r14
@@ -82,7 +82,7 @@ ENTRY(__sigsetjmp)
 #endif
 END (__sigsetjmp)
 
-#if !defined IS_IN_rtld
+#if !IS_IN (rtld)
 # if defined SHARED &&  SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
 /* In glibc release 2.19 new versions of setjmp-functions were introduced,
    but were reverted before 2.20. Thus both versions are the same function.  */
@@ -103,4 +103,4 @@ strong_alias (__v1__sigsetjmp, __v2__sigsetjmp);
 versioned_symbol (libc, __v1__sigsetjmp, __sigsetjmp, GLIBC_2_0);
 compat_symbol (libc, __v2__sigsetjmp, __sigsetjmp, GLIBC_2_19);
 # endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)  */
-#endif /* if !defined IS_IN_rtld  */
+#endif /* if !IS_IN (rtld)  */
diff --git a/sysdeps/sh/sh3/setjmp.S b/sysdeps/sh/sh3/setjmp.S
index f3a8e6a..1bc76a5 100644
--- a/sysdeps/sh/sh3/setjmp.S
+++ b/sysdeps/sh/sh3/setjmp.S
@@ -46,7 +46,7 @@ ENTRY (__sigsetjmp)
 	mov.l	r9, @-r4
 	mov.l	r8, @-r4
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	/* In ld.so we never save the signal mask.  */
 	rts
 	 mov	#0, r0
diff --git a/sysdeps/sh/sh4/setjmp.S b/sysdeps/sh/sh4/setjmp.S
index 4bbd666..91b8441 100644
--- a/sysdeps/sh/sh4/setjmp.S
+++ b/sysdeps/sh/sh4/setjmp.S
@@ -55,7 +55,7 @@ ENTRY (__sigsetjmp)
 	mov.l	r9, @-r4
 	mov.l	r8, @-r4
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	/* In ld.so we never save the signal mask.  */
 	rts
 	 mov	#0, r0
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 68b06e1..0b5ff20 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -26,7 +26,7 @@
 # include <regdef.h>
 #endif
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # include <dl-sysdep.h>         /* Defines RTLD_PRIVATE_ERRNO.  */
 #endif
 
@@ -349,7 +349,7 @@ __LABEL(name)						\
    we don't deoptimize things by placing the pointer check value there.  */
 
 #ifdef __ASSEMBLER__
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 #  define PTR_MANGLE(dst, src, tmp)				\
 	ldah	tmp, __pointer_chk_guard_local($29) !gprelhigh;	\
 	ldq	tmp, __pointer_chk_guard_local(tmp) !gprellow;	\
@@ -371,7 +371,7 @@ __LABEL(name)						\
 # define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
 #else
 # include <stdint.h>
-# if (defined IS_IN_rtld \
+# if (IS_IN (rtld) \
       || (!defined SHARED && (!defined NOT_IN_libc \
 			      || IS_IN (libpthread))))
 extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
index 1a0f093..5566528 100644
--- a/sysdeps/unix/arm/sysdep.S
+++ b/sysdeps/unix/arm/sysdep.S
@@ -19,7 +19,7 @@
 #define _ERRNO_H
 #include <bits/errno.h>
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # include <dl-sysdep.h>			/* Defines RTLD_PRIVATE_ERRNO.  */
 #endif
 
@@ -36,7 +36,7 @@ __syscall_error:
 	moveq	r0, $EAGAIN	/* Yes; translate it to EAGAIN.  */
 #endif
 
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
 	mov	r1, r0
 	GET_TLS (r2)
 	ldr	r2, 1f
diff --git a/sysdeps/unix/i386/sysdep.S b/sysdeps/unix/i386/sysdep.S
index bfe0d00..06af337 100644
--- a/sysdeps/unix/i386/sysdep.S
+++ b/sysdeps/unix/i386/sysdep.S
@@ -19,7 +19,7 @@
 #define _ERRNO_H
 #include <bits/errno.h>
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # include <dl-sysdep.h>		/* Defines RTLD_PRIVATE_ERRNO.  */
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index 84bec80..3fb6742 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -309,7 +309,7 @@
 #endif	/* __ASSEMBLER__ */
 
 /* Pointer mangling is supported for AArch64.  */
-#if (defined IS_IN_rtld || \
+#if (IS_IN (rtld) || \
      (!defined SHARED && (!defined NOT_IN_libc \
 			  || IS_IN (libpthread))))
 # ifdef __ASSEMBLER__
diff --git a/sysdeps/unix/sysv/linux/getcwd.c b/sysdeps/unix/sysv/linux/getcwd.c
index a9abcef..ca0f271 100644
--- a/sysdeps/unix/sysv/linux/getcwd.c
+++ b/sysdeps/unix/sysv/linux/getcwd.c
@@ -30,7 +30,7 @@
 
 /* If we compile the file for use in ld.so we don't need the feature
    that getcwd() allocates the buffers itself.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # define NO_ALLOCATION	1
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/hppa/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/lowlevellock.h
index fb61d0c..9a60492 100644
--- a/sysdeps/unix/sysv/linux/hppa/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/lowlevellock.h
@@ -58,7 +58,7 @@
 /* Initialize locks to zero.  */
 #define LLL_MUTEX_LOCK_INITIALIZER (0)
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/sysdeps/unix/sysv/linux/i386/lowlevellock.h
index 9d9ae58..ffae477 100644
--- a/sysdeps/unix/sysv/linux/i386/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/i386/lowlevellock.h
@@ -71,7 +71,7 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index 0282761..b538004 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -519,7 +519,7 @@ asm (".L__X'%ebx = 1\n\t"
 
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  Using a global variable
    is too complicated here since we have no PC-relative addressing mode.  */
diff --git a/sysdeps/unix/sysv/linux/ia64/lowlevellock.h b/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
index e84f530..fe4a90e 100644
--- a/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
@@ -52,7 +52,7 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/ia64/setjmp.S b/sysdeps/unix/sysv/linux/ia64/setjmp.S
index f919a49..42d9453 100644
--- a/sysdeps/unix/sysv/linux/ia64/setjmp.S
+++ b/sysdeps/unix/sysv/linux/ia64/setjmp.S
@@ -178,7 +178,7 @@ ENTRY(__sigsetjmp)
 	;;
 	st8.nta [r2]=r25		// ar.unat
 	st8.nta [r3]=in0		// &__jmp_buf
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	/* In ld.so we never save the signal mask.  */
 	;;
 #else
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 47fd577..0943852 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -364,7 +364,7 @@
 #endif /* not __ASSEMBLER__ */
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
diff --git a/sysdeps/unix/sysv/linux/lowlevellock-futex.h b/sysdeps/unix/sysv/linux/lowlevellock-futex.h
index 343afd6..11150b3 100644
--- a/sysdeps/unix/sysv/linux/lowlevellock-futex.h
+++ b/sysdeps/unix/sysv/linux/lowlevellock-futex.h
@@ -49,7 +49,7 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h b/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
index f967524..b75bf17 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
@@ -23,7 +23,7 @@
 
 #ifdef SHARED
 
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 # define M68K_VDSO_SYMBOL(name) __rtld_##name
 # define STR_M68K_VDSO_SYMBOL(name) "__rtld_" #name
 # else
@@ -35,7 +35,7 @@
 
 /* We define __rtld_* copies for rtld.
    We need them visible in libc to initialize.  */
-#  if defined IS_IN_rtld || !defined NOT_IN_libc
+#  if IS_IN (rtld) || !defined NOT_IN_libc
 extern void *__rtld___vdso_read_tp;
 extern void *__rtld___vdso_atomic_cmpxchg_32;
 extern void *__rtld___vdso_atomic_barrier;
@@ -44,14 +44,14 @@ extern void *__rtld___vdso_atomic_barrier;
 extern void __vdso_read_tp_stub (void);
 extern void __vdso_atomic_cmpxchg_32_stub (void);
 extern void __vdso_atomic_barrier_stub (void);
-#  endif /* IS_IN_rtld || !NOT_IN_libc */
+#  endif /* IS_IN (rtld) || !NOT_IN_libc */
 
 /* RTLD should only use its own copies.  */
-#  ifndef IS_IN_rtld
+#  if !IS_IN (rtld)
 extern void *__vdso_read_tp;
 extern void *__vdso_atomic_cmpxchg_32;
 extern void *__vdso_atomic_barrier;
-#  endif /* !IS_IN_rtld */
+#  endif /* !IS_IN (rtld) */
 
 # endif /* !__ASSEMBLER__ */
 
diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S
index 032b1f2..c220e78 100644
--- a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S
+++ b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S
@@ -51,7 +51,7 @@ END (__vdso_read_tp_stub)
    equivalent helper function (which clobbers fewer registers than
    a normal function call) in a vdso; tail call to the
    helper.  */
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
 /* rtld gets a hidden copy of __m68k_read_tp.  */
 	.hidden __m68k_read_tp
 # endif
diff --git a/sysdeps/unix/sysv/linux/microblaze/lowlevellock.h b/sysdeps/unix/sysv/linux/microblaze/lowlevellock.h
index 0ba63a1..9c21eeb 100644
--- a/sysdeps/unix/sysv/linux/microblaze/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/microblaze/lowlevellock.h
@@ -52,7 +52,7 @@
 #define LLL_SHARED  FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private)                                      \
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
index 1a5e37a..b691759 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
@@ -272,7 +272,7 @@
 
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
index 93e454e..1cca63d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
@@ -282,7 +282,7 @@
 
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
diff --git a/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/sysdeps/unix/sysv/linux/s390/lowlevellock.h
index eaf2d58..2c17b2c 100644
--- a/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/s390/lowlevellock.h
@@ -51,7 +51,7 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index 00919e3..e6fd96a 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
@@ -366,7 +366,7 @@
     _ret; })
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index d3bafca..917a636 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -372,7 +372,7 @@
     _ret; })
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
diff --git a/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/sysdeps/unix/sysv/linux/sh/lowlevellock.h
index 10a2c25..328446c 100644
--- a/sysdeps/unix/sysv/linux/sh/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/sh/lowlevellock.h
@@ -49,7 +49,7 @@
 #define LLL_SHARED     FUTEX_PRIVATE_FLAG
 
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h
index 3f68938..4fc5dd7 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.h
@@ -338,7 +338,7 @@
 #endif	/* __ASSEMBLER__ */
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  Using a global variable
    is too complicated here since we have no PC-relative addressing mode.  */
diff --git a/sysdeps/unix/sysv/linux/sparc/lowlevellock.h b/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
index d764075..eebf406 100644
--- a/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
@@ -57,7 +57,7 @@ extern void __cpu_relax (void);
 #define BUSY_WAIT_NOP	__cpu_relax ()
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
index 09ef2c9..e5bb3b5 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
@@ -21,7 +21,7 @@
 
 #include <sysdeps/unix/sysv/linux/sparc/sysdep.h>
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # include <dl-sysdep.h>		/* Defines RTLD_PRIVATE_ERRNO.  */
 #endif
 #include <tls.h>
@@ -125,7 +125,7 @@ ENTRY(name);					\
 #endif	/* __ASSEMBLER__ */
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
index a0f2305..e9aedce 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
@@ -21,7 +21,7 @@
 
 #include <sysdeps/unix/sysv/linux/sparc/sysdep.h>
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # include <dl-sysdep.h>		/* Defines RTLD_PRIVATE_ERRNO.  */
 #endif
 #include <tls.h>
@@ -140,7 +140,7 @@ ENTRY(name);					\
 #define STACK_BIAS	2047
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.h b/sysdeps/unix/sysv/linux/tile/sysdep.h
index d03a74b..b521351 100644
--- a/sysdeps/unix/sysv/linux/tile/sysdep.h
+++ b/sysdeps/unix/sysv/linux/tile/sysdep.h
@@ -264,7 +264,7 @@
 #endif /* not __ASSEMBLER__ */
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
diff --git a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index 55b4e16..37c0faf 100644
--- a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -72,7 +72,7 @@
 
 #ifndef __ASSEMBLER__
 
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
 /* In libc.so or ld.so all futexes are private.  */
 # ifdef __ASSUME_PRIVATE_FUTEX
 #  define __lll_private_flag(fl, private) \
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 4a619da..6377183 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -22,7 +22,7 @@
 #include <sysdeps/unix/x86_64/sysdep.h>
 #include <tls.h>
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # include <dl-sysdep.h>		/* Defines RTLD_PRIVATE_ERRNO.  */
 #endif
 
@@ -393,7 +393,7 @@
 
 
 /* Pointer mangling support.  */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 # ifdef __ASSEMBLER__
diff --git a/sysdeps/unix/x86_64/sysdep.S b/sysdeps/unix/x86_64/sysdep.S
index 9f5eb38..90ece2a 100644
--- a/sysdeps/unix/x86_64/sysdep.S
+++ b/sysdeps/unix/x86_64/sysdep.S
@@ -20,7 +20,7 @@
 #include <bits/errno.h>
 #include <tls.h>
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # include <dl-sysdep.h>		/* Defines RTLD_PRIVATE_ERRNO.  */
 #endif
 
diff --git a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S
index 4459212..7a4800f 100644
--- a/sysdeps/x86_64/setjmp.S
+++ b/sysdeps/x86_64/setjmp.S
@@ -54,7 +54,7 @@ ENTRY (__sigsetjmp)
 #endif
 	movq %rax, (JB_PC*8)(%rdi)
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 	/* In ld.so we never save the signal mask.  */
 	xorl %eax, %eax
 	retq

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8386acec964fe8ab8835d7b3253244ed239d6881

commit 8386acec964fe8ab8835d7b3253244ed239d6881
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 15:01:20 2014 +0530

    Remove IS_IN_libm
    
    Replace with IS_IN (libm). Generated code unchanged on x86_64.
    
            * include/math.h: Use IS_IN instead of IS_IN_libm.
            * sysdeps/alpha/fpu/s_copysign.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_fmal.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: Likewise.
            * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/s_copysignl.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/s_finitel.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/s_frexpl.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/s_isinfl.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/s_isnanl.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/s_modfl.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/s_scalbnl.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/s_signbitl.c: Likewise.
            * sysdeps/ieee754/ldbl-64-128/w_scalblnl.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_copysign.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_finite.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_frexp.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_isinf.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_isnan.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_ldexp.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_ldexpl.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_modf.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_scalbln.c: Likewise.
            * sysdeps/ieee754/ldbl-opt/s_scalbn.c: Likewise.
            * sysdeps/powerpc/power5+/fpu/s_modf.c: Likewise.
            * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Likewise.
            * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: Likewise.
            * sysdeps/powerpc/powerpc32/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c: Likewise.
            * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c: Likewise.
            * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c: Likewise.
            * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c: Likewise.
            * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c: Likewise.
            * sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S: Likewise.
            * sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S: Likewise.
            * sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S: Likewise.
            * sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c: Likewise.
            * sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c: Likewise.
            * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c: Likewise.
            * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c: Likewise.
            * sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c: Likewise.
            * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise.
            * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: Likewise.
            * sysdeps/powerpc/powerpc64/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise.
            * sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Likewise.
            * sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise.
            * sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S: Likewise.
            * sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S: Likewise.
            * sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S: Likewise.
            * sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S: Likewise.
            * sysdeps/sparc/sparc32/fpu/s_signbitl.S: Likewise.
            * sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S: Likewise.
            * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S: Likewise.

diff --git a/include/math.h b/include/math.h
index cbbce59..b10bfa0 100644
--- a/include/math.h
+++ b/include/math.h
@@ -6,7 +6,7 @@
 /* Now define the internal interfaces.  */
 extern int __matherr (struct exception *__exc);
 
-# if !defined NOT_IN_libc || defined IS_IN_libm
+# if !defined NOT_IN_libc || IS_IN (libm)
 hidden_proto (__finite)
 hidden_proto (__isinf)
 hidden_proto (__isnan)
diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c
index 13f5f1b..9092613 100644
--- a/sysdeps/alpha/fpu/s_copysign.c
+++ b/sysdeps/alpha/fpu/s_copysign.c
@@ -30,7 +30,7 @@ weak_alias (__copysign, copysign)
 strong_alias (__copysign, __copysignl)
 weak_alias (__copysign, copysignl)
 #endif
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c b/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c
index a16a886..3b8ec1a 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c
@@ -34,7 +34,7 @@ long double __copysignl(long double x, long double y)
   return x;
 }
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __copysignl, copysignl);
 #else
 long_double_symbol (libc, __copysignl, copysignl);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_finitel.c b/sysdeps/ieee754/ldbl-128ibm/s_finitel.c
index 7b4655f..b562ce6 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_finitel.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_finitel.c
@@ -40,7 +40,7 @@ ___finitel (long double x)
 }
 hidden_ver (___finitel, __finitel)
 weak_alias (___finitel, ____finitel)
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, ____finitel, finitel);
 long_double_symbol (libm, ___finitel, __finitel);
 #else
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_fmal.c b/sysdeps/ieee754/ldbl-128ibm/s_fmal.c
index 46dedf8..a2111d0 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_fmal.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_fmal.c
@@ -37,7 +37,7 @@ __fmal (long double x, long double y, long double z)
 
        return (x * y) + z;
 }
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __fmal, fmal);
 #else
 long_double_symbol (libc, __fmal, fmal);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c b/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
index a644f92..483c6a8 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
@@ -141,7 +141,7 @@ long double __frexpl(long double x, int *eptr)
   *eptr = expon;
   return x;
 }
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __frexpl, frexpl);
 #else
 long_double_symbol (libc, __frexpl, frexpl);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c b/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c
index 6a72822..730aa4d 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_isinfl.c
@@ -33,7 +33,7 @@ ___isinfl (long double x)
   return ~mask & (hx >> 62);
 }
 hidden_ver (___isinfl, __isinfl)
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 weak_alias (___isinfl, ____isinfl)
 long_double_symbol (libc, ___isinfl, isinfl);
 long_double_symbol (libc, ____isinfl, __isinfl);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c b/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c
index d12f1d3..9980875 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_isnanl.c
@@ -39,7 +39,7 @@ ___isnanl (long double x)
   return (int) (hx >> 63);
 }
 hidden_ver (___isnanl, __isnanl)
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 weak_alias (___isnanl, ____isnanl)
 long_double_symbol (libc, ___isnanl, isnanl);
 long_double_symbol (libc, ____isnanl, __isnanl);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_modfl.c b/sysdeps/ieee754/ldbl-128ibm/s_modfl.c
index ed03ce2..260cc3e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_modfl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_modfl.c
@@ -89,7 +89,7 @@ long double __modfl(long double x, long double *iptr)
 	    }
 	}
 }
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __modfl, modfl);
 #else
 long_double_symbol (libc, __modfl, modfl);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c b/sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c
index 161172d..a0d7aa9 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c
@@ -102,7 +102,7 @@ long double __scalbnl (long double x, int n)
 	x = ldbl_pack (xhi, xlo);
 	return x*twolm54;
 }
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __scalbnl, scalbnl);
 #else
 long_double_symbol (libc, __scalbnl, scalbnl);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_signbitl.c b/sysdeps/ieee754/ldbl-128ibm/s_signbitl.c
index 6d25711..fbccaf1 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_signbitl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_signbitl.c
@@ -31,7 +31,7 @@ ___signbitl (long double x)
   EXTRACT_WORDS64 (e, xhi);
   return e < 0;
 }
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, ___signbitl, __signbitl);
 #else
 long_double_symbol (libc, ___signbitl, __signbitl);
diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
index 1319584..211e724 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
@@ -2,7 +2,7 @@
 #undef weak_alias
 #define weak_alias(n,a)
 #include <sysdeps/ieee754/ldbl-128/s_copysignl.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __copysignl, copysignl);
 #else
 long_double_symbol (libc, __copysignl, copysignl);
diff --git a/sysdeps/ieee754/ldbl-64-128/s_finitel.c b/sysdeps/ieee754/ldbl-64-128/s_finitel.c
index 90717a1..c0862a7 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_finitel.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_finitel.c
@@ -8,7 +8,7 @@
 #undef __finitel
 hidden_ver (___finitel, __finitel)
 _weak_alias (___finitel, ____finitel)
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, ____finitel, finitel);
 long_double_symbol (libm, ___finitel, __finitel);
 #else
diff --git a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
index 685bbba..c7b6aaa 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
@@ -2,7 +2,7 @@
 #undef weak_alias
 #define weak_alias(n,a)
 #include <sysdeps/ieee754/ldbl-128/s_frexpl.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __frexpl, frexpl);
 #else
 long_double_symbol (libc, __frexpl, frexpl);
diff --git a/sysdeps/ieee754/ldbl-64-128/s_isinfl.c b/sysdeps/ieee754/ldbl-64-128/s_isinfl.c
index e046032..6dab0e9 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_isinfl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_isinfl.c
@@ -1,5 +1,5 @@
 #include <math_ldbl_opt.h>
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # undef weak_alias
 # define weak_alias(n,a)
 # undef hidden_def
@@ -7,7 +7,7 @@
 # define __isinfl(arg) ___isinfl(arg)
 #endif
 #include <sysdeps/ieee754/ldbl-128/s_isinfl.c>
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # undef __isinfl
 hidden_ver (___isinfl, __isinfl)
 _weak_alias (___isinfl, ____isinfl)
diff --git a/sysdeps/ieee754/ldbl-64-128/s_isnanl.c b/sysdeps/ieee754/ldbl-64-128/s_isnanl.c
index 3673463..ad5ecc5 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_isnanl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_isnanl.c
@@ -1,5 +1,5 @@
 #include <math_ldbl_opt.h>
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # undef weak_alias
 # define weak_alias(n,a)
 # undef hidden_def
@@ -7,7 +7,7 @@
 # define __isnanl(arg) ___isnanl(arg)
 #endif
 #include <sysdeps/ieee754/ldbl-128/s_isnanl.c>
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # undef __isnanl
 hidden_ver (___isnanl, __isnanl)
 _weak_alias (___isnanl, ____isnanl)
diff --git a/sysdeps/ieee754/ldbl-64-128/s_modfl.c b/sysdeps/ieee754/ldbl-64-128/s_modfl.c
index c17d669..fa4d3ad 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_modfl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_modfl.c
@@ -2,7 +2,7 @@
 #undef weak_alias
 #define weak_alias(n,a)
 #include <sysdeps/ieee754/ldbl-128/s_modfl.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __modfl, modfl);
 #else
 long_double_symbol (libc, __modfl, modfl);
diff --git a/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c b/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c
index 78520e9..fe2412b 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c
@@ -2,7 +2,7 @@
 #undef weak_alias
 #define weak_alias(n,a)
 #include <sysdeps/ieee754/ldbl-128/s_scalbnl.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __scalbnl, scalbnl);
 #else
 long_double_symbol (libc, __scalbnl, scalbnl);
diff --git a/sysdeps/ieee754/ldbl-64-128/s_signbitl.c b/sysdeps/ieee754/ldbl-64-128/s_signbitl.c
index f66db2f..850db73 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_signbitl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_signbitl.c
@@ -4,7 +4,7 @@
 #define __signbitl(arg) ___signbitl(arg)
 #include <sysdeps/ieee754/ldbl-128/s_signbitl.c>
 #undef __signbitl
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, ___signbitl, __signbitl);
 #else
 long_double_symbol (libc, ___signbitl, __signbitl);
diff --git a/sysdeps/ieee754/ldbl-64-128/w_scalblnl.c b/sysdeps/ieee754/ldbl-64-128/w_scalblnl.c
index fc6c4cf..2f3fc1f 100644
--- a/sysdeps/ieee754/ldbl-64-128/w_scalblnl.c
+++ b/sysdeps/ieee754/ldbl-64-128/w_scalblnl.c
@@ -20,7 +20,7 @@
 #undef weak_alias
 #define weak_alias(name, alias)
 #include <math/w_scalblnl.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __w_scalblnl, scalblnl);
 #else
 long_double_symbol (libc, __w_scalblnl, scalblnl);
diff --git a/sysdeps/ieee754/ldbl-opt/s_copysign.c b/sysdeps/ieee754/ldbl-opt/s_copysign.c
index 425e0ea..f4303f5 100644
--- a/sysdeps/ieee754/ldbl-opt/s_copysign.c
+++ b/sysdeps/ieee754/ldbl-opt/s_copysign.c
@@ -1,6 +1,6 @@
 #include <math_ldbl_opt.h>
 #include <sysdeps/ieee754/dbl-64/s_copysign.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_finite.c b/sysdeps/ieee754/ldbl-opt/s_finite.c
index 897dbfd..7d3ab00 100644
--- a/sysdeps/ieee754/ldbl-opt/s_finite.c
+++ b/sysdeps/ieee754/ldbl-opt/s_finite.c
@@ -1,7 +1,7 @@
 #include <math_ldbl_opt.h>
 #include <sysdeps/ieee754/dbl-64/s_finite.c>
 weak_alias (__finite, ___finite)
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
 compat_symbol (libm, __finite, __finitel, GLIBC_2_1);
 # endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_frexp.c b/sysdeps/ieee754/ldbl-opt/s_frexp.c
index 59ce352..0e3a5e0 100644
--- a/sysdeps/ieee754/ldbl-opt/s_frexp.c
+++ b/sysdeps/ieee754/ldbl-opt/s_frexp.c
@@ -1,6 +1,6 @@
 #include <math_ldbl_opt.h>
 #include <sysdeps/ieee754/dbl-64/s_frexp.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __frexp, frexpl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_isinf.c b/sysdeps/ieee754/ldbl-opt/s_isinf.c
index 401c8b1..1f760a0 100644
--- a/sysdeps/ieee754/ldbl-opt/s_isinf.c
+++ b/sysdeps/ieee754/ldbl-opt/s_isinf.c
@@ -1,6 +1,6 @@
 #include <math_ldbl_opt.h>
 #include <sysdeps/ieee754/dbl-64/s_isinf.c>
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
 compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
diff --git a/sysdeps/ieee754/ldbl-opt/s_isnan.c b/sysdeps/ieee754/ldbl-opt/s_isnan.c
index 164b800..33f57f1 100644
--- a/sysdeps/ieee754/ldbl-opt/s_isnan.c
+++ b/sysdeps/ieee754/ldbl-opt/s_isnan.c
@@ -1,6 +1,6 @@
 #include <math_ldbl_opt.h>
 #include <sysdeps/ieee754/dbl-64/s_isnan.c>
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/ieee754/ldbl-opt/s_ldexp.c b/sysdeps/ieee754/ldbl-opt/s_ldexp.c
index f0f6519..20e107b 100644
--- a/sysdeps/ieee754/ldbl-opt/s_ldexp.c
+++ b/sysdeps/ieee754/ldbl-opt/s_ldexp.c
@@ -1,6 +1,6 @@
 #include <math_ldbl_opt.h>
 #include <math/s_ldexp.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __ldexp, ldexpl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
index d4636b9..0dce1b1 100644
--- a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
+++ b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
@@ -2,7 +2,7 @@
 #undef weak_alias
 #define weak_alias(n,a)
 #include <math/s_ldexpl.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __ldexpl, ldexpl);
 #else
 long_double_symbol (libc, __ldexpl, ldexpl);
diff --git a/sysdeps/ieee754/ldbl-opt/s_modf.c b/sysdeps/ieee754/ldbl-opt/s_modf.c
index 2263811..93acb43 100644
--- a/sysdeps/ieee754/ldbl-opt/s_modf.c
+++ b/sysdeps/ieee754/ldbl-opt/s_modf.c
@@ -1,6 +1,6 @@
 #include <math_ldbl_opt.h>
 #include <sysdeps/ieee754/dbl-64/s_modf.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __modf, modfl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_scalbln.c b/sysdeps/ieee754/ldbl-opt/s_scalbln.c
index 2398bba..391142b 100644
--- a/sysdeps/ieee754/ldbl-opt/s_scalbln.c
+++ b/sysdeps/ieee754/ldbl-opt/s_scalbln.c
@@ -1,6 +1,6 @@
 #include <math_ldbl_opt.h>
 #include <sysdeps/ieee754/dbl-64/s_scalbln.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
 compat_symbol (libm, __scalbln, scalblnl, GLIBC_2_1);
 #endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_scalbn.c b/sysdeps/ieee754/ldbl-opt/s_scalbn.c
index 094735e..1ad81b1 100644
--- a/sysdeps/ieee754/ldbl-opt/s_scalbn.c
+++ b/sysdeps/ieee754/ldbl-opt/s_scalbn.c
@@ -1,6 +1,6 @@
 #include <math_ldbl_opt.h>
 #include <sysdeps/ieee754/dbl-64/s_scalbn.c>
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __scalbn, scalbnl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/powerpc/power5+/fpu/s_modf.c b/sysdeps/powerpc/power5+/fpu/s_modf.c
index 06da3ac..7d6cc84 100644
--- a/sysdeps/powerpc/power5+/fpu/s_modf.c
+++ b/sysdeps/powerpc/power5+/fpu/s_modf.c
@@ -49,7 +49,7 @@ weak_alias (__modf, modf)
 strong_alias (__modf, __modfl)
 weak_alias (__modf, modfl)
 #endif
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __modf, modfl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_copysign.S b/sysdeps/powerpc/powerpc32/fpu/s_copysign.S
index 0d172d7..25b7ce1 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_copysign.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_copysign.S
@@ -50,7 +50,7 @@ strong_alias(__copysign,__copysignf)
 weak_alias (__copysign,copysignl)
 strong_alias(__copysign,__copysignl)
 #endif
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __copysign, copysignl, GLIBC_2_0)
 # endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S b/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S
index ecfeafc..31fe9fe 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S
@@ -42,7 +42,7 @@ L(0):	bgelr	cr6
 	blr
 END (__copysignl)
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __copysignl, copysignl)
 #else
 long_double_symbol (libc, __copysignl, copysignl)
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/fpu/s_isnan.S
index d82a3c6..caa85e9 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_isnan.S
@@ -48,7 +48,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c
index 52df99d..74cd540 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c
@@ -42,7 +42,7 @@ weak_alias (__copysign, copysign)
 weak_alias (__copysign,copysignl)
 strong_alias(__copysign,__copysignl)
 #endif
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c
index c56e7ca..5244d9a 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c
@@ -36,7 +36,7 @@ strong_alias (__finite, __finitel)
 weak_alias (__finite, finitel)
 #endif
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 compat_symbol (libm, finite, finitel, GLIBC_2_0);
 # endif
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c
index 2f72c34..ba57a25 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c
@@ -36,7 +36,7 @@ strong_alias (__isinf, __isinfl)
 weak_alias (__isinf, isinfl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
 compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
 compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c
index 8f3666b..f182d50 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c
@@ -42,7 +42,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c
index 596b32c..383156b 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c
@@ -35,7 +35,7 @@ weak_alias (__modf, modf)
 strong_alias (__modf, __modfl)
 weak_alias (__modf, modfl)
 #endif
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __modf, modfl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S
index 99879a8..e91c567 100644
--- a/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S
@@ -52,7 +52,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S
index d767dcb..90e0d29 100644
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S
+++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S
@@ -47,7 +47,7 @@ strong_alias (__copysign, __copysignl)
 weak_alias (__copysign, copysignl)
 #endif
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 compat_symbol (libm, copysign, copysignl, GLIBC_2_0)
 # endif
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S
index 563e70a..461ae0d 100644
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S
@@ -52,7 +52,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
index 20e266b..cd1b184 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
@@ -78,7 +78,7 @@ strong_alias (__finite, __finitel)
 weak_alias (__finite, finitel)
 #endif
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 compat_symbol (libm, finite, finitel, GLIBC_2_0)
 # endif
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
index 47d608a..f9d5ca1 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
+++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
@@ -77,7 +77,7 @@ strong_alias (__isinf, __isinfl)
 weak_alias (__isinf, isinfl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
 compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
index 9cb8284..6aa9e11 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
@@ -82,7 +82,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c
index f3e6b3a..c42b37c 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c
@@ -42,7 +42,7 @@ weak_alias (__copysign, copysign)
 weak_alias (__copysign,copysignl)
 strong_alias(__copysign,__copysignl)
 #endif
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c
index b9e908d..078540d 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c
@@ -39,7 +39,7 @@ strong_alias (__finite, __finitel)
 weak_alias (__finite, finitel)
 #endif
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 compat_symbol (libm, finite, finitel, GLIBC_2_0);
 # endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
index e349a06..5781c3d 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
@@ -39,7 +39,7 @@ strong_alias (__isinf, __isinfl)
 weak_alias (__isinf, isinfl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
 compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
 compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
index 65a5ca0..2fd76b4 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
@@ -48,7 +48,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c
index f416fa9..a61adf5 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c
@@ -35,7 +35,7 @@ weak_alias (__modf, modf)
 strong_alias (__modf, __modfl)
 weak_alias (__modf, modfl)
 #endif
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __modf, modfl, GLIBC_2_0);
 # endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_copysign.S b/sysdeps/powerpc/powerpc64/fpu/s_copysign.S
index 49c793d..78b3756 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_copysign.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_copysign.S
@@ -50,7 +50,7 @@ strong_alias(__copysign,__copysignf)
 weak_alias (__copysign,copysignl)
 strong_alias(__copysign,__copysignl)
 #endif
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
 compat_symbol (libm, __copysign, copysignl, GLIBC_2_0)
 # endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S b/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S
index 39e180a..453c01a 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S
@@ -43,7 +43,7 @@ L(0):
 	blr
 END (__copysignl)
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, __copysignl, copysignl)
 #else
 long_double_symbol (libc, __copysignl, copysignl)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/fpu/s_isnan.S
index 629dae6..71e79f6 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_isnan.S
@@ -47,7 +47,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S
index 4ce6cf9..46796ab 100644
--- a/sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S
@@ -51,7 +51,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S b/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
index e1ea089..c5bb161 100644
--- a/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
+++ b/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
@@ -47,7 +47,7 @@ strong_alias (__copysign, __copysignl)
 weak_alias (__copysign, copysignl)
 #endif
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 compat_symbol (libm, copysign, copysignl, GLIBC_2_0)
 # endif
diff --git a/sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S
index 8a149b2..0ba6ad4 100644
--- a/sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S
@@ -50,7 +50,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S
index 3172fe3..20ed867 100644
--- a/sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S
@@ -49,7 +49,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S b/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
index 765d689..8d4916d 100644
--- a/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
@@ -57,7 +57,7 @@ strong_alias (__finite, __finitef)
 hidden_def (__finitef)
 weak_alias (__finitef, finitef)
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 compat_symbol (libm, __finite, __finitel, GLIBC_2_0)
 compat_symbol (libm, finite, finitel, GLIBC_2_0)
diff --git a/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S b/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
index e102d4b..79fd2e6 100644
--- a/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
+++ b/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
@@ -61,7 +61,7 @@ strong_alias (__isinf, __isinfl)
 weak_alias (__isinf, isinfl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
 compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S
index eabee71..5056261 100644
--- a/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S
@@ -60,7 +60,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S
index 2b27e7b..640f75f 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S
@@ -48,7 +48,7 @@ strong_alias (__finite, __finitef)
 hidden_def (__finitef)
 weak_alias (__finitef, finitef)
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 compat_symbol (libm, __finite, __finitel, GLIBC_2_0)
 compat_symbol (libm, finite, finitel, GLIBC_2_0)
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S
index d09b7fc..0e01be7 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S
@@ -58,7 +58,7 @@ strong_alias (__isinf, __isinfl)
 weak_alias (__isinf, isinfl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
 compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S
index cf119e5..7e3d2d1 100644
--- a/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S
@@ -53,7 +53,7 @@ strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/sparc/sparc32/fpu/s_signbitl.S b/sysdeps/sparc/sparc32/fpu/s_signbitl.S
index 64813f1..52f1baa 100644
--- a/sysdeps/sparc/sparc32/fpu/s_signbitl.S
+++ b/sysdeps/sparc/sparc32/fpu/s_signbitl.S
@@ -25,7 +25,7 @@ ENTRY (___signbitl)
 	 srl	%o1, 31, %o0
 END (___signbitl)
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 long_double_symbol (libm, ___signbitl, __signbitl);
 #else
 long_double_symbol (libc, ___signbitl, __signbitl);
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S
index f2e40b1..584204e 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S
@@ -32,7 +32,7 @@ END (__isnan)
 hidden_def (__isnan)
 weak_alias (__isnan, isnan)
 
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
 compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
 compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
index c5fa62b..b8f344e 100644
--- a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
+++ b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
@@ -46,7 +46,7 @@ ENTRY(__feraiseexcept)
 END(__feraiseexcept)
 	cfi_endproc
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # include <shlib-compat.h>
 # if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 strong_alias (__feraiseexcept, __old_feraiseexcept)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=faa01abca8aa1c8f7a5f886fdd24972bbb2b1f7a

commit faa01abca8aa1c8f7a5f886fdd24972bbb2b1f7a
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 14:59:59 2014 +0530

    Remove IS_IN_libpthread
    
    Replace with IS_IN (libpthread).  Generated code unchanged on
    x86_64.
    
    	* nptl/lowlevellock.c: Use IS_IN instead of IS_IN_libpthread.
    	* nptl/pthreadP.h: Likewise.
    	* nptl_db/structs.def: Likewise.
    	* sysdeps/arm/sysdep.h: Likewise.
    	* sysdeps/nptl/bits/libc-lock.h: Likewise.
    	* sysdeps/nptl/bits/libc-lockP.h: Likewise.
    	* sysdeps/sparc/sparc32/lowlevellock.c: Likewise.
    	* sysdeps/unix/alpha/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/not-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise.
    	* sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise.
    	* sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.

diff --git a/nptl/lowlevellock.c b/nptl/lowlevellock.c
index e198af7..4c093fc 100644
--- a/nptl/lowlevellock.c
+++ b/nptl/lowlevellock.c
@@ -35,7 +35,7 @@ __lll_lock_wait_private (int *futex)
 
 
 /* These functions don't get included in libc.so  */
-#ifdef IS_IN_libpthread
+#if IS_IN (libpthread)
 void
 __lll_lock_wait (int *futex, int private)
 {
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 376dbff..3185056 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -244,7 +244,7 @@ extern int __pthread_debug attribute_hidden;
 
 extern void __pthread_unwind (__pthread_unwind_buf_t *__buf)
      __cleanup_fct_attribute __attribute ((__noreturn__))
-#if !defined SHARED && !defined IS_IN_libpthread
+#if !defined SHARED && !IS_IN (libpthread)
      weak_function
 #endif
      ;
@@ -258,7 +258,7 @@ extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
      __cleanup_fct_attribute;
 extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
      __cleanup_fct_attribute;
-#ifdef IS_IN_libpthread
+#if IS_IN (libpthread)
 hidden_proto (__pthread_unwind)
 hidden_proto (__pthread_unwind_next)
 hidden_proto (__pthread_register_cancel)
@@ -302,7 +302,7 @@ __do_cancel (void)
 # define LIBC_CANCEL_HANDLED() \
   __asm (".globl " __SYMBOL_PREFIX "__libc_enable_asynccancel"); \
   __asm (".globl " __SYMBOL_PREFIX "__libc_disable_asynccancel")
-#elif defined IS_IN_libpthread
+#elif IS_IN (libpthread)
 # define LIBC_CANCEL_ASYNC() CANCEL_ASYNC ()
 # define LIBC_CANCEL_RESET(val) CANCEL_RESET (val)
 # define LIBC_CANCEL_HANDLED() \
@@ -347,7 +347,7 @@ extern int __make_stacks_executable (void **stack_endp)
 
 /* longjmp handling.  */
 extern void __pthread_cleanup_upto (__jmp_buf target, char *targetframe);
-#ifdef IS_IN_libpthread
+#if IS_IN (libpthread)
 hidden_proto (__pthread_cleanup_upto)
 #endif
 
@@ -492,7 +492,7 @@ extern int __pthread_enable_asynccancel (void) attribute_hidden;
 extern void __pthread_disable_asynccancel (int oldtype)
      internal_function attribute_hidden;
 
-#ifdef IS_IN_libpthread
+#if IS_IN (libpthread)
 hidden_proto (__pthread_mutex_init)
 hidden_proto (__pthread_mutex_destroy)
 hidden_proto (__pthread_mutex_lock)
@@ -531,7 +531,7 @@ extern int __librt_enable_asynccancel (void) attribute_hidden;
 extern void __librt_disable_asynccancel (int oldtype)
      internal_function attribute_hidden;
 
-#ifdef IS_IN_libpthread
+#if IS_IN (libpthread)
 /* Special versions which use non-exported functions.  */
 extern void __pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer,
 				    void (*routine) (void *), void *arg)
diff --git a/nptl_db/structs.def b/nptl_db/structs.def
index ec72ef1..5b905e2 100644
--- a/nptl_db/structs.def
+++ b/nptl_db/structs.def
@@ -74,7 +74,7 @@ DB_STRUCT_FIELD (link_map, l_tls_modid)
 DB_STRUCT_ARRAY_FIELD (dtv, dtv)
 #define pointer_val pointer.val /* Field of anonymous struct in dtv_t.  */
 DB_STRUCT_FIELD (dtv_t, pointer_val)
-#if !defined IS_IN_libpthread || TLS_TCB_AT_TP
+#if !IS_IN (libpthread) || TLS_TCB_AT_TP
 DB_STRUCT_FIELD (pthread, dtvp)
 #endif
 
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 8614b4a..b29fe10 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -359,7 +359,7 @@
 
 /* Pointer mangling support.  */
 #if (defined IS_IN_rtld || \
-     (!defined SHARED && (!defined NOT_IN_libc || defined IS_IN_libpthread)))
+     (!defined SHARED && (!defined NOT_IN_libc || IS_IN (libpthread))))
 # ifdef __ASSEMBLER__
 #  define PTR_MANGLE_LOAD(guard, tmp)					\
   LDR_HIDDEN (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local), 0)
diff --git a/sysdeps/nptl/bits/libc-lock.h b/sysdeps/nptl/bits/libc-lock.h
index 66e5b93..2acc6bf 100644
--- a/sysdeps/nptl/bits/libc-lock.h
+++ b/sysdeps/nptl/bits/libc-lock.h
@@ -26,7 +26,7 @@
 
 /* Mutex type.  */
 #if defined _LIBC || defined _IO_MTSAFE_IO
-# if (defined NOT_IN_libc && !defined IS_IN_libpthread) || !defined _LIBC
+# if (defined NOT_IN_libc && !IS_IN (libpthread)) || !defined _LIBC
 typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;
 # else
 typedef struct { int lock; int cnt; void *owner; } __libc_lock_recursive_t;
@@ -47,7 +47,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 
 /* Define an initialized recursive lock variable NAME with storage
    class CLASS.  */
-#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
 # define __libc_lock_define_initialized_recursive(CLASS, NAME) \
   CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
 # define _LIBC_LOCK_RECURSIVE_INITIALIZER \
@@ -60,7 +60,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Initialize a recursive mutex.  */
-#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
 # define __libc_lock_init_recursive(NAME) \
   ((void) ((NAME) = (__libc_lock_recursive_t) _LIBC_LOCK_RECURSIVE_INITIALIZER))
 #else
@@ -78,7 +78,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Finalize recursive named lock.  */
-#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
 # define __libc_lock_fini_recursive(NAME) ((void) 0)
 #else
 # define __libc_lock_fini_recursive(NAME) \
@@ -86,7 +86,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Lock the recursive named lock variable.  */
-#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
 # define __libc_lock_lock_recursive(NAME) \
   do {									      \
     void *self = THREAD_SELF;						      \
@@ -103,7 +103,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Try to lock the recursive named lock variable.  */
-#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
 # define __libc_lock_trylock_recursive(NAME) \
   ({									      \
     int result = 0;							      \
@@ -128,7 +128,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 #endif
 
 /* Unlock the recursive named lock variable.  */
-#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread))
 /* We do no error checking here.  */
 # define __libc_lock_unlock_recursive(NAME) \
   do {									      \
diff --git a/sysdeps/nptl/bits/libc-lockP.h b/sysdeps/nptl/bits/libc-lockP.h
index 5351a51..ae17507 100644
--- a/sysdeps/nptl/bits/libc-lockP.h
+++ b/sysdeps/nptl/bits/libc-lockP.h
@@ -35,7 +35,7 @@
 #include <pthread-functions.h>
 
 /* Mutex type.  */
-#if defined NOT_IN_libc && !defined IS_IN_libpthread
+#if defined NOT_IN_libc && !IS_IN (libpthread)
 typedef pthread_mutex_t __libc_lock_t;
 #else
 typedef int __libc_lock_t;
@@ -69,7 +69,7 @@ typedef pthread_key_t __libc_key_t;
    initialized locks must be set to one due to the lack of normal
    atomic operations.) */
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || IS_IN (libpthread)
 # if LLL_LOCK_INITIALIZER == 0
 #  define __libc_lock_define_initialized(CLASS,NAME) \
   CLASS __libc_lock_t NAME;
@@ -125,7 +125,7 @@ typedef pthread_key_t __libc_key_t;
 
 /* Initialize the named lock variable, leaving it in a consistent, unlocked
    state.  */
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || IS_IN (libpthread)
 # define __libc_lock_init(NAME) \
   ((void) ((NAME) = LLL_LOCK_INITIALIZER))
 #else
@@ -144,7 +144,7 @@ typedef pthread_key_t __libc_key_t;
 /* Finalize the named lock variable, which must be locked.  It cannot be
    used again until __libc_lock_init is called again on it.  This must be
    called on a lock variable before the containing storage is reused.  */
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || IS_IN (libpthread)
 # define __libc_lock_fini(NAME) ((void) 0)
 #else
 # define __libc_lock_fini(NAME) \
@@ -158,7 +158,7 @@ typedef pthread_key_t __libc_key_t;
 #endif
 
 /* Lock the named lock variable.  */
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || IS_IN (libpthread)
 # ifndef __libc_lock_lock
 #  define __libc_lock_lock(NAME) \
   ({ lll_lock (NAME, LLL_PRIVATE); 0; })
@@ -174,7 +174,7 @@ typedef pthread_key_t __libc_key_t;
   __libc_ptf_call (__pthread_rwlock_wrlock, (&(NAME)), 0)
 
 /* Try to lock the named lock variable.  */
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || IS_IN (libpthread)
 # ifndef __libc_lock_trylock
 #  define __libc_lock_trylock(NAME) \
   lll_trylock (NAME)
@@ -193,7 +193,7 @@ typedef pthread_key_t __libc_key_t;
   __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0)
 
 /* Unlock the named lock variable.  */
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || IS_IN (libpthread)
 # define __libc_lock_unlock(NAME) \
   lll_unlock (NAME, LLL_PRIVATE)
 #else
diff --git a/sysdeps/sparc/sparc32/lowlevellock.c b/sysdeps/sparc/sparc32/lowlevellock.c
index 8384281..78cfad9 100644
--- a/sysdeps/sparc/sparc32/lowlevellock.c
+++ b/sysdeps/sparc/sparc32/lowlevellock.c
@@ -37,7 +37,7 @@ __lll_lock_wait_private (int *futex)
 
 
 /* These functions don't get included in libc.so  */
-#ifdef IS_IN_libpthread
+#if IS_IN (libpthread)
 void
 __lll_lock_wait (int *futex, int private)
 {
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 17dad91..68b06e1 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -373,7 +373,7 @@ __LABEL(name)						\
 # include <stdint.h>
 # if (defined IS_IN_rtld \
       || (!defined SHARED && (!defined NOT_IN_libc \
-			      || defined IS_IN_libpthread)))
+			      || IS_IN (libpthread))))
 extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
 #  define PTR_MANGLE(var) \
 	(var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
index 9e347de..f2f8009 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				\
@@ -81,7 +81,7 @@ ENTRY (name);								\
 # define UNDOCARGS_5	UNDOCARGS_3; ldp x3, x4, [sp, 32]
 # define UNDOCARGS_6	UNDOCARGS_4; ldp x4, x5, [sp, 40]
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	bl __pthread_enable_asynccancel
 #  define CDISABLE	bl __pthread_disable_asynccancel
 #  define __local_multiple_threads __pthread_multiple_threads
@@ -96,7 +96,7 @@ ENTRY (name);								\
 #  error Unsupported library
 # endif
 
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# if IS_IN (libpthread) || !defined NOT_IN_libc
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index 84999f1..84bec80 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -311,7 +311,7 @@
 /* Pointer mangling is supported for AArch64.  */
 #if (defined IS_IN_rtld || \
      (!defined SHARED && (!defined NOT_IN_libc \
-			  || defined IS_IN_libpthread)))
+			  || IS_IN (libpthread))))
 # ifdef __ASSEMBLER__
 #  define PTR_MANGLE(dst, src, guard, tmp)                                \
   LDST_PCREL (ldr, guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local)); \
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
index 45bf93b..5479556 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 /* ??? Assumes that nothing comes between PSEUDO and PSEUDO_END
    besides "ret".  */
@@ -113,7 +113,7 @@ __LABEL($multi_error)						\
 # define LOAD_ARGS_5	LOAD_ARGS_4; ldq a4, 40(sp)
 # define LOAD_ARGS_6	LOAD_ARGS_5; ldq a5, 48(sp)
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define __local_enable_asynccancel	__pthread_enable_asynccancel
 #  define __local_disable_asynccancel	__pthread_disable_asynccancel
 #  define __local_multiple_threads	__pthread_multiple_threads
@@ -136,7 +136,7 @@ __LABEL($multi_error)						\
 #  define CDISABLE	jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp)
 # endif
 
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# if IS_IN (libpthread) || !defined NOT_IN_libc
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P \
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
index e5a8e36..9211d04 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 /* NOTE: We do mark syscalls with unwind annotations, for the benefit of
    cancellation; but they're really only accurate at the point of the
@@ -181,7 +181,7 @@
 # define RESTORE_LR_6				\
 	RESTORE_LR_0
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	bl PLTJMP(__pthread_enable_asynccancel)
 #  define CDISABLE	bl PLTJMP(__pthread_disable_asynccancel)
 #  define __local_multiple_threads __pthread_multiple_threads
@@ -196,7 +196,7 @@
 #  error Unsupported library
 # endif
 
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# if IS_IN (libpthread) || !defined NOT_IN_libc
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
index 365237e..5d4ff34 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # ifndef NO_ERROR
 #  define NO_ERROR -0x1000
@@ -204,7 +204,7 @@ L(pre_end):						ASM_LINE_SEP	\
 # define POPARGS_6	POPARGS_5 ldw -56(%sr0,%sp), %r21	ASM_LINE_SEP	\
 			.cfi_restore 21				ASM_LINE_SEP
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  ifdef PIC
 #   define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
 			bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
@@ -244,7 +244,7 @@ L(pre_end):						ASM_LINE_SEP	\
 #  error Unsupported library
 # endif
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define __local_multiple_threads __pthread_multiple_threads
 # elif !defined NOT_IN_libc
 #  define __local_multiple_threads __libc_multiple_threads
@@ -271,7 +271,7 @@ L(pre_end):						ASM_LINE_SEP	\
 # define NO_CANCELLATION 1
 
 #endif
-/* !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt) */
+/* !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt) */
 
 #ifndef __ASSEMBLER__
 # define RTLD_SINGLE_THREAD_P \
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h b/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
index 75fe2e6..c17ff6c 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -108,7 +108,7 @@
 # define _POPCARGS_6	_POPCARGS_5; popl %ebp; \
 			cfi_adjust_cfa_offset (-4); cfi_restore (ebp);
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	call __pthread_enable_asynccancel;
 #  define CDISABLE	call __pthread_disable_asynccancel
 # elif !defined NOT_IN_libc
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index 57d5ea0..0282761 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -34,7 +34,7 @@
 #define SYS_ify(syscall_name)	__NR_##syscall_name
 
 #if defined USE_DL_SYSINFO \
-    && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+    && (!defined NOT_IN_libc || IS_IN (libpthread))
 # define I386_USE_SYSENTER	1
 #else
 # undef I386_USE_SYSENTER
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
index 366728f..0458fce 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 
@@ -179,7 +179,7 @@ __GC_##name:								      \
 # undef PSEUDO_END
 # define PSEUDO_END(name) .endp
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	br.call.sptk.many b0 = __pthread_enable_asynccancel
 #  define CDISABLE	br.call.sptk.many b0 = __pthread_disable_asynccancel
 # elif !defined NOT_IN_libc
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 49d289c..47fd577 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -62,7 +62,7 @@
 
 #if defined USE_DL_SYSINFO \
 	&& (!defined NOT_IN_libc \
-	    || defined IS_IN_libpthread || IS_IN (librt))
+	    || IS_IN (libpthread) || IS_IN (librt))
 # define IA64_USE_NEW_STUB
 #else
 # undef IA64_USE_NEW_STUB
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h b/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
index 0e19a38..33ce922 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -100,7 +100,7 @@
 #  define PSEUDO_JMP(sym) jbsr sym
 # endif
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	PSEUDO_JMP (__pthread_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__pthread_disable_asynccancel)
 # elif !defined NOT_IN_libc
diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h b/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
index 4d371ef..0fe5b12 100644
--- a/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # if !IS_IN (librt) || !defined(PIC)
 #  define AC_STACK_SIZE  16  /* space for r15, async_cancel arg and 2 temp words */
@@ -102,7 +102,7 @@ L(pseudo_cancel):                                                    \
 #  define PSEUDO_JMP(sym)  brlid r15, sym; addk r0, r0, r0
 # endif
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE PSEUDO_JMP (__pthread_enable_asynccancel)
 #  define CDISABLE  PSEUDO_JMP (__pthread_disable_asynccancel)
 #  define __local_multiple_threads __pthread_multiple_threads
@@ -118,7 +118,7 @@ L(pseudo_cancel):                                                    \
 # endif
 
 
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# if IS_IN (libpthread) || !defined NOT_IN_libc
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
index acbc5da..6f79b14 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
@@ -27,7 +27,7 @@
    happen before any instructions.  So we use cfi_same_value instead of
    cfi_restore.  */
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 #ifdef __PIC__
 # undef PSEUDO
@@ -213,7 +213,7 @@
 #  define PSEUDO_JMP(sym) jal sym
 # endif
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	PSEUDO_JMP (__pthread_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__pthread_disable_asynccancel)
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
index 5fdd567..1d711f7 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # ifdef __PIC__
 #  define PSEUDO_CPLOAD .cpload t9;
@@ -154,7 +154,7 @@
 #  define PSEUDO_JMP(sym) jal sym;
 # endif
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	PSEUDO_JMP (__pthread_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__pthread_disable_asynccancel)
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index d089531..1d65f20 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 extern int __open_nocancel (const char *, int, ...) attribute_hidden;
 extern int __close_nocancel (int) attribute_hidden;
 extern int __read_nocancel (int, void *, size_t) attribute_hidden;
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
index 962beaf..25bf797 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
@@ -23,7 +23,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				\
@@ -81,7 +81,7 @@
 # define DOCARGS_6	stw 8,40(1); DOCARGS_5
 # define UNDOCARGS_6	lwz 8,40(1); UNDOCARGS_5
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	bl __pthread_enable_asynccancel@local
 #  define CDISABLE	bl __pthread_disable_asynccancel@local
 # elif !defined NOT_IN_libc
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
index 0447062..8683b6b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
@@ -23,7 +23,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
 #  define DASHDASHPFX(str) .__##str
@@ -99,7 +99,7 @@
 # define DOCARGS_6	std 8,CANCEL_PARM_SAVE+40(1); DOCARGS_5
 # define UNDOCARGS_6	ld 8,CANCEL_PARM_SAVE+40(1); UNDOCARGS_5
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  ifdef SHARED
 #   define CENABLE	bl JUMPTARGET(__pthread_enable_asynccancel)
 #   define CDISABLE	bl JUMPTARGET(__pthread_disable_asynccancel)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
index bc5d852..d19500d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -75,7 +75,7 @@ L(pseudo_check):							      \
 .size	__##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	      \
 L(pseudo_end):
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	__pthread_enable_asynccancel
 #  define CDISABLE	__pthread_disable_asynccancel
 # elif !defined NOT_IN_libc
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
index 885bf7e..9622d5a 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -69,7 +69,7 @@ L(pseudo_check):							      \
 .size	__##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	      \
 L(pseudo_end):
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	__pthread_enable_asynccancel
 #  define CDISABLE	__pthread_disable_asynccancel
 #  define __local_multiple_threads	__pthread_multiple_threads
@@ -111,7 +111,7 @@ L(pseudo_end):
 #define LR7_6		lg %r7,56+160(%r15); \
 			cfi_restore (%r7);
 
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# if IS_IN (libpthread) || !defined NOT_IN_libc
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P \
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
index 4ef51c0..131f42b 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # define _IMM12 #-12
 # define _IMM16 #-16
@@ -105,7 +105,7 @@
 # define LOAD_ARGS_5	LOAD_ARGS_4
 # define LOAD_ARGS_6	LOAD_ARGS_5
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define __local_enable_asynccancel	__pthread_enable_asynccancel
 #  define __local_disable_asynccancel	__pthread_disable_asynccancel
 # elif !defined NOT_IN_libc
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
index 2e24d2a..cc7adfc 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)	\
@@ -68,7 +68,7 @@ __##syscall_name##_nocancel:			\
 	 restore %g0, %l1, %o0;
 
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	call __pthread_enable_asynccancel
 #  define CDISABLE	call __pthread_disable_asynccancel
 # elif !defined NOT_IN_libc
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
index 0ae3b61..aee3dee 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)	\
@@ -66,7 +66,7 @@ __##syscall_name##_nocancel:			\
 2:	jmpl %i7 + 8, %g0;			\
 	 restore %g0, %l1, %o0;
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	call __pthread_enable_asynccancel
 #  define CDISABLE	call __pthread_disable_asynccancel
 # elif !defined NOT_IN_libc
diff --git a/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h b/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
index 8140273..028c393 100644
--- a/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 /* Allow hacking in some extra code if desired. */
 #ifndef PSEUDO_EXTRA
@@ -117,7 +117,7 @@
 
 # define STKSPACE	(13 * REGSIZE)
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	jal __pthread_enable_asynccancel
 #  define CDISABLE	jal __pthread_disable_asynccancel
 # elif IS_IN (librt)
diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.h b/sysdeps/unix/sysv/linux/tile/sysdep.h
index 238b266..d03a74b 100644
--- a/sysdeps/unix/sysv/linux/tile/sysdep.h
+++ b/sysdeps/unix/sysv/linux/tile/sysdep.h
@@ -45,7 +45,7 @@
 #ifndef PIC
 /* For static code, on error jump to __syscall_error directly. */
 # define SYSCALL_ERROR_NAME __syscall_error
-#elif !defined NOT_IN_libc || defined IS_IN_libpthread
+#elif !defined NOT_IN_libc || IS_IN (libpthread)
 /* Use the internal name for libc/libpthread shared objects. */
 # define SYSCALL_ERROR_NAME __GI___syscall_error
 #else
diff --git a/sysdeps/unix/sysv/linux/tile/waitpid.S b/sysdeps/unix/sysv/linux/tile/waitpid.S
index ac8e59e..e613b1c 100644
--- a/sysdeps/unix/sysv/linux/tile/waitpid.S
+++ b/sysdeps/unix/sysv/linux/tile/waitpid.S
@@ -1,7 +1,7 @@
 /*
 extern pid_t __waitpid_nocancel (pid_t, int *, int) attribute_hidden;
 */
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 /* Call __NR_wait4, providing fourth argument (struct rusage *) as NULL. */
 #define PSEUDO_EXTRA move r3, zero;
diff --git a/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/sysdeps/unix/sysv/linux/x86_64/cancellation.S
index 89fda5e..5189bbc 100644
--- a/sysdeps/unix/sysv/linux/x86_64/cancellation.S
+++ b/sysdeps/unix/sysv/linux/x86_64/cancellation.S
@@ -21,7 +21,7 @@
 #include <kernel-features.h>
 #include "lowlevellock.h"
 
-#ifdef IS_IN_libpthread
+#if IS_IN (libpthread)
 # if defined SHARED && !defined NO_HIDDEN
 #  define __pthread_unwind __GI___pthread_unwind
 # endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
index efdb1c6..2667292 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
+#if !defined NOT_IN_libc || IS_IN (libpthread) || IS_IN (librt)
 
 /* The code to disable cancellation depends on the fact that the called
    functions are special.  They don't modify registers other than %rax
@@ -59,7 +59,7 @@
     jae SYSCALL_ERROR_LABEL
 
 
-# ifdef IS_IN_libpthread
+# if IS_IN (libpthread)
 #  define CENABLE	call __pthread_enable_asynccancel;
 #  define CDISABLE	call __pthread_disable_asynccancel;
 #  define __local_multiple_threads __pthread_multiple_threads
@@ -74,7 +74,7 @@
 #  error Unsupported library
 # endif
 
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# if IS_IN (libpthread) || !defined NOT_IN_libc
 #  ifndef __ASSEMBLER__
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P \

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=611cb31f9cbfde275db8b2c74400206e68ce7bbf

commit 611cb31f9cbfde275db8b2c74400206e68ce7bbf
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 14:56:37 2014 +0530

    Remove IS_IN_librt
    
    Replace with IS_IN (librt).  Generated code unchanged on x86_64
    
            * include/mqueue.h: Use IS_IN instead of IS_IN_librt.
            * nptl/pthreadP.h: Likewise.
            * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
            * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/not-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise.
            * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise.
            * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.

diff --git a/include/mqueue.h b/include/mqueue.h
index 1ac4f13..aba788e 100644
--- a/include/mqueue.h
+++ b/include/mqueue.h
@@ -1,6 +1,6 @@
 #include <rt/mqueue.h>
 
-#ifdef IS_IN_librt
+#if IS_IN (librt)
 hidden_proto (mq_timedsend)
 hidden_proto (mq_timedreceive)
 hidden_proto (mq_setattr)
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 3aa24c2..376dbff 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -308,7 +308,7 @@ __do_cancel (void)
 # define LIBC_CANCEL_HANDLED() \
   __asm (".globl " __SYMBOL_PREFIX "__pthread_enable_asynccancel"); \
   __asm (".globl " __SYMBOL_PREFIX "__pthread_disable_asynccancel")
-#elif defined IS_IN_librt
+#elif IS_IN (librt)
 # define LIBC_CANCEL_ASYNC() \
   __librt_enable_asynccancel ()
 # define LIBC_CANCEL_RESET(val) \
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
index 546ed7b..9e347de 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				\
@@ -89,7 +89,7 @@ ENTRY (name);								\
 #  define CENABLE	bl __libc_enable_asynccancel
 #  define CDISABLE	bl __libc_disable_asynccancel
 #  define __local_multiple_threads __libc_multiple_threads
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	bl __librt_enable_asynccancel
 #  define CDISABLE	bl __librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
index 69809bc..45bf93b 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 /* ??? Assumes that nothing comes between PSEUDO and PSEUDO_END
    besides "ret".  */
@@ -121,7 +121,7 @@ __LABEL($multi_error)						\
 #  define __local_enable_asynccancel	__libc_enable_asynccancel
 #  define __local_disable_asynccancel	__libc_disable_asynccancel
 #  define __local_multiple_threads	__libc_multiple_threads
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define __local_enable_asynccancel	__librt_enable_asynccancel
 #  define __local_disable_asynccancel	__librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
index a0a8696..e5a8e36 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 /* NOTE: We do mark syscalls with unwind annotations, for the benefit of
    cancellation; but they're really only accurate at the point of the
@@ -189,7 +189,7 @@
 #  define CENABLE	bl PLTJMP(__libc_enable_asynccancel)
 #  define CDISABLE	bl PLTJMP(__libc_disable_asynccancel)
 #  define __local_multiple_threads __libc_multiple_threads
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	bl PLTJMP(__librt_enable_asynccancel)
 #  define CDISABLE	bl PLTJMP(__librt_disable_asynccancel)
 # else
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
index 6f1c9d7..365237e 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # ifndef NO_ERROR
 #  define NO_ERROR -0x1000
@@ -228,7 +228,7 @@ L(pre_end):						ASM_LINE_SEP	\
 #   define CDISABLE	.import __libc_disable_asynccancel,code ASM_LINE_SEP \
 			bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
 #  endif
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  ifdef PIC
 #   define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
 			bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
@@ -248,7 +248,7 @@ L(pre_end):						ASM_LINE_SEP	\
 #  define __local_multiple_threads __pthread_multiple_threads
 # elif !defined NOT_IN_libc
 #  define __local_multiple_threads __libc_multiple_threads
-# elif IS_IN_librt
+# elif IS_IN (librt)
 #  define __local_multiple_threads __librt_multiple_threads
 # else
 #  error Unsupported library
@@ -271,7 +271,7 @@ L(pre_end):						ASM_LINE_SEP	\
 # define NO_CANCELLATION 1
 
 #endif
-/* !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt */
+/* !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt) */
 
 #ifndef __ASSEMBLER__
 # define RTLD_SINGLE_THREAD_P \
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h b/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
index 4f4318d..75fe2e6 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -114,7 +114,7 @@
 # elif !defined NOT_IN_libc
 #  define CENABLE	call __libc_enable_asynccancel;
 #  define CDISABLE	call __libc_disable_asynccancel
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	call __librt_enable_asynccancel;
 #  define CDISABLE	call __librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
index c44c484..366728f 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 
@@ -185,7 +185,7 @@ __GC_##name:								      \
 # elif !defined NOT_IN_libc
 #  define CENABLE	br.call.sptk.many b0 = __libc_enable_asynccancel
 #  define CDISABLE	br.call.sptk.many b0 = __libc_disable_asynccancel
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	br.call.sptk.many b0 = __librt_enable_asynccancel
 #  define CDISABLE	br.call.sptk.many b0 = __librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index e0ec861..49d289c 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -62,7 +62,7 @@
 
 #if defined USE_DL_SYSINFO \
 	&& (!defined NOT_IN_libc \
-	    || defined IS_IN_libpthread || defined IS_IN_librt)
+	    || defined IS_IN_libpthread || IS_IN (librt))
 # define IA64_USE_NEW_STUB
 #else
 # undef IA64_USE_NEW_STUB
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h b/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
index 868ce56..0e19a38 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -106,7 +106,7 @@
 # elif !defined NOT_IN_libc
 #  define CENABLE	PSEUDO_JMP (__libc_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__libc_disable_asynccancel)
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	PSEUDO_JMP (__librt_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__librt_disable_asynccancel)
 # else
diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h b/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
index 0080d8d..4d371ef 100644
--- a/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h
@@ -21,9 +21,9 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
-# if !defined(IS_IN_librt) || !defined(PIC)
+# if !IS_IN (librt) || !defined(PIC)
 #  define AC_STACK_SIZE  16  /* space for r15, async_cancel arg and 2 temp words */
 #  define AC_SET_GOT /* empty */
 #  define AC_RESTORE_GOT /* empty */
@@ -110,7 +110,7 @@ L(pseudo_cancel):                                                    \
 #  define CENABLE PSEUDO_JMP (__libc_enable_asynccancel)
 #  define CDISABLE  PSEUDO_JMP (__libc_disable_asynccancel)
 #  define __local_multiple_threads __libc_multiple_threads
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE PSEUDO_JMP (__librt_enable_asynccancel)
 #  define CDISABLE  PSEUDO_JMP (__librt_disable_asynccancel)
 # else
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
index 341b9a0..acbc5da 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
@@ -27,7 +27,7 @@
    happen before any instructions.  So we use cfi_same_value instead of
    cfi_restore.  */
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 #ifdef __PIC__
 # undef PSEUDO
@@ -216,7 +216,7 @@
 # ifdef IS_IN_libpthread
 #  define CENABLE	PSEUDO_JMP (__pthread_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__pthread_disable_asynccancel)
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	PSEUDO_JMP (__librt_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__librt_disable_asynccancel)
 # else
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
index 3666081..5fdd567 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # ifdef __PIC__
 #  define PSEUDO_CPLOAD .cpload t9;
@@ -157,7 +157,7 @@
 # ifdef IS_IN_libpthread
 #  define CENABLE	PSEUDO_JMP (__pthread_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__pthread_disable_asynccancel)
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	PSEUDO_JMP (__librt_enable_asynccancel)
 #  define CDISABLE	PSEUDO_JMP (__librt_disable_asynccancel)
 # else
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 14f5e8b..d089531 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 extern int __open_nocancel (const char *, int, ...) attribute_hidden;
 extern int __close_nocancel (int) attribute_hidden;
 extern int __read_nocancel (int, void *, size_t) attribute_hidden;
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
index b6eedcb..962beaf 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
@@ -23,7 +23,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				\
@@ -87,7 +87,7 @@
 # elif !defined NOT_IN_libc
 #  define CENABLE	bl __libc_enable_asynccancel@local
 #  define CDISABLE	bl __libc_disable_asynccancel@local
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	bl __librt_enable_asynccancel@local
 #  define CDISABLE	bl __librt_disable_asynccancel@local
 # else
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
index 5807d9d..0447062 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
@@ -23,7 +23,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
 #  define DASHDASHPFX(str) .__##str
@@ -115,7 +115,7 @@
 #   define CENABLE	bl JUMPTARGET(__libc_enable_asynccancel); nop
 #   define CDISABLE	bl JUMPTARGET(__libc_disable_asynccancel); nop
 #  endif
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  ifdef SHARED
 #   define CENABLE	bl JUMPTARGET(__librt_enable_asynccancel)
 #   define CDISABLE	bl JUMPTARGET(__librt_disable_asynccancel)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
index 0eeefca..bc5d852 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -81,7 +81,7 @@ L(pseudo_end):
 # elif !defined NOT_IN_libc
 #  define CENABLE	__libc_enable_asynccancel
 #  define CDISABLE	__libc_disable_asynccancel
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	__librt_enable_asynccancel
 #  define CDISABLE	__librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
index b3560c8..885bf7e 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)				      \
@@ -77,7 +77,7 @@ L(pseudo_end):
 #  define CENABLE	__libc_enable_asynccancel
 #  define CDISABLE	__libc_disable_asynccancel
 #  define __local_multiple_threads	__libc_multiple_threads
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	__librt_enable_asynccancel
 #  define CDISABLE	__librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
index 4278f25..4ef51c0 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
@@ -21,7 +21,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # define _IMM12 #-12
 # define _IMM16 #-16
@@ -111,7 +111,7 @@
 # elif !defined NOT_IN_libc
 #  define __local_enable_asynccancel	__libc_enable_asynccancel
 #  define __local_disable_asynccancel	__libc_disable_asynccancel
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define __local_enable_asynccancel	__librt_enable_asynccancel
 #  define __local_disable_asynccancel	__librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
index fd9968f..2e24d2a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)	\
@@ -74,7 +74,7 @@ __##syscall_name##_nocancel:			\
 # elif !defined NOT_IN_libc
 #  define CENABLE	call __libc_enable_asynccancel
 #  define CDISABLE	call __libc_disable_asynccancel
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	call __librt_enable_asynccancel
 #  define CDISABLE	call __librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
index 4dad994..0ae3b61 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 # undef PSEUDO
 # define PSEUDO(name, syscall_name, args)	\
@@ -72,7 +72,7 @@ __##syscall_name##_nocancel:			\
 # elif !defined NOT_IN_libc
 #  define CENABLE	call __libc_enable_asynccancel
 #  define CDISABLE	call __libc_disable_asynccancel
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	call __librt_enable_asynccancel
 #  define CDISABLE	call __librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h b/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
index 2333338..8140273 100644
--- a/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/tile/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 /* Allow hacking in some extra code if desired. */
 #ifndef PSEUDO_EXTRA
@@ -120,7 +120,7 @@
 # ifdef IS_IN_libpthread
 #  define CENABLE	jal __pthread_enable_asynccancel
 #  define CDISABLE	jal __pthread_disable_asynccancel
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	jal __librt_enable_asynccancel
 #  define CDISABLE	jal __librt_disable_asynccancel
 # else
diff --git a/sysdeps/unix/sysv/linux/tile/waitpid.S b/sysdeps/unix/sysv/linux/tile/waitpid.S
index 9aa793e..ac8e59e 100644
--- a/sysdeps/unix/sysv/linux/tile/waitpid.S
+++ b/sysdeps/unix/sysv/linux/tile/waitpid.S
@@ -1,7 +1,7 @@
 /*
 extern pid_t __waitpid_nocancel (pid_t, int *, int) attribute_hidden;
 */
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 /* Call __NR_wait4, providing fourth argument (struct rusage *) as NULL. */
 #define PSEUDO_EXTRA move r3, zero;
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
index 83cd25f..efdb1c6 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
@@ -22,7 +22,7 @@
 # include <nptl/pthreadP.h>
 #endif
 
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || IS_IN (librt)
 
 /* The code to disable cancellation depends on the fact that the called
    functions are special.  They don't modify registers other than %rax
@@ -67,7 +67,7 @@
 #  define CENABLE	call __libc_enable_asynccancel;
 #  define CDISABLE	call __libc_disable_asynccancel;
 #  define __local_multiple_threads __libc_multiple_threads
-# elif defined IS_IN_librt
+# elif IS_IN (librt)
 #  define CENABLE	call __librt_enable_asynccancel;
 #  define CDISABLE	call __librt_disable_asynccancel;
 # else

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7d9cfc172e9f768a7d00d8a02bef530fe7d2a2c

commit f7d9cfc172e9f768a7d00d8a02bef530fe7d2a2c
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 14:33:02 2014 +0530

    Remove IS_IN_libdl
    
    Replace with IS_IN (libdl).  No changes to generated code on x86_64.
    
    	* dlfcn/dladdr.c: Use IS_IN.
    	* dlfcn/dladdr1.c: Likewise.
    	* dlfcn/dlclose.c: Likewise.
    	* dlfcn/dlerror.c: Likewise.
    	* dlfcn/dlinfo.c: Likewise.
    	* dlfcn/dlmopen.c: Likewise.
    	* dlfcn/dlopen.c: Likewise.
    	* dlfcn/dlsym.c: Likewise.
    	* dlfcn/dlvsym.c: Likewise.

diff --git a/dlfcn/dladdr.c b/dlfcn/dladdr.c
index 922ca44..2537a03 100644
--- a/dlfcn/dladdr.c
+++ b/dlfcn/dladdr.c
@@ -18,7 +18,7 @@
 
 #include <dlfcn.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 int
 dladdr (const void *address, Dl_info *info)
diff --git a/dlfcn/dladdr1.c b/dlfcn/dladdr1.c
index 0efc0dc..fa40dd9 100644
--- a/dlfcn/dladdr1.c
+++ b/dlfcn/dladdr1.c
@@ -18,7 +18,7 @@
 
 #include <dlfcn.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 int
 dladdr1 (const void *address, Dl_info *info, void **extra, int flags)
diff --git a/dlfcn/dlclose.c b/dlfcn/dlclose.c
index ca55b5f..3446a36 100644
--- a/dlfcn/dlclose.c
+++ b/dlfcn/dlclose.c
@@ -19,7 +19,7 @@
 #include <dlfcn.h>
 #include <ldsodefs.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 int
 dlclose (void *handle)
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index 6dd47a7..48b9be2 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -25,7 +25,7 @@
 #include <bits/libc-lock.h>
 #include <ldsodefs.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 char *
 dlerror (void)
diff --git a/dlfcn/dlinfo.c b/dlfcn/dlinfo.c
index 1876d9d..30becfb 100644
--- a/dlfcn/dlinfo.c
+++ b/dlfcn/dlinfo.c
@@ -21,7 +21,7 @@
 #include <ldsodefs.h>
 #include <libintl.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 int
 dlinfo (void *handle, int request, void *arg)
diff --git a/dlfcn/dlmopen.c b/dlfcn/dlmopen.c
index 115f6e9..2905a0e 100644
--- a/dlfcn/dlmopen.c
+++ b/dlfcn/dlmopen.c
@@ -23,7 +23,7 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 void *
 dlmopen (Lmid_t nsid, const char *file, int mode)
diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
index fa58c4c..a724737 100644
--- a/dlfcn/dlopen.c
+++ b/dlfcn/dlopen.c
@@ -22,7 +22,7 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 void *
 dlopen (const char *file, int mode)
diff --git a/dlfcn/dlsym.c b/dlfcn/dlsym.c
index 7bcc78d..d852bea 100644
--- a/dlfcn/dlsym.c
+++ b/dlfcn/dlsym.c
@@ -21,7 +21,7 @@
 
 #include <ldsodefs.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 void *
 dlsym (void *handle, const char *name)
diff --git a/dlfcn/dlvsym.c b/dlfcn/dlvsym.c
index d7a766b..2263429 100644
--- a/dlfcn/dlvsym.c
+++ b/dlfcn/dlvsym.c
@@ -21,7 +21,7 @@
 
 #include <ldsodefs.h>
 
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
 
 void *
 weak_function

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fec3bb42fa49ce112da4b2445e0ccc94d7473662

commit fec3bb42fa49ce112da4b2445e0ccc94d7473662
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 14:30:56 2014 +0530

    Remove IS_IN_nscd
    
    Replace with IS_IN (nscd).  Generated code unchanged on x86_64.
    
    	* include/ifaddrs.h: Use IS_IN.
    	* inet/check_pf.c: Likewise.
    	* sysdeps/unix/sysv/linux/check_pf.c: Likewise.
    	* nscd/Makefile (CPPFLAGS-nscd): Remove IS_IN_nscd.

diff --git a/include/ifaddrs.h b/include/ifaddrs.h
index e1c6cac..2787f21 100644
--- a/include/ifaddrs.h
+++ b/include/ifaddrs.h
@@ -26,7 +26,7 @@ extern void __check_native (uint32_t a1_index, int *a1_native,
 			    uint32_t a2_index, int *a2_native)
   attribute_hidden;
 
-#ifdef IS_IN_nscd
+#if IS_IN (nscd)
 extern uint32_t __bump_nl_timestamp (void) attribute_hidden;
 #endif
 
diff --git a/inet/check_pf.c b/inet/check_pf.c
index b2934f7..c129463 100644
--- a/inet/check_pf.c
+++ b/inet/check_pf.c
@@ -62,7 +62,7 @@ __free_in6ai (struct in6addrinfo *in6ai)
 }
 
 
-#ifdef IS_IN_nscd
+#if IS_IN (nscd)
 uint32_t
 __bump_nl_timestamp (void)
 {
diff --git a/nscd/Makefile b/nscd/Makefile
index 7ab4e9d..40e99aa 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -79,7 +79,7 @@ CFLAGS-nscd_gethst_r.c = -fexceptions
 CFLAGS-nscd_getai.c = -fexceptions
 CFLAGS-nscd_initgroups.c = -fexceptions
 
-CPPFLAGS-nscd += -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -DNOT_IN_libc=1
+CPPFLAGS-nscd += -D_FORTIFY_SOURCE=2 -DNOT_IN_libc
 
 ifeq (yesyes,$(have-fpie)$(build-shared))
 CFLAGS-nscd += $(pie-ccflag)
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index 976f249..4ba13e2 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -65,7 +65,7 @@ static struct cached_data *cache;
 __libc_lock_define_initialized (static, lock);
 
 
-#ifdef IS_IN_nscd
+#if IS_IN (nscd)
 static uint32_t nl_timestamp;
 
 uint32_t
@@ -81,7 +81,7 @@ __bump_nl_timestamp (void)
 static inline uint32_t
 get_nl_timestamp (void)
 {
-#ifdef IS_IN_nscd
+#if IS_IN (nscd)
   return nl_timestamp;
 #elif defined USE_NSCD
   return __nscd_get_nl_timestamp ();

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b36fa5e6c65918158aca3586dfa701644f5e2e56

commit b36fa5e6c65918158aca3586dfa701644f5e2e56
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 14:29:19 2014 +0530

    Remove IS_IN_ldconfig
    
    Replace with IS_IN (ldconfig).  No change in generated code.
    
    	* elf/Makefile (CFLAGS-ldconfig.c): Remove definition of
    	IS_IN_ldconfig.
    	* sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Use IS_IN.
    	* sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h: Likewise.

diff --git a/elf/Makefile b/elf/Makefile
index 7a5a9aa..718a052 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -437,7 +437,7 @@ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
 
 SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
 CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
-		    -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1 -DNOT_IN_libc=1
+		    -D'SLIBDIR="$(slibdir)"' -DNOT_IN_libc
 libof-ldconfig = ldconfig
 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-cache.c = $(SYSCONF-FLAGS)
diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c
index 6662a94..8ac351e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c
+++ b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c
@@ -1,4 +1,4 @@
-#ifdef IS_IN_ldconfig
+#if IS_IN (ldconfig)
 # include <sysdeps/i386/dl-procinfo.c>
 #else
 # include <sysdeps/generic/dl-procinfo.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h
index 3145520..7829e1c 100644
--- a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h
+++ b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h
@@ -1,4 +1,4 @@
-#ifdef IS_IN_ldconfig
+#if IS_IN (ldconfig)
 # include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
 #else
 # include <sysdeps/generic/dl-procinfo.h>

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d7a010a415e413435e4fa64db092077f6753cfa

commit 5d7a010a415e413435e4fa64db092077f6753cfa
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 14:26:54 2014 +0530

    Remove IS_IN_libc
    
    Replace it with IS_IN (libc) and remove the one place that it
    is defined in.  The generated code remains unchanged on x86_64.
    
    	* include/shlib-compat.h [!NOT_IN_libc]: Remove.
    	* nss/nss_files/files-parse.c (IS_IN_libc): Replace with
    	IS_IN (libc).

diff --git a/include/shlib-compat.h b/include/shlib-compat.h
index 30804d3..062da8d 100644
--- a/include/shlib-compat.h
+++ b/include/shlib-compat.h
@@ -45,10 +45,6 @@
    && (!(ABI_##lib##_##obsoleted - 0)					      \
        || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0))))
 
-# ifndef NOT_IN_libc
-#  define IS_IN_libc 1
-# endif
-
 /* That header also defines symbols like `VERSION_libm_GLIBC_2_1' to
    the version set name to use for e.g. symbols first introduced into
    libm in the GLIBC_2.1 version.  Definitions of symbols with explicit
diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c
index 1da1a6f..42fd1f3 100644
--- a/nss/nss_files/files-parse.c
+++ b/nss/nss_files/files-parse.c
@@ -73,7 +73,7 @@ struct parser_data
 /* Export the line parser function so it can be used in nss_db.  */
 # define parser_stclass /* Global */
 # define parse_line CONCAT(_nss_files_parse_,ENTNAME)
-# ifdef IS_IN_libc
+# if IS_IN (libc)
 /* We are defining one of the functions that actually lives in libc
    because it is used to implement fget*ent and suchlike.  */
 #  define nss_files_parse_hidden_def(name) libc_hidden_def (name)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bec065bf56873c5a21a30096a2bf16083f47653e

commit bec065bf56873c5a21a30096a2bf16083f47653e
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 14:24:58 2014 +0530

    Define IN_MODULE for translation units that define NOT_IN_libc
    
    Make sure that all instances where NOT_IN_libc is defined also defines
    IN_MODULE to facilitate removal NOT_IN_libc in future passes.
    
    Verified that the generated code is unchanged on x86_64.
    
    	* elf/Makefile (libof-sotruss-lib): Set as extramodules.

diff --git a/elf/Makefile b/elf/Makefile
index 677635b..7a5a9aa 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -96,6 +96,7 @@ extra-objs += sotruss-lib.os sotruss-lib.so
 install-others += $(inst_auditdir)/sotruss-lib.so
 install-bin-script += sotruss
 generated += sotruss
+libof-sotruss-lib = extramodules
 CPPFLAGS-sotruss-lib = -DNOT_IN_libc
 $(objpfx)sotruss-lib.so: $(objpfx)sotruss-lib.os
 	$(build-module-asneeded)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8535ab4b3667b8968fb9fef2db42658c55c60cf0

commit 8535ab4b3667b8968fb9fef2db42658c55c60cf0
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 11:58:09 2014 +0530

    Remove IN_LIB
    
    Replace with IS_IN and IS_IN_LIB macros instead.  This change results
    in a change in generated code, because it fixes a subtle bug.  The bug
    was introduced when systemtap probes were added to lowlevellock.h,
    which resulted in stap-probe.h being included in a number of places.
    stap-probe.h always defines IN_LIB, which breaks a check in errno.h
    and netdb.h since they rely on that macro to decide whether to
    implement an internal version of a declaration or an external one.
    
    The components that see a code change due to this are:
    
    iconv_prog
    libmemusage.so
    libpcprofile.so
    libSegFault.so
    libutil.so.1
    locale
    localedef
    nscd
    
    All other built components (i.e. libc, libpthread, etc.) remain
    unchanged by this on x86_64.
    
    	* elf/Makefile (CPPFLAGS-.os): Remove IN_LIB.
    	* elf/rtld-Rules (rtld-CPPFLAGS): Likewise.
    	* extra-lib.mk (CPPFLAGS-$(lib)): Likewise.
    	* include/libc-symbols.h (IS_IN_LIB): New macro.
    	* include/errno.h: Use IS_IN_LIB instead of IN_LIB.
    	* include/netdb.h: Likewise.
    	* include/stap-probe.h: Remove all uses of IN_LIB.

diff --git a/elf/Makefile b/elf/Makefile
index 6263a47..677635b 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -443,7 +443,7 @@ CFLAGS-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-rtld.c = $(SYSCONF-FLAGS)
 
 CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-		     -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
+		     -DNOT_IN_libc=1 -DIS_IN_rtld=1)
 
 cpp-srcs-left := $(all-rtld-routines:=.os)
 lib := rtld
diff --git a/elf/rtld-Rules b/elf/rtld-Rules
index 4d78d90..d106048 100644
--- a/elf/rtld-Rules
+++ b/elf/rtld-Rules
@@ -144,6 +144,6 @@ lib := rtld
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
 # This here is the whole point of all the shenanigans.
-rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
+rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
 
 endif
diff --git a/extra-lib.mk b/extra-lib.mk
index fd8812c..c719bd9 100644
--- a/extra-lib.mk
+++ b/extra-lib.mk
@@ -106,4 +106,4 @@ ifneq (,$(cpp-srcs-left))
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 endif
 
-CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1 -DIN_LIB=$(lib)
+CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
diff --git a/include/errno.h b/include/errno.h
index dbf2a61..8e60288 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -22,7 +22,7 @@
 #  define errno rtld_errno
 extern int rtld_errno attribute_hidden;
 
-# elif !defined NOT_IN_libc || defined IN_LIB
+# elif !defined NOT_IN_libc || IS_IN_LIB
 
 #  include <tls.h>
 
@@ -34,7 +34,7 @@ extern int rtld_errno attribute_hidden;
 #  endif
 extern __thread int errno attribute_tls_model_ie;
 
-# endif	/* !NOT_IN_libc || IN_LIB */
+# endif	/* !NOT_IN_libc || IS_IN_LIB */
 
 # define __set_errno(val) (errno = (val))
 
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 9b8208b..1dfcf2c 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -22,6 +22,11 @@
 
 #define IS_IN(lib) (IN_MODULE == MODULE_##lib)
 
+/* Returns true if the current module is a versioned library.  Versioned
+   library names culled from shlib-versions files are assigned a MODULE_*
+   value lower than MODULE_OTHERS_BEGIN.  */
+#define IS_IN_LIB (IN_MODULE < MODULE_OTHERS_BEGIN)
+
 /* This file's macros are included implicitly in the compilation of every
    file in the C library by -imacros.
 
diff --git a/include/netdb.h b/include/netdb.h
index a7960eb..eccdbe6 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -4,7 +4,7 @@
 
 #ifndef _ISOMAC
 /* Macros for accessing h_errno from inside libc.  */
-# if !defined NOT_IN_libc || defined IN_LIB
+# if !defined NOT_IN_libc || IS_IN_LIB
 #  undef  h_errno
 #  ifndef NOT_IN_libc
 #   define h_errno __libc_h_errno
@@ -12,7 +12,7 @@
 #   define h_errno h_errno	/* For #ifndef h_errno tests.  */
 #  endif
 extern __thread int h_errno attribute_tls_model_ie;
-# endif /* !NOT_IN_libc || IN_LIB */
+# endif /* !NOT_IN_libc || IS_IN_LIB */
 # define __set_h_errno(x) (h_errno = (x))
 
 libc_hidden_proto (hstrerror)
diff --git a/include/stap-probe.h b/include/stap-probe.h
index 150fc1e..6532b37 100644
--- a/include/stap-probe.h
+++ b/include/stap-probe.h
@@ -40,18 +40,6 @@
    architecture specific and can be found in the gdb and SystemTap
    source code.  */
 
-# ifndef NOT_IN_libc
-#  define IN_LIB	libc
-# elif !defined IN_LIB
-/* This is intentionally defined with extra unquoted commas in it so
-   that macro substitution will bomb out when it is used.  We don't
-   just use #error here, so that this header can be included by
-   other headers that use LIBC_PROBE inside their own macros.  We
-   only want such headers to fail to compile if those macros are
-   actually used in a context where IN_LIB has not been defined.  */
-#  define IN_LIB	,,,missing -DIN_LIB=... -- not extra-lib.mk?,,,
-# endif
-
 # define LIBC_PROBE(name, n, ...)	\
   LIBC_PROBE_1 (MODULE_NAME, name, n, ## __VA_ARGS__)
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e764b42f50255d22e17518a987c5cb52b7b0f0ee

commit e764b42f50255d22e17518a987c5cb52b7b0f0ee
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 11:55:35 2014 +0530

    Use MODULE_NAME in stap-probe instead of IN_LIB
    
    Verified that the generated code is unchanged on x86_64.
    
    	* scripts/gen-libc-modules.awk (END): Generate defines for
    	MODULE_NAME.
    	* include/stap-probe.h (LIBC_PROBE_1): Use MODULE_NAME instead
    	of IN_LIB.
    	(STAP_PROBE_ASM): Likewise.

diff --git a/include/stap-probe.h b/include/stap-probe.h
index 688646c..150fc1e 100644
--- a/include/stap-probe.h
+++ b/include/stap-probe.h
@@ -30,7 +30,7 @@
 
    Systemtap's header defines the macros STAP_PROBE (provider, name) and
    STAP_PROBEn (provider, name, arg1, ..., argn).  For "provider" we paste
-   in the IN_LIB name (libc, libpthread, etc.) automagically.
+   in MODULE_NAME (libc, libpthread, etc.) automagically.
 
    The format of the arg parameters is discussed here:
 
@@ -53,7 +53,7 @@
 # endif
 
 # define LIBC_PROBE(name, n, ...)	\
-  LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
+  LIBC_PROBE_1 (MODULE_NAME, name, n, ## __VA_ARGS__)
 
 # define LIBC_PROBE_1(lib, name, n, ...) \
   STAP_PROBE##n (lib, name, ## __VA_ARGS__)
@@ -61,7 +61,7 @@
 # define STAP_PROBE0		STAP_PROBE
 
 # define LIBC_PROBE_ASM(name, template) \
-  STAP_PROBE_ASM (IN_LIB, name, template)
+  STAP_PROBE_ASM (MODULE_NAME, name, template)
 
 # define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
 
diff --git a/scripts/gen-libc-modules.awk b/scripts/gen-libc-modules.awk
index d3382b6..1ae4af3 100644
--- a/scripts/gen-libc-modules.awk
+++ b/scripts/gen-libc-modules.awk
@@ -32,9 +32,16 @@ match (FILENAME, ".*soversions.i") {
 
 # Finally, print out the header file.
 END {
-  printf ("/* AUTOGENERATED BY gen-libc-modules.awk, DO NOT EDIT.  */\n\n")
+  printf ("/* AUTOGENERATED BY gen-libc-modules.awk, DO NOT EDIT.  */\n")
   i = 1
+  print ("\n/* Allowed values for IN_MODULE.  */")
   for (l in libs) {
     printf ("#define MODULE_%s %d\n", l, libs[l])
   }
+  print ("\n/* Module names, used in stap-probe.h */")
+  for (l in libs) {
+    printf ("#if IN_MODULE == MODULE_%s\n", l)
+    printf ("# define MODULE_NAME %s\n", l)
+    printf ("#endif\n")
+  }
 }

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8d89863a4d792a4441ae79bf81afcfcfacc68f3f

commit 8d89863a4d792a4441ae79bf81afcfcfacc68f3f
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 11:44:54 2014 +0530

    Auto-generate libc-modules.h
    
    Remove libc-modules.h from the tree and auto-generate it from
    soversions.i and a new file build.list.  Macros generated from
    soversions.i have lower values starting from 1, while those from
    build.list start from a special value MODULE_OTHER_BEGIN, which has a
    high enough value (1000).  This allows us to conveniently
    differentiate between the versioned libraries and other built modules,
    which is needed in errno.h and netdb.h to decide whether to use an
    internal symbol or an external one.
    
    Verified that generated code remains unchanged on x86_64.
    
    	* Makeconfig (module-cppflags): Include libc-modules.h for
    	everything except shlib-versions.v.i.
    	(CPPFLAGS): Use it.
    	(before-compile): Add libc-modules.h.
    	($(common-objpfx)libc-modules.h,
    	$(common-objpfx)libc-modules.stmp): New targets.
    	(common-generated): Add libc-modules.h and libc-modules.stmp.
    	($(common-objpfx)Versions.v.i): Depend on libc-modules.h.
    	* build.list: New file.
    	* include/libc-symbols.h: Don't include libc-modules.h.
    	* include/libc-modules.h: Remove file.
    	* scripts/gen-libc-modules.awk: New script to generate
    	libc-modules.h.
    	* sysdeps/unix/Makefile ($(common-objpfx)sysd-syscalls):
    	Depend on libc-modules.stmp.

diff --git a/Makeconfig b/Makeconfig
index 671eceb..5ffbd92 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -813,10 +813,22 @@ endif	# $(+cflags) == ""
 # of many little headers in the include directory.
 libio-include = -I$(..)libio
 
+# We don't include libc-modules.h when these targets are being built.  These
+# targets don't (and will likely never need to) use the IS_IN facility.  In
+# fact, shlib-versions should not use it because that will create a circular
+# dependency as libc-modules.h is generated from shlib-versions.
+skip-module-cppflags = shlib-versions.v.i Versions.v.i
+
 in-module = $(strip $(foreach lib,$(libof-$(basename $(@F))) $(libof-$(<F)) \
 				  $(libof-$(@F)),-DIN_MODULE=MODULE_$(lib)))
 
 module-def = $(if $(in-module),$(in-module),-DIN_MODULE=MODULE_libc)
+module-cppflags-real = -include $(common-objpfx)libc-modules.h $(module-def)
+
+# We don't need libc-modules.h and the IN_MODULE definition for
+# shlib-version.v.i.
+module-cppflags = $(if $(filter $(@F),$(skip-module-cppflags)), \
+		       ,$(module-cppflags-real))
 
 # These are the variables that the implicit compilation rules use.
 # Note that we can't use -std=* in CPPFLAGS, because it overrides
@@ -824,9 +836,9 @@ module-def = $(if $(in-module),$(in-module),-DIN_MODULE=MODULE_libc)
 # it causes cpp to stop predefining __ASSEMBLER__.
 CPPFLAGS = $(config-extra-cppflags) $(CPPUNDEFS) $(CPPFLAGS-config) \
 	   $($(subdir)-CPPFLAGS) \
-	   $(+includes) $(defines) \
+	   $(+includes) $(defines) $(module-cppflags) \
 	   -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
-	   $(CPPFLAGS-$(suffix $@)) $(module-def) \
+	   $(CPPFLAGS-$(suffix $@)) \
 	   $(foreach lib,$(libof-$(basename $(@F))) \
 			 $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
 	   $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
@@ -986,6 +998,24 @@ endif
 postclean-generated += soversions.mk soversions.i \
 		       shlib-versions.v shlib-versions.v.i
 
+before-compile += $(common-objpfx)libc-modules.h
+ifeq ($(soversions.mk-done),t)
+# Generate a header with macro definitions for use with the IS_IN macro.
+# These are the possible values for the IN_MODULE macro defined when building
+# sources, to identify which module the translation unit is going to be built
+# into.
+$(common-objpfx)libc-modules.h: $(common-objpfx)libc-modules.stmp; @:
+$(common-objpfx)libc-modules.stmp: $(..)scripts/gen-libc-modules.awk \
+				   $(common-objpfx)soversions.i \
+				   $(..)build.list
+	$(AWK) -f $^ > ${@:stmp=T}
+	$(move-if-change) ${@:stmp=T} ${@:stmp=h}
+	touch $@
+
+endif
+
+common-generated += libc-modules.h libc-modules.stmp
+
 # The name under which the run-time dynamic linker is installed.
 # We are currently going for the convention that `/lib/ld.so.1'
 # names the SVR4/ELF ABI-compliant dynamic linker.
diff --git a/build.list b/build.list
new file mode 100644
index 0000000..eab57c7
--- /dev/null
+++ b/build.list
@@ -0,0 +1,15 @@
+iconvprogs
+iconvdata
+ldconfig
+lddlibc4
+libmemusage
+libSegFault
+libpcprofile
+librpcsvc
+libutil
+locale_programs
+memusagestat
+nonlib
+nscd
+extramodules
+libnldbl
diff --git a/include/libc-modules.h b/include/libc-modules.h
deleted file mode 100644
index d12fb90..0000000
--- a/include/libc-modules.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#define MODULE_libc		1
-#define MODULE_libpthread	2
-#define MODULE_rtld		3
-#define MODULE_libdl		4
-#define MODULE_libm		5
-#define MODULE_iconvprogs	6
-#define MODULE_iconvdata	7
-#define MODULE_lddlibc4		8
-#define MODULE_locale_programs	9
-#define MODULE_memusagestat	10
-#define MODULE_libutil		12
-#define MODULE_libBrokenLocale	13
-#define MODULE_libmemusage	15
-#define MODULE_libresolv	16
-#define MODULE_libnss_db	17
-#define MODULE_libnss_files	18
-#define	MODULE_libnss_dns	19
-#define MODULE_libnss_compat	20
-#define MODULE_libnss_hesiod	21
-#define MODULE_libnss_nis	22
-#define MODULE_libnss_nisplus	23
-#define MODULE_libanl		24
-#define MODULE_librt		25
-#define MODULE_libSegFault	26
-#define MODULE_libthread_db	27
-#define MODULE_libcidn		28
-#define MODULE_libcrypt		29
-#define MODULE_libnsl		30
-#define MODULE_libpcprofile	31
-#define MODULE_librpcsvc	32
-#define MODULE_nscd		33
-#define MODULE_ldconfig 	34
-#define MODULE_libnldbl 	35
-
-/* Catch-all for test modules and other binaries.  */
-#define MODULE_nonlib		98
-#define MODULE_extramodules	99
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 131d7eb..9b8208b 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -20,8 +20,6 @@
 #ifndef _LIBC_SYMBOLS_H
 #define _LIBC_SYMBOLS_H	1
 
-#include "libc-modules.h"
-
 #define IS_IN(lib) (IN_MODULE == MODULE_##lib)
 
 /* This file's macros are included implicitly in the compilation of every
diff --git a/scripts/gen-libc-modules.awk b/scripts/gen-libc-modules.awk
new file mode 100644
index 0000000..d3382b6
--- /dev/null
+++ b/scripts/gen-libc-modules.awk
@@ -0,0 +1,40 @@
+# Generate a header file that defines the MODULE_* macros for each library and
+# module we build in glibc.  The library names are pulled in from soversions.i
+# and the additional modules are mentioned one-per-line in build.list.
+BEGIN {
+  PROCINFO["sorted_in"] = "@val_type_asc"
+  shlibs = 1
+  others = 1000
+  libs["OTHERS_BEGIN"] = others++
+}
+
+# Skip over comments.
+$1 == "#" {
+  next
+}
+
+# build.list is simply one module per line.
+match (FILENAME, ".*build.list") {
+  libs[$0] = others++
+}
+
+# We have only one special case in soversions.i parsing, which is to replace ld
+# with rtld since that's what we call it throughout the sources.
+match (FILENAME, ".*soversions.i") {
+  name = $2
+  if (name == "ld")
+    name = "rtld"
+
+  if (!(name in libs)) {
+    libs[name] = shlibs++
+  }
+}
+
+# Finally, print out the header file.
+END {
+  printf ("/* AUTOGENERATED BY gen-libc-modules.awk, DO NOT EDIT.  */\n\n")
+  i = 1
+  for (l in libs) {
+    printf ("#define MODULE_%s %d\n", l, libs[l])
+  }
+}
diff --git a/sysdeps/unix/Makefile b/sysdeps/unix/Makefile
index 0e535b6..573e90d 100644
--- a/sysdeps/unix/Makefile
+++ b/sysdeps/unix/Makefile
@@ -79,7 +79,8 @@ compile-syscall = $(COMPILE.S) -o $@ -x assembler-with-cpp - \
 
 ifndef avoid-generated
 $(common-objpfx)sysd-syscalls: $(..)sysdeps/unix/make-syscalls.sh \
-			       $(wildcard $(+sysdep_dirs:%=%/syscalls.list))
+			       $(wildcard $(+sysdep_dirs:%=%/syscalls.list)) \
+			       $(common-objpfx)libc-modules.stmp
 	for dir in $(+sysdep_dirs); do \
 	  test -f $$dir/syscalls.list && \
 	  { sysdirs='$(sysdirs)' \

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3048eb130dcf42893803a5fffa5299b22a31117b

commit 3048eb130dcf42893803a5fffa5299b22a31117b
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 10:52:28 2014 +0530

    Fix -Wundef warning in SHLIB_COMPAT
    
    Replace the IS_IN_##lib with IS_IN(lib).  Verified that the generated
    code remains the same.
    
    	* include/shlib-compat.h (_SHLIB_COMPAT): Use IS_IN.

diff --git a/include/shlib-compat.h b/include/shlib-compat.h
index fac0814..30804d3 100644
--- a/include/shlib-compat.h
+++ b/include/shlib-compat.h
@@ -41,7 +41,7 @@
 # define SHLIB_COMPAT(lib, introduced, obsoleted)			      \
   _SHLIB_COMPAT (lib, introduced, obsoleted)
 # define _SHLIB_COMPAT(lib, introduced, obsoleted)			      \
-  ((IS_IN_##lib - 0)							      \
+  (IS_IN (lib)								      \
    && (!(ABI_##lib##_##obsoleted - 0)					      \
        || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0))))
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f51e884dd4b86c95198a2f0492df33501c44916

commit 7f51e884dd4b86c95198a2f0492df33501c44916
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Aug 21 10:19:31 2014 +0530

    Add new macro IN_MODULE to identify module in which source is built
    
    The current scheme to identify which module a translation unit is
    built in depends on defining multiple macros IS_IN_* and also defining
    NOT_IN_libc if we're building a non-libc module.  In addition, there
    is an IN_LIB macro that does effectively the same thing, but for
    different modules (notably the systemtap probes).  This macro scheme
    unifies both ideas to use just one macro IN_MODULE and assign it a
    value depending on the module it is being built into.  If the module
    is not defined, it defaults to MODULE_libc.
    
    Patches that follow will remove uses of IS_IN_* variables with the
    IS_IN() macro.  libc-symbols.h has been converted already to give an
    example of how such a transition will look.
    
    Verified that there are no relevant source changes.  One source change
    that will crop up repeatedly is that of nscd_stat, since it uses the
    build timestamp as a constant in its logic.
    
    	* Makeconfig (in-module): Get value of libof set for the
    	translation unit.
    	(module-def): Set IN_MODULE based on value of libof-*.
    	(CPPFLAGS): Add $(module-def) to CPPFLAGS.
    	* Makerules: Don't suffix routine names for nonlib.
    	* include/libc-modules.h: New file.
    	* include/libc-symbols.h: Include libc-modules.h
    	(IS_IN): New macro to replace IS_IN_* macros.
    	* elf/Makefile: Set libof-* for each routine.
    	* elf/rtld-Rules: Likewise.
    	* extra-modules.mk: Likewise.
    	* iconv/Makefile: Likewise.
    	* iconvdata/Makefile: Likewise.
    	* locale/Makefile: Likewise.
    	* malloc/Makefile: Likewise.
    	* nss/Makefile: Likewise.
    	* sysdeps/gnu/Makefile: Likewise.
    	* sysdeps/ieee754/ldbl-opt/Makefile: Likewise.
    	* sysdeps/unix/sysv/linux/Makefile: Likewise.
    	* sysdeps/s390/s390-64/Makefile: Likewise.
    	* nscd/Makefile: Set libof-* for each routine.  Set CFLAGS and
    	CPPFLAGS for nscd instead of nonlib.

diff --git a/Makeconfig b/Makeconfig
index 24a3b82..671eceb 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -813,6 +813,11 @@ endif	# $(+cflags) == ""
 # of many little headers in the include directory.
 libio-include = -I$(..)libio
 
+in-module = $(strip $(foreach lib,$(libof-$(basename $(@F))) $(libof-$(<F)) \
+				  $(libof-$(@F)),-DIN_MODULE=MODULE_$(lib)))
+
+module-def = $(if $(in-module),$(in-module),-DIN_MODULE=MODULE_libc)
+
 # These are the variables that the implicit compilation rules use.
 # Note that we can't use -std=* in CPPFLAGS, because it overrides
 # the implicit -lang-asm and breaks cpp behavior for .S files--notably
@@ -821,7 +826,7 @@ CPPFLAGS = $(config-extra-cppflags) $(CPPUNDEFS) $(CPPFLAGS-config) \
 	   $($(subdir)-CPPFLAGS) \
 	   $(+includes) $(defines) \
 	   -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
-	   $(CPPFLAGS-$(suffix $@)) \
+	   $(CPPFLAGS-$(suffix $@)) $(module-def) \
 	   $(foreach lib,$(libof-$(basename $(@F))) \
 			 $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
 	   $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
diff --git a/Makerules b/Makerules
index 4f2eec3..3cf4c40 100644
--- a/Makerules
+++ b/Makerules
@@ -1223,7 +1223,7 @@ xcheck: xtests
 
 all-nonlib = $(strip $(tests) $(xtests) $(test-srcs) $(test-extras) $(others))
 ifneq (,$(all-nonlib))
-cpp-srcs-left = $(all-nonlib:=.c) $(all-nonlib:=.cc)
+cpp-srcs-left = $(all-nonlib)
 lib := nonlib
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 endif
diff --git a/elf/Makefile b/elf/Makefile
index 94074f3..6263a47 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -436,7 +436,8 @@ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
 
 SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
 CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
-		    -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
+		    -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1 -DNOT_IN_libc=1
+libof-ldconfig = ldconfig
 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-cache.c = $(SYSCONF-FLAGS)
 CFLAGS-rtld.c = $(SYSCONF-FLAGS)
@@ -444,6 +445,10 @@ CFLAGS-rtld.c = $(SYSCONF-FLAGS)
 CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
 		     -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
 
+cpp-srcs-left := $(all-rtld-routines:=.os)
+lib := rtld
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+
 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
 generated += $(addsuffix .so,$(strip $(modules-names)))
 
diff --git a/elf/rtld-Rules b/elf/rtld-Rules
index 0a5d6af..4d78d90 100644
--- a/elf/rtld-Rules
+++ b/elf/rtld-Rules
@@ -138,6 +138,11 @@ ifdef rtld-depfiles
 -include $(rtld-depfiles)
 endif
 
+# Set libof-* for each routine.
+cpp-srcs-left := $(subst .os,,$(rtld-modules))
+lib := rtld
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+
 # This here is the whole point of all the shenanigans.
 rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
 
diff --git a/extra-modules.mk b/extra-modules.mk
index c7ed850..9c2e4d2 100644
--- a/extra-modules.mk
+++ b/extra-modules.mk
@@ -6,4 +6,5 @@
 module := $(firstword $(extra-modules-left))
 extra-modules-left := $(filter-out $(module),$(extra-modules-left))
 
+libof-$(notdir $(module)) := extramodules
 CPPFLAGS-$(module).c += -DNOT_IN_libc
diff --git a/iconv/Makefile b/iconv/Makefile
index 48d17d7..8031a88 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -52,11 +52,12 @@ CFLAGS-gconv_cache.c += -DGCONV_DIR='"$(gconvdir)"'
 CFLAGS-gconv_conf.c = -DGCONV_PATH='"$(gconvdir)"'
 CFLAGS-iconvconfig.c = -DGCONV_PATH='"$(gconvdir)"' -DGCONV_DIR='"$(gconvdir)"'
 
-CPPFLAGS-iconv_charmap = -DNOT_IN_libc
-CPPFLAGS-linereader = -DNOT_IN_libc
-CPPFLAGS-strtab = -DNOT_IN_libc
-CPPFLAGS-charmap = -DNOT_IN_libc
-CPPFLAGS-charmap-dir = -DNOT_IN_libc
+CPPFLAGS-iconvprogs = -DNOT_IN_libc
+
+# Set libof-* for each routine.
+cpp-srcs-left := $(iconv_prog-modules) $(iconvconfig-modules)
+lib := iconvprogs
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
 ifeq ($(run-built-tests),yes)
 xtests-special += $(objpfx)test-iconvconfig.out
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index b6327d6..e0252ee 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -211,6 +211,7 @@ $(objpfx)iconv-rules: Makefile
 	$(AWK) 'NR == 1 { \
 		  for (i = 1; i <= NF; i++) { \
 		    printf "%s-routines := %s\n", $$i, tolower($$i); \
+		    printf "libof-%s := iconvdata\n", tolower($$i); \
 		    printf "%s-map := gconv.map\n", $$i; \
 		  } \
 		}; \
@@ -273,6 +274,11 @@ endif
 
 include ../Rules
 
+# Set libof-* for each routine.
+cpp-srcs-left := $(modules) $(generated-modules)
+lib := iconvdata
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+
 tst-loading-ENV = MALLOC_TRACE=$(objpfx)tst-loading.mtrace
 $(objpfx)mtrace-tst-loading.out: $(objpfx)tst-loading.out
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-loading.mtrace > $@; \
diff --git a/include/libc-modules.h b/include/libc-modules.h
new file mode 100644
index 0000000..d12fb90
--- /dev/null
+++ b/include/libc-modules.h
@@ -0,0 +1,37 @@
+#define MODULE_libc		1
+#define MODULE_libpthread	2
+#define MODULE_rtld		3
+#define MODULE_libdl		4
+#define MODULE_libm		5
+#define MODULE_iconvprogs	6
+#define MODULE_iconvdata	7
+#define MODULE_lddlibc4		8
+#define MODULE_locale_programs	9
+#define MODULE_memusagestat	10
+#define MODULE_libutil		12
+#define MODULE_libBrokenLocale	13
+#define MODULE_libmemusage	15
+#define MODULE_libresolv	16
+#define MODULE_libnss_db	17
+#define MODULE_libnss_files	18
+#define	MODULE_libnss_dns	19
+#define MODULE_libnss_compat	20
+#define MODULE_libnss_hesiod	21
+#define MODULE_libnss_nis	22
+#define MODULE_libnss_nisplus	23
+#define MODULE_libanl		24
+#define MODULE_librt		25
+#define MODULE_libSegFault	26
+#define MODULE_libthread_db	27
+#define MODULE_libcidn		28
+#define MODULE_libcrypt		29
+#define MODULE_libnsl		30
+#define MODULE_libpcprofile	31
+#define MODULE_librpcsvc	32
+#define MODULE_nscd		33
+#define MODULE_ldconfig 	34
+#define MODULE_libnldbl 	35
+
+/* Catch-all for test modules and other binaries.  */
+#define MODULE_nonlib		98
+#define MODULE_extramodules	99
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index d4ab1f3..131d7eb 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -20,6 +20,10 @@
 #ifndef _LIBC_SYMBOLS_H
 #define _LIBC_SYMBOLS_H	1
 
+#include "libc-modules.h"
+
+#define IS_IN(lib) (IN_MODULE == MODULE_##lib)
+
 /* This file's macros are included implicitly in the compilation of every
    file in the C library by -imacros.
 
@@ -468,7 +472,7 @@ for linking")
    If the function should be internal to multiple objects, say ld.so and
    libc.so, the best way is to use:
 
-   #if !defined NOT_IN_libc || defined IS_IN_rtld
+   #if IS_IN (libc) || IS_IN (rtld)
    hidden_proto (foo)
    #endif
 
@@ -584,7 +588,7 @@ for linking")
 # define libc_hidden_data_ver(local, name)
 #endif
 
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
 # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define rtld_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs)
 # define rtld_hidden_def(name) hidden_def (name)
@@ -604,7 +608,7 @@ for linking")
 # define rtld_hidden_data_ver(local, name)
 #endif
 
-#ifdef IS_IN_libm
+#if IS_IN (libm)
 # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define libm_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs)
 # define libm_hidden_def(name) hidden_def (name)
@@ -624,7 +628,7 @@ for linking")
 # define libm_hidden_data_ver(local, name)
 #endif
 
-#ifdef IS_IN_libresolv
+#if IS_IN (libresolv)
 # define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define libresolv_hidden_tls_proto(name, attrs...) \
   hidden_tls_proto (name, ##attrs)
@@ -645,7 +649,7 @@ for linking")
 # define libresolv_hidden_data_ver(local, name)
 #endif
 
-#ifdef IS_IN_librt
+#if IS_IN (librt)
 # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define librt_hidden_tls_proto(name, attrs...) \
   hidden_tls_proto (name, ##attrs)
@@ -666,7 +670,7 @@ for linking")
 # define librt_hidden_data_ver(local, name)
 #endif
 
-#ifdef IS_IN_libdl
+#if IS_IN (libdl)
 # define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define libdl_hidden_tls_proto(name, attrs...) \
   hidden_tls_proto (name, ##attrs)
@@ -687,7 +691,7 @@ for linking")
 # define libdl_hidden_data_ver(local, name)
 #endif
 
-#ifdef IS_IN_libnss_files
+#if IS_IN (libnss_files)
 # define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define libnss_files_hidden_tls_proto(name, attrs...) \
   hidden_tls_proto (name, ##attrs)
@@ -708,7 +712,7 @@ for linking")
 # define libnss_files_hidden_data_ver(local, name)
 #endif
 
-#ifdef IS_IN_libnsl
+#if IS_IN (libnsl)
 # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define libnsl_hidden_tls_proto(name, attrs...) \
   hidden_tls_proto (name, ##attrs)
@@ -729,7 +733,7 @@ for linking")
 # define libnsl_hidden_data_ver(local, name)
 #endif
 
-#ifdef IS_IN_libnss_nisplus
+#if IS_IN (libnss_nisplus)
 # define libnss_nisplus_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define libnss_nisplus_hidden_tls_proto(name, attrs...) \
   hidden_tls_proto (name, ##attrs)
@@ -758,7 +762,7 @@ for linking")
 # define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name)
 #endif
 
-#ifdef IS_IN_libutil
+#if IS_IN (libutil)
 # define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
 # define libutil_hidden_tls_proto(name, attrs...) \
   hidden_tls_proto (name, ##attrs)
diff --git a/locale/Makefile b/locale/Makefile
index e4c3878..5cd18e0 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -85,7 +85,7 @@ locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \
 		  -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
 		  -Iprograms
 
-CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \
+CPPFLAGS-locale_programs = -DLOCALE_PATH='$(localepath)' \
 			   -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
 			   -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
 			   -DLOCSRCDIR='"$(i18ndir)/locales"' \
@@ -96,7 +96,7 @@ CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
 CFLAGS-charmap-dir.c = -Wno-write-strings
 
 # This makes sure -DNOT_IN_libc et al are passed for all these modules.
-cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
-				$(locale-modules) $(lib-modules))
-lib := locale-programs
+cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \
+		 $(lib-modules)
+lib := locale_programs
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
diff --git a/malloc/Makefile b/malloc/Makefile
index 9e93523..fbfada2 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -89,6 +89,11 @@ endif
 do-memusagestat: $(objpfx)memusagestat
 
 memusagestat-modules = memusagestat
+
+cpp-srcs-left := $(memusagestat-modules)
+lib := memusagestat
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+
 $(objpfx)memusagestat: $(memusagestat-modules:%=$(objpfx)%.o)
 	$(LINK.o) -o $@ $^ $(libgd-LDFLAGS) -lgd -lpng -lz -lm
 
diff --git a/nscd/Makefile b/nscd/Makefile
index 639d87b..7ab4e9d 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -79,23 +79,22 @@ CFLAGS-nscd_gethst_r.c = -fexceptions
 CFLAGS-nscd_getai.c = -fexceptions
 CFLAGS-nscd_initgroups.c = -fexceptions
 
-CPPFLAGS-nonlib += -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2
+CPPFLAGS-nscd += -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -DNOT_IN_libc=1
 
 ifeq (yesyes,$(have-fpie)$(build-shared))
-CFLAGS-nonlib += $(pie-ccflag)
+CFLAGS-nscd += $(pie-ccflag)
 endif
 ifeq (yes,$(have-ssp))
-CFLAGS-nonlib += -fstack-protector
+CFLAGS-nscd += -fstack-protector
 endif
 
 ifeq (yesyes,$(have-fpie)$(build-shared))
 LDFLAGS-nscd = -Wl,-z,now
 endif
 
-# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
-# for all these modules.
-cpp-srcs-left := $(nscd-modules:=.c)
-lib := nonlib
+# Set libof-nscd.
+cpp-srcs-left := $(nscd-modules)
+lib := nscd
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
 $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
diff --git a/nss/Makefile b/nss/Makefile
index 1fa7f1f..7114d74 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -105,7 +105,8 @@ $(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
 $(inst_vardbdir)/Makefile: db-Makefile $(+force)
 	$(do-install)
 
-CFLAGS-nss_test1.c = -DNOT_IN_libc=1
+libof-nss_test1 = extramodules
+CPPFLAGS-nss_test1 = -DNOT_IN_libc=1
 $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps)
 	$(build-module)
 ifdef libnss_test1.so-version
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 9b2271b..da6e076 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -145,6 +145,7 @@ LDFLAGS-tst-putenv = $(no-as-needed)
 
 $(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os $(link-libc-deps)
 	$(build-module)
+libof-tst-putenvmod = extramodules
 CFLAGS-tst-putenvmod.c = -DNOT_IN_libc=1
 
 $(objpfx)bug-getcontext: $(libm)
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index c05708d..b5b2cf0 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -29,6 +29,8 @@ ifeq ($(subdir),stdio-common)
 
 errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .)))
 
+libof-errlist-compat = extramodules
+
 ifeq ($(build-shared),yes)
 $(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
 			   $(common-objpfx)Versions.v.i $(before-compile)
diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile
index fe5030e..ce4f0c5 100644
--- a/sysdeps/s390/s390-64/Makefile
+++ b/sysdeps/s390/s390-64/Makefile
@@ -28,6 +28,10 @@ s390x-iconv-modules = ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9 UTF16_UTF32_Z9 UTF8_UT
 extra-modules-left += $(s390x-iconv-modules)
 include extra-module.mk
 
+cpp-srcs-left := $(foreach mod,$(s390x-iconv-modules),$($(mod)-routines))
+lib := iconvdata
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+
 extra-objs      += $(addsuffix .so, $(s390x-iconv-modules))
 install-others  += $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules))
 
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 9ad6d22..2d6d8bb 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -178,6 +178,7 @@ ifeq ($(subdir),elf)
 sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir \
 			dl-fxstatat64
 
+libof-lddlibc4 = lddlibc4
 CPPFLAGS-lddlibc4 += -DNOT_IN_libc
 
 others += pldd

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]