![]() |
trying to compile Hylafax 4.0 pl2 with gcc on HP-UX 9.07 and I keep getting the following error: /usr/local/bin/gcc -I/usr/local/include -D__ANSI_CPP__ -I. -I.. -I/usr/local/include -I../regex -g -O -x c++ -c Dispatcher.c++ Dispatcher.c++: In method `int Dispatcher::waitFor(class FdMask &, class FdMask &, class FdMask &, struct timeval *)': Dispatcher.c++:628: passing `FdMask *' as argument 2 of `select(size_t, int *, int *, int *, const timeval *)' Dispatcher.c++: In method `void Dispatcher::checkConnections()': Dispatcher.c++:750: passing `FdMask *' as argument 2 of `select(size_t, int *, int *, int *, const timeval *)' In efforts to solve the problem: I have tried this with both gcc 2.7.2.3 and egcs 1.1.1 I have installed binutils 2.9.1 The code compiled fine on HP-UX 10.20 with gcc 2.8.1 but I need to get the client software installed on some HP-UX 9.X systems. BTW, while running the configure script on 9.X it defines CONFIG_BADSELECTPROTO and this causes a parse error from lines 624 and 747 during a "make depend" and a "make all" on this same util/Dispatcher.c++ file The configure script causes the Makefile in port to have syslog.c listed on the CFILE line but this causes a problem with LOG_PERROR in syslog.c which is undefined on HP-UX 9.X and 10.X I have undefined CONFIG_BADSELECTPROTO in port.h and had port/Makefile use vsyslog.c instead of syslog.c to even get this far. Also I have to enter two lines in port.h so I don't get errors about speed_t and struct termios being undefined. #define _TERMIOS_INCLUDED 1 #include <sys/termio.h> Once this is done in port.h then the following lines can be commented out too: /*extern int cfsetispeed(const struct termios*, speed_t);*/ /*extern int tcgetattr(int, struct termios*);*/ /*extern int tcsetattr(int, int, const struct termios*);*/ /*extern int tcsendbreak(int, int);*/ /*extern int tcdrain(int);*/ /*extern int tcflush(int, int);*/ /*extern int tcflow(int, int);*/ since all of the above are defined exactly the same in <sys/termio.h> I compared the port.h and defs files between the 9.07 system and the 10.20 but did not see any other obvious problem causing differences. Finally a co-worker who knows more about C++ than I do helped me make the following modifications to util/Dispatcher.c++ 628c628 < nfound = select(_nfds, (int *) &rmaskret, (int *) &wmaskret, (int *) &emaskret, (const timeval *) &howlong); --- > nfound = select(_nfds, &rmaskret, &wmaskret, &emaskret, howlong); 750c750 < if (select(fd+1, (int *) &rmask, NULL, NULL, (const timeval *) &poll) < 0) { --- > if (select(fd+1, &rmask, NULL, NULL, &poll) < 0) { It turns out that the select system call was changed from: int select( size_t nfds, int *readfds, int *writefds, int *exceptfds, const struct timeval *timeout ); at 9.X to the following: int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout); at 10.X to make 10.X more compliant. Now I am getting Unsatisfied symbols symbols when trying to link hfaxd FaxRequest type_info function(code) FaxRequest type_info node(data) vlogError(char const *, double *)(code) ARGH! Time to go home now. :-( -- Steve DuChene sad@hpuerca.atl.hp.com The HP North American Response Center, Atlanta X/CDE/Vue/xterminal/graphics support team