#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 */
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>"
# 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
/*
* Page Data Receive and Copy Quality Support for Modem Drivers.
*/
+#include "config.h"
#include "Sys.h"
#include "FaxModem.h"
#include "FaxTrace.h"
#include "StackBuffer.h"
#include "FaxServer.h"
-#include "version.h"
-
#define RCVBUFSIZ (32*1024) // XXX
static void setupCompression(TIFF*, u_int, uint32);
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();
@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}
*
* cqtest [-m maxbad] [-o output.tif] [-p %good] input.tif
*/
+#include "config.h"
#include "Sys.h"
#include "StackBuffer.h"
#include "G3Decoder.h"
#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
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
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.");
#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
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 \
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_ */