From b3228efa69e85fafe07d15471a22ae9a5a905ac8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 31 Dec 2002 12:56:28 +0000 Subject: [PATCH] Make getline.h and unicodeio.h self-contained. --- lib/ChangeLog | 7 +++++++ lib/getline.h | 6 +++++- lib/unicodeio.c | 8 ++------ lib/unicodeio.h | 1 + 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 73d24e051..0b9c9c1b2 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,10 @@ +2002-12-23 Bruno Haible + + * getline.h: Include , for size_t. + + * unicodeio.h: Include , for size_t. + * unicodeio.c: Don't include . + 2002-12-17 Bruno Haible * canon-host.c (strdup): Remove unused declaration. diff --git a/lib/getline.h b/lib/getline.h index 991184c75..636e3dda6 100644 --- a/lib/getline.h +++ b/lib/getline.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 1999, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef GETLINE_H_ # define GETLINE_H_ 1 +# include # include # ifndef PARAMS @@ -27,12 +28,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # endif # endif +/* glibc2 has these functions declared in . Avoid redeclarations. */ # if __GLIBC__ < 2 + int getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream)); int getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream)); + # endif #endif /* not GETLINE_H_ */ diff --git a/lib/unicodeio.c b/lib/unicodeio.c index 2e7ffc9d0..a698ca5df 100644 --- a/lib/unicodeio.c +++ b/lib/unicodeio.c @@ -26,9 +26,8 @@ # include #endif -#if HAVE_STDDEF_H -# include -#endif +/* Specification. */ +#include "unicodeio.h" #include #if HAVE_STRING_H @@ -52,9 +51,6 @@ extern int errno; #define _(msgid) gettext (msgid) #define N_(msgid) msgid -/* Specification. */ -#include "unicodeio.h" - /* When we pass a Unicode character to iconv(), we must pass it in a suitable encoding. The standardized Unicode encodings are UTF-8, UCS-2, UCS-4, UTF-16, UTF-16BE, UTF-16LE, UTF-7. diff --git a/lib/unicodeio.h b/lib/unicodeio.h index fb2b75242..92fa23c33 100644 --- a/lib/unicodeio.h +++ b/lib/unicodeio.h @@ -20,6 +20,7 @@ #ifndef UNICODEIO_H # define UNICODEIO_H +# include # include # ifndef PARAMS -- 2.11.0