diff options
author | ngie <ngie@FreeBSD.org> | 2014-11-17 13:39:00 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2014-11-17 13:39:00 +0000 |
commit | 8177391ac84430aeb73987802ea58e8bfe9ba72b (patch) | |
tree | 5afba437c6e7f13eeeb63c7313aa547c8c24536d /contrib/netbsd-tests/lib/libc/regex | |
parent | e5d03fbe91f9f0c573d55b2d87f2a1eb517ba14b (diff) | |
download | FreeBSD-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/regex')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/regex/debug.c | 8 | ||||
-rw-r--r-- | contrib/netbsd-tests/lib/libc/regex/t_exhaust.c | 8 | ||||
-rw-r--r-- | contrib/netbsd-tests/lib/libc/regex/t_regex_att.c | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/contrib/netbsd-tests/lib/libc/regex/debug.c b/contrib/netbsd-tests/lib/libc/regex/debug.c index 55655eb..f1d2b15 100644 --- a/contrib/netbsd-tests/lib/libc/regex/debug.c +++ b/contrib/netbsd-tests/lib/libc/regex/debug.c @@ -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); diff --git a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c index bc34441..0670e51 100644 --- a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c +++ b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c @@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_exhaust.c,v 1.7 2011/11/16 18:37:31 christos Exp $"); #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 diff --git a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c index fb8f285..0ca44b4 100644 --- a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c +++ b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c @@ -48,7 +48,7 @@ __RCSID("$NetBSD: t_regex_att.c,v 1.1 2012/08/24 20:24:40 jmmv Exp $"); #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 nm, const regmatch_t *pm, " 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"); |