summaryrefslogtreecommitdiffhomepage
path: root/patches/tcsh-6.22.00.local.patch
blob: b2a3a1b39d592ea276ea38f1d4ba8bc648cf9f90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
diff -Nru tcsh-6.22.00.orig/config/midipix tcsh-6.22.00/config/midipix
--- tcsh-6.22.00.orig/config/midipix	1970-01-01 01:00:00.000000000 +0100
+++ tcsh-6.22.00/config/midipix	2020-08-21 19:12:56.066600827 +0200
@@ -0,0 +1,138 @@
+/*
+ * config.h -- configure various defines for tcsh
+ *
+ * All source files should #include this FIRST.
+ *
+ * This is the config file for midipix systems
+ */
+
+#ifndef _h_config
+#define _h_config
+/****************** System dependant compilation flags ****************/
+/*
+ * POSIX	This system supports IEEE Std 1003.1-1988 (POSIX).
+ */
+#define POSIX
+
+/*
+ * POSIXJOBS	This system supports the optional IEEE Std 1003.1-1988 (POSIX)
+ *		job control facilities.
+ */
+#define POSIXJOBS
+
+/*
+ * VFORK	This machine has a vfork().  
+ *		It used to be that for job control to work, this define
+ *		was mandatory. This is not the case any more.
+ *		If you think you still need it, but you don't have vfork, 
+ *		define this anyway and then do #define vfork fork.  
+ *		I do this anyway on a Sun because of yellow pages brain damage,
+ *		[should not be needed under 4.1]
+ *		and on the iris4d cause	SGI's fork is sufficiently "virtual" 
+ *		that vfork isn't necessary.  (Besides, SGI's vfork is weird).
+ *		Note that some machines eg. rs6000 have a vfork, but not
+ *		with the berkeley semantics, so we cannot use it there either.
+ */
+#undef VFORK
+
+/*
+ * BSDJOBS	You have BSD-style job control (both process groups and
+ *		a tty that deals correctly
+ */
+#define BSDJOBS
+
+/*
+ * BSDTIMES	You have BSD-style process time stuff (like rusage)
+ *		This may or may not be true.  For example, Apple Unix
+ *		(OREO) has BSDJOBS but not BSDTIMES.
+ */
+#define BSDTIMES
+
+/*
+ * BSDLIMIT	You have BSD-style resource limit stuff (getrlimit/setrlimit)
+ */
+#define BSDLIMIT
+
+/*
+ * TERMIO	You have struct termio instead of struct sgttyb.
+ * 		This is usually the case for SVID systems, where
+ *		BSD uses sgttyb. POSIX systems should define this
+ *		anyway, even though they use struct termios.
+ */
+#define TERMIO
+
+/*
+ * SYSVREL	Your machine is SYSV based (HPUX, A/UX)
+ *		NOTE: don't do this if you are on a Pyramid -- tcsh is
+ *		built in a BSD universe.
+ *		Set SYSVREL to 1, 2, 3, or 4, depending the version of System V
+ *		you are running. Or set it to 0 if you are not SYSV based
+ *
+ *		Note: Linux should work with any SYSVREL < 3.
+ */
+#define SYSVREL	2
+
+/*
+ * YPBUGS	Work around Sun YP bugs that cause expansion of ~username
+ *		to send command output to /dev/null
+ */
+#undef YPBUGS
+
+/*
+ * Get the name space we want.
+ *
+ * The more recent defaults for gcc (e.g. on Red Hat 7.0)
+ * also define _POSIX_C_SOURCE, which throws our code off.
+ */
+
+#define __STRICT_ANSI__
+#ifndef _BSD_SOURCE
+# define _BSD_SOURCE
+#endif
+#ifndef _SVID_SOURCE
+# define _SVID_SOURCE
+#endif
+#ifndef _POSIX_SOURCE
+# define _POSIX_SOURCE
+#endif
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 500
+#endif
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+/*
+ * Large file support from <features.h>
+ */
+
+#ifndef _LARGEFILE_SOURCE
+# define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+# define _LARGEFILE64_SOURCE
+#endif
+#ifndef _FILE_OFFSET_BITS
+# define _FILE_OFFSET_BITS 64
+#endif
+
+/****************** local defines *********************/
+#ifndef _PATH_TCSHELL
+#define _PATH_TCSHELL "/bin/tcsh"
+#endif
+#define ECHO_STYLE      BOTH_ECHO
+
+#if !defined(SYSMALLOC)
+# define SYSMALLOC
+#endif
+#if !defined(NISPLUS)
+# define NISPLUS
+#endif
+#if !defined(POSIX)
+# define POSIX
+#endif
+
+/* midipix allows paths prepended with double slashes (network paths). */
+#define HAVE_SLASHSLASH 1
+
+#endif /* _h_config */
diff -Nru tcsh-6.22.00.orig/config_f.h tcsh-6.22.00/config_f.h
--- tcsh-6.22.00.orig/config_f.h	2019-11-28 17:00:05.000000000 +0100
+++ tcsh-6.22.00/config_f.h	2020-08-21 19:07:18.052977628 +0200
@@ -138,11 +138,8 @@
  *		This can be much slower and no memory statistics will be
  *		provided.
  */
-#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__)
+/* always use the system malloc. seriously guys. */
 # define SYSMALLOC
-#else
-# undef SYSMALLOC
-#endif
 
 /*
  * USE_ACCESS	Use access(2) rather than stat(2) when POSIX is defined.
diff -Nru tcsh-6.22.00.orig/configure tcsh-6.22.00/configure
--- tcsh-6.22.00.orig/configure	2019-11-28 17:00:05.000000000 +0100
+++ tcsh-6.22.00/configure	2020-08-21 19:08:03.600976202 +0200
@@ -2975,6 +2975,11 @@
     tcsh_config_file=qnx6
   ;;
 
+  ## midipix
+  *-midipix*)
+    tcsh_config_file=midipix
+  ;;
+
   * )
     as_fn_error $? "Tcsh can't guess the configuration file name
 for \`${host}' systems.
@@ -4284,7 +4289,7 @@
   return 0;
 }
 _ACEOF
-for ac_lib in '' termlib tinfo termcap curses ncurses; do
+for ac_lib in '' termlib tinfo termcap curses ncurses tinfo; do
   if test -z "$ac_lib"; then
     ac_res="none required"
   else
diff -Nru tcsh-6.22.00.orig/ed.inputl.c tcsh-6.22.00/ed.inputl.c
--- tcsh-6.22.00.orig/ed.inputl.c	2019-11-28 17:00:05.000000000 +0100
+++ tcsh-6.22.00/ed.inputl.c	2020-08-21 19:22:12.899460169 +0200
@@ -34,6 +34,8 @@
 #include "ed.defns.h"		/* for the function names */
 #include "tw.h"			/* for twenex stuff */
 
+#include <wchar.h>
+
 #define OKCMD INT_MAX
 
 /* ed.inputl -- routines to get a single line from the input. */
diff -Nru tcsh-6.22.00.orig/Makefile.in tcsh-6.22.00/Makefile.in
--- tcsh-6.22.00.orig/Makefile.in	2019-11-28 17:00:05.000000000 +0100
+++ tcsh-6.22.00/Makefile.in	2020-08-21 19:28:01.686381892 +0200
@@ -339,6 +339,7 @@
 #CC=	cc	-h0,ansi,novector,float0
 #CC=	lcc	-wa 
 CC_FOR_GETHOST = @CC_FOR_GETHOST@
+CPPFLAGS_FOR_GETHOST=-I. -I$(srcdir)
 ED=	ed
 AS=	as
 RM=	rm
@@ -447,7 +448,7 @@
 
 gethost:  gethost.c sh.err.h tc.const.h sh.h
 	rm -f gethost
-	${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $(srcdir)/gethost.c
+	${CC_FOR_GETHOST} -o gethost ${CPPFLAGS_FOR_GETHOST} ${CFLAGS_FOR_GETHOST} ${LDFLAGS_FOR_GETHOST} $(srcdir)/gethost.c
 
 tc.defs.c:	gethost host.defs
 	@rm -f $@.tmp
diff -Nru tcsh-6.22.00.orig/sh.h tcsh-6.22.00/sh.h
--- tcsh-6.22.00.orig/sh.h	2019-11-28 17:00:05.000000000 +0100
+++ tcsh-6.22.00/sh.h	2020-08-21 19:10:44.030604961 +0200
@@ -337,7 +337,7 @@
 #endif /* POSIX && !WINNT_NATIVE */
 #include <limits.h>
 
-#if SYSVREL > 0 || defined(_IBMR2) || defined(_MINIX) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
+#if SYSVREL > 0 || defined(_IBMR2) || defined(_MINIX) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) || defined(__midipix__)
 # if !defined(pyr) && !defined(stellar)
 #  include <time.h>
 #  ifdef _MINIX