changeset 8697:92376abc52b5

Fix fpurge for cygwin. * lib/fpurge.c (fpurge): Fix order of operation flub, and return a value. * modules/fpurge-tests (Depends-on): Clean up trash.
author Eric Blake <ebb9@byu.net>
date Mon, 16 Apr 2007 15:02:36 +0000
parents 54215b13787d
children ae4587be462b
files ChangeLog lib/fpurge.c modules/fpurge-tests
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-04-16  Eric Blake  <ebb9@byu.net>
+
+	Fix fpurge for cygwin.
+	* lib/fpurge.c (fpurge): Fix order of operation flub, and return a
+	value.
+	* modules/fpurge-tests (Depends-on): Clean up trash.
+
 2007-04-16  Simon Josefsson  <simon@josefsson.org>
 
 	* lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
@@ -205,7 +212,7 @@
 	* m4/locale_h.m4: New file.
 
 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
-            Bruno Haible  <bruno@clisp.org>
+	    Bruno Haible  <bruno@clisp.org>
 
 	* m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
 	be determined, test for availability of the copysignf, copysign,
--- a/lib/fpurge.c
+++ b/lib/fpurge.c
@@ -33,9 +33,10 @@
 #elif defined __sferror             /* FreeBSD, NetBSD, OpenBSD, MacOS X, Cygwin */
   fp->_p = fp->_bf._base;
   fp->_r = 0;
-  fp->_w = ((fp->_flags & (__SLBF | __SNBF) == 0) /* fully buffered? */
+  fp->_w = ((fp->_flags & (__SLBF | __SNBF)) == 0 /* fully buffered? */
 	    ? fp->_bf._size
 	    : 0);
+  return 0;
 #elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, mingw */
   fp->_ptr = fp->_base;
   if (fp->_ptr != NULL)
--- a/modules/fpurge-tests
+++ b/modules/fpurge-tests
@@ -8,4 +8,4 @@
 Makefile.am:
 TESTS += test-fpurge
 check_PROGRAMS += test-fpurge
-
+MOSTLYCLEANFILES += t-fpurge.tmp