octave-maintainers
[Top][All Lists]
Advanced

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

Re: isascii/toascii with MSVC


From: Michael Goffioul
Subject: Re: isascii/toascii with MSVC
Date: Mon, 25 Feb 2008 06:32:11 +0100

This time with the attachment.

On 2/24/08, Michael Goffioul <address@hidden> wrote:
> I have a problem with recent changes in mappers and isascii/toascii.
> The problem is that MSVC uses #define to define isascii and toascii to
> something else (prefix with __). These definition are located in ctype.h,
> such that octave_value class definition will be different, depending on
> whether you included ctype.h or not.
>
> Up to now, I could re-enable MSVC compilation with a patch like the
> one attached (it's not a changeset as it's only a temporary solution;
> once finalized, I'll provide a real changeset), but I find it rather ugly.
>
> With the previous code, I could solve the problem locally, but now that
> classes have isascii/toascii members, this is more tricky. The patch
> itself is not perfect and fails if you include ctype.h after ov.h (then you
> have re-undefine isascii/toascii).
>
> Another solution would be to use other names than isascii/toascii
> in octave code (except in the DEFUN's), but I don't know if this would
> be acceptable. Any opinion?
>
> BTW, this whole problem is related to a common pattern found in
> MSVC headers that prepend most of the C runtime functions with
> an underscore. When looking in the headers, one can read this is
> required by ANSI. Is this really so? I've never heard that...
>
> Michael.
>

Attachment: patch.diff
Description: Text document


reply via email to

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