Blame patches/tcsh-6.24.14.local.patch

c599b0
diff -Nru tcsh-6.24.14.orig/config_f.h tcsh-6.24.14/config_f.h
c599b0
--- tcsh-6.24.14.orig/config_f.h	2024-11-26 19:31:51.000000000 +0100
c599b0
+++ tcsh-6.24.14/config_f.h	2024-12-22 19:13:25.290832110 +0100
c599b0
@@ -147,7 +147,7 @@
c599b0
  *		This can be much slower and no memory statistics will be
c599b0
  *		provided.
c599b0
  */
c599b0
-#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__) || defined(__NetBSD__) || !defined(HAVE_WORKING_SBRK)
c599b0
+#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__) || defined(__NetBSD__) || defined(__midipix__) || !defined(HAVE_WORKING_SBRK)
c599b0
 # define SYSMALLOC
c599b0
 #else
c599b0
 # undef SYSMALLOC
c599b0
diff -Nru tcsh-6.24.14.orig/configure tcsh-6.24.14/configure
c599b0
--- tcsh-6.24.14.orig/configure	2024-11-26 19:31:51.000000000 +0100
c599b0
+++ tcsh-6.24.14/configure	2024-12-22 19:13:25.290832110 +0100
c599b0
@@ -6089,6 +6089,10 @@
cca402
   *-qnx6*) :
cca402
         tcsh_config_file=qnx6
cca402
    ;; #(
cca402
+  ## Midipix
cca402
+  *-midipix*) :
cca402
+        tcsh_config_file=midipix
cca402
+   ;; #(
cca402
   *) :
cca402
     as_fn_error $? "Tcsh can't guess the configuration file name
cca402
 for \`${host}' systems.
c599b0
diff -Nru tcsh-6.24.14.orig/ed.inputl.c tcsh-6.24.14/ed.inputl.c
c599b0
--- tcsh-6.24.14.orig/ed.inputl.c	2024-11-26 19:31:51.000000000 +0100
c599b0
+++ tcsh-6.24.14/ed.inputl.c	2024-12-22 19:13:25.290832110 +0100
c599b0
@@ -34,6 +34,8 @@
c599b0
 #include "ed.defns.h"		/* for the function names */
c599b0
 #include "tw.h"			/* for twenex stuff */
c599b0
 
c599b0
+#include <wchar.h>
c599b0
+
c599b0
 #define OKCMD INT_MAX
c599b0
 
c599b0
 /* ed.inputl -- routines to get a single line from the input. */
c599b0
diff -Nru tcsh-6.24.14.orig/Makefile.in tcsh-6.24.14/Makefile.in
c599b0
--- tcsh-6.24.14.orig/Makefile.in	2024-11-26 19:31:51.000000000 +0100
c599b0
+++ tcsh-6.24.14/Makefile.in	2024-12-22 19:16:54.096716085 +0100
c599b0
@@ -432,7 +432,7 @@
156476
 #CC=	lcc	-wa 
7dbc08
 CC_FOR_GETHOST = @CC_FOR_GETHOST@
c599b0
 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
c599b0
-CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
c599b0
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ -I. -I$(srcdir)
c599b0
 LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
7dbc08
 ED=	ed
7dbc08
 AS=	as
c599b0
@@ -598,7 +598,7 @@
156476
 	@echo '/* Do not edit this file, make creates it. */' > $@.tmp
156476
 	@echo '#ifndef _h_tc_const' >> $@.tmp
156476
 	@echo '#define _h_tc_const' >> $@.tmp
156476
-	${CPP} $(CPPFLAGS) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\
156476
+	${CPP} $(CFLAGS) $(CPPFLAGS) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\
156476
 	    $(srcdir)/tc.const.c | \
156476
 	    sed -n -e 's/^\(Char STR[a-zA-Z0-9_]*\) *\[ *\].*/extern \1[];/p' | \
c599b0
 	    LC_ALL=C sort >> $@.tmp
c599b0
diff -Nru tcsh-6.24.14.orig/sh.h tcsh-6.24.14/sh.h
c599b0
--- tcsh-6.24.14.orig/sh.h	2024-11-26 19:31:51.000000000 +0100
c599b0
+++ tcsh-6.24.14/sh.h	2024-12-22 19:13:25.290832110 +0100
c599b0
@@ -341,7 +341,7 @@
c599b0
 #endif /* POSIX && !WINNT_NATIVE */
c599b0
 #include <limits.h>
c599b0
 
c599b0
-#if SYSVREL > 0 || defined(_IBMR2) || defined(_MINIX) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
c599b0
+#if SYSVREL > 0 || defined(_IBMR2) || defined(_MINIX) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) || defined(__midipix__)
c599b0
 # if !defined(pyr) && !defined(stellar)
c599b0
 #  include <time.h>
c599b0
 #  ifdef _MINIX
c599b0
diff -Nru tcsh-6.24.14.orig/system/midipix tcsh-6.24.14/system/midipix
c599b0
--- tcsh-6.24.14.orig/system/midipix	1970-01-01 01:00:00.000000000 +0100
c599b0
+++ tcsh-6.24.14/system/midipix	2024-12-22 19:13:25.290832110 +0100
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
@@ -0,0 +1,138 @@
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * config.h -- configure various defines for tcsh
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * All source files should #include this FIRST.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * This is the config file for midipix systems
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#ifndef _h_config
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define _h_config
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/****************** System dependant compilation flags ****************/
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * POSIX	This system supports IEEE Std 1003.1-1988 (POSIX).
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define POSIX
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * POSIXJOBS	This system supports the optional IEEE Std 1003.1-1988 (POSIX)
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		job control facilities.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define POSIXJOBS
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * VFORK	This machine has a vfork().  
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		It used to be that for job control to work, this define
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		was mandatory. This is not the case any more.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		If you think you still need it, but you don't have vfork, 
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		define this anyway and then do #define vfork fork.  
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		I do this anyway on a Sun because of yellow pages brain damage,
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		[should not be needed under 4.1]
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		and on the iris4d cause	SGI's fork is sufficiently "virtual" 
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		that vfork isn't necessary.  (Besides, SGI's vfork is weird).
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		Note that some machines eg. rs6000 have a vfork, but not
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		with the berkeley semantics, so we cannot use it there either.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#undef VFORK
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * BSDJOBS	You have BSD-style job control (both process groups and
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		a tty that deals correctly
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define BSDJOBS
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * BSDTIMES	You have BSD-style process time stuff (like rusage)
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		This may or may not be true.  For example, Apple Unix
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		(OREO) has BSDJOBS but not BSDTIMES.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#define BSDTIMES
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * BSDLIMIT	You have BSD-style resource limit stuff (getrlimit/setrlimit)
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define BSDLIMIT
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * TERMIO	You have struct termio instead of struct sgttyb.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * 		This is usually the case for SVID systems, where
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		BSD uses sgttyb. POSIX systems should define this
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		anyway, even though they use struct termios.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define TERMIO
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * SYSVREL	Your machine is SYSV based (HPUX, A/UX)
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		NOTE: don't do this if you are on a Pyramid -- tcsh is
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		built in a BSD universe.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		Set SYSVREL to 1, 2, 3, or 4, depending the version of System V
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		you are running. Or set it to 0 if you are not SYSV based
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		Note: Linux should work with any SYSVREL < 3.
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#define SYSVREL	2
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ * YPBUGS	Work around Sun YP bugs that cause expansion of ~username
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ *		to send command output to /dev/null
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#undef YPBUGS
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+ * Get the name space we want.
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+ *
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+ * The more recent defaults for gcc (e.g. on Red Hat 7.0)
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+ * also define _POSIX_C_SOURCE, which throws our code off.
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#define __STRICT_ANSI__
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#ifndef _BSD_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define _BSD_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#ifndef _SVID_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define _SVID_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#ifndef _POSIX_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define _POSIX_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#ifndef _XOPEN_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define _XOPEN_SOURCE 500
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#ifndef _GNU_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define _GNU_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+/*
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+ * Large file support from <features.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+ */
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#ifndef _LARGEFILE_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define _LARGEFILE_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#ifndef _LARGEFILE64_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define _LARGEFILE64_SOURCE
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#ifndef _FILE_OFFSET_BITS
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define _FILE_OFFSET_BITS 64
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/****************** local defines *********************/
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#ifndef _PATH_TCSHELL
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define _PATH_TCSHELL "/bin/tcsh"
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define ECHO_STYLE      BOTH_ECHO
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#if !defined(SYSMALLOC)
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define SYSMALLOC
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#if !defined(NISPLUS)
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define NISPLUS
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#if !defined(POSIX)
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+# define POSIX
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 8afad0
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+/* midipix allows paths prepended with double slashes (network paths). */
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#define HAVE_SLASHSLASH 1
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+
Lucio Andrés Illanes Albornoz (arab, vxp) c688c1
+#endif /* _h_config */