aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2016-05-12 03:49:22 +0800
committerbapt <bapt@FreeBSD.org>2016-05-12 03:49:22 +0800
commit46500e4a503703fe8897a35592d1f2fdc35c820d (patch)
treef5d05cbe9e08a88f67fd08b05d63d39346034d73 /devel
parentbc4a5bbdb6deb7e136611f891ef10b0ca2297c4a (diff)
downloadfreebsd-ports-gnome-46500e4a503703fe8897a35592d1f2fdc35c820d.tar.gz
freebsd-ports-gnome-46500e4a503703fe8897a35592d1f2fdc35c820d.tar.zst
freebsd-ports-gnome-46500e4a503703fe8897a35592d1f2fdc35c820d.zip
Prevent collision with getline(3)
Diffstat (limited to 'devel')
-rw-r--r--devel/noweb/files/patch-c_finduses.c29
-rw-r--r--devel/noweb/files/patch-c_getline.c25
-rw-r--r--devel/noweb/files/patch-c_getline.h11
-rw-r--r--devel/noweb/files/patch-c_markmain.c11
-rw-r--r--devel/noweb/files/patch-c_notangle.c42
5 files changed, 118 insertions, 0 deletions
diff --git a/devel/noweb/files/patch-c_finduses.c b/devel/noweb/files/patch-c_finduses.c
new file mode 100644
index 000000000000..dbcd5e0bd8b0
--- /dev/null
+++ b/devel/noweb/files/patch-c_finduses.c
@@ -0,0 +1,29 @@
+--- c/finduses.c.orig 2006-06-12 21:16:23 UTC
++++ c/finduses.c
+@@ -49,7 +49,7 @@ main(int argc, char **argv) {
+ #line 155 "finduses.nw"
+ errormsg(Fatal, "%s: couldn't open temporary file\n", progname);
+ #line 78 "finduses.nw"
+- while ((line = getline(stdin)) != NULL) {
++ while ((line = get_line(stdin)) != NULL) {
+ if (fputs(line, tmp) == EOF)
+ #line 157 "finduses.nw"
+ errormsg(Fatal, "%s: error writing temporary file\n", progname);
+@@ -89,7 +89,7 @@ for (; i < argc; i++)
+ #line 66 "finduses.nw"
+ static void read_ids(FILE *in) {
+ char *line;
+- while ((line = getline(in)) != NULL) {
++ while ((line = get_line(in)) != NULL) {
+ if (line[strlen(line)-1] == '\n') line[strlen(line)-1] = 0;
+ add_ident(nwindex, line);
+ }
+@@ -100,7 +100,7 @@ static void add_use_markers(FILE *in, FI
+ int incode = 0;
+ LineOut info; info.line = (char *)0; info.out = out;
+
+- while ((line = getline(in)) != NULL) {
++ while ((line = get_line(in)) != NULL) {
+ if (is_begin(line, "code") || showquotes && is_keyword(line, "quote"))
+ incode = 1;
+ else if (is_end(line, "code") || is_keyword(line, "endquote"))
diff --git a/devel/noweb/files/patch-c_getline.c b/devel/noweb/files/patch-c_getline.c
new file mode 100644
index 000000000000..a2692eba7cc0
--- /dev/null
+++ b/devel/noweb/files/patch-c_getline.c
@@ -0,0 +1,25 @@
+--- c/getline.c.orig 2006-06-12 21:16:23 UTC
++++ c/getline.c
+@@ -19,7 +19,7 @@ void new_buffers(void) {
+ checkptr(buf2 = (char *) realloc(buf2, buf_size));
+ }
+ #line 47 "getline.nw"
+-char *getline (FILE *fp) {
++char *get_line (FILE *fp) {
+
+
+ #line 82 "getline.nw"
+@@ -40,11 +40,11 @@ if (buf1==NULL) {
+ return buf1;
+ }
+ #line 62 "getline.nw"
+-char *getline_expand (FILE *fp) {
++char *get_line_expand (FILE *fp) {
+ char *s, *t;
+ int width;
+
+- if (getline(fp)==NULL) return NULL;
++ if (get_line(fp)==NULL) return NULL;
+
+ #line 87 "getline.nw"
+ if (columnwidth(buf1) > buf_size - 1) {
diff --git a/devel/noweb/files/patch-c_getline.h b/devel/noweb/files/patch-c_getline.h
new file mode 100644
index 000000000000..dc3d97949a3d
--- /dev/null
+++ b/devel/noweb/files/patch-c_getline.h
@@ -0,0 +1,11 @@
+--- c/getline.h.orig 2006-06-12 21:16:23 UTC
++++ c/getline.h
+@@ -1,6 +1,6 @@
+-char *getline_expand (FILE *fp);
++char *get_line_expand (FILE *fp);
+ /* grab a line in buffer, return new buffer or NULL for eof
+ tabs in line are expanded according to tabsize */
+-char *getline (FILE *fp);
++char *get_line (FILE *fp);
+ /* grab a line in the buffer, return a new buffer or NULL for eof
+ no expansion of tabs */
diff --git a/devel/noweb/files/patch-c_markmain.c b/devel/noweb/files/patch-c_markmain.c
new file mode 100644
index 000000000000..b0f949808ea4
--- /dev/null
+++ b/devel/noweb/files/patch-c_markmain.c
@@ -0,0 +1,11 @@
+--- c/markmain.c.orig 2006-06-12 21:16:23 UTC
++++ c/markmain.c
+@@ -62,7 +62,7 @@ void markup (FILE* in, FILE *out, char *
+ #line 121 "markmain.nw"
+ print_pair(out, "file", filename);
+ print_state(out, Begin, state, count);
+-while ((line = getline_expand(in)) != NULL) {
++while ((line = get_line_expand(in)) != NULL) {
+ lineno++;
+
+ #line 172 "markmain.nw"
diff --git a/devel/noweb/files/patch-c_notangle.c b/devel/noweb/files/patch-c_notangle.c
new file mode 100644
index 000000000000..f0d5b65036cf
--- /dev/null
+++ b/devel/noweb/files/patch-c_notangle.c
@@ -0,0 +1,42 @@
+--- c/notangle.c.orig 2006-06-12 21:16:23 UTC
++++ c/notangle.c
+@@ -44,7 +44,7 @@ void read_defs(FILE *in) {
+ char *line = NULL; /* buffer for input */
+ Location loc;
+
+- while ((line = getline(in)) != NULL) {
++ while ((line = get_line(in)) != NULL) {
+ if (is_keyword(line, "fatal")) exit(1);
+
+ #line 101 "notangle.nw"
+@@ -90,7 +90,7 @@ if (!is_begin(line, "code"))
+ #line 66 "notangle.nw"
+
+ #line 97 "notangle.nw"
+-do { line = getline(in);
++do { line = get_line(in);
+ } while (line != NULL && !is_keyword(line,"defn") && !is_keyword(line,"text"));
+ #line 67 "notangle.nw"
+ insist(line,"defn","code chunk had no definition line");
+@@ -102,10 +102,10 @@ modname[strlen(modname)-1]='\0';
+ warn_dots(modname); /* names ending in ... aren't like web */
+ modptr = insert(modname); /* find or add module in table */
+
+- line = getline(in);
++ line = get_line(in);
+ insist(line,"nl","definition line not followed by newline");
+ loc.lineno++;
+- line = getline(in);
++ line = get_line(in);
+ while (line != NULL && !is_end(line,"code")) {
+ if (is_keyword(line,"nl")) {
+ addnewline(modptr);
+@@ -157,7 +157,7 @@ modname[strlen(modname)-1]='\0';
+ #line 182 "notangle.nw"
+ errorat(loc.filename, loc.lineno, Error, "botched code chunk `%s'", line);
+ #line 90 "notangle.nw"
+- line = getline(in);
++ line = get_line(in);
+ }
+
+ #line 176 "notangle.nw"