[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I have found a bug in SunOS 5.7 i386 i86pcwhile building tar 1.13.19
From: |
Jeff Silverman |
Subject: |
I have found a bug in SunOS 5.7 i386 i86pcwhile building tar 1.13.19 |
Date: |
Thu, 08 Feb 2001 18:11:19 -0800 |
Hi. When I attempt to compile tar 1.13.19 on SunOS 5.7 on Intel, I get
the following errors:
actin!jeffs 47 > make
make all-recursive
make[1]: Entering directory `/atm/homes/kant/jeffs/tar-1.13.19'
Making all in doc
make[2]: Entering directory `/atm/homes/kant/jeffs/tar-1.13.19/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/atm/homes/kant/jeffs/tar-1.13.19/doc'
Making all in lib
make[2]: Entering directory `/atm/homes/kant/jeffs/tar-1.13.19/lib'
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -g -O2 -c getdate.c
In file included from /usr/include/alloca.h:11,
from getdate.y:31:
/usr/include/sys/types.h:291: warning: empty declaration
/usr/include/sys/types.h:292: warning: empty declaration
getdate.y: In function `get_date':
getdate.y:912: structure has no member named `tm_zone'
getdate.y:925: structure has no member named `tm_zone'
getdate.y:929: structure has no member named `tm_zone'
make[2]: *** [getdate.o] Error 1
make[2]: Leaving directory `/atm/homes/kant/jeffs/tar-1.13.19/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/atm/homes/kant/jeffs/tar-1.13.19'
make: *** [all-recursive-am] Error 2
actin!jeffs 48 >
I dug into this a little bit and. struct tm is defined by
/usr/include/time.h as
struct tm { /* see ctime(3) */
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
By way of contrast, under Linux, struct tm is defined as
#ifdef _TIME_H
/* Used by other time functions. */
struct tm
{
int tm_sec; /* Seconds. [0-60] (1 leap second)
*/
int tm_min; /* Minutes. [0-59] */
int tm_hour; /* Hours. [0-23] */
int tm_mday; /* Day. [1-31] */
int tm_mon; /* Month. [0-11] */
int tm_year; /* Year - 1900. */
int tm_wday; /* Day of week. [0-6] */
int tm_yday; /* Days in year.[0-365] */
int tm_isdst; /* DST. [-1/0/1]*/
# ifdef __USE_BSD
long int tm_gmtoff; /* Seconds east of UTC. */
__const char *tm_zone; /* Timezone abbreviation. */
# else
long int __tm_gmtoff; /* Seconds east of UTC. */
__const char *__tm_zone; /* Timezone abbreviation. */
# endif
};
Here is an excerpt from lib/getdate.c line 1890
time_t Start = now ? *now : time (0);
struct tm *tmp = localtime (&Start);
struct tm tm;
struct tm tm0;
Then, a few dozen lines down:
#if HAVE_TM_ZONE
pc.local_time_zone_table[0].name = tmp->tm_zone;
I think that the problem is that SunOS 5.7 doesn't include tm_zone in
the definition of struct tm. So HAVE_TM_ZONE ought to be false. I
think.
I wish I could be of more help.
Jeff
--
Jeff Silverman, sysadmin for the Research Computing Systems (RCS)
University of Washington, School of Engineering, Electrical Engineering
Dept.
Box 352500, Seattle, WA, 98125-2500 FAX: (206) 221-5264 Phone (206)
543-9378
address@hidden http://rcs.ee.washington.edu/~jeffs
- I have found a bug in SunOS 5.7 i386 i86pcwhile building tar 1.13.19,
Jeff Silverman <=