httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: Compiling problem & solution under NeXTSTEP 3.x
Date Tue, 03 Dec 1996 22:16:45 GMT

hi,

thanks for the info and patch. Others have already reported similar
problems so a fix should be ready in the next beta release.

cheers,
rob

Tethpub Znek wrote:
>
>--NeXT-Mail-1476546630-1
>Content-Type: text/enriched; charset=us-ascii
>Content-Transfer-Encoding: quoted-printable
>
>Hi,
>
>
>I've had several problems compiling the latest apache (1.2b1) =
>under NeXTSTEP 3.x.
>
>As an attachment I included a diff-file solving most problems, =
>that is, compiling the
>
>standard set of modules with the exception of mod_fastcgi (this =
>seems to be a bit
>
>more tricky to fix). The helpers app "CutRule" uses the =
>shell-command "cut" which
>
>isn't available under NeXTSTEP 3.x - in fact I had to port it from =
>FreeBSD to NeXTSTEP,
>
>the source-code with some tweaks for NeXTSTEP is included as an =
>attachment, too.
>
>
>However, the long time waiting was worth it!! Good work!!
>
>
>  Marcus.
>
>
>
>--NeXT-Mail-1476546630-1
>Content-Type: application/octet-stream; name=NeXT.diffs; x-unix-mode=0644
>Content-Transfer-Encoding: quoted-printable
>
>*** http_main.c	Tue Dec  3 20:58:39 1996
>--- /Net/666/usr/local/src/apache_1.2b1/src/http_main.c	Sun Dec  1 =
>21:28:26 1996
>***************
>*** 105,113 ****
>  #include <sys/audit.h>
>  #include <prot.h>
>  #endif
>- #if defined(NEXT)
>- #include <netinet/in_systm.h>
>- #endif
>  #include <netinet/tcp.h>
> =20
>  #include "explain.h"
>--- 105,110 ----
>*** conf.h	Tue Dec  3 21:09:11 1996
>--- /Net/666/usr/local/src/apache_1.2b1/src/conf.h	Mon Dec  2 =
>17:07:23 1996
>***************
>*** 196,205 ****
>  #define JMP_BUF jmp_buf
>  #define NO_USE_SIGACTION
> =20
>- #define S_IWGRP 0000020         /* write permission, group */
>- #define S_IWOTH 0000002         /* write permission, other */
>- typedef int rlim_t;
>-=20
>  #elif defined(LINUX)
>  #undef HAVE_GMTOFF
>  #undef NO_KILLPG
>--- 196,201 ----
>
>--NeXT-Mail-1476546630-1
>Content-Type: text/enriched; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>
>  
>
>--NeXT-Mail-1476546630-1
>Content-Type: application/octet-stream; name=cut.c; x-unix-mode=0644
>Content-Transfer-Encoding: quoted-printable
>
>/*
> * Copyright (c) 1989, 1993
> *	The Regents of the University of California.  All rights =
>reserved.
> *
> * This code is derived from software contributed to Berkeley by
> * Adam S. Moskowitz of Menlo Consulting and Marciano Pitargue.
> *
> * Redistribution and use in source and binary forms, with or =
>without
> * modification, are permitted provided that the following =
>conditions
> * are met:
> * 1. Redistributions of source code must retain the above =
>copyright
> *    notice, this list of conditions and the following =
>disclaimer.
> * 2. Redistributions in binary form must reproduce the above =
>copyright
> *    notice, this list of conditions and the following disclaimer =
>in the
> *    documentation and/or other materials provided with the =
>distribution.
> * 3. All advertising materials mentioning features or use of this =
>software
> *    must display the following acknowledgement:
> *	This product includes software developed by the University of
> *	California, Berkeley and its contributors.
> * 4. Neither the name of the University nor the names of its =
>contributors
> *    may be used to endorse or promote products derived from this =
>software
> *    without specific prior written permission.
> *
> * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS =
>IS'' AND
> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED =
>TO, THE
> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A =
>PARTICULAR PURPOSE
> * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS =
>BE LIABLE
> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR =
>CONSEQUENTIAL
> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF =
>SUBSTITUTE GOODS
> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS =
>INTERRUPTION)
> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN =
>CONTRACT, STRICT
> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING =
>IN ANY WAY
> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE =
>POSSIBILITY OF
> * SUCH DAMAGE.
> */
>
>/* This code tweaked 12/03/96 by Tethpub Znek to compile under =
>NeXTSTEP
>   znek@free.de
>*/
>
>#ifndef lint
>static char copyright[] =3D
>"@(#) Copyright (c) 1989, 1993\n\
>	The Regents of the University of California.  All rights =
>reserved.\n";
>#endif /* not lint */
>
>#ifndef lint
>static char sccsid[] =3D "@(#)cut.c	8.1 (Berkeley) 6/6/93";
>#endif /* not lint */
>
>#include <ctype.h>
>#include <errno.h>
>#include <limits.h>
>#include <stdio.h>
>#include <stdlib.h>
>#include <string.h>
>
>int	cflag;
>char	dchar;
>int	dflag;
>int	fflag;
>int	sflag;
>
>#if defined(NeXT)
>void	c_cut(FILE *, char *);
>void	err(const char *, ...);
>void	f_cut(FILE *, char *);
>void	get_list(char *);
>void	usage(void);
>#define _POSIX2_LINE_MAX 2048
>#include <libc.h>
>#else
>void	c_cut __P((FILE *, char *));
>void	err __P((const char *, ...));
>void	f_cut __P((FILE *, char *));
>void	get_list __P((char *));
>void	usage __P((void));
>#endif
>
>int
>main(argc, argv)
>	int argc;
>	char *argv[];
>{
>	FILE *fp;
>
>#if defined (NeXT)
>	void (*fcn) (FILE *, char *);
>#else
>	void (*fcn) __P((FILE *, char *));
>#endif
>	int ch;
>
>	dchar =3D '\t';			/* default delimiter is \t */
>
>	while ((ch =3D getopt(argc, argv, "c:d:f:s")) !=3D EOF)
>		switch(ch) {
>		case 'c':
>			fcn =3D c_cut;
>			get_list(optarg);
>			cflag =3D 1;
>			break;
>		case 'd':
>			dchar =3D *optarg;
>			dflag =3D 1;
>			break;
>		case 'f':
>			get_list(optarg);
>			fcn =3D f_cut;
>			fflag =3D 1;
>			break;
>		case 's':
>			sflag =3D 1;
>			break;
>		case '?':
>		default:
>			usage();
>		}
>	argc -=3D optind;
>	argv +=3D optind;
>
>	if (fflag) {
>		if (cflag)
>			usage();
>	} else if (!cflag || dflag || sflag)
>		usage();
>
>	if (*argv)
>		for (; *argv; ++argv) {
>			if (!(fp =3D fopen(*argv, "r")))
>				err("%s: %s\n", *argv, strerror(errno));
>			fcn(fp, *argv);
>			(void)fclose(fp);
>		}
>	else
>		fcn(stdin, "stdin");
>	exit(0);
>}
>
>int autostart, autostop, maxval;
>
>char positions[_POSIX2_LINE_MAX + 1];
>
>void
>get_list(list)
>	char *list;
>{
>	register int setautostart, start, stop;
>	register char *pos;
>	char *p;
>
>	/*
>	 * set a byte in the positions array to indicate if a field or
>	 * column is to be selected; use +1, it's 1-based, not 0-based.
>	 * This parser is less restrictive than the Draft 9 POSIX spec.
>	 * POSIX doesn't allow lists that aren't in increasing order or
>	 * overlapping lists.  We also handle "-3-5" although there's no
>	 * real reason too.
>	 */
>	for (; p =3D strtok(list, ", \t"); list =3D NULL) {
>		setautostart =3D start =3D stop =3D 0;
>		if (*p =3D=3D '-') {
>			++p;
>			setautostart =3D 1;
>		}
>		if (isdigit(*p)) {
>			start =3D stop =3D strtol(p, &p, 10);
>			if (setautostart && start > autostart)
>				autostart =3D start;
>		}
>		if (*p =3D=3D '-') {
>			if (isdigit(p[1]))
>				stop =3D strtol(p + 1, &p, 10);
>			if (*p =3D=3D '-') {
>				++p;
>				if (!autostop || autostop > stop)
>					autostop =3D stop;
>			}
>		}
>		if (*p)
>			err("[-cf] list: illegal list value\n");
>		if (!stop || !start)
>			err("[-cf] list: values may not include zero\n");
>		if (stop > _POSIX2_LINE_MAX)
>			err("[-cf] list: %d too large (max %d)\n",
>			    stop, _POSIX2_LINE_MAX);
>		if (maxval < stop)
>			maxval =3D stop;
>		for (pos =3D positions + start; start++ <=3D stop; *pos++ =3D =
>1);
>	}
>
>	/* overlapping ranges */
>	if (autostop && maxval > autostop)
>		maxval =3D autostop;
>
>	/* set autostart */
>	if (autostart)
>		memset(positions + 1, '1', autostart);
>}
>
>/* ARGSUSED */
>void
>c_cut(fp, fname)
>	FILE *fp;
>	char *fname;
>{
>	register int ch, col;
>	register char *pos;
>
>	for (;;) {
>		pos =3D positions + 1;
>		for (col =3D maxval; col; --col) {
>			if ((ch =3D getc(fp)) =3D=3D EOF)
>				return;
>			if (ch =3D=3D '\n')
>				break;
>			if (*pos++)
>				(void)putchar(ch);
>		}
>		if (ch !=3D '\n')
>			if (autostop)
>				while ((ch =3D getc(fp)) !=3D EOF && ch !=3D '\n')
>					(void)putchar(ch);
>			else
>				while ((ch =3D getc(fp)) !=3D EOF && ch !=3D '\n');
>		(void)putchar('\n');
>	}
>}
>
>void
>f_cut(fp, fname)
>	FILE *fp;
>	char *fname;
>{
>	register int ch, field, isdelim;
>	register char *pos, *p, sep;
>	int output;
>	char lbuf[_POSIX2_LINE_MAX + 1];
>
>	for (sep =3D dchar; fgets(lbuf, sizeof(lbuf), fp);) {
>		output =3D 0;
>		for (isdelim =3D 0, p =3D lbuf;; ++p) {
>			if (!(ch =3D *p))
>				err("%s: line too long.\n", fname);
>			/* this should work if newline is delimiter */
>			if (ch =3D=3D sep)
>				isdelim =3D 1;
>			if (ch =3D=3D '\n') {
>				if (!isdelim && !sflag)
>					(void)printf("%s", lbuf);
>				break;
>			}
>		}
>		if (!isdelim)
>			continue;
>
>		pos =3D positions + 1;
>		for (field =3D maxval, p =3D lbuf; field; --field, ++pos) {
>			if (*pos) {
>				if (output++)
>					(void)putchar(sep);
>				while ((ch =3D *p++) !=3D '\n' && ch !=3D sep)
>					(void)putchar(ch);
>			} else
>				while ((ch =3D *p++) !=3D '\n' && ch !=3D sep);
>			if (ch =3D=3D '\n')
>				break;
>		}
>		if (ch !=3D '\n')
>			if (autostop) {
>				if (output)
>					(void)putchar(sep);
>				for (; (ch =3D *p) !=3D '\n'; ++p)
>					(void)putchar(ch);
>			} else
>				for (; (ch =3D *p) !=3D '\n'; ++p);
>		(void)putchar('\n');
>	}
>}
>
>void
>usage()
>{
>	(void)fprintf(stderr,
>"usage:\tcut -c list [file1 ...]\n\tcut -f list [-s] [-d delim] =
>[file ...]\n");
>	exit(1);
>}
>
>#if __STDC__
>#include <stdarg.h>
>#else
>#include <varargs.h>
>#endif
>
>void
>#if __STDC__
>err(const char *fmt, ...)
>#else
>err(fmt, va_alist)
>	char *fmt;
>        va_dcl
>#endif
>{
>	va_list ap;
>#if __STDC__
>	va_start(ap, fmt);
>#else
>	va_start(ap);
>#endif
>	(void)fprintf(stderr, "cut: ");
>	(void)vfprintf(stderr, fmt, ap);
>	va_end(ap);
>	(void)fprintf(stderr, "\n");
>	exit(1);
>	/* NOTREACHED */
>}
>
>--NeXT-Mail-1476546630-1
>Content-Type: text/enriched; charset=iso-8859-1
>Content-Transfer-Encoding: quoted-printable
>
>
>
>---
>
>_________________________________________________________
>
><bold>     Tethpub Znek=09
></bold>=09
><bold>FREE!  Technical support & administration
>
></bold>
><smaller>					Bremer Stra=DFe 17, 44135 Dortmund, Germany
>
>					Tel	   +49 (0) 231 5860453
>
>					Fax	   +49 (0) 231=20
>912899-1
>
>					e-mail   znek@free.de
>
>					www	   http://beefree.free.de/
>
></smaller>
>
>--NeXT-Mail-1476546630-1--
>


-- 
Rob Hartill.       Internet Movie Database Ltd.    http://www.imdb.com/  

Mime
View raw message