Re: [taskjuggler] cygwin compile error

From: Chris Schlaeger (cs_at_suse.de)
Date: Fri Jan 14 2005 - 06:21:08 CET


From: Chris Schlaeger <cs@suse.de>
Date: Thu, 13 Jan 2005 22:21:08 -0700
Message-Id: <200501132221.09672.cs@suse.de>
Subject: Re: [taskjuggler] cygwin compile error


Hi Nigel,

On Thursday 13 January 2005 22:10, Nigel.Brown@qml.com.au wrote:
> Utility.cpp: In function `time_t date2time(const QString&)':
>
> Utility.cpp:762: error: too many initializers for `tm'

looks like the struct tm in time.h is different on Cygwin than on Linux. On
Linux it looks like this:

/* 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
};

Just look at your time.h and see if you can adapt the code.

Chris

-- 
KDE 3.3: Conquer your Enterprise Desktop!  See http://www.kde.org!
GPG Key: 1024D/0500838B  A5FE C051 2AFC 9A14 768A  5125 5829 5750 0500 838B




This archive was generated by hypermail 2.1.7 : Fri Jan 14 2005 - 06:21:20 CET