Hi Alan,

I added these redefinition macros to plcdemos.h and plc++demos.h. But  
since we already use such a macro for isnan(), where PL__HAVE_ISNAN is  
defined in plConfig.h, I decided to do the same as well for _snprintf.  
So I copied the relevant part form config.h.cmake to plConfig.h.cmake  
and all works again for Visual C++. If this is not correct in your  
opinion, we should make changes as well for _isnan(). Actually, why do  
we have config.h and plConfig.h, where the latter seems to be a subset  
of the first?

Best Regards,
Werner

On Sep 13, 2009, at 11:09 PM, Alan W. Irwin wrote:

> On 2009-09-13 13:27-0700 Alan W. Irwin wrote:
>
>> Therefore, I suggest following exactly what is done in plplotP.h  
>> for both
>> plcdemos.h and plc++demos.h.  That should allow the current C and C++
>> examples 19 to compile without issues on all platforms and also  
>> allows us to
>> replace all versions of sprintf with snprintf (which is good  
>> practice) for
>> all C and C++ examples.  Note, with this solution plcdemos.h and plc 
>> ++demos.h
>> should be renamed to plcdemos.h.in and plc++demos.h.in (as  
>> configuration
>> template files to create plcdemos.h and plc++demos.h).
>>
>> In the configuration template files, use
>>
>> #cmakedefine PL_HAVE_SNPRINTF
>> and
>> #cmakedefine _PL_HAVE_SNPRINTF
>>
>> Those will get configured to
>>
>> #ifdef PL_HAVE_SNPRINTF
>> and
>> #ifdef _PL_HAVE_SNPRINTF
>
> I didn't state that last correctly.
>
> That should read instead,
>
> Those will get configured to
>
> #define PL_HAVE_SNPRINTF
> and
> #define _PL_HAVE_SNPRINTF
>
> if the corresponding CMake variables are true.  If the corresponding  
> CMake
> variables are false, than you get a configured line that is simply
> a comment.
>
> Alan
> __________________________
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and  
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state  
> implementation
> for stellar interiors (freeeos.sf.net); PLplot scientific plotting  
> software
> package (plplot.org); the libLASi project (unifont.org/lasi); the  
> Loads of
> Linux Links project (loll.sf.net); and the Linux Brochure Project
> (lbproject.sf.net).
> __________________________
>
> Linux-powered Science
> __________________________
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel


--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria
DVR-Nr: 0005886

email: sme...@iap.tuwien.ac.at
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
        +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to