# HG changeset patch # User Bruno Haible # Date 1041339388 0 # Node ID cf248975b9d39990826378d8d84165ae65f81389 # Parent 6118ace53e83b781839093c93079e550ecb086fc Make getline.h and unicodeio.h self-contained. diff --git a/lib/ChangeLog b/lib/ChangeLog --- 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 --- 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 @@ #ifndef GETLINE_H_ # define GETLINE_H_ 1 +# include # include # ifndef PARAMS @@ -27,12 +28,15 @@ # 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 --- 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 @@ #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 --- a/lib/unicodeio.h +++ b/lib/unicodeio.h @@ -20,6 +20,7 @@ #ifndef UNICODEIO_H # define UNICODEIO_H +# include # include # ifndef PARAMS