Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ksh Remove ancient cygwin support in ksh(1)
details: https://anonhg.NetBSD.org/src/rev/821bf821eb02
branches: trunk
changeset: 354587:821bf821eb02
user: kamil <kamil%NetBSD.org@localhost>
date: Thu Jun 22 13:32:04 2017 +0000
description:
Remove ancient cygwin support in ksh(1)
OK by <kre>
diffstat:
bin/ksh/c_ksh.c | 13 ++-----------
bin/ksh/edit.c | 9 ++-------
bin/ksh/path.c | 16 +++++-----------
bin/ksh/sh.h | 10 ++--------
4 files changed, 11 insertions(+), 37 deletions(-)
diffs (150 lines):
diff -r 7bb32007dc9d -r 821bf821eb02 bin/ksh/c_ksh.c
--- a/bin/ksh/c_ksh.c Thu Jun 22 13:21:21 2017 +0000
+++ b/bin/ksh/c_ksh.c Thu Jun 22 13:32:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_ksh.c,v 1.18 2011/10/16 17:12:11 joerg Exp $ */
+/* $NetBSD: c_ksh.c,v 1.19 2017/06/22 13:32:04 kamil Exp $ */
/*
* built-in Korn commands: c_*
@@ -6,17 +6,13 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.18 2011/10/16 17:12:11 joerg Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.19 2017/06/22 13:32:04 kamil Exp $");
#endif
#include "sh.h"
#include "ksh_stat.h"
#include <ctype.h>
-#ifdef __CYGWIN__
-#include <sys/cygwin.h>
-#endif /* __CYGWIN__ */
-
int
c_cd(wp)
char **wp;
@@ -162,12 +158,7 @@
/* Set PWD */
if (pwd) {
-#ifdef __CYGWIN__
- char ptmp[PATH]; /* larger than MAX_PATH */
- cygwin_conv_to_full_posix_path(pwd, ptmp);
-#else /* __CYGWIN__ */
char *ptmp = pwd;
-#endif /* __CYGWIN__ */
set_current_wd(ptmp);
/* Ignore failure (happens if readonly or integer) */
setstr(pwd_s, ptmp, KSH_RETURN_ERROR);
diff -r 7bb32007dc9d -r 821bf821eb02 bin/ksh/edit.c
--- a/bin/ksh/edit.c Thu Jun 22 13:21:21 2017 +0000
+++ b/bin/ksh/edit.c Thu Jun 22 13:32:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: edit.c,v 1.25 2010/06/05 03:02:37 sjg Exp $ */
+/* $NetBSD: edit.c,v 1.26 2017/06/22 13:32:04 kamil Exp $ */
/*
* Command line editing - common code
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: edit.c,v 1.25 2010/06/05 03:02:37 sjg Exp $");
+__RCSID("$NetBSD: edit.c,v 1.26 2017/06/22 13:32:04 kamil Exp $");
#endif
@@ -293,11 +293,6 @@
set_tty(tty_fd, &cb, TF_WAIT);
-#ifdef __CYGWIN__
- if (edchars.eof == '\0')
- edchars.eof = '\4';
-#endif /* __CYGWIN__ */
-
/* Convert unset values to internal `unset' value */
if (edchars.erase == vdisable_c)
edchars.erase = -1;
diff -r 7bb32007dc9d -r 821bf821eb02 bin/ksh/path.c
--- a/bin/ksh/path.c Thu Jun 22 13:21:21 2017 +0000
+++ b/bin/ksh/path.c Thu Jun 22 13:32:04 2017 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: path.c,v 1.8 2009/04/25 05:11:37 lukem Exp $ */
+/* $NetBSD: path.c,v 1.9 2017/06/22 13:32:04 kamil Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: path.c,v 1.8 2009/04/25 05:11:37 lukem Exp $");
+__RCSID("$NetBSD: path.c,v 1.9 2017/06/22 13:32:04 kamil Exp $");
#endif
@@ -130,10 +130,10 @@
if ((isrooted = ISROOTEDPATH(pathx)))
very_start++;
-#if defined (OS2) || defined (__CYGWIN__)
+#if defined (OS2)
if (pathx[0] && pathx[1] == ':') /* skip a: */
very_start += 2;
-#endif /* OS2 || __CYGWIN__ */
+#endif /* OS2 */
/* Before After
* /foo/ /foo
@@ -143,19 +143,13 @@
* .. ..
* ./foo foo
* foo/../../../bar ../../bar
- * OS2 and CYGWIN:
+ * OS2:
* a:/foo/../.. a:/
* a:. a:
* a:.. a:..
* a:foo/../../blah a:../blah
*/
-#ifdef __CYGWIN__
- /* preserve leading double-slash on pathnames (for UNC paths) */
- if (pathx[0] && ISDIRSEP(pathx[0]) && pathx[1] && ISDIRSEP(pathx[1]))
- very_start++;
-#endif /* __CYGWIN__ */
-
for (cur = t = start = very_start; ; ) {
/* treat multiple '/'s as one '/' */
while (ISDIRSEP(*t))
diff -r 7bb32007dc9d -r 821bf821eb02 bin/ksh/sh.h
--- a/bin/ksh/sh.h Thu Jun 22 13:21:21 2017 +0000
+++ b/bin/ksh/sh.h Thu Jun 22 13:32:04 2017 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: sh.h,v 1.7 2005/06/26 19:09:00 christos Exp $ */
+/* $NetBSD: sh.h,v 1.8 2017/06/22 13:32:04 kamil Exp $ */
/*
* Public Domain Bourne/Korn shell
*/
-/* $Id: sh.h,v 1.7 2005/06/26 19:09:00 christos Exp $ */
+/* $Id: sh.h,v 1.8 2017/06/22 13:32:04 kamil Exp $ */
#include "config.h" /* system and option configuration info */
@@ -323,14 +323,8 @@
# define DIRSEP '/'
# define DIRSEPSTR "/"
# define ISDIRSEP(c) ((c) == '/')
-#ifdef __CYGWIN__
-# define ISABSPATH(s) \
- (((s)[0] && (s)[1] == ':' && ISDIRSEP((s)[2])) || ISDIRSEP((s)[0]))
-# define ISRELPATH(s) (!(s)[0] || ((s)[1] != ':' && !ISDIRSEP((s)[0])))
-#else /* __CYGWIN__ */
# define ISABSPATH(s) ISDIRSEP((s)[0])
# define ISRELPATH(s) (!ISABSPATH(s))
-#endif /* __CYGWIN__ */
# define ISROOTEDPATH(s) ISABSPATH(s)
# define FILECHCONV(c) c
# define FILECMP(s1, s2) strcmp(s1, s2)
Home |
Main Index |
Thread Index |
Old Index