This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: ./configure
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 16 Mar 2005 16:46:07 -0000
- Subject: RE: ./configure
----Original Message----
>From: Donald
>Sent: 16 March 2005 15:44
> make[1]: Entering directory `/usr/src/mudtelnet-1.03-1/src/telnet'
> gcc -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-
> prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -
> Winline -DUSE_TERMIO -DKLUDGELINEMODE -I../ ../mudtelnet/muddb.c -c
> ../mudtelnet/muddb.c:184:25: bits/signum.h: No such file or directory
> ../mudtelnet/muddb.c: In function `mudscript_stop':
> ../mudtelnet/muddb.c:1051: warning: implicit declaration of function
> `waitpid' ../mudtelnet/muddb.c:1051: error: `WNOHANG' undeclared (first
> use in this function)
> ../mudtelnet/muddb.c:1051: error: (Each undeclared identifier is reported
> only once
> ../mudtelnet/muddb.c:1051: error: for each function it appears in.)
> make[1]: *** [muddb.o] Error 1
> make[1]: Leaving directory `/usr/src/mudtelnet-1.03-1/src/telnet'
> make: *** [telnet/mudtelnet] Error 2
>
Replace
#include <bits/signum.h>
with
#include <sys/wait.h>
at the top of that file. Then you're going to run into a link error later,
because the source-code in the src/telnet subdir is not cygwin compatible:
------------------------<snip!>------------------------
dk@mace /test/mudtelnet/mudtelnet-1.03-1/src> make
cd telnet ; make
make[1]: Entering directory `/test/mudtelnet/mudtelnet-1.03-1/src/telnet'
gcc authenc.o commands.o main.o network.o ring.o sys_bsd.o telnet.o
terminal.o
tn3270.o utilities.o genget.o muddb.o mudproc.o -lncurses -o mudtelnet
sys_bsd.o(.text+0x4ea):sys_bsd.c: undefined reference to `_sigblock'
sys_bsd.o(.text+0x4f7):sys_bsd.c: undefined reference to `_sigsetmask'
Info: resolving _optarg by linking to __imp__optarg (auto-import)
Info: resolving _optind by linking to __imp__optind (auto-import)
collect2: ld returned 1 exit status
make[1]: *** [mudtelnet] Error 1
make[1]: Leaving directory `/test/mudtelnet/mudtelnet-1.03-1/src/telnet'
make: *** [telnet/mudtelnet] Error 2
dk@mace /test/mudtelnet/mudtelnet-1.03-1/src>
------------------------<snip!>------------------------
which is because of this code in src/telnet/sys_bsd.c:
------------------------<snip!>------------------------
#ifdef SIGTSTP
(void) signal(SIGTSTP, SIG_DFL);
# ifndef SOLARIS
(void) sigsetmask(sigblock(0) & ~(1<<(SIGTSTP-1)));
# else SOLARIS
(void) sigrelse(SIGTSTP);
# endif SOLARIS
#endif /* SIGTSTP */
------------------------<snip!>------------------------
It uses the sigblock and sigsetmask functions, which are not implemented
in cygwin (and indeed aren't required by the POSIX/SuSv6). That's strange.
The binaries they offer on the website don't reference those functions.
Maybe SIGTSTP didn't used to be defined in the cygwin environment when they
compiled it, but has since been defined. I added the following line:
#undef SIGTSTP
just after this line:
#include "telnet_locl.h"
at the top of that file, and got what appeared to be a basically working
.exe, although the final copy in the makefile failed and I had to fish it
out of the telnet subdir.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/