From owner-freebsd-ports Sat Oct 19 14:50:10 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A59CA37B404 for ; Sat, 19 Oct 2002 14:50:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF6B243E6E for ; Sat, 19 Oct 2002 14:50:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9JLo3x3051970 for ; Sat, 19 Oct 2002 14:50:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9JLo3j0051969; Sat, 19 Oct 2002 14:50:03 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B8D037B406 for ; Sat, 19 Oct 2002 14:45:30 -0700 (PDT) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAE1843E77 for ; Sat, 19 Oct 2002 14:45:29 -0700 (PDT) (envelope-from kargl@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.12.6/8.12.5) with ESMTP id g9JLjT4G077081 for ; Sat, 19 Oct 2002 14:45:29 -0700 (PDT) (envelope-from kargl@troutmask.apl.washington.edu) Received: (from kargl@localhost) by troutmask.apl.washington.edu (8.12.6/8.12.6/Submit) id g9JLjT74077080; Sat, 19 Oct 2002 14:45:29 -0700 (PDT) Message-Id: <200210192145.g9JLjT74077080@troutmask.apl.washington.edu> Date: Sat, 19 Oct 2002 14:45:29 -0700 (PDT) From: "Steven G. Kargl" Reply-To: "Steven G. Kargl" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/44281: Fix build of lang/nawk Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 44281 >Category: ports >Synopsis: Fix build of lang/nawk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 19 14:50:03 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Steven G. Kargl >Release: FreeBSD 5.0-CURRENT i386 >Organization: apl/uw >Environment: System: FreeBSD troutmask.apl.washington.edu 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Sep 4 12:10:46 PDT 2002 kargl@troutmask.apl.washington.edu:/usr/obj/usr/src/sys/TROUTMASK i386 >Description: Fix the build of lang/nawk on -current. >How-To-Repeat: cd lang/nawk ; make >Fix: diff -ur nawk.orig/distinfo nawk/distinfo --- nawk.orig/distinfo Fri Mar 15 18:56:57 2002 +++ nawk/distinfo Sat Oct 19 14:26:41 2002 @@ -1 +1 @@ -MD5 (awk.tar.gz) = 65f0afae31a1ed77dd21de5a15be570d +MD5 (awk.tar.gz) = 1e2ef4bce7e538c8bf513ac21120bb26 diff -ur nawk.orig/files/patch-ba nawk/files/patch-ba --- nawk.orig/files/patch-ba Fri Nov 3 12:24:42 2000 +++ nawk/files/patch-ba Sat Oct 19 14:41:24 2002 @@ -1,10 +1,10 @@ ---- b.c.orig Sun Sep 24 17:18:38 2000 -+++ b.c Fri Nov 3 01:59:32 2000 +--- b.c.orig Sat Oct 19 14:29:49 2002 ++++ b.c Sat Oct 19 14:38:33 2002 @@ -27,6 +27,9 @@ #define DEBUG #include -+#ifdef __FreeBSD__ ++#ifdef __FreeBSD__ +#include +#endif #include @@ -14,65 +14,66 @@ fa *fatab[NFA]; int nfatab = 0; /* entries in fatab */ -+#ifdef __FreeBSD__ ++#ifdef __FreeBSD__ +static int +collate_range_cmp(a, b) +int a, b; +{ -+ int r; -+ static char s[2][2]; ++ int r; ++ static char s[2][2]; + -+ if ((unsigned char)a == (unsigned char)b) -+ return 0; -+ s[0][0] = a; -+ s[1][0] = b; -+ if ((r = strcoll(s[0], s[1])) == 0) -+ r = (unsigned char)a - (unsigned char)b; -+ return r; ++ if ((unsigned char)a == (unsigned char)b) ++ return 0; ++ s[0][0] = a; ++ s[1][0] = b; ++ if ((r = strcoll(s[0], s[1])) == 0) ++ r = (unsigned char)a - (unsigned char)b; ++ return r; +} +#endif + - fa *makedfa(char *s, int anchor) /* returns dfa for reg expr s */ + fa *makedfa(const char *s, int anchor) /* returns dfa for reg expr s */ { int i, use, nuse; @@ -287,6 +308,9 @@ int i, c, c2; uschar *p = (uschar *) argp; uschar *op, *bp; -+#ifdef __FreeBSD__ -+ int c3; ++#ifdef __FreeBSD__ ++ int c3; +#endif static uschar *buf = 0; static int bufsz = 100; -@@ -303,6 +327,22 @@ +@@ -303,6 +327,23 @@ c2 = *p++; if (c2 == '\\') c2 = quoted((char **) &p); -+#ifdef __FreeBSD__ -+ if (collate_range_cmp(c, c2) > 0) { -+ bp--; -+ i--; -+ continue; -+ } -+ for (c3 = 0; c3 < (1 << CHAR_BIT) - 1; c3++) { -+ if (collate_range_cmp(c, c3) <= 0 && -+ collate_range_cmp(c3, c2) <= 0) { -+ if (!adjbuf(&buf, &bufsz, bp-buf+2, 100, &bp, 0)) -+ FATAL("out of space for character class [%.10s...] 2", p); -+ *bp++ = c3 + 1; -+ i++; -+ } -+ } ++#ifdef __FreeBSD__ ++ if (collate_range_cmp(c, c2) > 0) { ++ bp--; ++ i--; ++ continue; ++ } ++ for (c3 = 0; c3 < (1 << CHAR_BIT) - 1; c3++) { ++ if (collate_range_cmp(c, c3) <= 0 && ++ collate_range_cmp(c3, c2) <= 0) { ++ if (!adjbuf(&buf, &bufsz, bp-buf+2, 100, &bp, 0)) ++ FATAL("out of space for character class [%.10s...] 2", p); ++ *bp++ = c3 + 1; ++ i++; ++ } ++ } +#else /*FreeBSD*/ ++ if (c > c2) { /* empty; ignore */ bp--; i--; -@@ -314,6 +354,7 @@ +@@ -314,6 +355,7 @@ *bp++ = ++c; i++; } -+#endif /*FreeBSD*/ ++#endif /*FreeBSD*/ continue; } } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message