8e5abd345e
Temporary files used to accept file uploads were not closed properly. This resulted in a file descriptor leak, which was unlikely to be serious because of the short lifespan of CGI programs and the fact that very few forms upload many files at once. However, on the Windows platform and possibly some others, file locking semantics prevented file uploads from working at all with these files not properly closed. Fixed in 2.05. Changes 2.04: Documentation fixes: the cgiHtmlEscape, cgiHtmlEscapeData, cgiValueEscape, and cgiValueEscapeData routines were named incorrectly in the manual. No code changes in version 2.04. Changes 2.03: Support for setting cookies has been reimplemented. The new code closely follows the actual practice of web sites that successfully use cookies, rather than attempting to implement the specification. The new code can successfully set more than one cookie at a time in typical web browsers.
70 lines
1.9 KiB
Text
70 lines
1.9 KiB
Text
$NetBSD: patch-aa,v 1.2 2006/01/06 22:46:51 adam Exp $
|
|
|
|
--- Makefile.orig 2005-12-16 15:52:31.000000000 +0100
|
|
+++ Makefile
|
|
@@ -1,29 +1,38 @@
|
|
-CFLAGS=-g -Wall
|
|
-CC=gcc
|
|
-AR=ar
|
|
-RANLIB=ranlib
|
|
-LIBS=-L./ -lcgic
|
|
-
|
|
-all: libcgic.a cgictest.cgi capture
|
|
-
|
|
-install: libcgic.a
|
|
- cp libcgic.a /usr/local/lib
|
|
- cp cgic.h /usr/local/include
|
|
- @echo libcgic.a is in /usr/local/lib. cgic.h is in /usr/local/include.
|
|
-
|
|
-libcgic.a: cgic.o cgic.h
|
|
- rm -f libcgic.a
|
|
- $(AR) rc libcgic.a cgic.o
|
|
- $(RANLIB) libcgic.a
|
|
-
|
|
-#mingw32 and cygwin users: replace .cgi with .exe
|
|
-
|
|
-cgictest.cgi: cgictest.o libcgic.a
|
|
- gcc cgictest.o -o cgictest.cgi ${LIBS}
|
|
-
|
|
-capture: capture.o libcgic.a
|
|
- gcc capture.o -o capture ${LIBS}
|
|
-
|
|
+CFLAGS+= -Wall
|
|
+LIBS= libcgic.la
|
|
+OBJS= cgic.o
|
|
+
|
|
+all: libcgic.la cgictest capture
|
|
+
|
|
+.SUFFIXES: .lo
|
|
+
|
|
+.c.lo:
|
|
+ ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -o $@ -c $<
|
|
+
|
|
+libcgic.la: $(OBJS:.o=.lo)
|
|
+ ${LIBTOOL} --mode=link ${CC} -o $@ ${OBJS:.o=.lo} \
|
|
+ -rpath ${PREFIX}/lib -version-info 0:0
|
|
+
|
|
+cgictest: cgictest.lo libcgic.la
|
|
+ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ cgictest.lo $(LIBS)
|
|
+
|
|
+capture: capture.lo libcgic.la
|
|
+ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ cgictest.lo $(LIBS)
|
|
+
|
|
+install: libcgic.la cgictest
|
|
+ -mkdir -p ${PREFIX}/libexec/cgi-bin
|
|
+ -mkdir -p ${PREFIX}/share/examples/cgiclib
|
|
+ ${INSTALL} -c -m 444 capture.c ${PREFIX}/share/examples/cgiclib
|
|
+ ${INSTALL} -c -m 444 cgictest.c ${PREFIX}/share/examples/cgiclib
|
|
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libcgic.la ${PREFIX}/lib
|
|
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} capture ${PREFIX}/libexec/cgi-bin
|
|
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} cgictest ${PREFIX}/libexec/cgi-bin
|
|
+ ${INSTALL} -c -m 444 cgic.h ${PREFIX}/include
|
|
+ -mkdir -p ${PREFIX}/share/doc/html/cgiclib
|
|
+ for i in *.html; do \
|
|
+ ${INSTALL} -c -m 444 $$i ${PREFIX}/share/doc/html/cgiclib ; \
|
|
+ done
|
|
+
|
|
clean:
|
|
- rm -f *.o *.a cgictest.cgi capture
|
|
+ rm -f *.o *.la cgictest capture
|
|
|