octave-maintainers
[Top][All Lists]
Advanced

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

Re: MSVC compiler support [patch 39]: include <direct.h>


From: John W. Eaton
Subject: Re: MSVC compiler support [patch 39]: include <direct.h>
Date: Fri, 20 Oct 2006 14:30:17 -0400

On 18-Oct-2006, Michael Goffioul wrote:

| John W. Eaton a écrit :
| > On 17-Oct-2006, Michael Goffioul wrote:
| >
| > | Some code needs direct.h to be included
| >
| > Exactly what is the error if you don't include <direct.h> in these
| > files?
| >   
| 
| "Unknown identifiers". direct.h defines functions like rmdir, chdir, 
| mkdir, getcwd...

POSIX systems declare rmdir, chdir, and getcwd in unistd.h.  Perhaps
the replacement for unistd.h should include direct.h for MSVC?

POSIX systems declare mkdir in sys/stat.h.  In Octave, all uses of
sys/stat.h go through libocave/statdefs.h, so maybe we could include
direct.h there for MSVC?  I'd prefer to NOT do it this way though:

  #if defined (_MSC_VER)
  #include <direct.h>
  #endif

but instead with some kind of feature test, so that we can write
something like

  #if defined (DIRECT_H_DECLARES_MKDIR)
  #include <direct.h>
  #endif

jwe



reply via email to

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