octave-maintainers
[Top][All Lists]
Advanced

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

Re: Compiling octave with MSVC


From: Michael Goffioul
Subject: Re: Compiling octave with MSVC
Date: Fri, 13 Oct 2006 22:21:48 +0200
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

John W. Eaton a écrit :
On 13-Oct-2006, Michael Goffioul wrote:

| John W. Eaton a écrit :
| > What is the purpose of
| >
| >   -D_WIN32_WINNT=0x0403
| > | | Otherwise, InitializeCriticalSectionAndSpinCount (used in | libcruft/misc/cquit.c)
| is not defined by MSVC headers. This is documented in MSDN.

I think we need some kind of feature test for this and it should be
defined in config.h, not on the compiler command line.

I'll work on the USE_MATH_DEFINES and _WIN32_WINNT config test and
come with a another patch for the build system. I also made other changes to cope with the missing <unistd.h> under MSVC, by producing an "equivalent" header in the top source dir (which actually includes 2 other MSVC headers, idea was taken from mingw). This is somewhat ugly and I first thought about simply changing the files that actually include unistd.h. However I notice that lex-generated files include unistd.h unconditionally, leading to compilation error. So it seemed easier to generate this "dummy" unistd.h directly; this would also avoid touching octave code directly.

| > and what warnings are disabled by
| >
| >   +#pragma warning( disable : 4003 )
| >   +#pragma warning( disable : 4996 )
| >   +#pragma warning( disable : 4661 )
| > | | - missing parameters in macros | - missing implementations in template instantiation (as template code is | not always
| completely in the header, the compiler complains)
| - warning about deprecated function names, which should be now prefixed | with an
| underscore (tempnam, strdup...)

OK, I added this much to the AH_BOTTOM macro in configure.in, but
maybe we should actually fix the problem with deprecated function
names instead of just ignoring the warning?  Can you enable this
warning and then send the warnings that are generated?

I'll do it, however this warning is also used to tell the user that MSVC now uses "secure" versions of string-related functions, like fopen, strdup..., which is MSVC-specific (I guess).

Michael.




reply via email to

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