]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Added support for HP-UX 11
authorRobert Colquhoun <rjc@trump.net.au>
Thu, 2 Sep 1999 10:16:20 +0000 (10:16 +0000)
committerRobert Colquhoun <rjc@trump.net.au>
Thu, 2 Sep 1999 10:16:20 +0000 (10:16 +0000)
Required some hacking to Socket.h(added the CONFIG_HPUX_SOCKLEN_T_BRAINDAMAGE
define).

Also incorporated the version no into the config.h file rather than separate
version.h files in the faxd and hfaxd directories.

config.h.in
configure
faxd/CopyQuality.c++
faxd/Makefile.in
faxd/cqtest.c++
faxd/faxQueueApp.c++
hfaxd/HylaFAXServer.c++
hfaxd/Makefile.in
util/Socket.h

index e0621640baf0873057c47bc136d9233ae2612570..69548e49ac4b1f9b1bd7053024a3b6857d87f6cf 100644 (file)
 #define        _CONFIG_
 #include "port.h"
 
+/*
+ * HylaFAX version number string
+ */
+#define HYLAFAX_VERSION "HylaFAX (tm) Version @VERSION@"
+
 #define        FAX_SPOOLDIR    "@SPOOL@"       /* pathname to top of spooling area */
 #define FAX_CLIENTBIN  "@BIN@"         /* place for client apps */
 #define FAX_LIBEXEC    "@LIBEXEC@"     /* place for lib executables */
index 282ef29fc41797cf544e210dc58fe7525e87ec20..93471e7d256fa5b2543473c5e9c04afc868a6e86 100755 (executable)
--- a/configure
+++ b/configure
@@ -2287,11 +2287,11 @@ BuildPortDotH()
     CheckVarDecl dev_t 'typedef int dev_t;' $TYPES_H stdlib.h
 
     if [ $CONFIG_OSFCNH = auto ]; then
-       if CheckForIncludeFile osfcn.h; then
-           CONFIG_OSFCNH=yes
-       else
-           CONFIG_OSFCNH=no
-       fi
+        if CheckForIncludeFile osfcn.h; then
+               CONFIG_OSFCNH=yes
+        else
+            CONFIG_OSFCNH=no
+        fi
     fi
     if [ $CONFIG_OSFCNH = yes ]; then
        Note "... configure use of <osfcn.h>"
@@ -2318,14 +2318,17 @@ BuildPortDotH()
     # default so folks don't have to rerun configure.
     #
     test "$CONFIG_SOCKARGLENTYPE" || {         # int vs unsigned long vs ...
-       case $TARGET in
-       # XXX fill in for busted systems
-       *-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
+        case $TARGET in
+           # XXX fill in for busted systems
+        *-aix4*)       CONFIG_SOCKARGLENTYPE=size_t;;
+        *-hpux11*)  # this is really broken, has a defined 
+                    # socklen_t but does *not* use it
+                echo "#define CONFIG_HPUX_SOCKLEN_T_BRAINDAMAGE";;
+        *sysv4.2uw2*)  CONFIG_SOCKARGLENTYPE=size_t;;
+        *-univel-*)    CONFIG_SOCKARGLENTYPE=size_t;;
+        *-UnixWare*)   CONFIG_SOCKARGLENTYPE=size_t;;
+        *)             CONFIG_SOCKARGLENTYPE=int;;
+        esac
     }
     TYPES_H="$TYPES_H sys/socket.h"
     CheckVarDecl socklen_t "typedef $CONFIG_SOCKARGLENTYPE socklen_t;" $TYPES_H
index 6b0140e7feb3fa0859b190dbb499f9688dba3674..7d407749f97e45e62a96503393e44ba579c7a0eb 100644 (file)
@@ -27,6 +27,7 @@
 /*
  * Page Data Receive and Copy Quality Support for Modem Drivers.
  */
+#include "config.h"
 #include "Sys.h"
 #include "FaxModem.h"
 #include "FaxTrace.h"
@@ -34,8 +35,6 @@
 #include "StackBuffer.h"
 #include "FaxServer.h"
 
-#include "version.h"
-
 #define        RCVBUFSIZ       (32*1024)               // XXX
 
 static void setupCompression(TIFF*, u_int, uint32);
@@ -295,7 +294,7 @@ FaxModem::recvSetupTIFF(TIFF* tif, long, int fillOrder)
     TIFFSetField(tif, TIFFTAG_XRESOLUTION,     204.);
     TIFFSetField(tif, TIFFTAG_YRESOLUTION,     (float) params.verticalRes());
     TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT,  RESUNIT_INCH);
-    TIFFSetField(tif, TIFFTAG_SOFTWARE,                VERSION);
+    TIFFSetField(tif, TIFFTAG_SOFTWARE,                HYLAFAX_VERSION);
     TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION,        (const char*) tsi);
     char dateTime[24];
     time_t now = Sys::now();
index b89fac4b3374b8ef89d45e7bde51bfb925ff551a..f594317818b1e349a5c7882dd3a769955114c21f 100644 (file)
@@ -159,22 +159,15 @@ libfaxserver.a: ${SERVER_OBJS} ${MODEM_OBJS}
 
 @MAKEDSOINCLUDE@ @MAKELQUOTE@${SRCDIR}/Makefile.@DSO@dso@MAKERQUOTE@
 
-LDIRT  = hash.h version.h mkhash
+LDIRT  = hash.h mkhash
 
 hash.h:        mkhash
        rm -f hash.h; ./mkhash > hash.h
 mkhash:        ${SRCDIR}/mkhash.c
        ${CCF} -o mkhash ${SRCDIR}/mkhash.c
 
-version.h:
-       VERSION="@DIST_MAJOR@.@DIST_MINOR@@DIST_TYPE@";\
-       if [ @DIST_TYPE@ = beta ]; then \
-           VERSION="$${VERSION}@DIST_ALPHA@"; \
-       fi; \
-       rm -f version.h; \
-       echo "#define VERSION \"HylaFAX (tm) Version $$VERSION\"">version.h
-faxQueueApp.o FaxRecv.o: version.h
-incdepend: version.h hash.h
+faxQueueApp.o FaxRecv.o:
+incdepend: hash.h
 
 faxq:  ${FAXQOBJS} libfaxserver.${DSO} ${LIBS}
        ${C++F} -o $@ ${FAXQOBJS} libfaxserver.${DSO} ${LDFLAGS}
index da551c3d24824392d234393d585f58cae6f002ef..946fcd2330aae20bca04348321de62b11ea0f76d 100644 (file)
@@ -29,6 +29,7 @@
  *
  * cqtest [-m maxbad] [-o output.tif] [-p %good] input.tif
  */
+#include "config.h"
 #include "Sys.h"
 #include "StackBuffer.h"
 #include "G3Decoder.h"
@@ -37,8 +38,6 @@
 #include "FaxTrace.h"
 #include "tiffio.h"
 
-#include "version.h"
-
 struct CQDecoder : public G3Decoder {
     u_int      cblc;           // current count of consecutive bad lines
     bool       lastRowBad;     // last decoded row was bad
@@ -118,7 +117,7 @@ CQDecoder::recvSetupTIFF(TIFF* tif, long, int fillOrder, const Class2Params& par
     TIFFSetField(tif, TIFFTAG_XRESOLUTION,     204.);
     TIFFSetField(tif, TIFFTAG_YRESOLUTION,     (float) params.verticalRes());
     TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT,  RESUNIT_INCH);
-    TIFFSetField(tif, TIFFTAG_SOFTWARE,                VERSION);
+    TIFFSetField(tif, TIFFTAG_SOFTWARE,                HYLAFAX_VERSION);
 #ifdef notdef
     TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION,        (const char*) tsi);
 #endif
index a9913222701a99fa4ff0781ff5965631fea0607c..462186e204d2b21d7c46545cbdc36988580c1942 100644 (file)
@@ -103,15 +103,13 @@ faxQueueApp::~faxQueueApp()
 
 faxQueueApp& faxQueueApp::instance() { return *_instance; }
 
-#include "version.h"
-
 void
 faxQueueApp::initialize(int argc, char** argv)
 {
     updateConfig(configFile);          // read config file
     faxApp::initialize(argc, argv);
 
-    logInfo("%s", VERSION);
+    logInfo("%s", HYLAFAX_VERSION);
     logInfo("%s", "Copyright (c) 1990-1996 Sam Leffler");
     logInfo("%s", "Copyright (c) 1991-1996 Silicon Graphics, Inc.");
 
index a16c358ce91549d195192ed2d7ff6f5e33181766..35aed0add1427e189a0a59425a9744e4fcb8911d 100644 (file)
@@ -37,9 +37,7 @@
 #include <pwd.h>
 #include <limits.h>
 
-#include "version.h"
-
-const char* HylaFAXServer::version = VERSION;
+const char* HylaFAXServer::version = HYLAFAX_VERSION;
 
 /*
  * NB: The remainder of the instance state is
index 53c45fc41fbfc7ab9041eeb5f6224f2c22430192..103f6689f20e3e0195bf431f987d0a2811b577d2 100644 (file)
@@ -92,17 +92,8 @@ FaxRequest.o: ${FAXDSRCDIR}/FaxRequest.c++
 faxRequest.o: ${FAXDSRCDIR}/faxRequest.c++
        ${C++F} -c ${C++FILE} ${FAXDSRCDIR}/faxRequest.c++@MAKECXXOVERRIDE@
 
-LDIRT  = version.h
-
-version.h:
-       VERSION="@DIST_MAJOR@.@DIST_MINOR@@DIST_TYPE@";\
-       if [ @DIST_TYPE@ = beta ]; then \
-           VERSION="$${VERSION}@DIST_ALPHA@"; \
-       fi; \
-       rm -f version.h; \
-       echo "#define VERSION \"HylaFAX (tm) Version $$VERSION\"">version.h
-HylaFAXServer.o: version.h
-incdepend: version.h
+HylaFAXServer.o: 
+incdepend:
 
 install: default
        ${INSTALL} -F ${LIBEXEC} -u root -m 4755 \
index a284294b38cd43d69ccd59cb425fc7c870be461a..055ce5b1933d96c524c185abcb474562fcdeb0ad 100644 (file)
@@ -56,20 +56,60 @@ extern "C" {
 
 class Socket {
 public:
-    static int accept(int s, void* addr, socklen_t* addrlen)
-       { return ::accept(s, (struct sockaddr*) addr, addrlen); }
-    static int bind(int s, const void* addr, int addrlen)
-       { return ::bind(s, (const struct sockaddr*) addr, addrlen); }
-    static int connect(int s, const void* addr, int addrlen)
-       { return ::connect(s, (const struct sockaddr*) addr, addrlen); }
-    static int getpeername(int s, void* name, socklen_t* namelen)
-       { return ::getpeername(s, (struct sockaddr*) name, namelen); }
-    static int getsockname(int s, void* name, socklen_t* namelen)
-       { return ::getsockname(s, (struct sockaddr*) name, namelen); }
-    static int setsockopt(int s, int level, int oname, const void* oval, int olen)
-       { return ::setsockopt(s, level, oname, (const char*) oval, olen); }
-
-    static struct hostent* gethostbyname(const char* name)
-       { return ::gethostbyname(name); }
+    static int accept(int s, void* addr, socklen_t* addrlen);
+    static int bind(int s, const void* addr, int addrlen);
+    static int connect(int s, const void* addr, int addrlen);
+    static int getpeername(int s, void* name, socklen_t* namelen);
+    static int getsockname(int s, void* name, socklen_t* namelen);
+    static int setsockopt(int s, int level, int oname, const void* oval, int olen);
+    static struct hostent* gethostbyname(const char* name);
 };
+
+inline int Socket::accept(int s, void* addr, socklen_t* addrlen)
+{
+#ifdef CONFIG_HPUX_SOCKLEN_T_BRAINDAMAGE
+    return ::accept(s, (struct sockaddr*) addr, (int*)addrlen);
+#else
+    return ::accept(s, (struct sockaddr*) addr, addrlen);
+#endif
+}
+
+inline int Socket::bind(int s, const void* addr, int addrlen)
+{
+    return ::bind(s, (const struct sockaddr*) addr, addrlen);
+}
+
+inline int Socket::connect(int s, const void* addr, int addrlen)
+{
+    return ::connect(s, (const struct sockaddr*) addr, addrlen);
+}
+
+inline int Socket::getpeername(int s, void* name, socklen_t* namelen)
+{
+#ifdef CONFIG_HPUX_SOCKLEN_T_BRAINDAMAGE
+    return ::getpeername(s, (struct sockaddr*) name, (int*)namelen);
+#else
+    return ::getpeername(s, (struct sockaddr*) name, namelen);
+#endif
+}
+
+inline int Socket::getsockname(int s, void* name, socklen_t* namelen)
+{
+#ifdef CONFIG_HPUX_SOCKLEN_T_BRAINDAMAGE
+    return ::getsockname(s, (struct sockaddr*) name, (int*)namelen);
+#else
+    return ::getsockname(s, (struct sockaddr*) name, namelen);
+#endif
+}
+
+inline int Socket::setsockopt(int s, int level, int oname, const void* oval, int olen)
+{
+    return ::setsockopt(s, level, oname, (const char*) oval, olen);
+}
+
+inline struct hostent* Socket::gethostbyname(const char* name)
+{
+    return ::gethostbyname(name);
+}
+
 #endif /* _Socket_ */