Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: compiling (not) with gcc 2.8.0 and libg++ 2.8.0
Hello Peter,
OK - Theres three problems with using gcc-2.8.0
1) Theres a number of C programs with void main() routines these need to be
changed to int main() theres a diff attached below to do this.
2) When using a pointer to call a class member function you need to specify
the pointer by using syntax similar to:
&FaxClient::storeTemp
not FaxClient::storeTemp
The above is not a real pointer unless the method is static it is an offset
pointer within the class. This occurs in util/SendFaxClient.c++,
util/SendFaxJob.c++, hfaxd/OldProtocol.c++
(There's a whole array of this is OldProtocol.c++....) just add a '&' to
the front.
I would provide a diff for the above but i think it would break a number of
older compilers and maybe it would be better done another way.
3) Compiler Internal Error
make[3]: Entering directory `/u3/rjc/hylafax-v4.0pl2/faxd'
/opt/gcc/bin/gcc -D__ANSI_CPP__ -I. -I.. -I.././faxd -I.././util
-I/opt/tiff-3.4/include -I.././regex -g -O -x c++ -c CopyQuality.c++
CopyQuality.c++: In method `unsigned char FaxModem::recvPageDLEData(struct
tiff *, unsigned char, const struct Class2Params &, class fxStr &)':
CopyQuality.c++:278: internal error--unrecognizable insn:
(insn 2052 2050 2053 (set (reg:SI 9 %r9)
(plus:SI (mem/u:SI (reg:SI 7 %r7))
(reg:SI 9 %r9))) -1 (nil)
(nil))
CopyQuality.c++:278: confused by earlier errors, bailing out
This might only be my compiler, i've got no idea how to fix this.
-Robert
----- cut here---------
diff -rc hylafax-v4.0pl2/util/faxconfig.c hylafax-v4.0pl2.new/util/faxconfig.c
*** hylafax-v4.0pl2/util/faxconfig.c Sat Feb 14 21:47:57 1998
--- hylafax-v4.0pl2.new/util/faxconfig.c Thu Feb 19 22:36:32 1998
***************
*** 51,57 ****
extern int cvtFacility(const char*, int*);
! void
main(int argc, char** argv)
{
extern int optind;
--- 51,57 ----
extern int cvtFacility(const char*, int*);
! int
main(int argc, char** argv)
{
extern int optind;
***************
*** 123,127 ****
} while ((optind += 2) < argc);
(void) close(fifo);
}
! exit(0);
}
--- 123,127 ----
} while ((optind += 2) < argc);
(void) close(fifo);
}
! return 0;
}
diff -rc hylafax-v4.0pl2/util/faxmsg.c hylafax-v4.0pl2.new/util/faxmsg.c
*** hylafax-v4.0pl2/util/faxmsg.c Sat Feb 14 21:47:58 1998
--- hylafax-v4.0pl2.new/util/faxmsg.c Thu Feb 19 22:34:45 1998
***************
*** 50,56 ****
extern int cvtFacility(const char*, int*);
! void
main(int argc, char** argv)
{
extern int optind;
--- 50,56 ----
extern int cvtFacility(const char*, int*);
! int
main(int argc, char** argv)
{
extern int optind;
***************
*** 127,131 ****
if (write(fifo, cmd, strlen(cmd)) != strlen(cmd))
fatal("FIFO write failed for command (%s)", strerror(errno));
(void) close(fifo);
! exit(0);
}
--- 127,131 ----
if (write(fifo, cmd, strlen(cmd)) != strlen(cmd))
fatal("FIFO write failed for command (%s)", strerror(errno));
(void) close(fifo);
! return 0;
}