Apache module on BSD/OS

Keith Porterfield (kwp@taliesin.manymedia.com)
Sat, 11 May 1996 15:35:45 -0700 (PDT)

From: Keith Porterfield <kwp@taliesin.manymedia.com>
Message-Id: <199605112235.PAA29372@taliesin.manymedia.com>
Subject: Apache module on BSD/OS
To: fastcgi-developers@OpenMarket.com
Date: Sat, 11 May 1996 15:35:45 -0700 (PDT)


Here's what I did to work around the non-portable access to members
of the FILE structure. Fortunately, the only place this occurs is in 
the GetFromStream function, which I changed as follows:

int GetFromStream(FILE *fp, char *buf, int len)
{
  int fp_size;
  fp_size = fp->_r; 			/* was fp->_cnt */
  if (fp_size > len)
    fp_size = len;
  if (fp_size > 0) {
    memcpy(buf, fp->_p, fp_size);	/* was fp->_ptr */
    fp->_p += fp_size; 			/* was fp->_prt */
  }
  return fp_size;
}

With those changes, the Apache module now seems to work fine on
my systems (Apache 1.0.5 and BSD/OS 2.x). I have no idea if this
will work on Linux or FreeBSD or anything else.

Keith
--
Keith Porterfield
Systems Architect, ManyMedia
kwp@manymedia.com