Hylafax Developers Mailing List Archives

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

[hylafax-devel] AIX Patches for 4.1beta1 (fwd)




Steve,

I'm just wondering, why did you abandon this approach?

-Darren




-- Attached file included as plaintext by Listar --
-- Desc: forwarded message

>From hylafax-devel-bounce@hylafax.org  Sun Jan 16 19:55:30 2000
Return-Path: <hylafax-devel-bounce@hylafax.org>
Received: from localhost (IDENT:darren@localhost.localdomain [127.0.0.1])
	by localhost.localdomain (8.9.3/8.9.3) with ESMTP id TAA12759
	for <darren@localhost>; Sun, 16 Jan 2000 19:55:28 GMT
Envelope-to: dnicker@ermine.ox.ac.uk
Delivery-date: Fri, 16 Jul 1999 05:51:10 +0100
Received: from ermine.ox.ac.uk
	by localhost with IMAP (fetchmail-5.1.0)
	for darren@localhost (single-drop); Sun, 16 Jan 2000 19:55:28 +0000 (GMT)
Received: from oxmail4.ox.ac.uk ([163.1.2.33] helo=oxmail.ox.ac.uk)
	by ermine.ox.ac.uk with esmtp (Exim 2.12 #1)
	id 114zxm-0003Oc-00
	for dnicker@ermine.ox.ac.uk; Fri, 16 Jul 1999 05:51:10 +0100
Received: from ns1.tpc.int ([207.102.129.130] helo=sinkhole.tpc.int)
	by oxmail.ox.ac.uk with esmtp (Exim 2.10 #1)
	id 114zxl-0007G6-00; Fri, 16 Jul 1999 05:51:09 +0100
Received: from sinkhole.tpc.int (localhost [127.0.0.1])
	by sinkhole.tpc.int (8.9.1a/8.9.1) with ESMTP id VAA07089;
	Thu, 15 Jul 1999 21:51:01 -0700
Received: with LISTAR (v0.124a; list hylafax-devel); Thu, 15 Jul 1999 21:51:01 -0700 (PDT)
Received: from morpheus.passageway.com (IDENT:root@morpheus.passageway.com [205.150.22.2])
	by sinkhole.tpc.int (8.9.1a/8.9.1) with ESMTP id VAA07030
	for <hylafax-devel@hylafax.org>; Thu, 15 Jul 1999 21:50:04 -0700
Received: (from uucp@localhost)
	by morpheus.passageway.com (8.9.3/8.9.3) with UUCP id WAA04957
	for hylafax-devel@hylafax.org; Thu, 15 Jul 1999 22:38:05 -0600
Received: (from steve@localhost)
	by spanner.genie96.com (8.9.3/8.9.0) id WAA39814
	for hylafax-devel@hylafax.org; Thu, 15 Jul 1999 22:34:48 -0600
From: Steve Williams <steve@genie96.com>
Message-Id: <199907160434.WAA39814@spanner.genie96.com>
Subject: [hylafax-devel] AIX Patches for 4.1beta1
To: hylafax-devel@hylafax.org
Date: Thu, 15 Jul 1999 22:34:48 -0600 (MDT)
Return-Receipt-To: steve@genie96.com
Read-Receipt-To: steve@genie96.com
X-Mailer: ELM [version 2.4 PL23alpha2]
Content-Type: text
X-archive-position: 7
X-listar-version: Listar v0.124a
X-original-sender: steve@genie96.com
Precedence: bulk
X-list: hylafax-devel

Hi,


I am compiling the latest cvs tree of 4.1beta1 on AIX 4.2 with IBM's xlC 
compiler version 3.1.4.10.

It was rather easy to get things to compile, but I do not have a test
machine available right now ( Y2K testing ).  I did fire up faxq & it started
and talked to my 4.0pl2 faxgettys, so that is at least a start.  I am
reluctanct to do much on my production system as it is also the TPC.INT 
cell for Calgary,Canada <g>.

I guess my main problem with these patches is how to add include files 
without breaking other distributions??

I will explain each of my changes necessary to get it to compile.

configure - CONFIG_SOCKARGLENTYPE
  Add Aix Version 4 to the Operating Systems that want a size_t for this
  paramater

configure - force use of UTMP
  AIX Version 4 has an include file utmpx, but the operating system is
  still using the standard utmp file

util/Dispatcher.c++
	"Dispatcher.c++", line 323.5: 1540-013: (S) "bzero" is undefined.
	...
	
	in <sys/time.h>:
	#define FD_ZERO(p)      bzero((char *)(p), sizeof(*(p)))

	<sys/time.h> does not have a prototype for bzero.  The include file
	for bzero ( strangely enough ) is <strings.h>

	So, initially, I figured to include <strings.h> in Dispatcher.c++.

	However, when the compile gets to hfaxd/SuperServer.c++ ( and others ),
	they include "Dispatcher.h", which uses fd_set.  fd_set is declared
	in time.h.  So, I figure the best thing to do is to include 
	<sys/time.h> in Dispatcher.h ( and because of the above needed item,
	<strings.h> as well.
	
hfaxd/HylaFAXServer.h

	The AIX xlC compiler was complaining thusly:
"HylaFAXServer.h", line 164.26: 1540-398: (W) "HylaFAXServer" is undefined.  \
Every variable of type "void(HylaFAXServer::*)(FILE*,const SpoolDir&,DIR*)" \
will assume "HylaFAXServer" has no virtual bases and does not use multiple \
inheritance.

	This line is in the SpoolDir Class, so I just moved things around
  	in the file so that the full definition for HylaFAXServer is before
	SpoolDir, and everything is happy!!

There is only one warning in faxmail about nl might be used before set, but
I examined the source code, and it is a bogus error message.  Other than
that, it compiled 100 % clean.  Running is a different story!!  Have to wait
for our Y2K testing to be done so I can get my spare system back :-(

I am not sure exactly how to provide the diffs, since they are not too big,
I guess I will try what I think is an OK way first.  I have two directories
hylafax.aix ( modified programs ) , and hylafax.cvs.  I wrote a quick shell 
script to walk the directory tree in the "cvs", which I picked up at 
Thu Jul 15 22:15:18 MDT 1999, and do a diff to the file in the other 
directory tree.

So......

*** hylafax.cvs/configure	Wed Jul 14 06:36:03 1999
--- hylafax.aix/configure	Thu Jul 15 20:15:02 1999
***************
*** 2316,2321 ****
--- 2316,2322 ----
  	*-univel-*)	CONFIG_SOCKARGLENTYPE=size_t;;
  	*sysv4.2uw2*)	CONFIG_SOCKARGLENTYPE=size_t;;
  	*-UnixWare*)	CONFIG_SOCKARGLENTYPE=size_t;;
+ 	*-aix4*)	CONFIG_SOCKARGLENTYPE=size_t;;
  	*)		CONFIG_SOCKARGLENTYPE=int;;
  	esac
      }
***************
*** 2657,2662 ****
--- 2658,2664 ----
  	if CheckForIncludeFile utmpx.h; then
  	    case $TARGET in
  	    *-hpux10.20*)	UTMP=utmp;;
+ 	    *-aix4*)	UTMP=utmp;;
          *-linux*)	    UTMP=utmp;;
  	    *)			    UTMP=utmpx;;
  	    esac
*** hylafax.cvs/hfaxd/HylaFAXServer.h	Sun Jun 13 01:41:13 1999
--- hylafax.aix/hfaxd/HylaFAXServer.h	Thu Jul 15 21:30:45 1999
***************
*** 136,168 ****
      const char*	help;
  };
  
! class HylaFAXServer;
  
- /*
-  * Directories in the spooling area are treated
-  * specially to hide implementation details and
-  * privileged information that clients have no
-  * business seeing.  Also we implement an access
-  * control system that is built on top of the
-  * normal UNIX protection mechanisms.
-  */ 
- struct SpoolDir {
-     const char*	pathname;
-     bool	adminOnly;	// accessible by unprivileged clients
-     bool	storAble;	// unprivileged clients may STOR files
-     bool	deleAble;	// unprivileged clients may DELE files
-     ino_t	ino;		// directory inode number
-     bool (*isVisibleFile)(const char*, const struct stat&);
-     void (HylaFAXServer::*listDirectory)(FILE*, const SpoolDir&, DIR*);
-     void (HylaFAXServer::*listFile)(FILE*, const SpoolDir&,
- 	const char*, const struct stat&);
-     void (HylaFAXServer::*nlstDirectory)(FILE*, const SpoolDir&, DIR*);
-     void (HylaFAXServer::*nlstFile)(FILE*, const SpoolDir&,
- 	const char*, const struct stat&);
-     void (HylaFAXServer::*delFile)(const SpoolDir&, const char*);
-     void (HylaFAXServer::*retrFile)(const SpoolDir&, const char*);
-     void (HylaFAXServer::*storFile)(const SpoolDir&, const char*);
- };
  
  struct stat;
  typedef struct tiff TIFF;
--- 136,143 ----
      const char*	help;
  };
  
! class SpoolDir;
  
  
  struct stat;
  typedef struct tiff TIFF;
***************
*** 594,598 ****
--- 569,598 ----
  };
  inline void HylaFAXServer::pushToken(Token t)		{ pushedToken = t; }
  
+ /*
+  * Directories in the spooling area are treated
+  * specially to hide implementation details and
+  * privileged information that clients have no
+  * business seeing.  Also we implement an access
+  * control system that is built on top of the
+  * normal UNIX protection mechanisms.
+  */ 
+ struct SpoolDir {
+     const char*	pathname;
+     bool	adminOnly;	// accessible by unprivileged clients
+     bool	storAble;	// unprivileged clients may STOR files
+     bool	deleAble;	// unprivileged clients may DELE files
+     ino_t	ino;		// directory inode number
+     bool (*isVisibleFile)(const char*, const struct stat&);
+     void (HylaFAXServer::*listDirectory)(FILE*, const SpoolDir&, DIR*);
+     void (HylaFAXServer::*listFile)(FILE*, const SpoolDir&,
+ 	const char*, const struct stat&);
+     void (HylaFAXServer::*nlstDirectory)(FILE*, const SpoolDir&, DIR*);
+     void (HylaFAXServer::*nlstFile)(FILE*, const SpoolDir&,
+ 	const char*, const struct stat&);
+     void (HylaFAXServer::*delFile)(const SpoolDir&, const char*);
+     void (HylaFAXServer::*retrFile)(const SpoolDir&, const char*);
+     void (HylaFAXServer::*storFile)(const SpoolDir&, const char*);
+ };
  #define	IS(x)	((state & (S_##x)) != 0)
  #endif /* _HylaFAXServer_ */
*** hylafax.cvs/util/Dispatcher.c++	Sun Jun 13 01:41:21 1999
--- hylafax.aix/util/Dispatcher.c++	Thu Jul 15 21:43:55 1999
***************
*** 31,39 ****
  #if HAS_SELECT_H
  #include <sys/select.h>
  #endif
- extern "C" {
- #include <sys/time.h>
- }
  #include <limits.h>
  
  #include "Dispatcher.h"
--- 31,36 ----
*** hylafax.cvs/util/Dispatcher.h	Sun Jun 13 01:41:21 1999
--- hylafax.aix/util/Dispatcher.h	Thu Jul 15 21:44:12 1999
***************
*** 30,35 ****
--- 30,40 ----
  #ifndef dp_dispatcher_h
  #define dp_dispatcher_h
  
+ extern "C" {
+ #include <sys/time.h>
+ #include <strings.h>
+ }
+ 
  #include "Types.h"
  
  class IOHandler;
-- 
	Steve Williams, Calgary, Alberta, Canada
	Genie Computer Systems Inc.
	steve@genie96.com

"A man doesn't begin to attain wisdom until he recognizes that he is 
 no longer indispensable."
- Admiral Richard E. Byrd ( 1888-1957 )






Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services