From bug-octave-request at bevo dot che dot wisc dot edu Mon Jan 31 08:06:17 2000 Subject: Re: Octave-2.1.25 build with Cygnus GCC From: Thomas Walter To: jwe at bevo dot che dot wisc dot edu CC: wdkirby at ix dot netcom dot com, bug-octave@bevo.che.wisc.edu Date: Mon, 31 Jan 2000 15:07:09 +0100 >>>>> "John" == John W Eaton writes: John> On 29-Jan-2000, William D Kirby wrote: John> | Attempting to build octave-2.1.25 with Cygnus GCC version 2.95.2 the John> | following error occurred in building liboctave. Function strptime is in John> | strptime.c. John> | John> | oct-time.cc: In method `void octave_strptime::init(const string &, const John> | string )': John> | oct-time.cc:244: implicit declaration of function `int strptime(...)' John> | oct-time.cc:244: initialization to `char *' from `int' lacks a cast John> Please try the following patch. John> Thanks, John> jwe Hello, I updated my cvs-tree of octave in the morning. The check above is there but it does not help much. I recently update to Debian Linux (potato) which uses 'gcc-2.95.2' and 'libc6'. The compiler complains about not seeing a declaration of 'strptime'. But this goes away if I add '-D_GNU_SOURCE=1' to the compile commands. If I remember correct, I had something similar in my site config file for 'configure' on my old system to compile everything with this option. The include file 'time.h' declares 'strptime' only if '__USE_XOPEN' is defined. Bye Thomas John> 2000-01-29 John W. Eaton John> * oct-time.cc [! HAVE_STRPTIME]: Provide declaration. John> Index: oct-time.cc John> =================================================================== John> RCS file: /usr/local/cvsroot/octave/liboctave/oct-time.cc,v John> retrieving revision 1.6 John> diff -c -r1.6 oct-time.cc John> *** oct-time.cc 2000/01/21 07:48:27 1.6 John> --- oct-time.cc 2000/01/29 19:31:45 John> *************** John> *** 32,37 **** John> --- 32,41 ---- John> #define __USE_XOPEN John> #include "oct-time.h" John> + #if !defined (HAVE_STRPTIME) John> + extern char *strptime (const char *buf, const char *format, struct tm *tm); John> + #endif John> + John> octave_time::octave_time (const octave_base_tm& tm) John> { John> struct tm t; -- SUSHI? Nein, Danke. Ich esse keine Köder. ---------------------------------------------- Dipl. Phys. Thomas Walter Inst. f. Physiklische Chemie II Egerlandstr. 3 Tel.: ++9131-85 27326 / 27330 91058 Erlangen, Germany email: walter at pctc dot chemie dot uni-erlangen dot de ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------