Drop HP-UX support from ksh(1)

OK by <kre>
This commit is contained in:
kamil 2017-06-22 13:35:47 +00:00
parent 4ae20c97a6
commit 2f8869f916
4 changed files with 8 additions and 40 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: c_ksh.c,v 1.20 2017/06/22 13:33:39 kamil Exp $ */
/* $NetBSD: c_ksh.c,v 1.21 2017/06/22 13:35:47 kamil Exp $ */
/*
* built-in Korn commands: c_*
@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: c_ksh.c,v 1.20 2017/06/22 13:33:39 kamil Exp $");
__RCSID("$NetBSD: c_ksh.c,v 1.21 2017/06/22 13:35:47 kamil Exp $");
#endif
#include "sh.h"
@ -325,7 +325,7 @@ c_print(wp)
switch ((c = *s++)) {
/* Oddly enough, \007 seems more portable than
* \a (due to HP-UX cc, Ultrix cc, old pcc's,
* \a (due to Ultrix cc, old pcc's,
* etc.).
*/
case 'a': c = '\007'; break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: c_ulimit.c,v 1.12 2015/05/09 13:26:06 christos Exp $ */
/* $NetBSD: c_ulimit.c,v 1.13 2017/06/22 13:35:47 kamil Exp $ */
/*
ulimit -- handle "ulimit" builtin
@ -20,7 +20,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: c_ulimit.c,v 1.12 2015/05/09 13:26:06 christos Exp $");
__RCSID("$NetBSD: c_ulimit.c,v 1.13 2017/06/22 13:35:47 kamil Exp $");
#endif
@ -113,9 +113,6 @@ c_ulimit(wp)
# ifdef UL_GETBREAK /* osf/1 */
{ "vmemory(maxaddr)", ULIMIT, UL_GETBREAK, -1, 1, 'v' },
# else /* UL_GETBREAK */
# ifdef UL_GETMAXBRK /* hpux */
{ "vmemory(maxaddr)", ULIMIT, UL_GETMAXBRK, -1, 1, 'v' },
# endif /* UL_GETMAXBRK */
# endif /* UL_GETBREAK */
# endif /* UL_GMEMLIM */
#endif /* RLIMIT_VMEM */

View File

@ -1,4 +1,4 @@
/* $NetBSD: config.h,v 1.10 2017/06/22 13:34:48 kamil Exp $ */
/* $NetBSD: config.h,v 1.11 2017/06/22 13:35:47 kamil Exp $ */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
@ -194,10 +194,6 @@
#define DEFAULT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
#endif
/* Define if your C library's getwd/getcwd function dumps core in unreadable
* directories. */
/* #undef HPUX_GETWD_BUG */
/* Include ksh features? */
#define KSH 1

View File

@ -1,4 +1,4 @@
/* $NetBSD: misc.c,v 1.18 2017/06/22 13:33:39 kamil Exp $ */
/* $NetBSD: misc.c,v 1.19 2017/06/22 13:35:47 kamil Exp $ */
/*
* Miscellaneous functions
@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: misc.c,v 1.18 2017/06/22 13:33:39 kamil Exp $");
__RCSID("$NetBSD: misc.c,v 1.19 2017/06/22 13:35:47 kamil Exp $");
#endif
@ -1284,25 +1284,6 @@ reset_nonblock(fd)
# define MAXPATHLEN PATH
#endif /* MAXPATHLEN */
#ifdef HPUX_GETWD_BUG
# include "ksh_dir.h"
/*
* Work around bug in hpux 10.x C library - getwd/getcwd dump core
* if current directory is not readable. Done in macro 'cause code
* is needed in GETWD and GETCWD cases.
*/
# define HPUX_GETWD_BUG_CODE \
{ \
DIR *d = ksh_opendir("."); \
if (!d) \
return (char *) 0; \
closedir(d); \
}
#else /* HPUX_GETWD_BUG */
# define HPUX_GETWD_BUG_CODE
#endif /* HPUX_GETWD_BUG */
/* Like getcwd(), except bsize is ignored if buf is 0 (MAXPATHLEN is used) */
char *
ksh_get_wd(buf, bsize)
@ -1313,9 +1294,6 @@ ksh_get_wd(buf, bsize)
char *b;
char *ret;
/* Before memory allocated */
HPUX_GETWD_BUG_CODE
/* Assume getcwd() available */
if (!buf) {
bsize = MAXPATHLEN;
@ -1338,9 +1316,6 @@ ksh_get_wd(buf, bsize)
char *b;
int len;
/* Before memory allocated */
HPUX_GETWD_BUG_CODE
if (buf && bsize > MAXPATHLEN)
b = buf;
else