httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@liege.ICS.UCI.EDU>
Subject [PATCH] Another one for NeXT from Andreas Koenig
Date Sat, 25 Jan 1997 21:11:21 GMT
Marc, compare this with yours, but I think I like NEXT1 better than REGEX_NEXT.

....Roy

------- Forwarded Message

Date: Sat, 25 Jan 1997 22:02:56 +0100
Message-Id: <199701252102.WAA06606@anna.in-berlin.de>
From: Andreas Koenig <k@anna.in-berlin.de>
To: "Roy T. Fielding" <fielding@kiwi.ICS.UCI.EDU>
CC: Ben Laurie <ben@gonzo.ben.algroup.co.uk>
In-reply-to: <9701251158.aa27467@paris.ics.uci.edu>
	(fielding@kiwi.ICS.UCI.EDU)
Subject: Re: Countdown to 1.2b5

>>>>> Roy T Fielding writes:

  >   * NeXT doesn't compile due to macro NEXT in regex/regcomp.c ???
  >        Status: no idea

I have a complete patch to make today's snapshot compile on the
NeXT. I've already sent it to RobH, CC to the new-httpd list (where I
do not have permission to post) and the modperl list, but haven't
received an answer so far.

I append it here, ok? I don't know, where's the best address to send
it to.

andreas

Description:
Configure check earlier for RANLIB, so we can override it afterwards.
We add a sleep 5 to ranlib, so the NeXT doesn't tamper the timestamp.
We pass RANLIB to subprocesses enclosed in quotes to protect the "; ".
We do not #include libc.h.
We do not #include memory.h.
We replace the macro NEXT with REGEX_NEXT.


--- ../../apache_1.2b5-19970125/src/Configure	Wed Jan 22 21:00:11 1997
+++ Configure	Sat Jan 25 17:56:51 1997
@@ -155,6 +155,15 @@
 
 DBM_LIB="-ldbm"
 
+#
+# Look for ranlib
+#
+if ./helpers/PrintPath -s ranlib; then
+    RANLIB="ranlib"
+else
+    RANLIB="true"
+fi
+
 case "$PLAT" in
     *-apple-aux3*)
 	OS='A/UX 3.1.x'
@@ -267,6 +276,8 @@
 	OS='NeXT'
 	CFLAGS="$CFLAGS -DNEXT"
 	DEF_WANTHSREGEX=yes
+	RANLIB="sleep 5; /bin/ranlib"
+	# ranlib on most NeXTs sets the time wrong. 5 secs wait does much good
 	;;
     *-dec-osf*)
 	OS='DEC OSF/1'
@@ -508,14 +519,6 @@
     else
 	LIBS="$LIBS -L/usr/local/lib -lsocks"
     fi
-fi
-#
-# Look for ranlib
-#
-if ./helpers/PrintPath -s ranlib; then
-    RANLIB="ranlib"
-else
-    RANLIB="true"
 fi
 
 #
--- ../../apache_1.2b5-19970125/src/Makefile.tmpl	Fri Jan 24 15:00:09 1997
+++ Makefile.tmpl	Sat Jan 25 17:13:56 1997
@@ -29,11 +29,11 @@
 	$(CC) $(LFLAGS)  -o httpd $(OBJS) $(REGLIB) $(LIBS)
 
 regex/libregex.a:
-	(cd regex; $(MAKE) lib CC=$(CC) AUX_CFLAGS="$(CFLAGS)" RANLIB=$(RANLIB))
+	(cd regex; $(MAKE) lib CC=$(CC) AUX_CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)")
 
 modules/proxy/libproxy.a:
 	(cd modules; \
-	$(MAKE) CC=$(CC) AUX_CFLAGS="$(CFLAGS)" RANLIB=$(RANLIB))
+	$(MAKE) CC=$(CC) AUX_CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)")
 
 clean:
 	rm -f httpd $(OBJS) 
--- ../../apache_1.2b5-19970125/src/conf.h	Sat Jan 25 03:00:10 1997
+++ conf.h	Sat Jan 25 18:24:48 1997
@@ -164,7 +164,6 @@
 #define tolower(c) (isupper(c) ? tolower(c) : c)
 
 #elif defined(NEXT)
-#include <libc.h>
 typedef unsigned short mode_t;
 #define HAVE_GMTOFF
 #undef NO_KILLPG
@@ -524,7 +523,7 @@
 #include <grp.h>
 #include <fcntl.h>
 #include <limits.h>
-#if !defined(QNX) && !defined(CONVEXOS11)
+#if !defined(QNX) && !defined(CONVEXOS11) && !defined(NEXT)
 #include <memory.h>
 #endif
 #ifdef NEED_PROCESS_H
--- ../../apache_1.2b5-19970125/src/regex/regcomp.c	Wed Jul 24 00:06:45 1996
+++ regex/regcomp.c	Sat Jan 25 17:28:34 1997
@@ -44,9 +44,9 @@
 #define	MORE2()	(p->next+1 < p->end)
 #define	SEE(c)	(MORE() && PEEK() == (c))
 #define	SEETWO(a, b)	(MORE() && MORE2() && PEEK() == (a) && PEEK2()
== (b))
-#define	EAT(c)	((SEE(c)) ? (NEXT(), 1) : 0)
+#define	EAT(c)	((SEE(c)) ? (REGEX_NEXT(), 1) : 0)
 #define	EATTWO(a, b)	((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
-#define	NEXT()	(p->next++)
+#define	REGEX_NEXT()	(p->next++)
 #define	NEXT2()	(p->next += 2)
 #define	NEXTn(n)	(p->next += (n))
 #define	GETNEXT()	(*p->next++)
@@ -324,7 +324,7 @@
 	if (!( c == '*' || c == '+' || c == '?' ||
 				(c == '{' && MORE2() && isdigit(PEEK2())) ))
 		return;		/* no repetition, we're done */
-	NEXT();
+	REGEX_NEXT();
 
 	REQUIRE(!wascaret, REG_BADRPT);
 	switch (c) {
@@ -361,7 +361,7 @@
 		repeat(p, pos, count, count2);
 		if (!EAT('}')) {	/* error heuristics */
 			while (MORE() && PEEK() != '}')
-				NEXT();
+				REGEX_NEXT();
 			REQUIRE(MORE(), REG_EBRACE);
 			SETERROR(REG_BADBR);
 		}
@@ -539,7 +539,7 @@
 		repeat(p, pos, count, count2);
 		if (!EATTWO('\\', '}')) {	/* error heuristics */
 			while (MORE() && !SEETWO('\\', '}'))
-				NEXT();
+				REGEX_NEXT();
 			REQUIRE(MORE(), REG_EBRACE);
 			SETERROR(REG_BADBR);
 		}
@@ -698,7 +698,7 @@
 		start = p_b_symbol(p);
 		if (SEE('-') && MORE2() && PEEK2() != ']') {
 			/* range */
-			NEXT();
+			REGEX_NEXT();
 			if (EAT('-'))
 				finish = '-';
 			else
@@ -729,7 +729,7 @@
 	register char c;
 
 	while (MORE() && isalpha(PEEK()))
-		NEXT();
+		REGEX_NEXT();
 	len = p->next - sp;
 	for (cp = cclasses; cp->name != NULL; cp++)
 		if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
@@ -799,7 +799,7 @@
 	register char c;
 
 	while (MORE() && !SEETWO(endc, ']'))
-		NEXT();
+		REGEX_NEXT();
 	if (!MORE()) {
 		SETERROR(REG_EBRACK);
 		return(0);

------- End of Forwarded Message


Mime
View raw message