Werner Smekal wrote:
Hi,

  
Could somebody with Windows access try example 29?  That example only uses
POSIX compliant time functions like mktime and difftime, but I am not sure
whether the Windows C library provides those or not (or even supplies them
under a different name).
    

example 29 compiles nicely on Windows with the Visual C++ compiler and 
MinGW. Unexpectedly the Visual C++ compiled examples works fine, while 
the MinGW compiled crashes. A short session with gdb gives:

Program received signal SIGSEGV, Segmentation fault.
0x710d744f in pldtfac (vmin=-315.36000000000001, vmax=31536315.359999999,
     factor=0x23fc00, start=0x23fbf8)
     at Z:/DevZone/PLdev/plplot/src/pldtik.c:123
123         tm = *gmtime(&t);
(gdb) list
118
119       diff = vmax - vmin;
120
121       if (start != NULL) {
122         t = (time_t) vmin;
123         tm = *gmtime(&t);
124         t2 = mktime(&tm);
125         /* Arg! This is because mktime is in local time and we need to
126            correct for the offset. C time handling really is 
broken... */
127         tdiff = difftime(t,t2);
(gdb) print t
$1 = -315
(gdb) print &t
$2 = (time_t *) 0x23fb5c
(gdb) print tm
$3 = {tm_sec = 5, tm_min = 2358452, tm_hour = 64685062, tm_mday = 196608,
   tm_mon = 207600, tm_year = 0, tm_wday = 1964002646, tm_yday = 1077411871,
   tm_isdst = 16384}
(gdb)

Can't see anything obvious here, maybe a bug in the Standard library of 
MinGW. Maybe others can confirm the crash and look into it.

  
Hello Werner,

I can confirm this crash - unfortunately I did not have time to look into it any further.
One way to check if this is a MinGW problem or a PLplot problem would be to
strip out all PLplot-specific calls and see what happens then.

Regards,

Arjen