httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@hyperreal.com>
Subject configuration bug (fwd)
Date Thu, 31 Aug 1995 03:15:34 GMT
Forwarded message:
> From swatt@Lynx.COM  Wed Aug 30 13:47:58 1995
> Message-Id: <m0snu4a-0000GMC@shadow.lynx.com>
> Date: Wed, 30 Aug 95 13:49 PDT
> From: swatt@Lynx.COM (Steven Watt -- KD6GGD)
> To: apache-bugs@apache.org
> Subject: configuration bug
> 
> Greetings!
> 
> I'm in the process of porting Apache 0.8.11 to our POSIX-conformant real-time
> OS named LynxOS, and have found the following:
> 
> In conf.h, if one lands in the "Unknown system" part of the planet, you
> should add a default definition of JMP_BUF to jmp_buf.
> 
> And a wonderful grossness:  LynxOS doesn't have a tm_gmtoff in struct tm.
> It also doesn't have the external timezone variable.  Therefore, I came
> up with this wonderful (ICK! ICK!) (but I think more portable, since mktime()
> is ANSI) hack in util.c:
> 
> #if defined(__Lynx__)
> struct tm *get_gmtoff(long *tz) {
> 	time_t tt;
> 	struct tm *loc_t;
> 	struct tm *gmt_t;
> 
> 	tt = time(NULL);
> 	loc_t = localtime(&tt);
> 	gmt_t = gmtime(&tt);
> 
> 	*tz = mktime(loc_t) - mktime(gmt_t);
> 
> 	return loc_t;
> }
> #else
>   .
>   .	 /* Other code */
>   .
> #endif /* defined(__Lynx__) */
> 
> 
> That's it!  Thanks for a nice product!
> 
> Steve Watt
> --
> Steve Watt   KD6GGD   PP-ASEL         Email at  home: steve@watt.com
> Lynx Real-Time Systems                          work: swatt@lynx.com
> 2239 Samaritan Drive                             +1 408 879 3900 x 162
> San Jose, CA, USA, 95124    Toll-free (US only)   1 800 255 LYNX x 162
> 


Mime
View raw message