This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
HAVE_GETCWD fails to include io.h
- From: Andrew Haley <aph at cambridge dot redhat dot com>
- To: Adam Megacz <gcj at lists dot megacz dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 23 Aug 2002 11:22:47 +0100 (BST)
- Subject: HAVE_GETCWD fails to include io.h
- References: <86ptwap4an.fsf@megacz.com>
Adam Megacz writes:
>
> Hrm, mingw won't build anymore because natSystem.cc uses getcwd()
> without #includ'ing io.h.
getcwd() is defined in unistd.h. That's why the call to getcwd() is
enclosed in #ifdef HAVE_UNISTD_H.
I guess mingw defines getcwd() in another file?
> Where would the appropriate place be for me to add #include<io.h>? In
> win32.h? In a #ifdef-WIN32 block in natSystem.cc?
The latter, probably.
However, I think it's time to break natRuntime.cc into some
OS-specific files before it gets any worse.
Andrew.