2019-05-09 10:55:54 +02:00
|
|
|
---
|
2022-12-05 16:14:29 +01:00
|
|
|
system/linux | 10 ++++++++++
|
2019-05-09 10:55:54 +02:00
|
|
|
config_f.h | 9 +++++++--
|
|
|
|
glob.h | 3 ++-
|
2021-05-28 11:46:17 +02:00
|
|
|
host.defs | 9 +++------
|
2019-05-09 10:55:54 +02:00
|
|
|
pathnames.h | 2 +-
|
|
|
|
sh.c | 3 +++
|
|
|
|
tc.alloc.c | 10 ++++++----
|
|
|
|
tc.func.c | 8 ++++++--
|
|
|
|
tc.str.c | 2 +-
|
|
|
|
tc.who.c | 3 +++
|
2022-12-05 16:14:29 +01:00
|
|
|
tcsh.man.in | 2 +-
|
2019-05-09 10:55:54 +02:00
|
|
|
tw.h | 4 ++++
|
2021-05-28 11:46:17 +02:00
|
|
|
12 files changed, 47 insertions(+), 18 deletions(-)
|
2019-05-09 10:55:54 +02:00
|
|
|
|
2022-12-05 16:14:29 +01:00
|
|
|
--- system/linux
|
|
|
|
+++ system/linux 2021-04-27 07:41:53.192829973 +0000
|
2019-12-02 09:28:24 +01:00
|
|
|
@@ -99,6 +99,9 @@
|
2019-05-09 10:55:54 +02:00
|
|
|
#ifndef _SVID_SOURCE
|
|
|
|
# define _SVID_SOURCE
|
|
|
|
#endif
|
|
|
|
+#ifndef _DEFAULT_SOURCE
|
|
|
|
+# define _DEFAULT_SOURCE
|
|
|
|
+#endif
|
|
|
|
#ifndef _POSIX_SOURCE
|
|
|
|
# define _POSIX_SOURCE
|
|
|
|
#endif
|
2019-12-02 09:28:24 +01:00
|
|
|
@@ -139,4 +142,11 @@
|
2019-05-09 10:55:54 +02:00
|
|
|
# define POSIX
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#if !defined(PW_SHADOW)
|
|
|
|
+# define PW_SHADOW
|
|
|
|
+#endif
|
|
|
|
+#if !defined(SuSE)
|
|
|
|
+# define SuSE
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#endif /* _h_config */
|
|
|
|
--- config_f.h
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ config_f.h 2021-04-27 07:41:53.192829973 +0000
|
2022-11-25 09:58:42 +01:00
|
|
|
@@ -72,7 +72,12 @@
|
2019-05-09 10:55:54 +02:00
|
|
|
/*
|
|
|
|
* LOGINFIRST Source ~/.login before ~/.cshrc
|
|
|
|
*/
|
|
|
|
-#undef LOGINFIRST
|
|
|
|
+#define LOGINFIRST
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * USERLOGINFIRST Source ~/.login before ~/.cshrc
|
|
|
|
+ */
|
|
|
|
+#undef USERLOGINFIRST
|
|
|
|
|
|
|
|
/*
|
|
|
|
* VIDEFAULT Make the VI mode editor the default
|
2022-11-25 09:58:42 +01:00
|
|
|
@@ -166,7 +171,7 @@
|
2019-05-09 10:55:54 +02:00
|
|
|
* successful, set $REMOTEHOST to the name or address of the
|
|
|
|
* host
|
|
|
|
*/
|
|
|
|
-#define REMOTEHOST
|
|
|
|
+#undef REMOTEHOST
|
|
|
|
|
|
|
|
/*
|
|
|
|
* COLOR_LS_F Do you want to use builtin color ls-F ?
|
|
|
|
--- glob.h
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ glob.h 2021-04-27 07:41:53.192829973 +0000
|
2019-05-09 10:55:54 +02:00
|
|
|
@@ -72,6 +72,7 @@ typedef struct {
|
|
|
|
#define GLOB_NOSYS (-4) /* Implementation does not support function. */
|
|
|
|
|
|
|
|
/* #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) */
|
|
|
|
+#if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE || defined _GNU_SOURCE)
|
|
|
|
#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
|
|
|
|
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
|
|
|
|
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
|
|
|
|
@@ -84,7 +85,7 @@ typedef struct {
|
|
|
|
#define GLOB_DOT 0x8000 /* don't skip dotfiles (except . and ..) */
|
|
|
|
|
|
|
|
#define GLOB_ABEND GLOB_ABORTED /* source compatibility */
|
|
|
|
-/* #endif */
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
int glob (const char *, int, int (*)(const char *, int), glob_t *);
|
|
|
|
void globfree (glob_t *);
|
2021-05-28 11:21:06 +02:00
|
|
|
--- host.defs
|
2021-05-28 11:46:17 +02:00
|
|
|
+++ host.defs 2021-05-28 09:44:03.337584826 +0000
|
|
|
|
@@ -189,9 +189,8 @@ static void populate(void)
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
xsnprintf(ostype, sizeof(ostype), "%s", p);
|
|
|
|
- xsnprintf(mach, sizeof(mach), "%s", e != -1 ? uts.machine : "unknown");
|
|
|
|
- xsnprintf(host, sizeof(host), "%s-%s",
|
|
|
|
- e != -1 ? uts.machine : "unknown", ostype);
|
|
|
|
+ xsnprintf(mach, sizeof(mach), "%s-suse-linux", e != -1 ? uts.machine : "unknown");
|
|
|
|
+ xsnprintf(host, sizeof(host), "%s", e != -1 ? uts.machine : "unknown");
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *
|
2022-05-13 10:14:00 +02:00
|
|
|
@@ -1275,9 +1274,7 @@ newcode :
|
2021-05-28 11:21:06 +02:00
|
|
|
#ifndef _ostype_
|
|
|
|
ostype = "unknown";
|
|
|
|
#endif
|
|
|
|
-#ifndef _vendor_
|
|
|
|
- vendor = "unknown";
|
|
|
|
-#endif
|
|
|
|
+ vendor = "suse";
|
|
|
|
#ifndef _machtype_
|
|
|
|
machtype = "unknown";
|
|
|
|
#endif
|
2019-05-09 10:55:54 +02:00
|
|
|
--- pathnames.h
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ pathnames.h 2021-04-27 07:41:53.192829973 +0000
|
2019-05-09 10:55:54 +02:00
|
|
|
@@ -83,7 +83,7 @@
|
|
|
|
# endif /* !_PATH_DOTLOGIN */
|
|
|
|
#endif /* sgi || OREO || cray || AMIX || CDC */
|
|
|
|
|
|
|
|
-#if (defined(_CRAYCOM) || defined(Lynx)) && !defined(_PATH_TCSHELL)
|
|
|
|
+#if (defined(_CRAYCOM) || defined(Lynx) || defined(linux)) && !defined(_PATH_TCSHELL)
|
|
|
|
# define _PATH_TCSHELL "/bin/tcsh" /* 1st class shell */
|
|
|
|
#endif /* _CRAYCOM && !_PATH_TCSHELL */
|
|
|
|
|
|
|
|
--- sh.c
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ sh.c 2021-04-27 07:41:53.192829973 +0000
|
2019-12-02 10:56:43 +01:00
|
|
|
@@ -1346,6 +1346,9 @@ main(int argc, char **argv)
|
2019-05-09 10:55:54 +02:00
|
|
|
setintr = osetintr;
|
|
|
|
parintr = oparintr;
|
|
|
|
}
|
|
|
|
+#ifndef USERLOGINFIRST
|
|
|
|
+# undef LOGINFIRST
|
|
|
|
+#endif
|
|
|
|
#ifdef LOGINFIRST
|
|
|
|
if (loginsh)
|
|
|
|
(void) srccat(varval(STRhome), STRsldotlogin);
|
|
|
|
--- tc.alloc.c
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ tc.alloc.c 2021-04-27 07:41:53.192829973 +0000
|
2019-05-09 10:55:54 +02:00
|
|
|
@@ -518,7 +518,7 @@ smalloc(size_t n)
|
|
|
|
{
|
|
|
|
ptr_t ptr;
|
|
|
|
|
|
|
|
- n = n ? n : 1;
|
|
|
|
+ n = n ? n+1 : 1;
|
|
|
|
|
|
|
|
#ifdef USE_SBRK
|
|
|
|
if (membot == NULL)
|
|
|
|
@@ -541,7 +541,7 @@ srealloc(ptr_t p, size_t n)
|
|
|
|
{
|
|
|
|
ptr_t ptr;
|
|
|
|
|
|
|
|
- n = n ? n : 1;
|
|
|
|
+ n = n ? n+1 : 1;
|
|
|
|
|
|
|
|
#ifdef USE_SBRK
|
|
|
|
if (membot == NULL)
|
|
|
|
@@ -565,7 +565,7 @@ scalloc(size_t s, size_t n)
|
|
|
|
ptr_t ptr;
|
|
|
|
|
|
|
|
n *= s;
|
|
|
|
- n = n ? n : 1;
|
|
|
|
+ n = n ? n+1 : 1;
|
|
|
|
|
|
|
|
#ifdef USE_SBRK
|
|
|
|
if (membot == NULL)
|
|
|
|
@@ -590,8 +590,10 @@ scalloc(size_t s, size_t n)
|
|
|
|
void
|
|
|
|
sfree(ptr_t p)
|
|
|
|
{
|
|
|
|
- if (p && !dont_free)
|
|
|
|
+ if (p && !dont_free) {
|
|
|
|
free(p);
|
|
|
|
+ p = (ptr_t)NULL;
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* SYSMALLOC */
|
|
|
|
--- tc.func.c
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ tc.func.c 2021-04-27 07:41:53.196829900 +0000
|
2022-01-11 16:23:18 +01:00
|
|
|
@@ -739,9 +739,13 @@ auto_lock(void)
|
2019-05-09 10:55:54 +02:00
|
|
|
handle_pending_signals();
|
|
|
|
errno = 0;
|
|
|
|
}
|
|
|
|
- if (spw != NULL) /* shadowed passwd */
|
|
|
|
+ if (spw != NULL) /* shadowed passwd */
|
|
|
|
srpp = spw->sp_pwdp;
|
|
|
|
+ else
|
|
|
|
+ srpp = pw->pw_passwd; /* nis extended passwd? */
|
|
|
|
}
|
|
|
|
+ endspent();
|
|
|
|
+ endpwent();
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2022-01-11 16:23:18 +01:00
|
|
|
@@ -1957,7 +1961,7 @@ getremotehost(int dest_fd)
|
2019-05-09 10:55:54 +02:00
|
|
|
* have not caught up yet.
|
|
|
|
*/
|
|
|
|
addr.s_addr = inet_addr(name);
|
|
|
|
- if (addr.s_addr != (unsigned int)~0)
|
|
|
|
+ if (addr.s_addr != ~0U)
|
|
|
|
host = name;
|
|
|
|
else {
|
|
|
|
if (sptr != name) {
|
|
|
|
--- tc.str.c
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ tc.str.c 2021-04-27 07:41:53.196829900 +0000
|
2019-05-09 10:55:54 +02:00
|
|
|
@@ -347,7 +347,7 @@ s_strlen(const Char *str)
|
|
|
|
{
|
|
|
|
size_t n;
|
|
|
|
|
|
|
|
- for (n = 0; *str++; n++)
|
|
|
|
+ for (n = 0; str && *str; n++, str++)
|
|
|
|
continue;
|
|
|
|
return (n);
|
|
|
|
}
|
|
|
|
--- tc.who.c
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ tc.who.c 2021-04-27 07:41:53.196829900 +0000
|
2019-05-09 10:55:54 +02:00
|
|
|
@@ -259,6 +259,9 @@ watch_login(int force)
|
|
|
|
}
|
|
|
|
stlast = sta.st_mtime;
|
|
|
|
#if defined(HAVE_GETUTENT) || defined(HAVE_GETUTXENT)
|
|
|
|
+# ifndef HAVE_UTMPX_H
|
|
|
|
+ utmpname( _PATH_UTMP );
|
|
|
|
+# endif
|
|
|
|
setutent();
|
|
|
|
#else
|
|
|
|
if ((utmpfd = xopen(TCSH_PATH_UTMP, O_RDONLY|O_LARGEFILE)) < 0) {
|
2022-12-05 16:14:29 +01:00
|
|
|
--- tcsh.man.in
|
|
|
|
+++ tcsh.man.in 2021-04-27 07:41:53.196829900 +0000
|
2022-12-13 08:35:27 +01:00
|
|
|
@@ -1012,7 +1012,7 @@ much like
|
2022-11-25 09:58:42 +01:00
|
|
|
.Ic history-search-backward
|
|
|
|
does.
|
|
|
|
.
|
|
|
|
-.It Ic delete-char No (not bound)
|
|
|
|
+.It Ic delete-char \fR(bound to `Del' if using the standard \fI/etc/csh.cshrc\fR)
|
2019-05-09 10:55:54 +02:00
|
|
|
Deletes the character under the cursor.
|
2022-11-25 09:58:42 +01:00
|
|
|
See also
|
|
|
|
.Ic delete-char-or-list-or-eof .
|
2019-05-09 10:55:54 +02:00
|
|
|
--- tw.h
|
2021-05-28 11:21:06 +02:00
|
|
|
+++ tw.h 2021-04-27 07:41:53.196829900 +0000
|
2019-05-09 10:55:54 +02:00
|
|
|
@@ -32,6 +32,10 @@
|
|
|
|
#ifndef _h_tw
|
|
|
|
#define _h_tw
|
|
|
|
|
|
|
|
+#ifndef _h_sh
|
|
|
|
+# include "sh.h"
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#define TW_PATH 0x1000
|
|
|
|
#define TW_ZERO 0x0fff
|
|
|
|
|