octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

oct-time.cc on an alpha


From: A. Scottedward Hodel
Subject: oct-time.cc on an alpha
Date: Wed, 23 Feb 2000 14:46:51 -0600
User-agent: Microsoft Outlook Express Macintosh Edition - 5.01 (1630)

I'm updating my gcc/g++ to 2.95.2 so that I can compile the latest Octave
CVS archives.

Compiling liboctave/oct-time.cc gives errors:

oct-time.cc:182: `struct tm' has no member named `tm_zone'
oct-time.cc: In method `void octave_base_tm::init(void *)':
oct-time.cc:229: `struct tm' has no member named `tm_zone'
oct-time.cc: In method `void octave_strptime::init(const string &, const
string &)':
oct-time.cc:273: `struct tm' has no member named `tm_zone'

There was previously an error near line 80 of this file.  I worked my way
back to time.h on my system, which defines struct tm with:

#ifdef _OSF_SOURCE
        long    tm_gmtoff;
        char    *tm_zone;
#else
        long    __tm_gmtoff;
        char    *__tm_zone;
#endif

It's not clear to me why this doesn't cause problems in the configure
script.  Nevertheless, I modified oct-time.cc near line 80 to read:

#if defined (HAVE_TM_ZONE)
  std::string s = tm.zone ();
  char *ps = strsave (s.c_str ());
#ifdef _OSF_SOURCE
  t.tm_zone = ps;
#else
  t.__tm_zone = ps;
#endif
#endif

which seems to fix the compiler problem.

Do other alpha users have suggestions on a clean way to fix this problem?
One
may either have configure define _OSF_SOURCE (to define the tm struct as
expected) or else I can modify oct-time.cc as above in each place where
tm_zone is referenced.  I don't like either of these solutions, since this
problem does not show up when I manually compile the conftest.c program
generated by configure to test for tm.tm_zone.


-- 
A S Hodel Assoc. Prof. Dept Elect and Computer Eng, Auburn Univ,AL
36849-5201
On leave at NASA Marshall Space Flight Center (256) 544-1426
Address until 31 July 2000:Mail Code TD-55, MSFC, Alabama, 35812
http://www.eng.auburn.edu/~scotte

Configuration (please do not edit this section):
-----------------------------------------------

uname output:     OSF1 edalf1 V4.0 1091 alpha
configure opts:   %config_opts%
Fortran compiler: f77
FFLAGS:           -fpe1 -O
F2C:              
F2CFLAGS:         
FLIBS:            -lUfor -lfor -lFutil -lm -lots -lm
CPPFLAGS:         
INCFLAGS:         -I. -I. -I./liboctave -I./src -I./libcruft/misc  -I./glob
-I./glob
C compiler:       gcc, version 2.95.2 19991024 (release)
CFLAGS:           -O -I/usr/local/gnu/beta/include -L/usr/local/gnu/beta/lib
CPICFLAG:         
C++ compiler:     c++, version 2.95.2 19991024 (release)
CXXFLAGS:         %OCTAVE_CONF_BUG_CXXFLAGS%
CXXPICFLAG:       
LDFLAGS:          -g
LIBFLAGS:         -L.
RLD_FLAG:         -Xlinker -rpath -Xlinker
/usr/local/gnu/beta/lib/octave-2.1.28
TERMLIBS:         -lcurses
LIBS:             
LEXLIB:           
LIBPLPLOT:        
LIBDLFCN:         
LIBGLOB:          ./glob/libglob.a
DEFS:

  -DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=":" -DUSE_READLINE=1
  -D__NO_MATH_INLINES=1 -DCXX_NEW_FRIEND_TEMPLATE_DECL=1 -DHAVE_LIBM=1
  -DF77_APPEND_UNDERSCORE=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4
  -DSIZEOF_LONG=8 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1
  -DNPOS=std::string::npos -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1
  -DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_ASSERT_H=1
  -DHAVE_CURSES_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_FLOAT_H=1
  -DHAVE_FNMATCH_H=1 -DHAVE_GLOB_H=1 -DHAVE_GRP_H=1 -DHAVE_LIMITS_H=1
  -DHAVE_MEMORY_H=1 -DHAVE_NAN_H=1 -DHAVE_POLL_H=1 -DHAVE_PWD_H=1
  -DHAVE_SGTTY_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
  -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_PAR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E_STRNCASECMP=1 -DHAVE_STRPTIME=1
  -DHAVE_TEMPNAM=1 -DHAVE_UMASK=1 -DHAVE_UNLINK=1 -DHAVE_USLEEP=1
  -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_WAITPID=1 -DHAVE_DLOPEN=1
  -DHAVE_DLSYM=1 -DHAVE_DLERROR=1 -DHAVE_DLCLOSE=1 -DWITH_DL=1
  -DWITH_DYNAMIC_LINKING=1 -DHAVE_TIMEVAL=1 -DHAVE_FINITE=1
  -DHAVE_ISNAN=1 -DHAVE_ACOSH=1 -DHAVE_ASINH=1 -DHAVE_ATANH=1
  -DHAVE_ERF=1 -DHAVE_ERFC=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_ST_BLOCKS=1
  -DHAVE_ST_RDEV=1 -DHAVE_TM_ZONE=1 -DHAVE_GR_PASSWD=1
  -DEXCEPTION_IN_MATH=1 -DRETSIGTYPE=void -DHAVE_SYS_SIGLIST=1
  -DHAVE_POSIX_SIGNALS=1 -DHAVE_GETRUSAGE=1 -DHAVE_TIMES=1
  -DGNUPLOT_HAS_MULTIPLOT=1 -DGNUPLOT_HAS_FRAMES=1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]