View | Details | Raw Unified | Return to bug 92572
Collapse All | Expand All

(-)hylafax/Makefile (-4 / +1 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	hylafax
8
PORTNAME=	hylafax
9
PORTVERSION=	4.2.1
9
PORTVERSION=	4.2.5
10
PORTREVISION=	3
11
CATEGORIES=	comms
10
CATEGORIES=	comms
12
MASTER_SITES=	ftp://ftp.hylafax.org/source/
11
MASTER_SITES=	ftp://ftp.hylafax.org/source/
13
12
Lines 22-29 Link Here
22
		jpeg:${PORTSDIR}/graphics/jpeg
21
		jpeg:${PORTSDIR}/graphics/jpeg
23
22
24
RUN_DEPENDS=	gawk:${PORTSDIR}/lang/gawk
23
RUN_DEPENDS=	gawk:${PORTSDIR}/lang/gawk
25
26
BROKEN=		Configure fails
27
24
28
DIST_SUBDIR=	hylafax
25
DIST_SUBDIR=	hylafax
29
26
(-)hylafax/distinfo (-3 / +2 lines)
Lines 1-3 Link Here
1
MD5 (hylafax/hylafax-4.2.1.tar.gz) = 05430e41a279d0fff6d6e4b444440829
1
MD5 (hylafax/hylafax-4.2.5.tar.gz) = 5989c2638f79b178cbe935882cd58f3e
2
SHA256 (hylafax/hylafax-4.2.1.tar.gz) = 1f8bf5f7115e97cb7a97851e7dfdea84104ea255392d1c5da05f7f9ba67fc284
2
SIZE (hylafax/hylafax-4.2.5.tar.gz) = 1450958
3
SIZE (hylafax/hylafax-4.2.1.tar.gz) = 1412035
(-)hylafax/files/patch-configure (-130 / +10 lines)
Lines 1-131 Link Here
1
--- configure.orig	Tue Dec 28 05:45:03 2004
1
--- configure.orig	Mon Jan 30 23:31:09 2006
2
+++ configure	Wed Jan 12 23:15:17 2005
2
+++ configure	Mon Jan 30 23:31:32 2006
3
@@ -43,8 +43,8 @@
3
@@ -2418,7 +2418,7 @@
4
 DIR_LIB=/usr/local/lib
4
 	if [ ${header_ver} -ge 19960307 ]; then
5
 DIR_LIBEXEC=$DIR_SBIN
5
 	    case ${lib_ver} in
6
 DIR_SPOOL=/var/spool/hylafax
6
 		3.4)		tiff_runlen_t="uint16" ;;
7
-DIR_HTML=/var/httpd/htdocs/hylafax
7
-		3.[567])	tiff_runlen_t="uint32" ;;
8
-DIR_CGI=/var/httpd/cgi-bin
8
+		3.[5678])	tiff_runlen_t="uint32" ;;
9
+DIR_HTML=/usr/local/share/doc/hylafax
9
 	    esac
10
+DIR_CGI=/usr/local/share/doc/hylafax/cgi-bin
11
 PATH_DPSRIP=$DIR_LIBEXEC/ps2fax.exe
12
 PATH_IMPRIP=/usr/lib/print/psrip
13
 HTMLPATH=/hylafax
14
@@ -52,9 +52,9 @@
15
 DEFVRES=98
16
 PAGESIZE="North American Letter"
17
 FAXUID=uucp
18
-FAXGID=
19
-SYSUID=bin
20
-SYSGID=
21
+FAXGID=dialer
22
+SYSUID=root
23
+SYSGID=wheel
24
 DSO=auto
25
 GETTY=auto
26
 HTML=no
27
@@ -384,7 +384,7 @@
28
     -srcdir=*|--srcdir=*)	SRCDIR="$ac_optarg";;
29
     -target|--target)		ac_prev=TARGET;;
30
     -target=*|--target=*)	TARGET="$ac_optarg" ;;
31
-	-disable-pam|--disable-pam) DISABLE_PAM="yes" ;;
32
+    -disable-pam|--disable-pam)	DISABLE_PAM="yes" ;;
33
     -version|--version)
34
 	echo "This is HylaFAX configure $Revision: 1.106 $"
35
 	exit 0
36
@@ -1578,11 +1578,11 @@
37
 if [ "$DISABLE_PAM" != "yes" ]; then
38
 	Note "Checking for PAM (Pluggable Authentication Module) support"
39
 	CheckForLibrary pam_authenticate -lpam &&
40
-		CheckForLibrary misc_conv -lpam_misc -lpam &&
41
+		CheckForLibrary misc_conv -lpam &&
42
 		CheckForIncludeFile security/pam_appl.h &&
43
 		CheckForIncludeFile security/pam_misc.h && {
44
 			HAVE_PAM="#define HAVE_PAM 1"
45
-			PAMLIBS="-lpam -lpam_misc"
46
+			PAMLIBS="-lpam"
47
 		}
48
 	if [ "x$PAMLIBS" = "x" ]; then
49
 		Note "... not found. Disabling PAM support"
50
@@ -2661,5 +2661,4 @@
51
     CheckFuncDecl strtoul \
52
 	'extern unsigned long strtoul(const char*, char**, int);' stdlib.h
53
-    CheckFuncDecl cuserid 'extern char* cuserid(char*);' stdio.h
54
     #
55
     # unistd.h is for sco3.2v4.[0-2] and GNU libc (yech!)
56
@@ -2677,8 +2676,4 @@
57
     CheckStdio fdopen 'extern FILE* fdopen(int, const char*);'
58
     CheckStdio snprintf 'extern int snprintf(char*, size_t, const char*,...);'
59
-    CheckForFuncDecl vsnprintf stdio.h || {
60
-	echo '#include <stdarg.h>'
61
-	AddFuncDecl vsnprintf 'extern int vsnprintf(char*, size_t, const char*, va_list);'
62
-    }
63
     CheckForDefine fileno stdio.h || {
64
 	CheckStdio fileno 'extern int fileno(FILE*);'
65
@@ -3010,5 +3005,4 @@
66
 
67
 FUNCS="
68
-    cuserid
69
     flock
70
     ftruncate
71
@@ -3024,5 +3018,4 @@
72
     strtod
73
     strtoul
74
-    vsnprintf
75
     writev
76
 "
77
@@ -4326,18 +4326,8 @@
78
 
79
 HylaFAX configuration parameters (part 1 of 2) are:
80
 
81
-[ 1] Directory for applications:        $DIR_BIN
82
-[ 2] Directory for lib data files:      $DIR_LIBDATA
83
-[ 3] Directory for lib executables:     $DIR_LIBEXEC
84
-[ 4] Directory for system apps:  	$DIR_SBIN
85
-[ 5] Directory for manual pages:        $DIR_MAN
86
-[ 6] Directory for HTML documentation:  $DIR_HTML
87
-[ 7] Directory for spooling:            $DIR_SPOOL
88
-[ 8] Directory for uucp lock files:     $DIR_LOCKS
89
-[ 9] Uucp lock file scheme:             $LOCKS
90
 [10] PostScript imager package:         $PS
91
 [11] PostScript imager program:         $PATH_PSRIP
92
-[12] Manual page installation scheme:   $MANSCHEME
93
 [13] Default page size:                 $PAGESIZE
94
 [14] Default vertical res (lpi):        $DEFVRES
95
 
96
@@ -4353,16 +4343,11 @@
97
 [15] Location of getty program:         $PATH_GETTY
98
 [16] Location of voice getty program:   $PATH_VGETTY
99
 [17] Location of sendmail program:      $PATH_SENDMAIL
100
-[18] Location of TIFF tools:            $TIFFBIN
101
-[19] Location of SysV init scripts:	$DIR_SYSVINIT
102
-[20] Location of SysV start scripts:	$DIR_SYSVINITSTART
103
-[21] Location of SysV stop scripts:	$DIR_SYSVINITSTOP
104
-[22] Name of SysV start script:		$NAME_SYSVINITSTART
105
-[23] Name of SysV stop script:		$NAME_SYSVINITSTOP
106
 [24] Init script starts faxq:		$FAXQ_SERVER
107
 [25] Init script starts hfaxd		$HFAXD_SERVER
108
 [26] Start old protocol:		$HFAXD_OLD_PROTOCOL
109
 [27] Start paging protocol:		$HFAXD_SNPP_SERVER
110
+
111
 EOF
112
 }
113
   
114
@@ -4463,7 +4448,7 @@
115
     ok=skip
116
     while [ "$ok" != y ] && [ "$ok" != yes ]; do
117
 	if [ "$ok" != skip ]; then
118
-	    for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
119
+	    for i in 10 11 13 14 ; do
120
 		promptForParameter $i;
121
 	    done
122
 	fi
123
@@ -4492,7 +4477,7 @@
124
     ok=skip
125
     while [ "$ok" != y ] && [ "$ok" != yes ]; do
126
 	if [ "$ok" != skip ]; then
127
-	    for i in 15 16 17 18 19 20 21 22 23 24 25 26 27 ; do
128
+	    for i in 15 16 17 24 25 26 27 ; do
129
 		promptForParameter $i;
130
 	    done
131
 	fi
10
 	fi
11
     else
(-)hylafax/files/patch-cuserid (-99 lines)
Lines 1-99 Link Here
1
--- util/SNPPClient.c++	Sat Feb  8 17:49:57 2003
2
+++ util/SNPPClient.c++	Sun Jul 24 14:54:33 2005
3
@@ -247,17 +247,11 @@
4
 SNPPClient::setupUserIdentity(fxStr& emsg)
5
 {
6
-    struct passwd* pwd = NULL;
7
-    char* name = cuserid(NULL);
8
-    if (!name) {
9
-	name = getlogin();
10
-	if (name)
11
-	    pwd = getpwnam(name);
12
-    }
13
-    if (!pwd)
14
-	pwd = getpwuid(getuid());
15
+    struct passwd* pwd;
16
+
17
+    pwd = getpwuid(getuid());
18
     if (!pwd) {
19
 	emsg = fxStr::format(
20
-	    "Can not locate your password entry (account name %s, uid %lu).",
21
-	    (name ? name : "<unspecified>"), (u_long) getuid());
22
+	    "Can not locate your password entry (uid %lu): %s.",
23
+		(u_long) getuid(), strerror(errno));
24
 	return (false);
25
     }
26
--- util/TextFormat.c++	Thu Nov 20 16:23:17 2003
27
+++ util/TextFormat.c++	Sun Jul 24 14:55:47 2005
28
@@ -510,5 +510,5 @@
29
     time_t t = Sys::now();
30
     fprintf(output, "%%%%CreationDate: %s", ctime(&t));
31
-    char* cp = cuserid(NULL);
32
+    char* cp = getlogin();
33
     fprintf(output, "%%%%For: %s\n", cp ? cp : "");
34
     fputs("%%Origin: 0 0\n", output);
35
--- util/FaxClient.c++	Wed Mar 10 08:58:47 2004
36
+++ util/FaxClient.c++	Thu Jul 28 13:40:39 2005
37
@@ -180,20 +180,17 @@
38
 {
39
     struct passwd* pwd = NULL;
40
-    char* name = getenv("FAXUSER");
41
+    const char* name = getenv("FAXUSER");
42
     if (name)
43
 	pwd = getpwnam(name);
44
     else
45
-	name = cuserid(NULL);
46
-    if (!name) {
47
-	name = getlogin();
48
-	if (name)
49
-	    pwd = getpwnam(name);
50
-    }
51
-    if (!pwd)
52
 	pwd = getpwuid(getuid());
53
     if (!pwd) {
54
-	emsg = fxStr::format(
55
-	    "Can not locate your password entry (account name %s, uid %lu).",
56
-	    (name ? name : "<unspecified>"), (u_long) getuid());
57
+	if (name)
58
+	    emsg = fxStr::format("Can not locate FAXUSER password entry "
59
+		"(account name %s, uid %lu): %s", name, (u_long) getuid(),
60
+		strerror(errno));
61
+	else
62
+	    emsg = fxStr::format("Can not locate your password entry "
63
+		"(uid %lu): %s", (u_long) getuid(), strerror(errno));
64
 	return (false);
65
     }
66
@@ -621,4 +622,6 @@
67
 FaxClient::vcommand(const char* fmt, va_list ap)
68
 {
69
+    char *line = NULL;
70
+
71
     if (getVerbose()) {
72
         if (strncasecmp("PASS ", fmt, 5) == 0) {
73
@@ -627,7 +630,11 @@
74
             traceServer("-> ADMIN XXXX");
75
         } else {
76
-            fxStr s("-> ");
77
-            s.append(fmt);
78
-            vtraceServer(s, ap);
79
+           line = (char *)malloc(100);
80
+           if (line == NULL)
81
+               printError("Memory allocation failed");
82
+           else {
83
+               vsnprintf(line, 100, fmt, ap);
84
+               traceServer("-> %s", line);
85
+           }
86
         }
87
     }
88
@@ -637,5 +644,10 @@
89
         return (0);
90
     }
91
-    vfprintf(fdOut, fmt, ap);
92
+    if (line == NULL)
93
+       vfprintf(fdOut, fmt, ap);
94
+    else {
95
+       fputs(line, fdOut);
96
+       free(line);
97
+    }
98
     fputs("\r\n", fdOut);
99
     (void) fflush(fdOut);
(-)hylafax/files/patch-faxd_Class1Send.c++ (-61 lines)
Lines 1-61 Link Here
1
--- faxd/Class1Send.c++.orig	Sat Oct  8 18:06:03 2005
2
+++ faxd/Class1Send.c++	Sat Oct  8 18:06:47 2005
3
@@ -270,6 +270,8 @@
4
     HDLCFrame frame(conf.class1FrameOverhead);
5
 
6
     do {
7
+        hadV34Trouble = false;		// to monitor failure type
8
+	batchingError = false;
9
 	signalRcvd = 0;
10
 	if (abortRequested())
11
 	    return (send_failed);
12
@@ -320,8 +322,6 @@
13
 	/*
14
 	 * Transmit the facsimile message/Phase C.
15
 	 */
16
-        hadV34Trouble = false;		// to monitor failure type
17
-	batchingError = false;
18
 	if (!sendPage(tif, params, decodePageChop(pph, params), cmd, emsg)) {
19
 	    if (hadV34Trouble) {
20
 		protoTrace("The destination appears to have trouble with V.34-Fax.");
21
@@ -913,6 +913,7 @@
22
 	ecmBlock[ecmBlockPos++] = ecmFrame[i];
23
     ecmFramePos = 0;
24
     if (frameNumber == 256 || lastframe) {
25
+	fxAssert(frameNumber <= 256, "Invalid frameNumber value.");
26
 	ecmBlockPos = 0;
27
 	bool lastblock = lastframe;
28
 
29
@@ -1145,7 +1146,7 @@
30
 			}
31
 		    }
32
 		}
33
-	    } while (!gotppr && (++ppscnt < 3) && (crpcnt < 3));
34
+	    } while (!gotppr && (++ppscnt < 3) && (crpcnt < 3) && !(useV34 && gotEOT));
35
 	    if (gotppr) {
36
 		if (!useV34 && !atCmd(conf.class1SwitchingCmd, AT_OK)) {
37
 		    emsg = "Failure to receive silence.";
38
@@ -1485,9 +1486,11 @@
39
 		return (false);
40
 	}
41
     }
42
-    if (eod && (ecmFramePos != 0)) {
43
-	while (ecmFramePos < (frameSize + 4))
44
-	    ecmFrame[ecmFramePos++] = 0x00;
45
+    if (eod) {
46
+	if (ecmFramePos != 0)	{
47
+	    // frame must be filled to end with zero-data
48
+	    while (ecmFramePos < (frameSize + 4)) ecmFrame[ecmFramePos++] = 0x00;
49
+	}
50
 	if (!blockFrame(bitrev, true, ppmcmd, emsg))
51
 	    return (false);
52
     }
53
@@ -1631,7 +1634,7 @@
54
     }
55
 
56
     bool rc = true;
57
-    ecmBlockPos = ecmFramePos = ecmBitPos = ecmOnes = ecmByte = 0;
58
+    frameNumber = ecmBlockPos = ecmFramePos = ecmBitPos = ecmOnes = ecmByte = 0;
59
     protoTrace("SEND begin page");
60
 
61
     tstrip_t nstrips = TIFFNumberOfStrips(tif);
(-)hylafax/files/patch-hfaxd::Makefile.in (-8 lines)
Lines 1-8 Link Here
1
--- hfaxd/Makefile.in.orig	Thu Nov 20 16:20:39 2003
2
+++ hfaxd/Makefile.in	Fri Jan 14 22:59:19 2005
3
@@ -99,4 +99,4 @@
4
 	${INSTALL} -F ${LIBEXEC} -u root -m 755 \
5
 	    -idb ${PRODUCT}.sw.server -O hfaxd
6
 	${INSTALL} -F ${LIBDATA} -m 644 -idb ${PRODUCT}.sw.server \
7
-	    -idb "config(noupdate)" -src ${SRCDIR}/hfaxd.conf -O hfaxd.conf
8
+	    -idb "config(noupdate)" -src ${SRCDIR}/hfaxd.conf -O hfaxd.conf-dist
(-)hylafax/files/patch-util::Makefile.in (-13 lines)
Lines 1-13 Link Here
1
--- util/Makefile.in.orig	Mon Aug 16 14:58:22 2004
2
+++ util/Makefile.in	Fri Jan 14 23:17:11 2005
3
@@ -161,8 +161,8 @@
4
 
5
 installClient: default
6
 	${PUTCLIENT} -F ${LIBEXEC} -m 755 -O textfmt
7
-	${PUTCLIENT} -F ${LIBDATA} -m 444 -O pagesizes
8
-	${PUTCLIENT} -F ${LIBDATA} -m 444 -src ${SRCDIR}/typerules -O typerules
9
+	${PUTCLIENT} -F ${LIBDATA} -m 444 -src ${SRCDIR}/pagesizes -O pagesizes-dist
10
+	${PUTCLIENT} -F ${LIBDATA} -m 444 -src ${SRCDIR}/typerules -O typerules-dist
11
 
12
 install: installClient
13
 	${PUTSBIN} -m 755 -O faxmsg faxadduser faxconfig faxdeluser faxmodem \
(-)hylafax/files/patch-util::faxrcvd.sh.in (-10 lines)
Lines 1-10 Link Here
1
--- util/faxrcvd.sh.in.orig	Sun May 23 15:47:38 2004
2
+++ util/faxrcvd.sh.in	Sun May 23 15:48:12 2004
3
@@ -51,6 +51,7 @@
4
 }
5
 . etc/setup.cache
6
 
7
+export PATH=$PATH:$BIN
8
 INFO=$SBIN/faxinfo
9
 FAX2PS=$TIFFBIN/fax2ps
10
 MIMENCODE=mimencode
(-)hylafax/files/patch-warnings (-311 lines)
Lines 1-311 Link Here
1
--- util/faxwatch.c++	Fri Jun 14 15:24:04 2002
2
+++ util/faxwatch.c++	Sun Jul 24 14:32:23 2005
3
@@ -49,5 +49,5 @@
4
 writeData(void* arg, const char* buf, int cc, fxStr& emsg)
5
 {
6
-    if (Sys::write((int) arg, buf, cc) != cc) {
7
+    if (Sys::write((intptr_t) arg, buf, cc) != cc) {
8
 	emsg = fxStr::format("write error: %s", strerror(errno));
9
 	return (false);
10
--- hfaxd/FileTransfer.c++	Wed Mar 17 13:26:54 2004
11
+++ hfaxd/FileTransfer.c++	Sun Jul 24 14:34:37 2005
12
@@ -323,5 +323,5 @@
13
 #define	TIFFdiroff(v) \
14
     (uint32) (sizeof (TIFFHeader) + sizeof (uint16) + \
15
-      (unsigned) &(((DirTemplate*) 0)->v))
16
+      (uintptr_t) &(((DirTemplate*) 0)->v))
17
 	{ TIFFTAG_SUBFILETYPE,		TIFF_LONG,	1 },
18
 	{ TIFFTAG_IMAGEWIDTH,		TIFF_LONG,	1 },
19
--- util/Dispatcher.c++	Sat Feb  8 17:49:55 2003
20
+++ util/Dispatcher.c++	Sun Jul 24 15:23:45 2005
21
@@ -579,10 +579,10 @@
22
      */
23
     if (!_cqueue->isReady()) {
24
-    do {
25
-        //note - this is an array copy, not a pointer assignment
26
-        rmaskret = _rmask;
27
-        wmaskret = _wmask;
28
-        emaskret = _emask;
29
-        howlong = calculateTimeout(howlong);
30
+	do {
31
+            //note - this is an array copy, not a pointer assignment
32
+            rmaskret = _rmask;
33
+            wmaskret = _wmask;
34
+            emaskret = _emask;
35
+            howlong = calculateTimeout(howlong);
36
 
37
 #if CONFIG_BADSELECTPROTO
38
@@ -594,5 +594,6 @@
39
 	    howlong = calculateTimeout(howlong);
40
 	} while (nfound < 0 && !handleError());
41
-    }
42
+    } else
43
+	nfound = 0;
44
     if (!_cqueue->isEmpty()) {
45
 #if defined(SA_NOCLDSTOP)		// POSIX
46
--- util/TimeOfDay.c++	Mon Jun  4 01:32:05 2001
47
+++ util/TimeOfDay.c++	Sun Jul 24 15:27:15 2005
48
@@ -146,5 +146,5 @@
49
 	while (*cp && *cp != ',' && !isdigit(*cp))
50
 	    cp++;
51
-	time_t start, end;
52
+	unsigned start, end;
53
 	if (sscanf(cp, "%u-%u", &start, &end) == 2) {
54
 	    // convert from military time to seconds
55
--- util/Class2Params.c++	Tue Dec 28 16:13:04 2004
56
+++ util/Class2Params.c++	Sun Jul 24 15:29:15 2005
57
@@ -348,7 +348,5 @@
58
     // extension flags for 3 more bytes
59
     u_int firstbyte  = 0;
60
-    u_int secondbyte = (1<<24);
61
     u_int thirdbyte  = (1<<24) | (1<<16);
62
-    u_int fourthbyte = (1<<24) | (1<<16) | (1<<8);
63
     u_int dcs_xinfo =
64
 	  (vr & VR_R8 ? (DCS_200X400 | thirdbyte) : 0)
65
--- util/TypeRules.c++	Sat Oct  4 14:19:26 2003
66
+++ util/TypeRules.c++	Sun Jul 24 15:32:54 2005
67
@@ -81,5 +81,5 @@
68
 		printf(" <any value>");
69
 	    else
70
-		printf(" %#x", value.v);
71
+		printf(" %#llx", (long long)value.v);
72
 	}
73
 	printf(" -- ");
74
--- util/cvtfacility.c	Mon Oct 12 16:47:48 1998
75
+++ util/cvtfacility.c	Sun Jul 24 15:37:21 2005
76
@@ -32,58 +32,58 @@
77
 } facilitynames[] = {
78
 #ifdef LOG_AUDIT
79
-	"audit",	LOG_AUDIT,
80
+	{ "audit",	LOG_AUDIT	},
81
 #endif
82
 #ifdef LOG_AUTH
83
-	"auth",		LOG_AUTH,
84
+	{ "auth",		LOG_AUTH	},
85
 #endif
86
 #ifdef LOG_CRON
87
-	"cron", 	LOG_CRON,
88
+	{ "cron", 	LOG_CRON	},
89
 #endif
90
 #ifdef LOG_DAEMON
91
-	"daemon",	LOG_DAEMON,
92
+	{ "daemon",	LOG_DAEMON	},
93
 #endif
94
 #ifdef LOG_MAIL
95
-	"mail",		LOG_MAIL,
96
+	{ "mail",		LOG_MAIL	},
97
 #endif
98
 #ifdef LOG_NEWS
99
-	"news",		LOG_NEWS,
100
+	{ "news",		LOG_NEWS	},
101
 #endif
102
 #ifdef LOG_SAT
103
-	"sat",		LOG_AUDIT,
104
+	{ "sat",		LOG_AUDIT	},
105
 #endif
106
 #ifdef LOG_SYSLOG
107
-	"syslog",	LOG_SYSLOG,
108
+	{ "syslog",	LOG_SYSLOG	},
109
 #endif
110
 #ifdef LOG_USER
111
-	"user",		LOG_USER,
112
+	{ "user",		LOG_USER	},
113
 #endif
114
 #ifdef LOG_UUCP
115
-	"uucp",		LOG_UUCP,
116
+	{ "uucp",		LOG_UUCP	},
117
 #endif
118
 #ifdef LOG_LOCAL0
119
-	"local0",	LOG_LOCAL0,
120
+	{ "local0",	LOG_LOCAL0	},
121
 #endif
122
 #ifdef LOG_LOCAL1
123
-	"local1",	LOG_LOCAL1,
124
+	{ "local1",	LOG_LOCAL1	},
125
 #endif
126
 #ifdef LOG_LOCAL2
127
-	"local2",	LOG_LOCAL2,
128
+	{ "local2",	LOG_LOCAL2	},
129
 #endif
130
 #ifdef LOG_LOCAL3
131
-	"local3",	LOG_LOCAL3,
132
+	{ "local3",	LOG_LOCAL3	},
133
 #endif
134
 #ifdef LOG_LOCAL4
135
-	"local4",	LOG_LOCAL4,
136
+	{ "local4",	LOG_LOCAL4	},
137
 #endif
138
 #ifdef LOG_LOCAL5
139
-	"local5",	LOG_LOCAL5,
140
+	{ "local5",	LOG_LOCAL5	},
141
 #endif
142
 #ifdef LOG_LOCAL6
143
-	"local6",	LOG_LOCAL6,
144
+	{ "local6",	LOG_LOCAL6	},
145
 #endif
146
 #ifdef LOG_LOCAL7
147
-	"local7",	LOG_LOCAL7,
148
+	{ "local7",	LOG_LOCAL7	},
149
 #endif
150
-	NULL,		-1,
151
+	{ NULL,		-1	},
152
 };
153
 
154
--- util/faxmsg.c	Sat Feb  8 17:22:18 2003
155
+++ util/faxmsg.c	Sun Jul 24 15:43:58 2005
156
@@ -59,15 +59,15 @@
157
     int fifo, c;
158
     char* spooldir = FAX_SPOOLDIR;
159
-    const char* arg;
160
+    const char* arg = NULL;
161
     char fifoname[256];
162
     int cmdlen, fnlen;
163
     char cmd[80];
164
     char* appname;
165
-    const char* opts;
166
-    const char* usage;
167
-    const char* cmdfmt;
168
+    const char* opts = NULL;
169
+    const char* usage = NULL;
170
+    const char* cmdfmt = NULL;
171
     char* cp;
172
     int facility = LOG_DAEMON;
173
-    int modemRequired;
174
+    int modemRequired = 0;
175
 
176
     (void) cvtFacility(LOG_FAX, &facility);
177
@@ -123,6 +123,6 @@
178
         } else {
179
             fnlen = snprintf(fifoname, sizeof(fifoname), "%s.%.*s", FAX_FIFO,
180
-                sizeof (fifoname) - sizeof (FAX_FIFO), argv[optind]);
181
-            if (fnlen < 0 | fnlen >= sizeof(fifoname)) {
182
+                (int)(sizeof (fifoname) - sizeof (FAX_FIFO)), argv[optind]);
183
+            if (fnlen < 0 || fnlen >= sizeof(fifoname)) {
184
                 fatal("Argument name too long: %s", argv[optind]);
185
             }
186
@@ -133,5 +133,5 @@
187
         fatal("usage: %s %s", argv[0], usage);
188
     }
189
-    for (cp = fifoname; cp = strchr(cp, '/'); *cp++ = '_')
190
+    for (cp = fifoname; (cp = strchr(cp, '/')); *cp++ = '_')
191
 	;
192
     if (chdir(spooldir) < 0) {
193
--- util/faxconfig.c	Tue Apr 15 17:44:03 2003
194
+++ util/faxconfig.c	Sun Jul 24 15:47:52 2005
195
@@ -89,5 +89,5 @@
196
         } else {
197
             snprintf(fifoname, sizeof(fifoname), "%s.%.*s", FAX_FIFO,
198
-                sizeof (fifoname) - sizeof (FAX_FIFO), devid);
199
+                (int)(sizeof(fifoname) - sizeof(FAX_FIFO)), devid);
200
         }
201
     } else {
202
--- util/faxstate.c	Sat Feb  8 17:22:18 2003
203
+++ util/faxstate.c	Sun Jul 24 15:49:29 2005
204
@@ -141,5 +141,5 @@
205
     } else {
206
         snprintf(fifoname, sizeof(fifoname), "%s.%.*s", FAX_FIFO,
207
-            sizeof (fifoname) - sizeof (FAX_FIFO), devid);
208
+            (int)(sizeof(fifoname) - sizeof(FAX_FIFO)), devid);
209
         fifo = open(fifoname, O_WRONLY|O_NDELAY);
210
         if (fifo < 0) {
211
--- util/dialtest.c++	Sat Feb  8 17:32:35 2003
212
+++ util/dialtest.c++	Sun Jul 24 15:50:17 2005
213
@@ -67,5 +67,5 @@
214
     char* longDistancePrefix = "1";
215
     bool verbose = false;
216
-    extern int optind, opterr;
217
+    extern int optind;
218
     extern char* optarg;
219
     int c;
220
--- util/tiffcheck.c++	Wed Sep  1 19:59:16 2004
221
+++ util/tiffcheck.c++	Sun Jul 24 15:51:11 2005
222
@@ -98,5 +98,5 @@
223
      * Suppress libtiff warning messages from becoming fatal.
224
      */
225
-    TIFFErrorHandler whandler = TIFFSetWarningHandler(NULL);
226
+    TIFFSetWarningHandler(NULL);
227
 
228
     if (tif) {
229
@@ -201,5 +201,5 @@
230
      * we generate because we are careful to include valid info.
231
      */
232
-    float yres, yresinch;
233
+    float yres, yresinch = .0F;
234
     if (TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres)) {
235
 	short resunit = RESUNIT_INCH;		// TIFF spec default
236
--- faxcover/faxcover.c++	Wed Sep  3 11:15:17 2003
237
+++ faxcover/faxcover.c++	Sun Jul 24 16:01:29 2005
238
@@ -97,6 +97,4 @@
239
 faxCoverApp::initialize(int argc, char** argv)
240
 {
241
-    extern int optind;
242
-    extern char* optarg;
243
     int c;
244
 
245
--- faxd/FaxRecv.c++	Tue Nov 16 09:55:04 2004
246
+++ faxd/FaxRecv.c++	Sun Jul 24 16:04:18 2005
247
@@ -128,5 +128,5 @@
248
     u_long seqnum = Sequence::getNext(FAX_RECVDIR "/" FAX_SEQF, emsg);
249
 
250
-    if (seqnum == -1)
251
+    if (seqnum == (u_long)-1)
252
 	return -1;
253
 
254
+++ faxd/ModemServer.c++	Sun Jul 24 16:11:33 2005
255
@@ -749,4 +749,7 @@
256
 	    changeState(LOCKWAIT, pollLockWait);
257
 	break;
258
+	default:
259
+	    traceServer("ModemServer::timerExpired() in an unexpected "
260
+		"state %d", state);
261
     }
262
 }
263
--- faxd/ClassModem.c++	Sat Jan  1 16:27:14 2005
264
+++ faxd/ClassModem.c++	Sun Jul 24 16:13:14 2005
265
@@ -96,13 +96,4 @@
266
 };
267
 
268
-static fxStr
269
-stripAT(const fxStr& a0)
270
-{
271
-    fxStr s(a0);
272
-    if (s.length() >= 2 && s.head(2) == "AT")
273
-	s.remove(0, 2);
274
-    return s;
275
-}
276
-
277
 ClassModem::ClassModem(ModemServer& s, const ModemConfig& c)
278
     : server(s)
279
@@ -1334,5 +1325,5 @@
280
 	    /* fall thru... */
281
 	case AT_RING:			// normal ring
282
-	    if (conf.ringResponse != "" && (rings+1) >= conf.ringsBeforeResponse) {
283
+	    if (conf.ringResponse != "" && rings+1U >= conf.ringsBeforeResponse) {
284
 		// With the MT1932ZDX we must respond ATH1>DT1 in order
285
 		// to hear DTMF tones which are DID data, and we configure
286
--- faxd/Class1.c++	Fri Nov 26 23:28:13 2004
287
+++ faxd/Class1.c++	Sun Jul 24 16:17:28 2005
288
@@ -164,5 +164,4 @@
289
 	// We could query the modem but that would require another
290
 	// config option, so we just trust the enable command.
291
-	u_short pos = 0;
292
 	primaryV34Rate = 0;
293
 	const char* buf = conf.class1EnableV34Cmd;
294
--- faxd/Class1Send.c++	Tue Dec 28 21:16:46 2004
295
+++ faxd/Class1Send.c++	Sun Jul 24 16:19:20 2005
296
@@ -742,5 +742,5 @@
297
 		    switch (frame.getFCF()) {
298
 		    case FCF_NSF:
299
-			{ u_int nsf = frame.getDataWord(); }
300
+			frame.getDataWord();
301
 			break;
302
 		    case FCF_CSI:
303
--- faxd/Class2Send.c++	Tue Nov 23 13:11:02 2004
304
+++ faxd/Class2Send.c++	Sun Jul 24 16:23:12 2005
305
@@ -193,6 +194,5 @@
306
 	 * so that we can read the input stream for DC1.
307
 	 */
308
-	FlowControl oiFlow = getInputFlow();
309
 	if (flowControl == FLOW_XONXOFF)
310
 	    setXONXOFF(FLOW_NONE, getOutputFlow(), ACT_NOW);
311
     }

Return to bug 92572