octave-maintainers
[Top][All Lists]
Advanced

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

Re: MINGW build


From: Paul Kienzle
Subject: Re: MINGW build
Date: Tue, 24 Sep 2002 11:05:55 -0400

> > kpathsea/config.h
> >
> >    The following leads to all sorts of conflicts:
> >
> >    #ifdef WIN32
> >    #define __STDC__ 1
> >    #include <kpathsea/win32lib.h>
> >    #endif
> >
> > => instead  use something like
> >
> >    #ifdef MINGW
> >    #include <windws.h>
> >    #include <fcntl.h>
> >    #include <dirent.h>
> >    #endif
> >
> > Surely somebody has built kpathsea for MinGW, so it is a matter of finding
> > the correct fix.
> 
> I do have a comment on using the pre-processor macro/s to determine
> the system or system type. If you want a Windows 32 bit system, then
> it's __WIN32__ and/or __WIN32 (the non-underscored counterparts are
> an abomination); if you want to exclude Cygwin, then it's __WIN32__ &&
> !__CYGWIN__. Mingw is plain Windows32, and thus covered by __WIN32__,
> and there is typically never a good reason to use __MINGW32__ explicitly,
> unless you're taking advantage of something specific in Mingw helper
> libraries.

The following patch will compile kpathsea without errors, but I have no
idea how dependent it is on the particular version of MINGW32.

kpathsea/ChangeLog
Paul Kienzle <address@hidden>
        * config.h: Remove MINGW32 conflicts with win32lib.h.
        * c-stat.h: Ditto.

Index: c-stat.h
===================================================================
RCS file: /cvs/octave/kpathsea/c-stat.h,v
retrieving revision 1.5
diff -r1.5 c-stat.h
25c25
< #ifdef WIN32
---
> #if defined (WIN32) && !defined (__MINGW32__)
Index: config.h
===================================================================
RCS file: /cvs/octave/kpathsea/config.h,v
retrieving revision 1.5
diff -r1.5 config.h
37c37,41
< #ifdef WIN32
---
> #if defined(__MINGW32__)
> #include <windows.h>
> #include <fcntl.h>
> #include <dirent.h>
> #elif defined(WIN32)



reply via email to

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