FreeBSD Bugzilla – Attachment 25934 Details for
Bug 44281
Fix build of lang/nawk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.53 KB, created by
Steven G. Kargl
on 2002-10-19 22:50:03 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Steven G. Kargl
Created:
2002-10-19 22:50:03 UTC
Size:
3.53 KB
patch
obsolete
>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 <ctype.h> >-+#ifdef __FreeBSD__ >++#ifdef __FreeBSD__ > +#include <limits.h> > +#endif > #include <stdio.h> >@@ -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; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44281
: 25934