summaryrefslogtreecommitdiff
path: root/www/cgic/patches
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2006-01-06 22:46:51 +0000
committeradam <adam@pkgsrc.org>2006-01-06 22:46:51 +0000
commit8e5abd345e4f0fdf37e933d1e310d86d945058d4 (patch)
tree5b8c0dbcde41e5a3d8ee82663d63597c1aeaafd8 /www/cgic/patches
parentf967965ad486f56a10310c3931241d92832900db (diff)
downloadpkgsrc-8e5abd345e4f0fdf37e933d1e310d86d945058d4.tar.gz
Changes 2.05:
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.
Diffstat (limited to 'www/cgic/patches')
-rw-r--r--www/cgic/patches/patch-aa45
-rw-r--r--www/cgic/patches/patch-ac30
-rw-r--r--www/cgic/patches/patch-ae6
-rw-r--r--www/cgic/patches/patch-af6
4 files changed, 41 insertions, 46 deletions
diff --git a/www/cgic/patches/patch-aa b/www/cgic/patches/patch-aa
index 12168fe243d..bb9027a850a 100644
--- a/www/cgic/patches/patch-aa
+++ b/www/cgic/patches/patch-aa
@@ -1,29 +1,26 @@
-$NetBSD: patch-aa,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $
+$NetBSD: patch-aa,v 1.2 2006/01/06 22:46:51 adam Exp $
---- Makefile.orig Sun Jan 12 13:59:43 2003
+--- Makefile.orig 2005-12-16 15:52:31.000000000 +0100
+++ Makefile
-@@ -1,27 +1,42 @@
+@@ -1,29 +1,38 @@
-CFLAGS=-g -Wall
-+CFLAGS += -g -Wall
- CC=gcc
- AR=ar
+-CC=gcc
+-AR=ar
+-RANLIB=ranlib
-LIBS=-L./ -lcgic
-+LIBS = libcgic.la
-
+-
-all: libcgic.a cgictest.cgi capture
-+OBJS = cgic.o
-
+-
-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.
-+all: libcgic.la cgictest capture
-
+-
-libcgic.a: cgic.o cgic.h
- rm -f libcgic.a
- $(AR) rc libcgic.a cgic.o
-+.SUFFIXES: .lo
-
+- $(RANLIB) libcgic.a
+-
-#mingw32 and cygwin users: replace .cgi with .exe
-
-cgictest.cgi: cgictest.o libcgic.a
@@ -31,13 +28,21 @@ $NetBSD: patch-aa,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $
-
-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
++ -rpath ${PREFIX}/lib -version-info 0:0
+
+cgictest: cgictest.lo libcgic.la
+ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ cgictest.lo $(LIBS)
@@ -50,15 +55,15 @@ $NetBSD: patch-aa,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $
+ -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 ${INSTALL} -c -m 444 libcgic.la ${PREFIX}/lib
-+ ${LIBTOOL} --mode=install ${INSTALL} -c -m 755 capture ${PREFIX}/libexec/cgi-bin
-+ ${LIBTOOL} --mode=install ${INSTALL} -c -m 755 cgictest ${PREFIX}/libexec/cgi-bin
++ ${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
diff --git a/www/cgic/patches/patch-ac b/www/cgic/patches/patch-ac
index eb7a2089d20..862a25a3668 100644
--- a/www/cgic/patches/patch-ac
+++ b/www/cgic/patches/patch-ac
@@ -1,10 +1,10 @@
-$NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $
+$NetBSD: patch-ac,v 1.2 2006/01/06 22:46:51 adam Exp $
---- cgic.c.orig Sun Jan 12 13:59:43 2003
+--- cgic.c.orig 2004-11-15 17:57:59.000000000 +0100
+++ cgic.c
-@@ -124,8 +124,9 @@ static int cgiStrBeginsNc(char *s1, char
-
- static int firstCookie = 1;
+@@ -119,8 +119,9 @@ static void cgiFreeResources();
+ static int cgiStrEqNc(char *s1, char *s2);
+ static int cgiStrBeginsNc(char *s1, char *s2);
-int main(int argc, char *argv[]) {
- int result;
@@ -14,7 +14,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $
char *cgiContentLengthString;
char *e;
cgiSetupConstants();
-@@ -211,17 +212,6 @@ int main(int argc, char *argv[]) {
+@@ -206,17 +207,6 @@ int main(int argc, char *argv[]) {
cgiOut = stdout;
cgiRestored = 0;
@@ -32,25 +32,15 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $
if (cgiStrEqNc(cgiRequestMethod, "post")) {
#ifdef CGICDEBUG
CGICDEBUGSTART
-@@ -290,9 +280,9 @@ int main(int argc, char *argv[]) {
+@@ -284,9 +274,8 @@ int main(int argc, char *argv[]) {
+ #endif /* CGICDEBUG */
}
}
- firstCookie = 1;
- result = cgiMain();
- cgiFreeResources();
- return result;
-+
-+ atexit(cgiFreeResources);
-+ return(0);
++ atexit(cgiFreeResources);
++ return 0;
}
static void cgiGetenv(char **s, char *var){
-@@ -1995,7 +1985,7 @@ cgiEnvironmentResultType cgiReadEnvironm
- FILE *in;
- cgiFormEntry *e = 0, *p;
- char *version;
-- cgiEnvironmentResultType result;
-+ cgiEnvironmentResultType result = cgiEnvironmentSuccess;
- /* Free any existing data first */
- cgiFreeResources();
- /* Be sure to open in binary mode */
diff --git a/www/cgic/patches/patch-ae b/www/cgic/patches/patch-ae
index d548a8f53aa..003ad48a4b3 100644
--- a/www/cgic/patches/patch-ae
+++ b/www/cgic/patches/patch-ae
@@ -1,8 +1,8 @@
-$NetBSD: patch-ae,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $
+$NetBSD: patch-ae,v 1.2 2006/01/06 22:46:51 adam Exp $
---- cgic.html.orig Sun Jan 12 13:59:43 2003
+--- cgic.html.orig 2004-11-15 17:59:19.000000000 +0100
+++ cgic.html
-@@ -365,6 +365,29 @@ cgic.c to your project?</strong>
+@@ -378,6 +378,29 @@ cgic.c to your project?</strong>
If none of the above proves effective, please see the
section regarding <a href="#support">support</a>.
<h3><a name="howto">How to write a cgic application</a></h3>
diff --git a/www/cgic/patches/patch-af b/www/cgic/patches/patch-af
index 0fc93cd0c7c..d4e7415ebb7 100644
--- a/www/cgic/patches/patch-af
+++ b/www/cgic/patches/patch-af
@@ -1,8 +1,8 @@
-$NetBSD: patch-af,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $
+$NetBSD: patch-af,v 1.2 2006/01/06 22:46:51 adam Exp $
---- cgictest.c.orig Sun Jan 12 13:59:43 2003
+--- cgictest.c.orig 2004-04-22 22:49:47.000000000 +0200
+++ cgictest.c
-@@ -33,7 +33,13 @@ void Cookies();
+@@ -42,7 +42,13 @@ void Cookies();
void LoadEnvironment();
void SaveEnvironment();