X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetline.c;h=ba05abb73affe0a6bb812309b28beee73145ff65;hb=0aaee99cbb17d6508bef411304056c88ef6b3a89;hp=6757dee1219a266df07325aaea5860f372e2e8b5;hpb=876cbb501793eabdc8565159d18292af560c5016;p=gnulib.git diff --git a/lib/getline.c b/lib/getline.c index 6757dee12..ba05abb73 100644 --- a/lib/getline.c +++ b/lib/getline.c @@ -18,17 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */ -#ifdef HAVE_CONFIG_H +#if HAVE_CONFIG_H # include #endif -/* The `getdelim' function is only declared if there following symbol +/* The `getdelim' function is only declared if the following symbol is defined. */ #define _GNU_SOURCE 1 #include #include -#if defined __GNU_LIBRARY__ && defined HAVE_GETDELIM +#if defined __GNU_LIBRARY__ && HAVE_GETDELIM int getline (lineptr, n, stream) @@ -42,17 +42,17 @@ getline (lineptr, n, stream) #else /* ! have getdelim */ -#define NDEBUG -#include +# define NDEBUG +# include -#if STDC_HEADERS -# include -#else +# if STDC_HEADERS +# include +# else char *malloc (), *realloc (); -#endif +# endif /* Always add at least this many bytes when extending the buffer. */ -#define MIN_CHUNK 64 +# define MIN_CHUNK 64 /* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR + OFFSET (and null-terminate it). *LINEPTR is a pointer returned from