On Wed, 2 Apr 2025, Adam wrote:
I always build on NetBSD and Darwin (aka macOS).
lang/jimtcl does not build for sparc/solaris.gcc -fPIC -I. -fno-unwind-tables -fno-asynchronous-unwind-tables -DUSE_UTF8 -DHAVE_OPENPTY -O2 -Wall -D_GNU_SOURCE -O2 -I/usr/include -I/opt/pkg/include -I/usr/include -I/opt/pkg/include -c jim-tty.c -o jim-tty.o
jim-tty.c: In function 'Jim_GetTtyControlSettings':jim-tty.c:372:9: warning: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration]
372 | if (ioctl(fd, TIOCMGET, &status) < 0) {
| ^~~~~
gcc -fPIC -I. -fno-unwind-tables -fno-asynchronous-unwind-tables
-DUSE_UTF8 -DHAVE_OPENPTY -O2 -Wall -D_GNU_SOURCE -O2 -I/usr/include
-I/opt/pkg/include -I/usr/include -I/opt/pkg/include -c openpty.c -o
openpty.o
openpty.c:36:5: error: conflicting types for 'openpty'36 | int openpty(int *pm, int *ps, char name[20], const struct termios *tio, const struct winsize *ws)
| ^~~~~~~
In file included from /usr/include/termios.h:8,
from openpty.c:29:
/usr/include/sys/termios.h:538:12: note: previous declaration of 'openpty'
was here
538 | extern int openpty(int *, int *, char *, struct termios *, struct
winsize *);
| ^~~~~~~
openpty.c: In function 'openpty':
openpty.c:38:2: error: unknown type name 'sig_t'
38 | sig_t old_signal;
| ^~~~~
openpty.c:43:13: warning: assignment to 'int' from 'void (*)(int)' makes
integer from pointer without a cast -Wint-conversion]
43 | old_signal = signal(SIGCHLD, SIG_DFL);
| ^
openpty.c:64:18: warning: passing argument 2 of 'signal' makes pointer
from integer without a cast [-Wint-conversion]
64 | signal(SIGCHLD, old_signal);
| ^~~~~~~~~~
| |
| int
In file included from /usr/include/signal.h:18,
from openpty.c:31:
/usr/include/iso/signal_iso.h:41:27: note: expected 'void (*)(int)' but
argument is of type 'int'
41 | extern void (*signal(int, void (*)(int)))(int);
| ^~~~~~~~~~~~~
*** Error code 1
jim-tty.c defines an own version of openpty() which seems not very
portable.
Regards,Uwe Klaus --
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature