From 25269d65dbf89ed02076d5a47c0ed8e56e46a944 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 11 May 2016 21:51:01 +0000 Subject: Prevent collision with get_line --- news/cg/files/patch-util.c | 20 ++++++++++++++++++++ news/cg/files/patch-util.h | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 news/cg/files/patch-util.c create mode 100644 news/cg/files/patch-util.h (limited to 'news') diff --git a/news/cg/files/patch-util.c b/news/cg/files/patch-util.c new file mode 100644 index 000000000000..05e2c8e4fcfb --- /dev/null +++ b/news/cg/files/patch-util.c @@ -0,0 +1,20 @@ +--- util.c.orig 2002-05-13 16:27:29 UTC ++++ util.c +@@ -180,7 +180,7 @@ rename_uniq(const char *from, char **to) + + + char * +-getline(FILE *f) ++get_line(FILE *f) + { + static char *b; + static int bsize; +@@ -234,7 +234,7 @@ getline(FILE *f) + void + skip_rest(FILE *f) + { +- while (getline(f) != NULL) ++ while (get_line(f) != NULL) + ; + } + diff --git a/news/cg/files/patch-util.h b/news/cg/files/patch-util.h new file mode 100644 index 000000000000..2228d5475e7f --- /dev/null +++ b/news/cg/files/patch-util.h @@ -0,0 +1,11 @@ +--- util.h.orig 2002-04-24 15:45:24 UTC ++++ util.h +@@ -57,7 +57,7 @@ void copy_stream(stream *in, out_state * + void debug(out_state *out, char *fmt, ...); + char *expand(char *path); + FILE *fopen_uniq(char **s); +-char *getline(FILE *f); ++char *get_line(FILE *f); + void output_header(out_state *out, symbol name, struct header *h); + void prdebug(int level, char *fmt, ...); + void prdebug_init(int do_file, int do_stdout); -- cgit v1.2.3