tcsh/tcsh-6.18.00.dif
2012-01-16 13:43:34 +00:00

246 lines
6.4 KiB
Plaintext

--- Makefile.in
+++ Makefile.in 2011-11-16 12:12:02.000000000 +0000
@@ -599,7 +599,6 @@ install: tcsh$(EXEEXT) install.catalogs
-mkdir -p ${DESTBIN}
-mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old
cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT)
- -strip ${DESTBIN}/tcsh$(EXEEXT)
chmod 755 ${DESTBIN}/tcsh$(EXEEXT)
install.catalogs:
--- config/linux
+++ config/linux 2011-11-16 12:15:09.000000000 +0000
@@ -132,4 +132,11 @@
# define POSIX
#endif
+#if !defined(PW_SHADOW)
+# define PW_SHADOW
+#endif
+#if !defined(SuSE)
+# define SuSE
+#endif
+
#endif /* _h_config */
--- config_f.h
+++ config_f.h 2011-11-16 12:17:18.000000000 +0000
@@ -37,7 +37,7 @@
*/
#ifndef _h_config_f
#define _h_config_f
-
+#include <features.h>
/*
* SHORT_STRINGS Use at least 16 bit characters instead of 8 bit chars
* This fixes up quoting problems and eases implementation
@@ -60,7 +60,12 @@
/*
* LOGINFIRST Source ~/.login before ~/.cshrc
*/
-#undef LOGINFIRST
+#define LOGINFIRST
+
+/*
+ * USERLOGINFIRST Source ~/.login before ~/.cshrc
+ */
+#undef USERLOGINFIRST
/*
* VIDEFAULT Make the VI mode editor the default
@@ -154,7 +159,7 @@
* 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 ?
@@ -177,7 +182,7 @@
* RCSID This defines if we want rcs strings in the binary or not
*
*/
-#if !defined(lint) && !defined(SABER) && !defined(__CLCC__)
+#if !defined(lint) && !defined(SABER) && !defined(__CLCC__) && !defined(__linux__)
# ifndef __GNUC__
# define RCSID(id) static char *rcsid = (id);
# else
--- configure
+++ configure 2011-11-16 10:49:20.000000000 +0000
@@ -3794,7 +3794,7 @@ return tgetent ();
return 0;
}
_ACEOF
-for ac_lib in '' termlib termcap curses ncurses; do
+for ac_lib in '' termlib termcap tinfo curses ncurses; do
if test -z "$ac_lib"; then
ac_res="none required"
else
--- configure.in
+++ configure.in 2011-11-16 10:49:09.000000000 +0000
@@ -298,7 +298,7 @@ fi
dnl Checks for libraries
AC_SEARCH_LIBS(crypt, crypt)
AC_SEARCH_LIBS(getspnam, sec)
-AC_SEARCH_LIBS(tgetent, termlib termcap curses ncurses)
+AC_SEARCH_LIBS(tgetent, termlib termcap tinfo curses ncurses)
AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(connect, socket)
AC_SEARCH_LIBS(catgets, catgets)
--- glob.h
+++ glob.h 2006-04-25 12:58:31.000000000 +0000
@@ -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 *);
--- pathnames.h
+++ pathnames.h 2006-04-25 12:58:31.000000000 +0000
@@ -84,7 +84,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
+++ sh.c 2010-12-10 16:10:45.000000000 +0000
@@ -1353,6 +1353,9 @@ main(int argc, char **argv)
setintr = osetintr;
parintr = oparintr;
}
+#ifndef USERLOGINFIRST
+# undef LOGINFIRST
+#endif
#ifdef LOGINFIRST
if (loginsh)
(void) srccat(varval(STRhome), STRsldotlogin);
--- tc.alloc.c
+++ tc.alloc.c 2006-04-25 12:58:31.000000000 +0000
@@ -489,7 +489,7 @@ smalloc(size_t n)
{
ptr_t ptr;
- n = n ? n : 1;
+ n = n ? n+1 : 1;
#ifdef HAVE_SBRK
if (membot == NULL)
@@ -512,7 +512,7 @@ srealloc(ptr_t p, size_t n)
{
ptr_t ptr;
- n = n ? n : 1;
+ n = n ? n+1 : 1;
#ifdef HAVE_SBRK
if (membot == NULL)
@@ -536,7 +536,7 @@ scalloc(size_t s, size_t n)
ptr_t ptr;
n *= s;
- n = n ? n : 1;
+ n = n ? n+1 : 1;
#ifdef HAVE_SBRK
if (membot == NULL)
@@ -561,8 +561,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
+++ tc.func.c 2007-07-13 11:15:03.000000000 +0000
@@ -689,9 +689,13 @@ auto_lock(void)
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
@@ -1905,7 +1909,7 @@ getremotehost(int dest_fd)
* 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
+++ tc.str.c 2006-04-25 12:58:31.000000000 +0000
@@ -336,7 +336,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
+++ tc.who.c 2012-01-16 09:55:14.275144702 +0000
@@ -277,6 +277,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) {
--- tcsh.man
+++ tcsh.man 2006-04-25 12:58:31.000000000 +0000
@@ -578,7 +578,7 @@ Repeating \fIdabbrev-expand\fR without a
changes to the next previous word etc., skipping identical matches
much like \fIhistory-search-backward\fR does.
.TP 8
-.B delete-char \fR(not bound)
+.B delete-char \fR(bound to `Del' if using the standard \fI/etc/csh.cshrc\fR)
Deletes the character under the cursor.
See also \fIdelete-char-or-list-or-eof\fR.
.TP 8
--- tw.h
+++ tw.h 2006-04-25 12:58:31.000000000 +0000
@@ -33,6 +33,10 @@
#ifndef _h_tw
#define _h_tw
+#ifndef _h_sh
+# include "sh.h"
+#endif
+
#define TW_PATH 0x1000
#define TW_ZERO 0x0fff