bug-gnulib
[Top][All Lists]
Advanced

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

Re: ioctl.c


From: Bruno Haible
Subject: Re: ioctl.c
Date: Thu, 12 Apr 2012 12:45:10 +0200
User-agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; )

Hi,

> gl tests fail to compile, but after patching (i've attached the patch)
> they all pass too.

Thanks for the report. I can reproduce the compilation failure with a
gnulib testdir for just the module 'ioctl':

gcc-3 -mno-cygwin -DHAVE_CONFIG_H -I. -I..  -DGNULIB_STRICT_CHECKING=1 
-I/usr/local/mingw/include -Wall  -g -O2 -MT ioctl.o -MD -MP -MF 
.deps/ioctl.Tpo -c -o ioctl.o ioctl.c
ioctl.c: In function `primary_ioctl':
ioctl.c:60: error: `HANDLE' undeclared (first use in this function)
ioctl.c:60: error: (Each undeclared identifier is reported only once
ioctl.c:60: error: for each function it appears in.)
ioctl.c:60: error: parse error before "_get_osfhandle"
make[3]: *** [ioctl.o] Error 1

I'm applying this patch, based on yours.


2012-04-12  LRN  <address@hidden>  (tiny change)

        ioctl: Fix compilation error on mingw.
        * lib/ioctl.c: Include <windows.h>.
        Also reported by Ray Satiro <address@hidden>.

--- lib/ioctl.c.orig    Thu Apr 12 12:44:11 2012
+++ lib/ioctl.c Thu Apr 12 12:36:59 2012
@@ -46,6 +46,10 @@
 
 # include <errno.h>
 
+/* Get HANDLE.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
 # include "fd-hook.h"
 /* Get _get_osfhandle.  */
 # include "msvc-nothrow.h"




reply via email to

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