Skip site navigation (1)Skip section navigation (2)
Date:      28 Feb 2000 06:08:46 -0000
From:      lioux@uol.com.br
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/17035: Update port www/ijb to both use FreeBSD gnuregex and emit less warnings
Message-ID:  <20000228060846.41401.qmail@Fedaykin.here>

next in thread | raw e-mail | index | archive | help

>Number:         17035
>Category:       ports
>Synopsis:       Update port www/ijb to both use FreeBSD gnuregex and emit less warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 27 22:20:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Mario Sergio Fujikawa Ferreira
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:

FreeBSD Here.here 4.0-CURRENT FreeBSD 4.0-CURRENT #3: Wed Feb 23 11:34:03 EST 2000     lioux@Here.here:/usr/current/src/sys/compile/LIOUX  i386

>Description:

 Just a little set of patches that may never make it because they may just considered
too trivial due to too much time in hands. :)
 ijb now uses the FreeBSD gnuregex lib instead of the one shipped with it (1997).
 Besides, it now emits no warnings, at least with -Wall. This part of the patch may
be deemed unnecessary, yet as I am shipping patches I might as well ship the whole package.
First, I created a loaders.h with a zalloc definition to be included in ssplit.c. 
Then, I added a DEFAULT_FALLBACK_HTTP_PORT to socks4.c, though perhaps too pessimistic.
Afterwards, I replaced all references to malloc.h with stdlib.h.

>How-To-Repeat:

	

>Fix:

diff -ruN /usr/ports/www/ijb/patches/patch-aa ./patches/patch-aa
--- /usr/ports/www/ijb/patches/patch-aa	Sat Feb  6 04:59:05 1999
+++ ./patches/patch-aa	Mon Feb 28 02:42:16 2000
@@ -1,6 +1,7 @@
---- Makefile.orig	Fri Feb  5 22:52:56 1999
-+++ Makefile	Fri Feb  5 22:53:25 1999
-@@ -8,7 +8,7 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/Makefile ./Makefile
+--- /usr/ports/www/ijb/work/ijb20/Makefile	Mon Feb 28 02:35:10 2000
++++ ./Makefile	Mon Feb 28 02:37:39 2000
+@@ -8,10 +8,11 @@
  PROG   = junkbuster
  O      = o
  RM     = rm -f
@@ -9,7 +10,11 @@
  
  # use this for Solaris 2.x
  #LDFLAGS = -lnsl -lsocket 
-@@ -47,7 +47,7 @@
++LDFLAGS += -lgnuregex
+ 
+ # use these for SunOS 4.x
+ #LDFLAGS = -nsl
+@@ -47,10 +48,10 @@
  #MORE_CFLAGS = -relax_pointers
  #LDFLAGS = -map junkbuster.xMAP
  
@@ -17,4 +22,8 @@
 +CFLAGS  += $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
  
  OBJS =	jcc.$(O) parsers.$(O) filters.$(O) loaders.$(O) bind.$(O) conn.$(O) \
- 	encode.$(O) ssplit.$(O) socks4.$(O) acl.$(O) gnu_regex.$(O) win32.$(O)
+-	encode.$(O) ssplit.$(O) socks4.$(O) acl.$(O) gnu_regex.$(O) win32.$(O)
++	encode.$(O) ssplit.$(O) socks4.$(O) acl.$(O) win32.$(O)
+ 
+ $(PROG): $(OBJS)
+ 	$(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
diff -ruN /usr/ports/www/ijb/patches/patch-ab ./patches/patch-ab
--- /usr/ports/www/ijb/patches/patch-ab	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-ab	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,12 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/acl.c ./acl.c
+--- /usr/ports/www/ijb/work/ijb20/acl.c	Mon Feb 28 02:35:10 2000
++++ ./acl.c	Mon Feb 28 02:31:06 2000
+@@ -18,7 +18,7 @@
+ #endif
+ 
+ #ifdef REGEX
+-#include "gnu_regex.h"
++#include "gnuregex.h"
+ #endif
+ 
+ #include "jcc.h"
diff -ruN /usr/ports/www/ijb/patches/patch-ac ./patches/patch-ac
--- /usr/ports/www/ijb/patches/patch-ac	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-ac	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,12 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/conn.c ./conn.c
+--- /usr/ports/www/ijb/work/ijb20/conn.c	Mon Feb 28 02:35:10 2000
++++ ./conn.c	Mon Feb 28 02:31:06 2000
+@@ -34,7 +34,7 @@
+ #endif
+ 
+ #ifdef REGEX
+-#include "gnu_regex.h"
++#include "gnuregex.h"
+ #endif
+ 
+ #include "jcc.h"
diff -ruN /usr/ports/www/ijb/patches/patch-ad ./patches/patch-ad
--- /usr/ports/www/ijb/patches/patch-ad	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-ad	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,12 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/encode.c ./encode.c
+--- /usr/ports/www/ijb/work/ijb20/encode.c	Mon Feb 28 02:35:10 2000
++++ ./encode.c	Mon Feb 28 02:31:06 2000
+@@ -9,7 +9,7 @@
+ #include <ctype.h>
+ 
+ #ifdef REGEX
+-#include "gnu_regex.h"
++#include "gnuregex.h"
+ #endif
+ 
+ #include "jcc.h"
diff -ruN /usr/ports/www/ijb/patches/patch-ae ./patches/patch-ae
--- /usr/ports/www/ijb/patches/patch-ae	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-ae	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,12 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/filters.c ./filters.c
+--- /usr/ports/www/ijb/work/ijb20/filters.c	Mon Feb 28 02:35:10 2000
++++ ./filters.c	Mon Feb 28 02:31:06 2000
+@@ -15,7 +15,7 @@
+ #endif
+ 
+ #ifdef REGEX
+-#include <gnu_regex.h>
++#include <gnuregex.h>
+ #endif
+ 
+ #include "jcc.h"
diff -ruN /usr/ports/www/ijb/patches/patch-af ./patches/patch-af
--- /usr/ports/www/ijb/patches/patch-af	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-af	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,12 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/gnu_regex.c ./gnu_regex.c
+--- /usr/ports/www/ijb/work/ijb20/gnu_regex.c	Mon Feb 28 02:35:10 2000
++++ ./gnu_regex.c	Mon Feb 28 02:31:06 2000
+@@ -131,7 +131,7 @@
+ #endif /* not emacs */
+ 
+ /* Get the interface, including the syntax bits.  */
+-#include "gnu_regex.h"
++#include "gnuregex.h"
+ 
+ /* isalpha etc. are used for the character classes.  */
+ #include <ctype.h>
diff -ruN /usr/ports/www/ijb/patches/patch-ag ./patches/patch-ag
--- /usr/ports/www/ijb/patches/patch-ag	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-ag	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,13 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/jcc.c ./jcc.c
+--- /usr/ports/www/ijb/work/ijb20/jcc.c	Mon Feb 28 02:35:10 2000
++++ ./jcc.c	Mon Feb 28 02:31:06 2000
+@@ -39,7 +39,7 @@
+ #endif
+ 
+ #ifdef REGEX
+-#include <gnu_regex.h>
++#include <gnuregex.h>
+ #endif
+ 
+ #include "jcc.h"
+Binary files /usr/ports/www/ijb/work/ijb20/junkbuster and ./junkbuster differ
diff -ruN /usr/ports/www/ijb/patches/patch-ah ./patches/patch-ah
--- /usr/ports/www/ijb/patches/patch-ah	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-ah	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,38 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/loaders.c ./loaders.c
+--- /usr/ports/www/ijb/work/ijb20/loaders.c	Mon Feb 28 02:35:10 2000
++++ ./loaders.c	Mon Feb 28 02:34:29 2000
+@@ -8,7 +8,7 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <ctype.h>
+@@ -18,7 +18,7 @@
+ #endif
+ 
+ #ifdef REGEX
+-#include <gnu_regex.h>
++#include <gnuregex.h>
+ #endif
+ 
+ #include "jcc.h"
+@@ -1160,7 +1160,7 @@
+ 
+ 	extern char	*acl_rcs, *bind_rcs, *conn_rcs, *encode_rcs,
+ 			*jcc_rcs, *loaders_rcs, *parsers_rcs, *filters_rcs,
+-			*socks4_rcs, *ssplit_rcs, *gnu_regex_rcs, *win32_rcs;
++			*socks4_rcs, *ssplit_rcs, *win32_rcs;
+ 
+ 	b = strsav(b, "<h2>Source versions:</h2>\n");
+ 	b = strsav(b, "<pre>");
+@@ -1174,7 +1174,6 @@
+ 	sprintf(buf, "%s\n", socks4_rcs    );	b = strsav(b, buf);
+ 	sprintf(buf, "%s\n", ssplit_rcs    );	b = strsav(b, buf);
+ 	sprintf(buf, "%s\n", acl_rcs       );	b = strsav(b, buf);
+-	sprintf(buf, "%s\n", gnu_regex_rcs );	b = strsav(b, buf);
+ 	sprintf(buf, "%s\n", win32_rcs     );	b = strsav(b, buf);
+ 	b = strsav(b, "</pre>");
+ 
diff -ruN /usr/ports/www/ijb/patches/patch-ai ./patches/patch-ai
--- /usr/ports/www/ijb/patches/patch-ai	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-ai	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,10 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/loaders.h ./loaders.h
+--- /usr/ports/www/ijb/work/ijb20/loaders.h	Wed Dec 31 21:00:00 1969
++++ ./loaders.h	Mon Feb 28 02:22:47 2000
+@@ -0,0 +1,6 @@
++#ifndef __LOADERS_H_INCLUDE__
++#define __LOADERS_H_INCLUDE__
++
++void * zalloc(int);
++
++#endif /* __LOADERS_H_INCLUDE__ */
diff -ruN /usr/ports/www/ijb/patches/patch-aj ./patches/patch-aj
--- /usr/ports/www/ijb/patches/patch-aj	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-aj	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,12 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/parsers.c ./parsers.c
+--- /usr/ports/www/ijb/work/ijb20/parsers.c	Mon Feb 28 02:35:10 2000
++++ ./parsers.c	Mon Feb 28 02:31:06 2000
+@@ -15,7 +15,7 @@
+ #endif
+ 
+ #ifdef REGEX
+-#include <gnu_regex.h>
++#include <gnuregex.h>
+ #endif
+ 
+ #include "jcc.h"
diff -ruN /usr/ports/www/ijb/patches/patch-ak ./patches/patch-ak
--- /usr/ports/www/ijb/patches/patch-ak	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-ak	Mon Feb 28 02:56:15 2000
@@ -0,0 +1,27 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/socks4.c ./socks4.c
+--- /usr/ports/www/ijb/work/ijb20/socks4.c	Mon Feb 28 02:35:10 2000
++++ ./socks4.c	Mon Feb 28 02:31:06 2000
+@@ -19,11 +19,13 @@
+ #endif
+ 
+ #ifdef REGEX
+-#include <gnu_regex.h>
++#include <gnuregex.h>
+ #endif
+ 
+ #include "jcc.h"
+ 
++#define DEFAULT_FALLBACK_HTTP_PORT	80
++
+ #define SOCKS_REQUEST_GRANTED		90
+ #define SOCKS_REQUEST_REJECT		91
+ #define SOCKS_REQUEST_IDENT_FAILED	92
+@@ -56,7 +58,7 @@
+ 	unsigned char sbuf[BUFSIZ];
+ 	struct socks_op    *c = (struct socks_op    *)cbuf;
+ 	struct socks_reply *s = (struct socks_reply *)sbuf;
+-	int web_server_addr;
++	int web_server_addr = DEFAULT_FALLBACK_HTTP_PORT;
+ 	int n, csiz, sfd, target_port;
+ 	int err = 0;
+ 	char *errstr, *target_host;
diff -ruN /usr/ports/www/ijb/patches/patch-al ./patches/patch-al
--- /usr/ports/www/ijb/patches/patch-al	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-al	Mon Feb 28 02:49:49 2000
@@ -0,0 +1,12 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/ssplit.c ./ssplit.c
+--- /usr/ports/www/ijb/work/ijb20/ssplit.c	Mon Feb 28 02:35:10 2000
++++ ./ssplit.c	Mon Feb 28 02:31:06 2000
+@@ -18,6 +18,8 @@
+  *      l = flag indicating whether to ignore leading field separators
+  */
+ 
++#include "loaders.h"
++#include <stdlib.h>
+ #include <string.h>
+ 
+ int ssplit(char *s, char *c, char *v[], int n, int m, int l)
diff -ruN /usr/ports/www/ijb/patches/patch-am ./patches/patch-am
--- /usr/ports/www/ijb/patches/patch-am	Wed Dec 31 21:00:00 1969
+++ ./patches/patch-am	Mon Feb 28 02:38:24 2000
@@ -0,0 +1,12 @@
+diff -ruN /usr/ports/www/ijb/work/ijb20/win32.c ./win32.c
+--- /usr/ports/www/ijb/work/ijb20/win32.c	Mon Feb 28 02:35:10 2000
++++ ./win32.c	Mon Feb 28 02:31:06 2000
+@@ -7,7 +7,7 @@
+ 
+ #include <stdio.h>
+ #ifdef REGEX
+-#include "gnu_regex.h"
++#include "gnuregex.h"
+ #endif
+ #include "jcc.h"
+ #include <windows.h>

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000228060846.41401.qmail>