[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

8.0.9 patches

Albert Chin conserver-users@mlists.thewrittenword.com
Thu, 18 Dec 2003 22:33:58 -0800 (PST)


I had to apply the patches below to get conserver-8.0.9 to build on
HP-UX 10.20, 11.00, 11i, IRIX 6.5, and AIX 4.3.2, 5.1 with the vendor
C compiler.

1. [conserver/consent.h, conserver/consent.c, conserver/group.c,
    conserver/main.c, conserver/readcfg.c, ]
   One of the HP-UX header files has an enum UNKNOWN = 0. 
2. [conserver/group.c]
   You #ifdef CRTSCTS in conserver/consent.h but forgot to do the
   same in conserver/group.c.
3. [conserver/Makefile.in]
   Use $datadir rather than $(prefix)/share. $datadir is
   $(prefix)/share by default but might be changed at configure time.
4. [configure.in]
   Why define _XOPEN_SOURCE_EXTENDED on HP-UX? I removed it and didn't
   run into problems.

-- 
albert chin (china@thewrittenword.com)

-- snip snip
--- conserver/consent.h.orig	Thu Dec 18 12:36:14 2003
+++ conserver/consent.h	Thu Dec 18 12:37:23 2003
@@ -52,7 +52,7 @@
 } PARITY;
 
 typedef enum consType {
-    UNKNOWN = 0,
+    C_UNKNOWN = 0,
     DEVICE,
     EXEC,
     HOST
--- conserver/consent.c.orig	Thu Dec 18 12:38:05 2003
+++ conserver/consent.c	Thu Dec 18 12:38:13 2003
@@ -691,7 +691,7 @@
     TagLogfile(pCE, "Console up");
 
     switch (pCE->type) {
-	case UNKNOWN:		/* shut up gcc */
+	case C_UNKNOWN:		/* shut up gcc */
 	    break;
 	case EXEC:
 	    if ((cofile =
@@ -826,7 +826,7 @@
     }
 
     switch (pCE->type) {
-	case UNKNOWN:		/* shut up gcc */
+	case C_UNKNOWN:		/* shut up gcc */
 	    break;
 	case EXEC:
 	    Verbose("[%s] pid %lu on %s", pCE->server, pCE->ipid,
--- conserver/group.c.orig	Thu Dec 18 12:34:47 2003
+++ conserver/group.c	Thu Dec 18 12:38:53 2003
@@ -1853,7 +1853,7 @@
 		b = "Netwk";
 		p = ' ';
 		break;
-	    case UNKNOWN:	/* shut up gcc */
+	    case C_UNKNOWN:	/* shut up gcc */
 		break;
 	}
 	FilePrint(pCLServing->fd, FLAGFALSE,
@@ -2026,7 +2026,7 @@
 			  (pCE->baud ? pCE->baud->acrate : ""),
 			  (pCE->parity ? pCE->parity->key[0] : ' '));
 		break;
-	    case UNKNOWN:	/* shut up gcc */
+	    case C_UNKNOWN:	/* shut up gcc */
 		break;
 	}
 	FilePrint(pCLServing->fd, FLAGTRUE, ",%d:",
@@ -2089,8 +2089,10 @@
 	    s = BuildTmpString(",ixany");
 	if (pCE->ixoff == FLAGTRUE)
 	    s = BuildTmpString(",ixoff");
+#if defined(CRTSCTS)
 	if (pCE->crtscts == FLAGTRUE)
 	    s = BuildTmpString(",crtscts");
+#endif
 	if (pCE->ondemand == FLAGTRUE)
 	    s = BuildTmpString(",ondemand");
 	if (pCE->reinitoncc == FLAGTRUE)
--- conserver/main.c.orig	Thu Dec 18 12:40:01 2003
+++ conserver/main.c	Thu Dec 18 12:40:14 2003
@@ -887,9 +887,9 @@
 			       EMPTYSTR(pCE->host), pCE->port,
 			       pCE->telnetState));
 		    break;
-		case UNKNOWN:
+		case C_UNKNOWN:
 		    CONDDEBUG((1,
-			       "DumpDataStructures():  server=%s, type=UNKNOWN",
+			       "DumpDataStructures():  server=%s, type=C_UNKNOWN",
 			       EMPTYSTR(pCE->server)));
 		    break;
 	    }
--- conserver/readcfg.c.orig	Thu Dec 18 12:41:10 2003
+++ conserver/readcfg.c	Thu Dec 18 12:41:41 2003
@@ -653,7 +653,7 @@
     CONSENT *c;
 #endif
 {
-    if (d->type != UNKNOWN)
+    if (d->type != C_UNKNOWN)
 	c->type = d->type;
     if (d->breakNum != 0)
 	c->breakNum = d->breakNum;
@@ -1953,7 +1953,7 @@
     char *id;
 #endif
 {
-    CONSTYPE t = UNKNOWN;
+    CONSTYPE t = C_UNKNOWN;
     if ((id == (char *)0) || (*id == '\000')) {
 	c->type = t;
 	return;
@@ -1964,7 +1964,7 @@
 	t = EXEC;
     else if (strcasecmp("host", id) == 0)
 	t = HOST;
-    if (t == UNKNOWN) {
+    if (t == C_UNKNOWN) {
 	if (isMaster)
 	    Error("invalid console type `%s' [%s:%d]", id, file, line);
     } else
@@ -2119,7 +2119,7 @@
 		invalid = 1;
 	    }
 	    break;
-	case UNKNOWN:
+	case C_UNKNOWN:
 	    if (isMaster)
 		Error("[%s] console type unknown [%s:%d]",
 		      parserConsoleTemp->server, file, line);
@@ -2697,7 +2697,7 @@
 		    closeMatch = 0;
 		}
 		break;
-	    case UNKNOWN:
+	    case C_UNKNOWN:
 		break;
 	}
 
--- conserver/Makefile.in.orig	Thu Dec 18 12:50:53 2003
+++ conserver/Makefile.in	Thu Dec 18 12:52:01 2003
@@ -4,9 +4,10 @@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 sbindir = @sbindir@
+datadir = @datadir@
 sysconfdir = @sysconfdir@
 mandir = @mandir@
-exampledir = $(prefix)/share/examples/conserver
+exampledir = $(datadir)/examples
 
 ### Installation programs and flags
 INSTALL = @INSTALL@
--- configure.in.orig	2003-12-18 12:32:00.506873000 -0600
+++ configure.in	2003-12-18 12:32:15.619573000 -0600
@@ -283,7 +283,6 @@
 
 case "$host" in
 *-*-hpux*)
-    CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
     AC_CHECK_LIB(xnet,t_error,,AC_MSG_ERROR([-lxnet needed on HP-UX]))
     AC_CHECK_LIB(sec,getspnam)
     AC_CHECK_HEADERS(hpsecurity.h prot.h)