Print this page
libiberty/testsuite: Avoid conflicting getline()

*** 44,54 **** /* Safely read a single line of arbitrary length from standard input. */ #define LINELEN 80 static void ! getline(buf) struct line *buf; { char *data = buf->data; size_t alloc = buf->alloced; size_t count = 0; --- 44,54 ---- /* Safely read a single line of arbitrary length from standard input. */ #define LINELEN 80 static void ! _getline(buf) struct line *buf; { char *data = buf->data; size_t alloc = buf->alloced; size_t count = 0;
*** 194,209 **** for (;;) { const char *inp; ! getline (&format); if (feof (stdin)) break; ! getline (&input); ! getline (&expect); inp = protect_end (input.data); tests++; --- 194,209 ---- for (;;) { const char *inp; ! _getline (&format); if (feof (stdin)) break; ! _getline (&input); ! _getline (&expect); inp = protect_end (input.data); tests++;
*** 320,330 **** } free (result); if (no_params) { ! getline (&expect); result = cplus_demangle (inp, DMGL_ANSI|DMGL_TYPES); if (result ? strcmp (result, expect.data) : strcmp (input.data, expect.data)) --- 320,330 ---- } free (result); if (no_params) { ! _getline (&expect); result = cplus_demangle (inp, DMGL_ANSI|DMGL_TYPES); if (result ? strcmp (result, expect.data) : strcmp (input.data, expect.data))