Branch: Tag:

2002-04-26

2002-04-26 11:29:59 by Anders Johansson <anders@roxen.com>

Added one more check for tm.__tm_gmtoff. Fixes [bug 2987 (#2987)].

Rev: src/builtin_functions.c:1.359

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.358 2002/04/12 11:31:45 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.359 2002/04/26 11:29:59 anders Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
4050: Inside #if defined(HAVE_LOCALTIME)
   pop_n_elems(args);    encode_struct_tm(tm);    - #ifdef HAVE_EXTERNAL_TIMEZONE + #ifdef STRUCT_TM_HAS_GMTOFF    push_string(make_shared_string("timezone")); -  push_int(timezone); +  push_int(-tm->tm_gmtoff);    f_aggregate_mapping(20);   #else - #ifdef STRUCT_TM_HAS_GMTOFF + #ifdef STRUCT_TM_HAS___TM_GMTOFF    push_string(make_shared_string("timezone")); -  push_int(-tm->tm_gmtoff); +  push_int(-tm->__tm_gmtoff);    f_aggregate_mapping(20);   #else -  + #ifdef HAVE_EXTERNAL_TIMEZONE +  push_string(make_shared_string("timezone")); +  push_int(timezone); +  f_aggregate_mapping(20); + #else    f_aggregate_mapping(18); - #endif - #endif + #endif /* HAVE_EXTERNAL_TIMEZONE */ + #endif /* STRUCT_TM_HAS___TM_GMTOFF */ + #endif /* STRUCT_TM_HAS_GMTOFF */   }   #endif