bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'fflush' test failure on Cygwin


From: Bruno Haible
Subject: Re: 'fflush' test failure on Cygwin
Date: Mon, 23 Apr 2007 10:56:28 +0200
User-agent: KMail/1.5.4

Eric Blake wrote:
> 2007-04-16  Eric Blake  <address@hidden>
> 
>       Make fflush rely on fpurge.
>       * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
>       open coding all variants.
>       * modules/fflush (Depends-on): Add fpurge and unistd.
>       * modules/fflush-tests (Depends-on): Unistd is no longer extra.
>       * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.

This fails to compile on some system (sorry, I don't remember which one),
because off_t is not defined. Since off_t is defined by either <sys/types.h>
or <unistd.h>, here's a proposed fix. (<sys/types.h> is simpler, is required
by ISO C, does not need <unistd.h>.)


2007-04-23  Bruno Haible  <address@hidden>

        * lib/fflush.c: Include <sys/types.h>. Needed for off_t.

*** lib/fflush.c        17 Apr 2007 03:38:08 -0000      1.3
--- lib/fflush.c        23 Apr 2007 08:56:03 -0000
***************
*** 18,26 ****
  /* Written by Eric Blake. */
  
  #include <config.h>
! #include <errno.h>
  #include <stdio.h>
  
  #include "fpurge.h"
  
  #undef fflush
--- 18,30 ----
  /* Written by Eric Blake. */
  
  #include <config.h>
! 
! /* Specification.  */
  #include <stdio.h>
  
+ #include <errno.h>
+ #include <sys/types.h>
+ 
  #include "fpurge.h"
  
  #undef fflush





reply via email to

[Prev in Thread] Current Thread [Next in Thread]