Files
Astral/patches/xterm/jinx-working-patch.patch
T
2025-12-06 18:47:55 -03:00

180 lines
5.7 KiB
Diff

diff --git xterm-clean/Makefile.in xterm-workdir/Makefile.in
index bb6da23..9500664 100644
--- xterm-clean/Makefile.in
+++ xterm-workdir/Makefile.in
@@ -68,7 +68,7 @@ PIXMAPDIR_DEF = @no_pixmapdir@-DPIXMAP_ROOTDIR=\"@PIXMAPDIR@/\"
CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ -DDEFCLASS=\"@APP_CLASS@\" $(PIXMAPDIR_DEF) $(EXTRA_CPPFLAGS)
CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS)
LDFLAGS = @LDFLAGS@ @EXTRA_LDFLAGS@
-LIBS = @LIBS@
+LIBS = @LIBS@ -lncursesw -ltinfow
prefix = @prefix@
exec_prefix = @exec_prefix@
diff --git xterm-clean/config.sub xterm-workdir/config.sub
index e4c4e09..272cd1c 100755
--- xterm-clean/config.sub
+++ xterm-workdir/config.sub
@@ -1737,7 +1737,7 @@ case $os in
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ gnu* | astral* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git xterm-clean/main.c xterm-workdir/main.c
index 3d2ad4c..92ff910 100644
--- xterm-clean/main.c
+++ xterm-workdir/main.c
@@ -89,9 +89,13 @@
#define RES_OFFSET(field) XtOffsetOf(XTERM_RESOURCE, field)
+#define _GNU_SOURCE
+#include <stdlib.h>
+
#include <xterm.h>
#include <version.h>
#include <graphics.h>
+#include <termios.h>
/* xterm uses these X Toolkit resource names, which are exported in array */
#undef XtNborderWidth
@@ -172,7 +176,7 @@ static GCC_NORETURN void HsSysError(int);
#define KANJI
#endif
-#ifdef linux
+#if defined(linux) || defined(__astral__)
#define USE_SYSV_PGRP
#define USE_SYSV_SIGNALS
#define WTMP
@@ -315,7 +319,7 @@ ttyslot(void)
#ifndef NOFILE
#define NOFILE OPEN_MAX
#endif
-#elif !(defined(VMS) || defined(WIN32) || defined(Lynx) || defined(__GNU__) || defined(__MVS__))
+#elif !(defined(VMS) || defined(WIN32) || defined(Lynx) || defined(__GNU__) || defined(__MVS__) || defined(__astral__))
#include <sys/param.h> /* for NOFILE */
#endif
@@ -716,11 +720,12 @@ static struct {
#endif
#ifndef TAB3
-#if defined(OXTABS)
-#define TAB3 OXTABS
-#elif defined(XTABS)
-#define TAB3 XTABS
-#endif
+#define TAB3 0014000
+//#if defined(OXTABS)
+//#define TAB3 OXTABS
+//#elif defined(XTABS)
+//#define TAB3 XTABS
+//#endif
#endif
#ifndef TABDLY
@@ -3011,7 +3016,7 @@ main(int argc, char *argv[]ENVP_ARG)
}
#endif
#endif
-#if defined(USE_ANY_SYSV_TERMIO) || defined(__MVS__) || defined(__minix)
+#if defined(USE_ANY_SYSV_TERMIO) || defined(__MVS__) || defined(__minix) || defined(__astral__)
if (0 > (mode = fcntl(screen->respond, F_GETFL, 0)))
SysError(ERROR_F_GETFL);
#ifdef O_NDELAY
@@ -3753,7 +3758,7 @@ ourValidShell(const char *pathname)
return findValidShell(x_strtrim(resource.valid_shells), pathname);
}
-#if defined(HAVE_GETUSERSHELL) && defined(HAVE_ENDUSERSHELL)
+#if defined(HAVE_GETUSERSHELL) && defined(HAVE_ENDUSERSHELL) && 0
static Boolean
validShell(const char *pathname)
{
@@ -4356,7 +4361,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed)
/*
* now in child process
*/
-#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__)
+#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__) || defined(__astral__)
int pgrp = setsid(); /* variable may not be used... */
#else
int pgrp = getpid();
@@ -4496,7 +4501,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed)
/* make /dev/tty work */
ioctl(ttyfd, TCSETCTTY, 0);
#endif
-#if ((defined(__GLIBC__) && defined(__FreeBSD_kernel__)) || defined(__GNU__)) && defined(TIOCSCTTY)
+#if ((defined(__GLIBC__) && defined(__FreeBSD_kernel__)) || defined(__GNU__) || defined(__astral__)) && defined(TIOCSCTTY)
/* make /dev/tty work */
ioctl(ttyfd, TIOCSCTTY, 0);
#endif
diff --git xterm-clean/util.c xterm-workdir/util.c
index 4e609a2..f4d716f 100644
--- xterm-clean/util.c
+++ xterm-workdir/util.c
@@ -54,6 +54,7 @@
/* util.c */
+#define _GNU_SOURCE
#include <xterm.h>
#include <data.h>
diff --git xterm-clean/xterm.h xterm-workdir/xterm.h
index 89590cb..9a99f0c 100644
--- xterm-clean/xterm.h
+++ xterm-workdir/xterm.h
@@ -80,7 +80,7 @@
#define HAVE_PUTENV 1
#endif
-#if defined(CSRG_BASED) || defined(__GNU__) || defined(__minix)
+#if defined(CSRG_BASED) || defined(__GNU__) || defined(__minix) || defined(__astral__)
#define USE_POSIX_TERMIOS 1
#endif
@@ -176,7 +176,7 @@
#define USE_SYSV_UTMP
#endif
-#if defined(__GNU__) || defined(__MVS__) || defined(__osf__)
+#if defined(__GNU__) || defined(__MVS__) || defined(__osf__) || defined(__astral__)
#define USE_TTY_GROUP
#endif
diff --git xterm-clean/xterm_io.h xterm-workdir/xterm_io.h
index 130d365..72ebd01 100644
--- xterm-clean/xterm_io.h
+++ xterm-workdir/xterm_io.h
@@ -92,13 +92,14 @@
#undef SYSV /* pretend to be bsd (sgtty.h) */
#endif /* macII */
-#ifdef __GNU__
+#if defined(__GNU__) || defined(__astral__)
#define USE_POSIX_TERMIOS
#define HAVE_POSIX_OPENPT 1
#define HAVE_PTSNAME 1
#define HAVE_GRANTPT_PTY_ISATTY 1
#endif
+
#if defined(__GLIBC__) && !(defined(linux) || defined(__GNU__))
#define USE_POSIX_TERMIOS /* GNU/KFreeBSD and GNU/KNetBSD */
#endif
@@ -212,7 +213,7 @@
#undef FIONCLEX
#endif /* macII */
-#if defined(__QNX__) || defined(__GNU__) || defined(__MVS__) || defined(__osf__)
+#if defined(__QNX__) || defined(__GNU__) || defined(__MVS__) || defined(__osf__) || defined(__astral__)
#undef TIOCSLTC /* <sgtty.h> conflicts with <termios.h> */
#undef TIOCSLTC
#endif