|
From: | Jon Kinsey |
Subject: | Re: [Bug-gnubg] Bug: compile error on misc3d.c |
Date: | Mon, 19 Apr 2004 10:40:27 +0100 |
User-agent: | Mozilla Thunderbird 0.5 (Windows/20040207) |
Jon Kinsey wrote:
Achim Mueller wrote:* Joern Thyssen wrote on 17 Apr 2004:On Sat, Apr 17, 2004 at 07:37:16AM +0200, Achim Mueller wrote Try adding unistd.h: #if HAVE_UNISTD_H #include <unistd.h> #endifThat worked (of course ;-) ).And before I had to change misc3d.c (line 28, #include <io.h>), because it couldn't find io.h.Perhaps io.h should only be included for windows?There are two io.h on my system in /usr/include/asm and /usr/include/sys. Changing "#include <io.h>" to "#include <sys/io.h>" did help.It's my fault... I added a call to access() and couldn't work out which include was needed. The windows reference says io.h, which works on windows but I noticed it wasn't anywhere else (so probably wasn't going to work for everyone) - so which include is used elsewhere for access()?I've had a quick look and I don't think it's included correctly in other files - it just gets compiled as an undefined reference. The higher warning level I happen to be using for the 3d library flags the warning (and stops as I've got warnings cause errors set).
Answering myself, I've changed it to: #if HAVE_UNISTD_H #include <unistd.h> #else #include <io.h> #endif which should hopefully work everywhere. Jon
[Prev in Thread] | Current Thread | [Next in Thread] |