about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile1
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h6
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/sysdep.h4
-rw-r--r--sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h6
-rw-r--r--sysdeps/unix/sysv/linux/alpha/vfork.S2
-rw-r--r--sysdeps/unix/sysv/linux/arm/sysdep-cancel.h6
-rw-r--r--sysdeps/unix/sysv/linux/arm/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/getpid.c4
-rw-r--r--sysdeps/unix/sysv/linux/hppa/lowlevellock.h2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h8
-rw-r--r--sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S4
-rw-r--r--sysdeps/unix/sysv/linux/i386/lowlevellock.h8
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep-cancel.h4
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h4
-rw-r--r--sysdeps/unix/sysv/linux/ia64/lowlevellock.h2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h6
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.S2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/lowlevellock-futex.h2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h4
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h4
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/lowlevellock.h2
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h6
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/sysdep-cancel.h2
-rw-r--r--sysdeps/unix/sysv/linux/not-cancel.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h4
-rw-r--r--sysdeps/unix/sysv/linux/s390/longjmp_chk.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/lowlevellock.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h4
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S4
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/vfork.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h6
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S4
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/vfork.S2
-rw-r--r--sysdeps/unix/sysv/linux/sh/lowlevellock.S4
-rw-r--r--sysdeps/unix/sysv/linux/sh/lowlevellock.h2
-rw-r--r--sysdeps/unix/sysv/linux/sh/sysdep-cancel.h4
-rw-r--r--sysdeps/unix/sysv/linux/sh/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/sh/vfork.S2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/lowlevellock.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h4
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/brk.S2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h4
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/tile/sysdep-cancel.h2
-rw-r--r--sysdeps/unix/sysv/linux/tile/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/tile/waitpid.S2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/lowlevellock.S4
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/lowlevellock.h8
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sysdep.h2
57 files changed, 96 insertions, 97 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 2d6d8bbc73..72754b76cc 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 f2f8009b3c..de88ad2170 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 3fb6742759..45a86365cd 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 5479556c91..d8439bf09f 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 befcd78e60..d18ae27834 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 9211d049a4..f966e9564d 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 91bdca5226..f2d334329d 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 937b1d4e11..af5db449c3 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 9a60492479..2a4d273e73 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 5d4ff342d4..aec3f37afd 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 4ed46fc63e..13596f11ac 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 ffae477160..1032f4b666 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 c17ff6c586..ab15b9d3ef 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 b5380043a8..d751c58e3e 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 fe4a90e7bb..b586731cfb 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 0458fcea64..c402dca60f 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 004ade1627..9ec89513d1 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 094385256a..49684f8296 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 11150b33ba..8927661544 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 b75bf17549..aa116c4c7e 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 33ce922b2f..d5b8445a41 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 3a91e867f3..97090884e0 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 9c21eeb96c..659248428f 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 0fe5b1208a..5e185a34e4 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 6f79b14f62..40e4225ed5 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 1d711f784a..e12eea71be 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 1d65f20404..0858ce845a 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 25bf797f7c..db1dfb8c5a 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 8683b6bf77..9fff7505fd 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 02c96c289a..d18fbdf0a3 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 2c17b2cab5..14fb4a87ed 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 d19500ded1..3b027e01f1 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 de3f8a4e84..aca7e22a9c 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 e6fd96a334..f0ef41cef4 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 290e464089..3a368c8d5c 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 9622d5a9ab..4955ec1cbd 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 0fbfe9c9e0..6b4a613a6a 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 917a636ee2..696e4b3c04 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 7de1bb07ad..54bb2724c8 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 84b8edb86c..3fab373b03 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 328446c094..e6dbab248d 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 131f42b49f..9b5911c0a2 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 4fc5dd7775..6f57854466 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 76326f5048..63ca02386a 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 eebf406eae..5c8c3f4588 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 cc7adfcdeb..526e87554f 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 e5bb3b5501..c9f38f4e4e 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 567163f907..875ee3d301 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 aee3deecbc..e11f7c18c2 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 e9aedcee0f..52b07c2791 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 028c3930e1..6c10552b14 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 b521351887..d3b98bd359 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 7fa1cca660..dee1b0cce1 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 f2dca070f3..5d8e77c1a7 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 37c0faf25a..2f0cf5cb6d 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 2667292155..cecaec1619 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 6377183d54..16c497bcb4 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