Subject: NCSA httpd 1.5a patches for Apollo DomainOS
From: [email-masked] (Vincent D. Skahan)
Date: Thu, 16 Nov 1995 23:23:44 GMT

After looking at the coolness of the 'virtual server' stuff in the new NCSA
httpd 1.5a that is now 'released' by NCSA, I gave it a try on HP/UX and it's
a "just type make" proposition.  Of course, apollo users are never so lucky.

The following are diffs for NCSA httpd 1.5a to work with HP/Apollo 
DomainOS 10.4.0.11 and cc 6.9.  I've submitted these to NCSA so maybe
someday we won't have to patch stuff...

To apply:
	cd to the httpd_1.5a-export/src directory 
	patch < thisfile

Disclaimer:
	no warranties, guarantees, etc :-)

Also, in the "I sometimes get REALLY tired of Apollos" category,  there is
a problem in Apollo's /usr/include/netinet/in.h file where it has no code
in it to permit it to be included more than once.  To fix, add the following 
lines around the existing /usr/include/netinet/in.h file, which means making
friends with somebody with root privileges :-) 

	(add to /usr/include/netinet/in.h)
	==================================
	#ifndef __IN_H_INCLUDED__
	#define __IN_H_INCLUDED__
	[...put rest of file here...]
	#endif  /* __IN_H_INCLUDED__ */

*** Makefile.original	Wed Nov 15 12:27:39 1995
--- Makefile	Wed Nov 15 12:29:02 1995
***************
*** 3,11 ****
  # For normal machines with ANSI compilers
  # CC= cc
  # For Suns or other non-ANSI platforms. 
! CC= gcc 
! QUANTIFY=/hdf2/pure/quantify-2.0-sunos4/quantify
! PURIFY=purify

  # CFLAGS, compile flags.
--- 3,11 ----
  # For normal machines with ANSI compilers
  # CC= cc
  # For Suns or other non-ANSI platforms. 
! CC= cc 
! #QUANTIFY=/hdf2/pure/quantify-2.0-sunos4/quantify
! #PURIFY=purify

  # CFLAGS, compile flags.
***************
*** 34,55 ****
  # although it's most likely that your realm supports one or the other.
  # To enable DES-encryption of HTTP messages via Kerberos key exchange,
  # define the KRB-ENCRYPT flag (not supported in Beta1 -- hopefully Beta2).
! 
! KRB4_DIR    = /xdev/mosaic/libkrb4/sun
! KRB4_LIBS   = -L$(KRB4_DIR)/lib -lkrb -ldes
! KRB4_CFLAGS = -DKRB4 -I$(KRB4_DIR)/include
! 
! KRB5_DIR    = /xdev/mosaic/libkrb5/sun
! KRB5_LIBS   = $(KRB5_DIR)/lib/libkrb5.a $(KRB5_DIR)/lib/libcrypto.a $(KRB5_DIR)/util/et/libcom_err.a
! KRB5_CFLAGS = -DKRB5 -I$(KRB5_DIR)/include -I$(KRB5_DIR)/include/krb5
! 
! 
  # Comment out the following two lines to exclude Kerberos support
  
  # KRB_CFLAGS = $(KRB4_CFLAGS) $(KRB5_CFLAGS)   # -DKRB-ENCRYPT
  # KRB_LIBS   = $(KRB4_LIBS) $(KRB5_LIBS)
! 
! 
  # DBM 
  #
  # To enable DBM password/groupfile support, define the DBM_SUPPORT flag
--- 34,55 ----
  # although it's most likely that your realm supports one or the other.
  # To enable DES-encryption of HTTP messages via Kerberos key exchange,
  # define the KRB-ENCRYPT flag (not supported in Beta1 -- hopefully Beta2).
! #
! #KRB4_DIR    = /xdev/mosaic/libkrb4/sun
! #KRB4_LIBS   = -L$(KRB4_DIR)/lib -lkrb -ldes
! #KRB4_CFLAGS = -DKRB4 -I$(KRB4_DIR)/include
! #
! #KRB5_DIR    = /xdev/mosaic/libkrb5/sun
! #KRB5_LIBS   = $(KRB5_DIR)/lib/libkrb5.a $(KRB5_DIR)/lib/libcrypto.a $(KRB5_DIR)/util/et/libcom_err.a
! #KRB5_CFLAGS = -DKRB5 -I$(KRB5_DIR)/include -I$(KRB5_DIR)/include/krb5
! #
! #
  # Comment out the following two lines to exclude Kerberos support
  
  # KRB_CFLAGS = $(KRB4_CFLAGS) $(KRB5_CFLAGS)   # -DKRB-ENCRYPT
  # KRB_LIBS   = $(KRB4_LIBS) $(KRB5_LIBS)
! #
! #
  # DBM 
  #
  # To enable DBM password/groupfile support, define the DBM_SUPPORT flag
***************
*** 128,134 ****
  # AUX_CFLAGS= -Xa -eft -DUTS21
  # EXTRA_LIBS= -lsocket -lbsd -la
  # For HP/Apollo Domain/OS
! # AUX_CFLAGS= -DAPOLLO
  # For AT&T Sys V R 3.2
  # AUX_CFLAGS= -DATTSVR3
  # EXTRA_LIBS= -lnet -lnsl_s -lgen
--- 128,134 ----
  # AUX_CFLAGS= -Xa -eft -DUTS21
  # EXTRA_LIBS= -lsocket -lbsd -la
  # For HP/Apollo Domain/OS
! AUX_CFLAGS= -DAPOLLO
  # For AT&T Sys V R 3.2
  # AUX_CFLAGS= -DATTSVR3
  # EXTRA_LIBS= -lnet -lnsl_s -lgen
*** fdwrap.c.original	Thu Nov 16 09:50:30 1995
--- fdwrap.c	Thu Nov 16 12:23:32 1995
***************
*** 235,241 ****
--- 235,246 ----
        fclose(FdTab[fd].fp);
      }
      FdTab[fd].fp = NULL;
+ #ifndef APOLLO
      return closedir(dp);
+ #else
+     closedir(dp);
+     return;
+ #endif
  }

*** http_dir.c.original	Wed Nov 15 12:55:50 1995
--- http_dir.c	Wed Nov 15 12:54:56 1995
***************
*** 40,46 ****
--- 40,48 ----
  #include <sys/stat.h>
  #include <sys/types.h>
  #include <ctype.h>
+ #ifndef APOLLO
  #include <dirent.h>
+ #endif
  #include "constants.h"
  #include "http_dir.h"
  #include "http_mime.h"
*** portability.h.original	Wed Nov 15 12:31:25 1995
--- portability.h	Thu Nov 16 14:26:28 1995
***************
*** 321,330 ****
--- 321,333 ----
  #include <sys/types.h>
  
  #elif defined(APOLLO)
+ #include <sys/types.h>
  #define BSD
+ #define NO_MALLOC_H
  #undef NO_KILLPG
  #undef NO_SETSID
  #define timezone	_bky_timezone
+ #define DIR_FILENO(p)  ((p)->dd_fd)
  
  #elif defined(ATTSVR3)
  #define NO_STDLIB_H

-- 
 ----------- Vince Skahan ------ [email-masked] -----------
  Microsoft Word for Windows doesn't have the word "Internet" in its spell
  checker.  It suggests the following alternates:
              Interment   Internee   Interned    Internees