summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc/stdlib
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-11-17 13:39:00 +0000
committerngie <ngie@FreeBSD.org>2014-11-17 13:39:00 +0000
commit8177391ac84430aeb73987802ea58e8bfe9ba72b (patch)
tree5afba437c6e7f13eeeb63c7313aa547c8c24536d /contrib/netbsd-tests/lib/libc/stdlib
parente5d03fbe91f9f0c573d55b2d87f2a1eb517ba14b (diff)
downloadFreeBSD-src-8177391ac84430aeb73987802ea58e8bfe9ba72b.zip
FreeBSD-src-8177391ac84430aeb73987802ea58e8bfe9ba72b.tar.gz
Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) with
their #ifdef equivalents for everything changed in contrib/netbsd-tests. There are some items from the vendor tree that use #if defined(__FreeBSD__) or #if defined(__NetBSD__) which are being left alone Requested by: bde, rpaulo Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/stdlib')
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c2
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c2
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c8
5 files changed, 10 insertions, 10 deletions
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c b/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c
index d3e1f11..c0641db 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c
@@ -42,7 +42,7 @@ __RCSID("$NetBSD: h_atexit.c,v 1.1 2011/01/12 19:44:08 pgoyette Exp $");
extern int __cxa_atexit(void (*func)(void *), void *, void *);
extern void __cxa_finalize(void *);
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
/*
* On shared object unload, in __cxa_finalize, call and clear all installed
* atexit and __cxa_atexit handlers that are either installed by unloaded
@@ -191,7 +191,7 @@ main(int argc, char *argv[])
ASSERT(0 == atexit(normal_handler_0));
ASSERT(0 == atexit(normal_handler_1));
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
ASSERT(0 == __cxa_atexit(cxa_handler_4, &arg_1, dso_handle_1));
ASSERT(0 == __cxa_atexit(cxa_handler_5, &arg_1, dso_handle_1));
ASSERT(0 == __cxa_atexit(cxa_handler_3, &arg_2, dso_handle_2));
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c b/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c
index 58ecd96..ec2b9bb 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c
@@ -34,7 +34,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <err.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
#include <libutil.h>
#endif
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c b/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
index f5ded27..2293e2c 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
@@ -36,7 +36,7 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
#include <libutil.h>
#endif
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c b/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c
index 3b0b885..5a8fa28 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c
@@ -40,7 +40,7 @@ __RCSID("$NetBSD: t_getenv.c,v 1.2 2011/07/15 13:54:31 jruoho Exp $");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
#include <signal.h>
#endif
@@ -155,7 +155,7 @@ ATF_TC_BODY(setenv_basic, tc)
ATF_CHECK_ERRNO(EINVAL, setenv(NULL, "val", 1) == -1);
ATF_CHECK_ERRNO(EINVAL, setenv("", "val", 1) == -1);
ATF_CHECK_ERRNO(EINVAL, setenv("v=r", "val", 1) == -1);
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
/*
Both FreeBSD and OS/X does not validate the second
argument to setenv(3)
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c b/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
index 3c869c4..d665967 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
@@ -75,7 +75,7 @@ __RCSID("$NetBSD: t_hsearch.c,v 1.4 2014/07/20 20:17:21 christos Exp $");
#define REQUIRE_ERRNO(x) ATF_REQUIRE_MSG(x, "%s", strerror(errno))
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
ATF_TC(hsearch_basic);
ATF_TC_HEAD(hsearch_basic, tc)
{
@@ -231,7 +231,7 @@ ATF_TC_BODY(hsearch_two, tc)
hdestroy();
}
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
ATF_TC(hsearch_r_basic);
ATF_TC_HEAD(hsearch_r_basic, tc)
{
@@ -389,14 +389,14 @@ ATF_TC_BODY(hsearch_r_two, tc)
ATF_TP_ADD_TCS(tp)
{
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
ATF_TP_ADD_TC(tp, hsearch_basic);
#endif
ATF_TP_ADD_TC(tp, hsearch_duplicate);
ATF_TP_ADD_TC(tp, hsearch_nonexistent);
ATF_TP_ADD_TC(tp, hsearch_two);
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
ATF_TP_ADD_TC(tp, hsearch_r_basic);
#endif
ATF_TP_ADD_TC(tp, hsearch_r_duplicate);
OpenPOWER on IntegriCloud