Author: ngie
Date: Mon Nov 17 13:39:00 2014
New Revision: 274626
URL: https://svnweb.freebsd.org/changeset/base/274626

Log:
  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

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c
  head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c
  head/contrib/netbsd-tests/lib/libc/gen/t_glob.c
  head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
  head/contrib/netbsd-tests/lib/libc/gen/t_nice.c
  head/contrib/netbsd-tests/lib/libc/gen/t_raise.c
  head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
  head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c
  head/contrib/netbsd-tests/lib/libc/gen/t_time.c
  head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c
  head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c
  head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c
  head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
  head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c
  head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c
  head/contrib/netbsd-tests/lib/libc/net/t_ether_aton.c
  head/contrib/netbsd-tests/lib/libc/regex/debug.c
  head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
  head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
  head/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c
  head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c
  head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
  head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c
  head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
  head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
  head/contrib/netbsd-tests/lib/libc/string/t_strerror.c
  head/contrib/netbsd-tests/lib/libc/sys/t_access.c
  head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c
  head/contrib/netbsd-tests/lib/libc/sys/t_getgroups.c
  head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c
  head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c
  head/contrib/netbsd-tests/lib/libc/sys/t_listen.c
  head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c
  head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c
  head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c
  head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c
  head/contrib/netbsd-tests/lib/libc/sys/t_poll.c
  head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
  head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c
  head/contrib/netbsd-tests/lib/libc/sys/t_stat.c
  head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c
  head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c
  head/contrib/netbsd-tests/lib/libc/sys/t_write.c
  head/contrib/netbsd-tests/lib/libc/time/t_strptime.c
  head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c
  head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c
  head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c
  head/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c
  head/contrib/netbsd-tests/lib/libc/tls/t_tls_static_helper.c
  head/contrib/netbsd-tests/lib/libc/tls_dso/h_tls_dynamic.c
  head/contrib/netbsd-tests/lib/libpthread/h_atexit.c
  head/contrib/netbsd-tests/lib/libpthread/t_detach.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c  Mon Nov 
17 13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c  Mon Nov 
17 13:39:00 2014        (r274626)
@@ -31,7 +31,7 @@
  */
 
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <sys/stat.h>
 #endif
 #include <atf-c.h>
@@ -251,7 +251,7 @@ ATF_TC_BODY(t_spawn_open_nonexistent, tc
        posix_spawn_file_actions_destroy(&fa);
 }
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 ATF_TC(t_spawn_open_nonexistent_diag);
 
 ATF_TC_HEAD(t_spawn_open_nonexistent_diag, tc)
@@ -381,7 +381,7 @@ ATF_TP_ADD_TCS(tp)
 {
        ATF_TP_ADD_TC(tp, t_spawn_fileactions);
        ATF_TP_ADD_TC(tp, t_spawn_open_nonexistent);
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        ATF_TP_ADD_TC(tp, t_spawn_open_nonexistent_diag);
 #endif
        ATF_TP_ADD_TC(tp, t_spawn_reopen);

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c   Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c   Mon Nov 17 13:39:00 
2014        (r274626)
@@ -56,7 +56,7 @@ ATF_TC_BODY(getcwd_err, tc)
        ATF_REQUIRE(getcwd(buf, 0) == NULL);
        ATF_REQUIRE(errno == EINVAL);
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        errno = 0;
 
        ATF_REQUIRE(getcwd((void *)-1, sizeof(buf)) == NULL);

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_glob.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_glob.c     Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_glob.c     Mon Nov 17 13:39:00 
2014        (r274626)
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_glob.c,v 1.3 2013/01
 #include <string.h>
 #include <errno.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include "h_macros.h"
 #define        __gl_stat_t struct stat
 #define        _S_IFDIR S_IFDIR
@@ -138,7 +138,7 @@ gl_readdir(void *v)
                dir.d_ino = dd->pos;
                dir.d_type = f->dir ? DT_DIR : DT_REG;
                DPRINTF(("readdir %s %d\n", dir.d_name, dir.d_type));
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
                dir.d_reclen = -1; /* Does not have _DIRENT_RECLEN */
 #else
                dir.d_reclen = _DIRENT_RECLEN(&dir, dir.d_namlen);
@@ -223,7 +223,7 @@ run(const char *p, int flags, const char
 }
 
 
-#if !defined(__FreeBSD__)
+#ifndef __FreeBSD__
 ATF_TC(glob_star);
 ATF_TC_HEAD(glob_star, tc)
 {
@@ -272,7 +272,7 @@ ATF_TC_BODY(glob_nocheck, tc)
 
 ATF_TP_ADD_TCS(tp)
 {
-#if !defined(__FreeBSD__)
+#ifndef __FreeBSD__
        ATF_TP_ADD_TC(tp, glob_star);
 #endif
        ATF_TP_ADD_TC(tp, glob_star_not);

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c  Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c  Mon Nov 17 
13:39:00 2014        (r274626)
@@ -34,7 +34,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <libutil.h>
 #else
 #include <util.h>
@@ -82,7 +82,7 @@ const struct hnopts {
        /*
         * Truncated output.  Rev. 1.7 produces "1.0 K".
         */
-#if !defined(__FreeBSD__)
+#ifndef __FreeBSD__
        { 6, 1000, "A", HN_AUTOSCALE, HN_DECIMAL, -1, "" },
 
        /*

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_nice.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_nice.c     Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_nice.c     Mon Nov 17 13:39:00 
2014        (r274626)
@@ -72,7 +72,7 @@ ATF_TC_BODY(nice_err, tc)
 {
        int i;
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_expect_fail("nice(incr) with incr < 0 fails with unprivileged "
           "users and sets errno == EPERM; see PR # 189821 for more details");
 #endif
@@ -98,7 +98,7 @@ ATF_TC_HEAD(nice_priority, tc)
 
 ATF_TC_BODY(nice_priority, tc)
 {
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        int i, pri, pri2, nic;
 #else
        int i, pri, nic;
@@ -115,7 +115,7 @@ ATF_TC_BODY(nice_priority, tc)
                pri = getpriority(PRIO_PROCESS, 0);
                ATF_REQUIRE(errno == 0);
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
                if (nic != pri)
                        atf_tc_fail("nice(3) and getpriority(2) conflict");
 #endif
@@ -130,14 +130,14 @@ ATF_TC_BODY(nice_priority, tc)
                if (pid == 0) {
 
                        errno = 0;
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
                        pri = getpriority(PRIO_PROCESS, 0);
 #else
                        pri2 = getpriority(PRIO_PROCESS, 0);
 #endif
                        ATF_REQUIRE(errno == 0);
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
                        if (pri != pri2)
 #else
                        if (nic != pri)
@@ -180,7 +180,7 @@ ATF_TC_HEAD(nice_thread, tc)
 ATF_TC_BODY(nice_thread, tc)
 {
        pthread_t tid[5];
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        int pri, rv, val;
 #else
        int rv, val;
@@ -196,7 +196,7 @@ ATF_TC_BODY(nice_thread, tc)
                val = nice(i);
                ATF_REQUIRE(val != -1);
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
                pri = getpriority(PRIO_PROCESS, 0);
                rv = pthread_create(&tid[i], NULL, threadfunc, &pri);
 #else

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_raise.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_raise.c    Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_raise.c    Mon Nov 17 13:39:00 
2014        (r274626)
@@ -43,7 +43,7 @@ static int    count;
 static void    handler_err(int);
 static void    handler_ret(int);
 static void    handler_stress(int);
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 static int     sig[] = { SIGALRM, SIGIO, SIGUSR1, SIGUSR2 };
 #else
 static int     sig[] = { SIGALRM, SIGIO, SIGUSR1, SIGUSR2, SIGPWR };

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c    Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c    Mon Nov 17 
13:39:00 2014        (r274626)
@@ -63,7 +63,7 @@ ATF_TC_BODY(setdomainname_basic, tc)
 
                (void)memset(name, 0, sizeof(name));
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
                /* 
                 * Sanity checks to ensure that the wrong invariant isn't being
                 * tested for per PR # 181127
@@ -101,7 +101,7 @@ ATF_TC_BODY(setdomainname_limit, tc)
 
        (void)memset(name, 0, sizeof(name));
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        ATF_REQUIRE(setdomainname(name, MAXHOSTNAMELEN - 1 ) == 0);
        ATF_REQUIRE(setdomainname(name, MAXHOSTNAMELEN) == -1);
 #endif

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c  Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c  Mon Nov 17 13:39:00 
2014        (r274626)
@@ -28,7 +28,7 @@
 
 #include <atf-c.h>
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 #include <sys/inttypes.h>
 #endif
 #include <sys/resource.h>
@@ -87,7 +87,7 @@ sig_debug(int signo, siginfo_t *info, uc
                printf("uc_stack %p %lu 0x%x\n", ctx->uc_stack.ss_sp,
                    (unsigned long)ctx->uc_stack.ss_size,
                    ctx->uc_stack.ss_flags);
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
                for (i = 0; i < __arraycount(ctx->uc_mcontext.__gregs); i++)
                        printf("uc_mcontext.greg[%d] 0x%lx\n", i,
                            (long)ctx->uc_mcontext.__gregs[i]);
@@ -144,7 +144,7 @@ sigchild_action(int signo, siginfo_t *in
                printf("si_uid=%d\n", info->si_uid);
                printf("si_pid=%d\n", info->si_pid);
                printf("si_status=%d\n", info->si_status);
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
                printf("si_utime=%lu\n", (unsigned long int)info->si_utime);
                printf("si_stime=%lu\n", (unsigned long int)info->si_stime);
 #endif

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_time.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_time.c     Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_time.c     Mon Nov 17 13:39:00 
2014        (r274626)
@@ -31,7 +31,7 @@
 #include <sys/cdefs.h>
 __RCSID("$NetBSD: t_time.c,v 1.2 2011/11/11 05:03:38 jruoho Exp $");
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <sys/time.h>
 #endif
 #include <atf-c.h>

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c  Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c  Mon Nov 17 13:39:00 
2014        (r274626)
@@ -107,7 +107,7 @@ ATF_TC_BODY(ttyname_r_err, tc)
                ATF_REQUIRE(rv == ERANGE);
        }
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_expect_fail("FreeBSD returns ENOTTY instead of EBADF; see 
bin/191936");
 #endif
        rv = ttyname_r(-1, buf, ttymax);

Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c       Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c       Mon Nov 17 
13:39:00 2014        (r274626)
@@ -132,7 +132,7 @@ h_ctype2(const struct test *t, bool use_
        size_t n;
 
        ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL);
 #else
        if (setlocale(LC_CTYPE, t->locale) == NULL) {
@@ -245,7 +245,7 @@ ATF_TC_BODY(mbrtowc_internal, tc)
 {
        struct test *t;
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_expect_fail("ja_* locale fails");
 #endif
        for (t = &tests[0]; t->data != NULL; ++t)

Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c      Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c      Mon Nov 17 
13:39:00 2014        (r274626)
@@ -150,7 +150,7 @@ ATF_TC_BODY(mbstowcs_basic, tc)
                int i;
 
                ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
                ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL);
 #else
                if (setlocale(LC_CTYPE, t->locale) == NULL) {

Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -76,7 +76,7 @@ h_mbtowc(const char *locale, const char 
        char *str;
 
        ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        ATF_REQUIRE(setlocale(LC_CTYPE, locale) != NULL);
 #else
        if (setlocale(LC_CTYPE, locale) == NULL) {
@@ -137,13 +137,13 @@ ATF_TC_BODY(mbtowc, tc)
        h_mbtowc("ja_JP.ISO2022-JP", "\033$B", "\033$B$\"\033(B");
        h_mbtowc("ja_JP.SJIS", "\202", "\202\240");
        h_mbtowc("ja_JP.eucJP", "\244", "\244\242");
-#if !defined(__FreeBSD__)
+#ifndef __FreeBSD__
        /* Moved last as it fails */
        h_mbtowc("zh_CN.GB18030", "\241", "\241\241");
 #endif
        h_mbtowc("zh_TW.Big5", "\241", "\241@");
        h_mbtowc("zh_TW.eucTW", "\241", "\241\241");
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_expect_fail("zh_CN.GB18030");
        h_mbtowc("zh_CN.GB18030", "\241", "\241\241");
 #endif

Modified: head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -66,7 +66,7 @@ __RCSID("$NetBSD: t_wcstod.c,v 1.3 2011/
 
 #include <atf-c.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <stdio.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -109,7 +109,7 @@ h_wctomb(const struct test *t, char tc)
        size_t sz, ret, i;
 
        ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL);
 #else
        if (setlocale(LC_CTYPE, t->locale) == NULL) {

Modified: head/contrib/netbsd-tests/lib/libc/net/t_ether_aton.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/net/t_ether_aton.c       Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/net/t_ether_aton.c       Mon Nov 17 
13:39:00 2014        (r274626)
@@ -46,14 +46,14 @@ __RCSID("$NetBSD: t_ether_aton.c,v 1.1 2
 #include <string.h>
 #include <errno.h>
 
-#if !defined(__NetBSD__)
-#if defined(__linux__)
+#ifndef __NetBSD__
+#ifdef __linux__
 #include <netinet/ether.h>
 #endif
 #include <net/ethernet.h>
 #endif
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 #define ETHER_ADDR_LEN 6
 
 int ether_aton_r(u_char *dest, size_t len, const char *str);
@@ -65,7 +65,7 @@ static const struct {
        int error;
 } tests[] = {
        { { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab }, "01:23:45:67:89:ab", 0 },
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        { { 0x00, 0x01, 0x22, 0x03, 0x14, 0x05 }, "0:1:22-3:14:05", 0 },
        { { 0x00, 0x01, 0x22, 0x03, 0x14, 0x05 }, "000122031405", 0 },
        { { 0x0a, 0x0B, 0xcc, 0xdD, 0xEE, 0x0f }, "0a0BccdDEE0f", 0 },
@@ -86,13 +86,13 @@ ATF_TC_HEAD(tc_ether_aton, tc)
  
 ATF_TC_BODY(tc_ether_aton, tc)
 {
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        u_char dest[ETHER_ADDR_LEN];
 #else
        struct ether_addr dest;
 #endif
        size_t t;
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        int e, r;
 #else
        int e;
@@ -103,7 +103,7 @@ ATF_TC_BODY(tc_ether_aton, tc)
        for (t = 0; tests[t].str; t++) {
                s = tests[t].str;
                if ((e = tests[t].error) == 0) {
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
                        if (ether_aton_r(dest, sizeof(dest), s) != e)
                                atf_tc_fail("failed on `%s'", s);
                        if (memcmp(dest, tests[t].res, sizeof(dest)) != 0)
@@ -115,7 +115,7 @@ ATF_TC_BODY(tc_ether_aton, tc)
                                atf_tc_fail("unexpected result on `%s'", s);
 #endif
                } else {
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
                        if ((r = ether_aton_r(dest, sizeof(dest), s)) != e)
                                atf_tc_fail("unexpectedly succeeded on `%s' "
                                    "(%d != %d)", s, r, e);

Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/regex/debug.c    Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/regex/debug.c    Mon Nov 17 13:39:00 
2014        (r274626)
@@ -34,7 +34,7 @@
 #include <string.h>
 
 #include <sys/types.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <wchar.h>
 #include <wctype.h>
 #endif
@@ -54,7 +54,7 @@ static char *regchar(int);
 void
 regprint(regex_t *r, FILE *d)
 {
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        struct re_guts *g = r->re_g;
        int c;
        int last;
@@ -177,7 +177,7 @@ s_print(struct re_guts *g, FILE *d)
                        break;
                case OANYOF:
                        fprintf(d, "[(%ld)", (long)opnd);
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
                        cs = &g->sets[opnd];
                        last = -1;
                        for (size_t i = 0; i < g->csetsize+1; i++)      /* +1 
flushes */
@@ -250,7 +250,7 @@ s_print(struct re_guts *g, FILE *d)
                        fprintf(d, ">");
                        break;
                default:
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
                        fprintf(d, "!%ld(%ld)!", OP(*s), opnd);
 #else
                        fprintf(d, "!%d(%d)!", OP(*s), opnd);

Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_exhaust.c,v 1.7 2011
 #include <stdlib.h>
 #include <err.h>
 #include <atf-c.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <sys/resource.h>
 #endif
 
@@ -179,7 +179,7 @@ ATF_TC_HEAD(regcomp_too_big, tc)
            " crash, but return a proper error code");
        // libtre needs it.
        atf_tc_set_md_var(tc, "timeout", "600");
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_set_md_var(tc, "require.memory", "64M");
 #else
        atf_tc_set_md_var(tc, "require.memory", "120M");
@@ -189,12 +189,12 @@ ATF_TC_HEAD(regcomp_too_big, tc)
 ATF_TC_BODY(regcomp_too_big, tc)
 {
        regex_t re;
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        struct rlimit limit;
 #endif
        int e;
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024;
        ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1);
 #endif

Modified: head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c      Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c      Mon Nov 17 
13:39:00 2014        (r274626)
@@ -48,7 +48,7 @@ __RCSID("$NetBSD: t_regex_att.c,v 1.1 20
 #include <vis.h>
 #include <ctype.h>
 #include <atf-c.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <libutil.h>
 #endif
 
@@ -377,7 +377,7 @@ checkmatches(const char *matches, size_t
                    " cur=%d, max=%zu", res, l, len - off);
                off += l;
        }
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        ATF_CHECK_STREQ_MSG(res, matches, " at line %zu", lineno);
 #else
        ATF_REQUIRE_STREQ_MSG(res, matches, " at line %zu", lineno);
@@ -580,7 +580,7 @@ ATF_TC_BODY(leftassoc, tc)
         * any explation.  Mark as broken here, but I don't know why. */
        atf_tc_expect_fail("Reason for breakage unknown");
 #endif
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_expect_fail("The expected and matched groups are mismatched on 
FreeBSD");
 #endif
        att_test(tc, "leftassoc");

Modified: head/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/h_atexit.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -42,7 +42,7 @@ __RCSID("$NetBSD: h_atexit.c,v 1.1 2011/
 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));

Modified: head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -34,7 +34,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <err.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <libutil.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c   Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c   Mon Nov 17 
13:39:00 2014        (r274626)
@@ -36,7 +36,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <libutil.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -40,7 +40,7 @@ __RCSID("$NetBSD: t_getenv.c,v 1.2 2011/
 #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)

Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c       Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c       Mon Nov 17 
13:39:00 2014        (r274626)
@@ -75,7 +75,7 @@ __RCSID("$NetBSD: t_hsearch.c,v 1.4 2014
 
 #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);

Modified: head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -51,7 +51,7 @@ unsigned char *start[BLOCKTYPES] = {
 };
 
 char result[100];
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 const char goodResult[] = "7b405d24bc03195474c70ddae9e1f8fb";
 #else
 const char goodResult[] = "217b4fbe456916bf62a2f85df752e4ab";
@@ -93,7 +93,7 @@ ATF_TC_BODY(memcpy_basic, tc)
        start[2] = auto1;
        start[3] = auto2;
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        srandom(0L);
 #else
        /*

Modified: head/contrib/netbsd-tests/lib/libc/string/t_strerror.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/string/t_strerror.c      Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/string/t_strerror.c      Mon Nov 17 
13:39:00 2014        (r274626)
@@ -37,7 +37,7 @@ __RCSID("$NetBSD: t_strerror.c,v 1.3 201
 #include <locale.h>
 #include <string.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <stdio.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_access.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_access.c   Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_access.c   Mon Nov 17 13:39:00 
2014        (r274626)
@@ -40,7 +40,7 @@ __RCSID("$NetBSD: t_access.c,v 1.1 2011/
 
 #include <atf-c.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <sys/stat.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c    Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c    Mon Nov 17 
13:39:00 2014        (r274626)
@@ -63,7 +63,7 @@ __RCSID("$NetBSD: t_clock_gettime.c,v 1.
 #include <sys/param.h>
 #include <sys/sysctl.h>
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 #include <machine/int_limits.h>
 #endif
 
@@ -75,7 +75,7 @@ __RCSID("$NetBSD: t_clock_gettime.c,v 1.
 #include <time.h>
 #include <unistd.h>
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 #include "../../../h_macros.h"
 #else
 #include <limits.h>

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getgroups.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_getgroups.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_getgroups.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -57,7 +57,7 @@ ATF_TC_BODY(getgroups_err, tc)
 
        errno = 0;
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_expect_fail("Reported as kern/189941");
 #endif
        ATF_REQUIRE(getgroups(-1, gidset) == -1);

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -47,7 +47,7 @@ static void           sighandler(int);
 static const size_t    maxiter = 2000;
 
 static void
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 sighandler(int signo __unused)
 #else
 sighandler(int signo)

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c   Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c   Mon Nov 17 13:39:00 
2014        (r274626)
@@ -149,11 +149,11 @@ ATF_TC_BODY(kqueue_desc_passing, tc)
 
        printf("parent (pid %d): sending kq fd %d\n", getpid(), kq);
        if (sendmsg(s[0], &m, 0) == -1) {
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
                ATF_REQUIRE_EQ_MSG(errno, EBADF, "errno is %d", errno);
                atf_tc_skip("PR kern/46523");
 #endif
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
                ATF_REQUIRE_EQ_MSG(errno, EOPNOTSUPP, "errno is %d", errno);
                close(s[0]);
 #endif

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_listen.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_listen.c   Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_listen.c   Mon Nov 17 13:39:00 
2014        (r274626)
@@ -36,7 +36,7 @@
 #include <arpa/inet.h>
 #include <netinet/in.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <sys/socket.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c   Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c   Mon Nov 17 13:39:00 
2014        (r274626)
@@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_msgrcv.c,v 1.3 2013/
 #include <time.h>
 #include <unistd.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <limits.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c   Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c   Mon Nov 17 13:39:00 
2014        (r274626)
@@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_msgsnd.c,v 1.2 2011/
 #include <time.h>
 #include <unistd.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <limits.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_nanosleep.c,v 1.3 20
 #include <unistd.h>
 
 static void
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 handler(int signo __unused)
 #else
 handler(int signo)

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c    Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c    Mon Nov 17 13:39:00 
2014        (r274626)
@@ -53,7 +53,7 @@ run(int flags)
        while ((i = open("/", O_RDONLY)) < 3)
                ATF_REQUIRE(i != -1);
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        closefrom(3);
 #else
        ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
@@ -80,7 +80,7 @@ run(int flags)
                ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) == 0);
        }
 
-#if !defined(__FreeBSD__)
+#ifndef __FreeBSD__
        if (flags & O_NOSIGPIPE) {
                ATF_REQUIRE(fcntl(fd[0], F_GETNOSIGPIPE) != 0);
                ATF_REQUIRE(fcntl(fd[1], F_GETNOSIGPIPE) != 0);
@@ -116,7 +116,7 @@ ATF_TC_BODY(pipe2_consume, tc)
 {
        struct rlimit rl;
        int err, filedes[2];
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        int old;
 
        closefrom(4);
@@ -132,7 +132,7 @@ ATF_TC_BODY(pipe2_consume, tc)
         * file descriptor limit in the middle of a pipe2() call - i.e.
         * before the call only a single descriptor may be openend.
         */
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        old = rl.rlim_cur;
 #endif
        rl.rlim_cur = 4;
@@ -141,7 +141,7 @@ ATF_TC_BODY(pipe2_consume, tc)
 
        err = pipe2(filedes, O_CLOEXEC);
        ATF_REQUIRE(err == -1);
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        rl.rlim_cur = old;
        err = setrlimit(RLIMIT_NOFILE, &rl);
 #endif
@@ -169,7 +169,7 @@ ATF_TC_BODY(pipe2_cloexec, tc)
        run(O_CLOEXEC);
 }
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 ATF_TC(pipe2_nosigpipe);
 ATF_TC_HEAD(pipe2_nosigpipe, tc)
 {
@@ -201,7 +201,7 @@ ATF_TP_ADD_TCS(tp)
        ATF_TP_ADD_TC(tp, pipe2_consume);
        ATF_TP_ADD_TC(tp, pipe2_nonblock);
        ATF_TP_ADD_TC(tp, pipe2_cloexec);
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        ATF_TP_ADD_TC(tp, pipe2_nosigpipe);
 #endif
        ATF_TP_ADD_TC(tp, pipe2_einval);

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_poll.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_poll.c     Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_poll.c     Mon Nov 17 13:39:00 
2014        (r274626)
@@ -233,7 +233,7 @@ ATF_TC_BODY(poll_err, tc)
        ATF_REQUIRE_ERRNO(EINVAL, poll(&pfd, 1, -2) == -1);
 }
 
-#if !defined(__FreeBSD__)
+#ifndef __FreeBSD__
 ATF_TC(pollts_basic);
 ATF_TC_HEAD(pollts_basic, tc)
 {
@@ -386,7 +386,7 @@ ATF_TP_ADD_TCS(tp)
        ATF_TP_ADD_TC(tp, poll_3way);
        ATF_TP_ADD_TC(tp, poll_basic);
        ATF_TP_ADD_TC(tp, poll_err);
-#if !defined(__FreeBSD__)
+#ifndef __FreeBSD__
        ATF_TP_ADD_TC(tp, pollts_basic);
        ATF_TP_ADD_TC(tp, pollts_err);
        ATF_TP_ADD_TC(tp, pollts_sigmask);

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c   Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c   Mon Nov 17 13:39:00 
2014        (r274626)
@@ -58,7 +58,7 @@ ATF_TC_BODY(revoke_basic, tc)
        size_t i, n;
        int *buf;
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_skip("revoke(2) is only implemented for devfs(5).");
 #endif
        (void)memset(&res, 0, sizeof(struct rlimit));
@@ -116,7 +116,7 @@ ATF_TC_BODY(revoke_err, tc)
        errno = 0;
        ATF_REQUIRE_ERRNO(ENAMETOOLONG, revoke(buf) == -1);
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_skip("revoke(2) is only implemented for devfs(5).");
 #endif
        errno = 0;
@@ -139,7 +139,7 @@ ATF_TC_BODY(revoke_perm, tc)
        int fd, sta;
        pid_t pid;
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_skip("revoke(2) is only implemented for devfs(5).");
 #endif
        pw = getpwnam("nobody");

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c Mon Nov 17 13:39:00 
2014        (r274626)
@@ -46,7 +46,7 @@ static void   handler(int, siginfo_t *, vo
 static int value;
 
 static void
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 handler(int signo __unused, siginfo_t *info __unused, void *data __unused)
 #else
 handler(int signo, siginfo_t *info, void *data)
@@ -76,7 +76,7 @@ ATF_TC_BODY(sigqueue_basic, tc)
 
        sv.sival_int = VALUE;
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        /* 
         * From kern_sig.c:
         * Specification says sigqueue can only send signal to single process.

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_stat.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_stat.c     Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_stat.c     Mon Nov 17 13:39:00 
2014        (r274626)
@@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_stat.c,v 1.4 2012/03
 
 #include <stdio.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <netinet/in.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c     Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c     Mon Nov 17 
13:39:00 2014        (r274626)
@@ -38,7 +38,7 @@ static timer_t t;
 static bool fail = true;
 
 static void
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 timer_signal_handler(int signo, siginfo_t *si, void *osi __unused)
 #else
 timer_signal_handler(int signo, siginfo_t *si, void *osi)

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c   Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c   Mon Nov 17 13:39:00 
2014        (r274626)
@@ -85,7 +85,7 @@ ATF_TC_BODY(unlink_err, tc)
        (void)memset(buf, 'x', sizeof(buf));
 
        errno = 0;
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        ATF_REQUIRE_ERRNO(EISDIR, unlink("/") == -1);
 #else
        ATF_REQUIRE_ERRNO(EBUSY, unlink("/") == -1);

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_write.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_write.c    Mon Nov 17 13:30:18 
2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_write.c    Mon Nov 17 13:39:00 
2014        (r274626)
@@ -32,7 +32,7 @@ __COPYRIGHT("@(#) Copyright (c) 2008\
 __RCSID("$NetBSD: t_write.c,v 1.2 2011/10/19 16:19:30 jruoho Exp $");
 
 #include <sys/uio.h>
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 #include <sys/syslimits.h>
 #endif
 
@@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_write.c,v 1.2 2011/1
 #include <string.h>
 #include <unistd.h>
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #include <limits.h>
 #endif
 
@@ -55,7 +55,7 @@ static bool            fail = false;
 static const char      *path = "write";
 
 static void
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 sighandler(int signo __unused)
 #else
 sighandler(int signo)

Modified: head/contrib/netbsd-tests/lib/libc/time/t_strptime.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/time/t_strptime.c        Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/time/t_strptime.c        Mon Nov 17 
13:39:00 2014        (r274626)
@@ -49,7 +49,7 @@ h_pass(const char *buf, const char *fmt,
        exp = buf + len;
        ret = strptime(buf, fmt, &tm);
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        ATF_CHECK_MSG(ret == exp,
            "strptime(\"%s\", \"%s\", tm): incorrect return code: "
            "expected: %p, got: %p", buf, fmt, exp, ret);
@@ -88,7 +88,7 @@ h_fail(const char *buf, const char *fmt)
 {
        struct tm tm = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, NULL };
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        ATF_CHECK_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", "
            "\"%s\", &tm) should fail, but it didn't", buf, fmt);
 #else
@@ -108,7 +108,7 @@ ATF_TC_HEAD(common, tc)
 ATF_TC_BODY(common, tc)
 {
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
        atf_tc_expect_fail("There are various issues with strptime on FreeBSD");
 #endif
 
@@ -189,13 +189,13 @@ ATF_TC_BODY(day, tc)
        h_pass("mon", "%a", 3, -1, -1, -1, -1, -1, -1, 1, -1);
        h_pass("tueSDay", "%A", 7, -1, -1, -1, -1, -1, -1, 2, -1);
        h_pass("sunday", "%A", 6, -1, -1, -1, -1, -1, -1, 0, -1);
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        h_fail("sunday", "%EA");
 #else
        h_pass("Sunday", "%EA", 6, -1, -1, -1, -1, -1, -1, 0, -1);
 #endif
        h_pass("SaturDay", "%A", 8, -1, -1, -1, -1, -1, -1, 6, -1);
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
        h_fail("SaturDay", "%OA");
 #else
        h_pass("SaturDay", "%OA", 8, -1, -1, -1, -1, -1, -1, 6, -1);

Modified: head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c   Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c   Mon Nov 17 
13:39:00 2014        (r274626)
@@ -36,7 +36,7 @@ __RCSID("$NetBSD: h_tls_dlopen.c,v 1.5 2
 
 #include <atf-c.h>
 #include <unistd.h>
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 #include <sys/tls.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c       Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c       Mon Nov 17 
13:39:00 2014        (r274626)
@@ -39,7 +39,7 @@ __RCSID("$NetBSD: t_tls_dlopen.c,v 1.3 2
 #include <pthread.h>
 #include <unistd.h>
 
-#if defined(__NetBSD__)
+#ifdef __NetBSD__
 #include <sys/tls.h>
 #endif
 

Modified: head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c      Mon Nov 17 
13:30:18 2014        (r274625)
+++ head/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c      Mon Nov 17 
13:39:00 2014        (r274626)
@@ -38,7 +38,7 @@ __RCSID("$NetBSD: t_tls_dynamic.c,v 1.3 
 #include <pthread.h>
 #include <unistd.h>

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to