SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Peter C. N. <spa...@le...> - 2008年07月23日 19:18:58
On solaris with gcc-4.3.1, the macro __cplusplus is not defined to
199711L. This is a long-standing issue with solaris. This doesn't much
matter on some platforms, but for matplotlib, what is happening to me
is that through a series of defines and conditionals, the method
putchar, as used here:
./ttconv/ttutil.cpp:void TTStreamWriter::putchar(int val)
gets tokenized by the preprocessor into putc by
/usr/include/iso/stdio_iso.h, here on line 350:
#define putchar(x) putc((x), stdout)
This only happens if __cplusplus is < 199711L. I'm avoiding this by
building using the studio C compiler, but I thought I'd mention this
in case it's possible to detect this during the configuration stage,
and perhaps wrap with something like:
#ifdef
#if __cplusplus <= 199711L
#undef putchar
#endif
#endif
However, I haven't tested this yet. Has anyone else thought about
this?
Thanks,
-Peter
-- 
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.
From: Michael D. <md...@st...> - 2008年07月31日 13:11:54
(Sorry for the delay, just back from vacation).
I don't have access to that version of gcc on Solaris to test. However, 
if you find a preprocessor workaround that works for you, I'm happy to 
test it on Linux/Mac/Windows and commit.
Cheers,
Mike
Peter C. Norton wrote:
> On solaris with gcc-4.3.1, the macro __cplusplus is not defined to
> 199711L. This is a long-standing issue with solaris. This doesn't much
> matter on some platforms, but for matplotlib, what is happening to me
> is that through a series of defines and conditionals, the method
> putchar, as used here:
>
> ./ttconv/ttutil.cpp:void TTStreamWriter::putchar(int val)
>
> gets tokenized by the preprocessor into putc by
> /usr/include/iso/stdio_iso.h, here on line 350:
>
> #define putchar(x) putc((x), stdout)
>
> This only happens if __cplusplus is < 199711L. I'm avoiding this by
> building using the studio C compiler, but I thought I'd mention this
> in case it's possible to detect this during the configuration stage,
> and perhaps wrap with something like:
>
> #ifdef
> #if __cplusplus <= 199711L
> #undef putchar
> #endif
> #endif
>
> However, I haven't tested this yet. Has anyone else thought about
> this?
>
> Thanks,
>
> -Peter
>
>
>
>
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Peter C. N. <spa...@le...> - 2008年08月12日 00:22:29
Michael,
I'm going to see if there is a fixincludes route to fixing this, but
in case there isn't, is adding an additional name to the
TTStreamWriter, eg. TTStreamWriter::put_char, out of the question?
Thanks,
-Peter
On Thu, Jul 31, 2008 at 09:08:18AM -0400, Michael Droettboom wrote:
> (Sorry for the delay, just back from vacation).
> 
> I don't have access to that version of gcc on Solaris to test. However, 
> if you find a preprocessor workaround that works for you, I'm happy to 
> test it on Linux/Mac/Windows and commit.
> 
> Cheers,
> Mike
> 
> Peter C. Norton wrote:
> >On solaris with gcc-4.3.1, the macro __cplusplus is not defined to
> >199711L. This is a long-standing issue with solaris. This doesn't much
> >matter on some platforms, but for matplotlib, what is happening to me
> >is that through a series of defines and conditionals, the method
> >putchar, as used here:
> >
> >./ttconv/ttutil.cpp:void TTStreamWriter::putchar(int val)
> >
> >gets tokenized by the preprocessor into putc by
> >/usr/include/iso/stdio_iso.h, here on line 350:
> >
> >#define putchar(x) putc((x), stdout)
> >
> >This only happens if __cplusplus is < 199711L. I'm avoiding this by
> >building using the studio C compiler, but I thought I'd mention this
> >in case it's possible to detect this during the configuration stage,
> >and perhaps wrap with something like:
> >
> >#ifdef
> >#if __cplusplus <= 199711L
> >#undef putchar
> >#endif
> >#endif
> >
> >However, I haven't tested this yet. Has anyone else thought about
> >this?
> >
> >Thanks,
> >
> >-Peter
> >
> >
> >
> >
> > 
> 
> -- 
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
> 
-- 
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.
From: Michael D. <md...@st...> - 2008年08月12日 12:28:56
I assume you mean renaming TTStreamWriter::putchar to 
TTStreamWriter::put_char. That would be fine. Once you confirm that 
solves your problem on Solaris, I'll test and commit it here.
Cheers,
Mike
Peter C. Norton wrote:
> Michael,
>
> I'm going to see if there is a fixincludes route to fixing this, but
> in case there isn't, is adding an additional name to the
> TTStreamWriter, eg. TTStreamWriter::put_char, out of the question?
>
> Thanks,
>
> -Peter
>
> On Thu, Jul 31, 2008 at 09:08:18AM -0400, Michael Droettboom wrote:
> 
>> (Sorry for the delay, just back from vacation).
>>
>> I don't have access to that version of gcc on Solaris to test. However, 
>> if you find a preprocessor workaround that works for you, I'm happy to 
>> test it on Linux/Mac/Windows and commit.
>>
>> Cheers,
>> Mike
>>
>> Peter C. Norton wrote:
>> 
>>> On solaris with gcc-4.3.1, the macro __cplusplus is not defined to
>>> 199711L. This is a long-standing issue with solaris. This doesn't much
>>> matter on some platforms, but for matplotlib, what is happening to me
>>> is that through a series of defines and conditionals, the method
>>> putchar, as used here:
>>>
>>> ./ttconv/ttutil.cpp:void TTStreamWriter::putchar(int val)
>>>
>>> gets tokenized by the preprocessor into putc by
>>> /usr/include/iso/stdio_iso.h, here on line 350:
>>>
>>> #define putchar(x) putc((x), stdout)
>>>
>>> This only happens if __cplusplus is < 199711L. I'm avoiding this by
>>> building using the studio C compiler, but I thought I'd mention this
>>> in case it's possible to detect this during the configuration stage,
>>> and perhaps wrap with something like:
>>>
>>> #ifdef
>>> #if __cplusplus <= 199711L
>>> #undef putchar
>>> #endif
>>> #endif
>>>
>>> However, I haven't tested this yet. Has anyone else thought about
>>> this?
>>>
>>> Thanks,
>>>
>>> -Peter
>>>
>>>
>>>
>>>
>>> 
>>> 
>> -- 
>> Michael Droettboom
>> Science Software Branch
>> Operations and Engineering Division
>> Space Telescope Science Institute
>> Operated by AURA for NASA
>>
>> 
>
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /