Mercurial > hg > octave-lyh > gnulib-hg
changeset 4144:96e52fc820a5
Include specification first.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 08 Jan 2003 18:42:38 +0000 |
parents | 15e576739c3c |
children | 7fa9fefe97e8 |
files | lib/ChangeLog lib/full-write.c lib/safe-read.c |
diffstat | 3 files changed, 21 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2003-01-08 Bruno Haible <bruno@clisp.org> + + * safe-read.c: Include specification header first, to ensure its + selfcontainedness. + * full-write.c: Likewise. + 2003-01-08 Jim Meyering <jim@meyering.net> * full-write.c: Undefine and define-away `const' after inclusion
--- a/lib/full-write.c +++ b/lib/full-write.c @@ -20,20 +20,25 @@ # include <config.h> #endif +/* Specification. */ +#ifdef FULL_READ +# include "full-read.h" +#else +# include "full-write.h" +#endif + #include <errno.h> #ifndef errno extern int errno; #endif #ifdef FULL_READ -# include "full-read.h" # include "safe-read.h" # define safe_rw safe_read # define full_rw full_read # undef const # define const /* empty */ #else -# include "full-write.h" # include "safe-write.h" # define safe_rw safe_write # define full_rw full_write
--- a/lib/safe-read.c +++ b/lib/safe-read.c @@ -1,5 +1,5 @@ /* An interface to read and write that retries after interrupts. - Copyright (C) 1993, 1994, 1998, 2002 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1998, 2002-2003 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 @@ -19,6 +19,13 @@ # include <config.h> #endif +/* Specification. */ +#ifdef SAFE_WRITE +# include "safe-write.h" +#else +# include "safe-read.h" +#endif + /* Get ssize_t. */ #include <sys/types.h> #if HAVE_UNISTD_H @@ -55,11 +62,9 @@ #endif #ifdef SAFE_WRITE -# include "safe-write.h" # define safe_rw safe_write # define rw write #else -# include "safe-read.h" # define safe_rw safe_read # define rw read # undef const