Subject: patches for NCSA httpd v1.3 on Apollo Domain/OS
From: [email-masked] (Vincent D. Skahan)
Date: Wed, 13 Jul 1994 19:54:39 GMT
Newsgroups: comp.infosystems.www.misc,comp.sys.apollo,boeing.comp.www

The following couple of small patches are needed to httpd-1.3 to get it to 
compile and run properly on Apollo Domain/OS:
	- o/s version 10.4.0.11
	- system booted in 'BSD' mode
	- cc version 6.9

After patching, the access log properly reports the time offset from GMT....

-- 
 ----------- Vince Skahan ------ [email-masked] -----------

------------------------------ cut here --------------------------------------

*** httpd.h.orig	Sat May  7 19:47:12 1994
--- httpd.h	Wed Jul 13 09:16:36 1994
***************
*** 163,169 ****
  
  #include <sys/types.h>
  
! #if !defined(NEXT) && !defined(CONVEXOS)
  #include <dirent.h>
  #define DIR_TYPE dirent
  #else
--- 163,169 ----
  
  #include <sys/types.h>
  
! #if !defined(NEXT) && !defined(CONVEXOS) && !defined(APOLLO)
  #include <dirent.h>
  #define DIR_TYPE dirent
  #else

*** util.c.orig	Wed Jul 13 09:17:55 1994
--- util.c	Wed Jul 13 12:28:36 1994
***************
*** 8,13 ****
--- 8,17 ----
  
  #include "httpd.h"
  
+ #if defined(APOLLO)
+ 	#include <sys/time.h>
+ #endif
+ 
  char *get_time() {
      time_t t;
      char *time_string;
***************
*** 38,55 ****
      time_t tt;
      struct tm *t;
  
      tt = time(NULL);
      t = localtime(&tt);
  #if defined(BSD) && !defined(AUX) && !defined(APOLLO)
      *tz = t->tm_gmtoff;
  #else
!     *tz = - timezone;
      if(t->tm_isdst)
          *tz += 3600;
  #endif
      return t;
  }
- 
  
  static char *months[] = {
      "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"
--- 42,68 ----
      time_t tt;
      struct tm *t;
  
+ #if defined(APOLLO)
+ 	struct timeval  tp;    /* see gettimeofday(2) */
+ 	struct timezone tzp;
+ #endif
+ 
      tt = time(NULL);
      t = localtime(&tt);
  #if defined(BSD) && !defined(AUX) && !defined(APOLLO)
      *tz = t->tm_gmtoff;
  #else
!     #if defined(APOLLO)
! 	gettimeofday(&tp,&tzp);
! 	*tz = (60 * tzp.tz_minuteswest);
!     #else
! 	*tz = - timezone;
!     #endif
      if(t->tm_isdst)
          *tz += 3600;
  #endif
      return t;
  }
  
  static char *months[] = {
      "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"

------------------------------ cut here --------------------------------------
-- 
 ----------- Vince Skahan ------ [email-masked] -----------