Hi Alan,

Alan W. Irwin wrote:
>
>> [out of order] 4. qsastime_testlib cannot be built with MSVC 2008 as 
>> setenv and unsetenv
>>    are not implemented.
>>
>> [so] the above changes
>> are untested.
> 
> Is this a showstopper for MSVC 2008 or do you think you can find for that
> platform (a) some library alternatives for setenv and unsetenv, (b) some
> other alternative to set the time zone to zero temporarily which would make
> mktime act like an inverse to gmtime, or (c) some other alternative that is
> equivalent to the Linux timegm or the inverse of gmtime?
> 


There are too many problems to make qsastime_testlib worthwhile on 32 bit 
Windows XP with MSVC 2008 (and earlier editions) even with 64 bit time_t values.

32 bit Windows XP / MSVC 2008 has extensions for 64 bit time_t values and a 
function  _mkgmtime64 for converting times a struct tm to 64 bit time_t. 
Unfortunately mkgmtime64 returns -1 for all times prior to 1/1/1970.

A further problem for qsastime_testlib is that the MSVC debug version of 
strftime throws an exception for years less than 0 or greater than 9999. 

For the record MSVC has the (unix) putenv function which can be used to 
implement setenv and unsetenv. However googling putenv suggests there could be 
problems with memory leaks and care has to be taken over ownership/lifetime of 
the environment variables. Further it is unclear how an environment variable is 
set to empty string. eg. 
   setenv("TZ","",1) -> putenv("TZ=")
This unsets TZ rather than setting it to an empty string.
 

Default 32 bit Cygwin compiles and links but has 32 bit time_t so testing is 
not done. I didn't investigate if there were 64bit time_t extensions.

Note my investigations were on a 32bit Windows XP system so this excludes 32 
bit Vista and 64bit versions of XP and Vista.


Terrence



      

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to