HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Patches to compile HylaFax 4.0pl2 with egcs 1.1b
Hi!
I hope this is the correct place to send this. If not, I appologize
for bothering you. Please point me to the correct place.
I tried to compile HylaFax with egcs 1.1b, which is an offspring of
gcc but has a more up to date C++ implementation (see
http://egcs.cygnus.com/ for details).
I had to do some minor corrections to make the source compile. The
diffs are appended below.
There're still some warnings regarding Socket.c++. Since I'm not sure
if these warnings are C++ related, I didn't change the code to get rid
of them.
BTW, I'm using RedHat Linux 5.0
Bye,
Michael
P.S.: I'm only an ``ordinary user'' of HylaFax and am not subscribed
to this list. So if you have any comments on the patches:
please copy me on your mail. Thanks.
--
PGP Key on Servers -- Finger-Print: 51ECA5D2 13938F91 CBF76CC4 F8B5B67C
Paranoids are people, too; they have their own problems. It's easy to
criticize, but if everybody hated you, you'd be paranoid too.
-- D. J. Hicks
-----------------------
Only in my-hylafax-v4.0pl2: Makefile
Only in my-hylafax-v4.0pl2: config.local
diff -c -r hylafax-v4.0pl2/configure my-hylafax-v4.0pl2/configure
*** hylafax-v4.0pl2/configure Sat Feb 14 11:46:28 1998
--- my-hylafax-v4.0pl2/configure Sun Sep 6 16:46:29 1998
***************
*** 2621,2628 ****
#
echo '#define HAS_LOGWTMP 1'
Note "... configure use of logwtmp (BSD-style wtmp logging)"
! AddFuncDecl logwtmp \
! 'int logwtmp(const char*, const char*, const char*);'
CheckForLibrary logout -lutil && {
echo '#define HAS_LOGOUT 1'
Note "... configure use of logout (BSD-style utmp support)"
--- 2621,2628 ----
#
echo '#define HAS_LOGWTMP 1'
Note "... configure use of logwtmp (BSD-style wtmp logging)"
! # AddFuncDecl logwtmp \
! # 'int logwtmp(const char*, const char*, const char*);'
CheckForLibrary logout -lutil && {
echo '#define HAS_LOGOUT 1'
Note "... configure use of logout (BSD-style utmp support)"
Only in my-hylafax-v4.0pl2: defs
diff -c -r hylafax-v4.0pl2/hfaxd/FileSystem.c++ my-hylafax-v4.0pl2/hfaxd/FileSystem.c++
*** hylafax-v4.0pl2/hfaxd/FileSystem.c++ Sat Feb 14 11:50:01 1998
--- my-hylafax-v4.0pl2/hfaxd/FileSystem.c++ Sun Sep 6 18:29:19 1998
***************
*** 139,202 ****
SpoolDir HylaFAXServer::dirs[] = {
{ "/status/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listStatus, HylaFAXServer::listStatusFile,
! HylaFAXServer::nlstStatus, HylaFAXServer::nlstUnixFile, },
{ "/sendq/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleSendQFile,
! HylaFAXServer::listSendQ, HylaFAXServer::listSendQFile,
! HylaFAXServer::nlstSendQ, HylaFAXServer::nlstSendQFile, },
{ "/doneq/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleSendQFile,
! HylaFAXServer::listSendQ, HylaFAXServer::listSendQFile,
! HylaFAXServer::nlstSendQ, HylaFAXServer::nlstSendQFile, },
{ "/docq/", FALSE, TRUE, TRUE, 0,
HylaFAXServer::isVisibleDocQFile,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/tmp/", FALSE, TRUE, TRUE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/log/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/recvq/", FALSE, FALSE, TRUE, 0,
HylaFAXServer::isVisibleRecvQFile,
! HylaFAXServer::listRecvQ, HylaFAXServer::listRecvQFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/archive/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/pollq/", FALSE, TRUE, TRUE, 0,
HylaFAXServer::isVisibleRecvQFile,
! HylaFAXServer::listRecvQ, HylaFAXServer::listRecvQFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleRootFile,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/etc/", TRUE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/info/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/bin/", TRUE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/config/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
{ "/client/", TRUE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! HylaFAXServer::listDirectory, HylaFAXServer::listUnixFile,
! HylaFAXServer::nlstDirectory, HylaFAXServer::nlstUnixFile, },
};
#define N(a) (sizeof (a) / sizeof (a[0]))
--- 139,202 ----
SpoolDir HylaFAXServer::dirs[] = {
{ "/status/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listStatus, &HylaFAXServer::listStatusFile,
! &HylaFAXServer::nlstStatus, &HylaFAXServer::nlstUnixFile, },
{ "/sendq/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleSendQFile,
! &HylaFAXServer::listSendQ, &HylaFAXServer::listSendQFile,
! &HylaFAXServer::nlstSendQ, &HylaFAXServer::nlstSendQFile, },
{ "/doneq/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleSendQFile,
! &HylaFAXServer::listSendQ, &HylaFAXServer::listSendQFile,
! &HylaFAXServer::nlstSendQ, &HylaFAXServer::nlstSendQFile, },
{ "/docq/", FALSE, TRUE, TRUE, 0,
HylaFAXServer::isVisibleDocQFile,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/tmp/", FALSE, TRUE, TRUE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/log/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/recvq/", FALSE, FALSE, TRUE, 0,
HylaFAXServer::isVisibleRecvQFile,
! &HylaFAXServer::listRecvQ, &HylaFAXServer::listRecvQFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/archive/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/pollq/", FALSE, TRUE, TRUE, 0,
HylaFAXServer::isVisibleRecvQFile,
! &HylaFAXServer::listRecvQ, &HylaFAXServer::listRecvQFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleRootFile,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/etc/", TRUE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/info/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/bin/", TRUE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/config/", FALSE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
{ "/client/", TRUE, FALSE, FALSE, 0,
HylaFAXServer::isVisibleTRUE,
! &HylaFAXServer::listDirectory, &HylaFAXServer::listUnixFile,
! &HylaFAXServer::nlstDirectory, &HylaFAXServer::nlstUnixFile, },
};
#define N(a) (sizeof (a) / sizeof (a[0]))
diff -c -r hylafax-v4.0pl2/hfaxd/OldProtocol.c++ my-hylafax-v4.0pl2/hfaxd/OldProtocol.c++
*** hylafax-v4.0pl2/hfaxd/OldProtocol.c++ Sat Feb 14 11:50:07 1998
--- my-hylafax-v4.0pl2/hfaxd/OldProtocol.c++ Sun Sep 6 17:08:07 1998
***************
*** 220,257 ****
// NB: there is no support for the old style data transfer
const OldProtocolServer::protoCmd OldProtocolServer::cmds[] = {
! { "begin", TRUE, OldProtocolServer::submitJob },
! { "checkPerm", TRUE, OldProtocolServer::ackPermission },
! { "tiff", TRUE, OldProtocolServer::getTIFFData },
! { "postscript", TRUE, OldProtocolServer::getPostScriptData },
! { "zpostscript", TRUE, OldProtocolServer::getZPostScriptData },
! { "opaque", TRUE, OldProtocolServer::getOpaqueData },
! { "zopaque", TRUE, OldProtocolServer::getZOpaqueData },
! { "poll", TRUE, OldProtocolServer::newPollID },
! { "userID", FALSE, OldProtocolServer::setUserID },
! { "version", FALSE, OldProtocolServer::setProtoVersion },
! { "serverStatus", FALSE, OldProtocolServer::sendServerStatus },
! { "serverInfo", FALSE, OldProtocolServer::sendServerInfo },
! { "allStatus", FALSE, OldProtocolServer::sendAllStatus },
! { "userStatus", FALSE, OldProtocolServer::sendUserStatus },
! { "jobStatus", FALSE, OldProtocolServer::sendJobStatus },
! { "recvStatus", FALSE, OldProtocolServer::sendRecvStatus },
! { "remove", TRUE, OldProtocolServer::removeJob },
! { "removeGroup", TRUE, OldProtocolServer::removeJobGroup },
! { "kill", TRUE, OldProtocolServer::killJob },
! { "killGroup", TRUE, OldProtocolServer::killJobGroup },
! { "alterTTS", TRUE, OldProtocolServer::alterJobTTS },
! { "alterGroupTTS", TRUE, OldProtocolServer::alterJobGroupTTS },
! { "alterKillTime", TRUE, OldProtocolServer::alterJobKillTime },
! { "alterGroupKillTime", TRUE, OldProtocolServer::alterJobGroupKillTime },
! { "alterMaxDials", TRUE, OldProtocolServer::alterJobMaxDials },
! { "alterGroupMaxDials", TRUE, OldProtocolServer::alterJobGroupMaxDials },
! { "alterNotify", TRUE, OldProtocolServer::alterJobNotification },
! { "alterGroupNotify", TRUE, OldProtocolServer::alterJobGroupNotification },
! { "alterModem", TRUE, OldProtocolServer::alterJobModem },
! { "alterGroupModem", TRUE, OldProtocolServer::alterJobGroupModem },
! { "alterPriority", TRUE, OldProtocolServer::alterJobPriority },
! { "alterGroupPriority", TRUE, OldProtocolServer::alterJobGroupPriority },
};
#define NCMDS (sizeof (cmds) / sizeof (cmds[0]))
--- 220,257 ----
// NB: there is no support for the old style data transfer
const OldProtocolServer::protoCmd OldProtocolServer::cmds[] = {
! { "begin", TRUE, &OldProtocolServer::submitJob },
! { "checkPerm", TRUE, &OldProtocolServer::ackPermission },
! { "tiff", TRUE, &OldProtocolServer::getTIFFData },
! { "postscript", TRUE, &OldProtocolServer::getPostScriptData },
! { "zpostscript", TRUE, &OldProtocolServer::getZPostScriptData },
! { "opaque", TRUE, &OldProtocolServer::getOpaqueData },
! { "zopaque", TRUE, &OldProtocolServer::getZOpaqueData },
! { "poll", TRUE, &OldProtocolServer::newPollID },
! { "userID", FALSE, &OldProtocolServer::setUserID },
! { "version", FALSE, &OldProtocolServer::setProtoVersion },
! { "serverStatus", FALSE, &OldProtocolServer::sendServerStatus },
! { "serverInfo", FALSE, &OldProtocolServer::sendServerInfo },
! { "allStatus", FALSE, &OldProtocolServer::sendAllStatus },
! { "userStatus", FALSE, &OldProtocolServer::sendUserStatus },
! { "jobStatus", FALSE, &OldProtocolServer::sendJobStatus },
! { "recvStatus", FALSE, &OldProtocolServer::sendRecvStatus },
! { "remove", TRUE, &OldProtocolServer::removeJob },
! { "removeGroup", TRUE, &OldProtocolServer::removeJobGroup },
! { "kill", TRUE, &OldProtocolServer::killJob },
! { "killGroup", TRUE, &OldProtocolServer::killJobGroup },
! { "alterTTS", TRUE, &OldProtocolServer::alterJobTTS },
! { "alterGroupTTS", TRUE, &OldProtocolServer::alterJobGroupTTS },
! { "alterKillTime", TRUE, &OldProtocolServer::alterJobKillTime },
! { "alterGroupKillTime", TRUE, &OldProtocolServer::alterJobGroupKillTime },
! { "alterMaxDials", TRUE, &OldProtocolServer::alterJobMaxDials },
! { "alterGroupMaxDials", TRUE, &OldProtocolServer::alterJobGroupMaxDials },
! { "alterNotify", TRUE, &OldProtocolServer::alterJobNotification },
! { "alterGroupNotify", TRUE, &OldProtocolServer::alterJobGroupNotification },
! { "alterModem", TRUE, &OldProtocolServer::alterJobModem },
! { "alterGroupModem", TRUE, &OldProtocolServer::alterJobGroupModem },
! { "alterPriority", TRUE, &OldProtocolServer::alterJobPriority },
! { "alterGroupPriority", TRUE, &OldProtocolServer::alterJobGroupPriority },
};
#define NCMDS (sizeof (cmds) / sizeof (cmds[0]))
***************
*** 604,612 ****
#define DEFINE_Alter(param) \
void OldProtocolServer::alterJob##param(const char* tag) \
! { applyToJob(tag, "alter", OldProtocolServer::reallyAlterJob##param); }\
void OldProtocolServer::alterJobGroup##param(const char* tag) \
! { applyToJobGroup(tag, "alter", OldProtocolServer::reallyAlterJob##param); }
fxBool
OldProtocolServer::alterSuspend(Job& job)
--- 604,612 ----
#define DEFINE_Alter(param) \
void OldProtocolServer::alterJob##param(const char* tag) \
! { applyToJob(tag, "alter", &OldProtocolServer::reallyAlterJob##param); }\
void OldProtocolServer::alterJobGroup##param(const char* tag) \
! { applyToJobGroup(tag, "alter", &OldProtocolServer::reallyAlterJob##param); }
fxBool
OldProtocolServer::alterSuspend(Job& job)
***************
*** 752,760 ****
#define DEFINE_Op(op) \
void OldProtocolServer::##op##Job(const char* tag) \
! { applyToJob(tag, fxQUOTE(op), OldProtocolServer::do##op); }\
void OldProtocolServer::##op##JobGroup(const char* tag) \
! { applyToJobGroup(tag, fxQUOTE(op), OldProtocolServer::do##op); }
void
OldProtocolServer::doremove(Job& job, const char*)
{
--- 752,760 ----
#define DEFINE_Op(op) \
void OldProtocolServer::##op##Job(const char* tag) \
! { applyToJob(tag, fxQUOTE(op), &OldProtocolServer::do##op); }\
void OldProtocolServer::##op##JobGroup(const char* tag) \
! { applyToJobGroup(tag, fxQUOTE(op), &OldProtocolServer::do##op); }
void
OldProtocolServer::doremove(Job& job, const char*)
{
Only in my-hylafax-v4.0pl2/man: cman.apps
Only in my-hylafax-v4.0pl2/man: cman.files
Only in my-hylafax-v4.0pl2/man: sman.apps
Only in my-hylafax-v4.0pl2/man: sman.files
Only in my-hylafax-v4.0pl2/pkg: Makefile
Only in my-hylafax-v4.0pl2/pkg: cpkginfo
Only in my-hylafax-v4.0pl2/pkg: cproto.stub
Only in my-hylafax-v4.0pl2/pkg: crequest
Only in my-hylafax-v4.0pl2/pkg: make_proto.sh
Only in my-hylafax-v4.0pl2/pkg: postinstall
Only in my-hylafax-v4.0pl2/pkg: postremove
Only in my-hylafax-v4.0pl2/pkg: spkginfo
Only in my-hylafax-v4.0pl2/pkg: sproto.stub
Only in my-hylafax-v4.0pl2/pkg: srequest
Only in my-hylafax-v4.0pl2/port: install.sh
Only in my-hylafax-v4.0pl2/port: mkdepend
Only in my-hylafax-v4.0pl2: rules
diff -c -r hylafax-v4.0pl2/util/RegEx.c++ my-hylafax-v4.0pl2/util/RegEx.c++
*** hylafax-v4.0pl2/util/RegEx.c++ Sat Feb 14 11:47:22 1998
--- my-hylafax-v4.0pl2/util/RegEx.c++ Sun Sep 6 16:11:13 1998
***************
*** 76,83 ****
else {
matches[0].rm_so = off;
matches[0].rm_eo = length;
execResult = regexec(&c_pattern, text, c_pattern.re_nsub+1,
! matches, REG_STARTEND);
}
}
return (execResult == 0);
--- 76,85 ----
else {
matches[0].rm_so = off;
matches[0].rm_eo = length;
+ // execResult = regexec(&c_pattern, text, c_pattern.re_nsub+1,
+ // matches, REG_STARTEND);
execResult = regexec(&c_pattern, text, c_pattern.re_nsub+1,
! matches, REG_NOSUB);
}
}
return (execResult == 0);
diff -c -r hylafax-v4.0pl2/util/SendFaxClient.c++ my-hylafax-v4.0pl2/util/SendFaxClient.c++
*** hylafax-v4.0pl2/util/SendFaxClient.c++ Sat Feb 14 11:47:24 1998
--- my-hylafax-v4.0pl2/util/SendFaxClient.c++ Sun Sep 6 16:26:29 1998
***************
*** 457,467 ****
if (info.rule->getResult() == TypeRule::TIFF) {
fileSent = setFormat(FORM_TIFF)
&& setType(TYPE_I)
! && sendData(fd, FaxClient::storeTemp, info.doc, emsg);
} else {
fileSent = setFormat(FORM_PS)
&& setType(TYPE_I) // XXX TYPE_A???
! && sendZData(fd, FaxClient::storeTemp, info.doc, emsg);
}
Sys::close(fd);
if (!fileSent) {
--- 457,469 ----
if (info.rule->getResult() == TypeRule::TIFF) {
fileSent = setFormat(FORM_TIFF)
&& setType(TYPE_I)
! && sendData(fd, &FaxClient::storeTemp, info.doc, emsg);
! // && sendData(fd, FaxClient::storeTemp, info.doc, emsg);
} else {
fileSent = setFormat(FORM_PS)
&& setType(TYPE_I) // XXX TYPE_A???
! && sendZData(fd, &FaxClient::storeTemp, info.doc, emsg);
! // && sendZData(fd, FaxClient::storeTemp, info.doc, emsg);
}
Sys::close(fd);
if (!fileSent) {
diff -c -r hylafax-v4.0pl2/util/SendFaxJob.c++ my-hylafax-v4.0pl2/util/SendFaxJob.c++
*** hylafax-v4.0pl2/util/SendFaxJob.c++ Sat Feb 14 11:47:24 1998
--- my-hylafax-v4.0pl2/util/SendFaxJob.c++ Sun Sep 6 16:20:30 1998
***************
*** 496,502 ****
fxBool fileSent =
client.setFormat(FaxClient::FORM_PS)
&& client.setType(FaxClient::TYPE_I) // XXX??? TYPE_A
! && client.sendZData(fd, FaxClient::storeTemp, coverDoc, emsg);
Sys::close(fd);
if (!fileSent) {
if (emsg == "")
--- 496,503 ----
fxBool fileSent =
client.setFormat(FaxClient::FORM_PS)
&& client.setType(FaxClient::TYPE_I) // XXX??? TYPE_A
! && client.sendZData(fd, &FaxClient::storeTemp, coverDoc, emsg);
! // && client.sendZData(fd, FaxClient::storeTemp, coverDoc, emsg);
Sys::close(fd);
if (!fileSent) {
if (emsg == "")