summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2012-08-22 22:34:57 +0000
committermatthew <matthew@openbsd.org>2012-08-22 22:34:57 +0000
commitab34f86f4671d8c204f0ee042ddb9c00d5016a3b (patch)
tree3a96a249f58e8c6b9597a7c01ea9f4292895d616 /lib
parentFix missing PIC -> __PIC__ conversions; ok pascal (diff)
downloadwireguard-openbsd-ab34f86f4671d8c204f0ee042ddb9c00d5016a3b.tar.xz
wireguard-openbsd-ab34f86f4671d8c204f0ee042ddb9c00d5016a3b.zip
Test for __PIC__ instead of PIC in preparation for eliminating -DPIC
from bsd.lib.mk for C source files. ok deraadt, pascal
Diffstat (limited to 'lib')
-rw-r--r--lib/librthread/rthread.c6
-rw-r--r--lib/librthread/rthread_fork.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/librthread/rthread.c b/lib/librthread/rthread.c
index 704ed46d03d..17b7aed61fa 100644
--- a/lib/librthread/rthread.c
+++ b/lib/librthread/rthread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread.c,v 1.64 2012/08/15 17:07:49 matthew Exp $ */
+/* $OpenBSD: rthread.c,v 1.65 2012/08/22 22:34:57 matthew Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -174,7 +174,7 @@ _rthread_init(void)
_rthread_debug(1, "rthread init\n");
-#if defined(__ELF__) && defined(PIC)
+#if defined(__ELF__) && defined(__PIC__)
/*
* To avoid recursion problems in ld.so, we need to trigger the
* functions once to fully bind them before registering them
@@ -582,7 +582,7 @@ _thread_dump_info(void)
_spinunlock(&_thread_lock);
}
-#if defined(__ELF__) && defined(PIC)
+#if defined(__ELF__) && defined(__PIC__)
/*
* _rthread_dl_lock() provides the locking for dlopen(), dlclose(), and
* the function called via atexit() to invoke all destructors. The latter
diff --git a/lib/librthread/rthread_fork.c b/lib/librthread/rthread_fork.c
index 9ca144821c4..d5786ed5449 100644
--- a/lib/librthread/rthread_fork.c
+++ b/lib/librthread/rthread_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_fork.c,v 1.4 2011/11/06 11:48:59 guenther Exp $ */
+/* $OpenBSD: rthread_fork.c,v 1.5 2012/08/22 22:34:57 matthew Exp $ */
/*
* Copyright (c) 2008 Kurt Miller <kurt@openbsd.org>
@@ -77,7 +77,7 @@ _dofork(int is_vfork)
* binding in the other locking functions can succeed.
*/
-#if defined(__ELF__) && defined(PIC)
+#if defined(__ELF__) && defined(__PIC__)
_rthread_dl_lock(0);
#endif
@@ -85,13 +85,13 @@ _dofork(int is_vfork)
_thread_malloc_lock();
_thread_arc4_lock();
-#if defined(__ELF__) && defined(PIC)
+#if defined(__ELF__) && defined(__PIC__)
_rthread_bind_lock(0);
#endif
newid = sys_fork();
-#if defined(__ELF__) && defined(PIC)
+#if defined(__ELF__) && defined(__PIC__)
_rthread_bind_lock(1);
#endif
@@ -99,7 +99,7 @@ _dofork(int is_vfork)
_thread_malloc_unlock();
_thread_atexit_unlock();
-#if defined(__ELF__) && defined(PIC)
+#if defined(__ELF__) && defined(__PIC__)
_rthread_dl_lock(1);
#endif