From octave-maintainers-request at bevo dot che dot wisc dot edu Wed Feb 7 12:13:13 2001 Subject: Re: extern char *strptime () on FreeBSD 2.2.8 From: "John W. Eaton" To: Trond Varslot Cc: octave-maintainers at bevo dot che dot wisc dot edu Date: Wed, 7 Feb 2001 12:12:58 -0600 On 5-Feb-2001, Trond Varslot wrote: | Will something along these lines be acceptable? It basicly checks if the | function strptime() is defined in time.h. If it is, there is no need to | define it in lo-cutils.c. If it is not, strptime will be defined as | previously. | | This is atleast will get rid of the compilation error which I got | because of the discrepancy in the definition of strptime in time.h and | in lo-cutils.c. I've deleted the declaration of strptime from lo-cutils.c but added a cast: char * oct_strptime (const char *buf, const char *format, struct tm *tm) { return (char *) strptime (buf, format, tm); } Is there any problem with that? BTW, why does FreeBSD declare it as returning const char*? I don't know of any other system that does. They all provide declarations with a non-const return type. jwe