+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
# 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
/* 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
# 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
#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