* better check for interix
* fail chvt() if no setsid()
This commit is contained in:
parent
44abfaee70
commit
2d1261b883
33
aclocal.m4
vendored
33
aclocal.m4
vendored
@ -1,6 +1,24 @@
|
|||||||
dnl $MirBSD: aclocal.m4,v 1.10 2004/10/28 11:53:39 tg Exp $
|
dnl $MirBSD: aclocal.m4,v 1.11 2004/12/10 15:01:05 tg Exp $
|
||||||
|
dnl-
|
||||||
|
dnl Copyright (c) 2004
|
||||||
|
dnl Thorsten "mirabile" Glaser <tg@66h.42h.de>
|
||||||
dnl
|
dnl
|
||||||
dnl Copyright (c) 2004 Thorsten Glaser
|
dnl Licensee is hereby permitted to deal in this work without restric-
|
||||||
|
dnl tion, including unlimited rights to use, publicly perform, modify,
|
||||||
|
dnl merge, distribute, sell, give away or sublicence, provided all co-
|
||||||
|
dnl pyright notices above, these terms and the disclaimer are retained
|
||||||
|
dnl in all redistributions or reproduced in accompanying documentation
|
||||||
|
dnl or other materials provided with binary redistributions.
|
||||||
|
dnl
|
||||||
|
dnl Licensor hereby provides this work "AS IS" and WITHOUT WARRANTY of
|
||||||
|
dnl any kind, expressed or implied, to the maximum extent permitted by
|
||||||
|
dnl applicable law, but with the warranty of being written without ma-
|
||||||
|
dnl licious intent or gross negligence; in no event shall licensor, an
|
||||||
|
dnl author or contributor be held liable for any damage, direct, indi-
|
||||||
|
dnl rect or other, however caused, arising in any way out of the usage
|
||||||
|
dnl of this work, even if advised of the possibility of such damage.
|
||||||
|
dnl-
|
||||||
|
dnl Based upon code by:
|
||||||
dnl Copyright (C) 1996, Memorial University of Newfoundland.
|
dnl Copyright (C) 1996, Memorial University of Newfoundland.
|
||||||
dnl ------------------------------------------------------------
|
dnl ------------------------------------------------------------
|
||||||
dnl
|
dnl
|
||||||
@ -786,7 +804,7 @@ dnl Several OSes need to be detected and symbols defined so the shell can
|
|||||||
dnl deal with them. This is a bit kludgy, but...
|
dnl deal with them. This is a bit kludgy, but...
|
||||||
dnl Currently tests for:
|
dnl Currently tests for:
|
||||||
dnl AIX, ISC (Interactive systems corp), MINIX, OS2 using EMX library,
|
dnl AIX, ISC (Interactive systems corp), MINIX, OS2 using EMX library,
|
||||||
dnl SCO (santa cruz operation), NEXT
|
dnl SCO (santa cruz operation), NEXT, Interix/MS Services for Unix
|
||||||
dnl DO NOT USE with AC_AIX, AC_MINIX or AC_ISC_POSIX tests as these are
|
dnl DO NOT USE with AC_AIX, AC_MINIX or AC_ISC_POSIX tests as these are
|
||||||
dnl incorperated in this test.
|
dnl incorperated in this test.
|
||||||
AC_DEFUN(KSH_OS_TYPE,
|
AC_DEFUN(KSH_OS_TYPE,
|
||||||
@ -797,7 +815,7 @@ AC_DEFUN(KSH_OS_TYPE,
|
|||||||
[ ksh_cv_os_type=no
|
[ ksh_cv_os_type=no
|
||||||
# Some tests below add -C to CPPFLAGS
|
# Some tests below add -C to CPPFLAGS
|
||||||
saveCPPFLAGS="$CPPFLAGS"
|
saveCPPFLAGS="$CPPFLAGS"
|
||||||
for i in AIX ISC MINIX SCO OS2_EMX TITANOS NEXT HPUX; do
|
for i in AIX ISC MINIX SCO OS2_EMX TITANOS NEXT HPUX Interix; do
|
||||||
case $i in #((
|
case $i in #((
|
||||||
AIX)
|
AIX)
|
||||||
AC_EGREP_CPP(yes,
|
AC_EGREP_CPP(yes,
|
||||||
@ -874,6 +892,10 @@ yes
|
|||||||
#endif
|
#endif
|
||||||
], ksh_cv_os_type=$i)
|
], ksh_cv_os_type=$i)
|
||||||
;; #(
|
;; #(
|
||||||
|
Interix)
|
||||||
|
AC_EGREP_CPP(INTERIX_H,
|
||||||
|
[#include <interix/interix.h>], ksh_cv_os_type=$i)dnl
|
||||||
|
;; #(
|
||||||
esac #))
|
esac #))
|
||||||
test $ksh_cv_os_type != no && break
|
test $ksh_cv_os_type != no && break
|
||||||
done
|
done
|
||||||
@ -882,6 +904,9 @@ yes
|
|||||||
AIX)
|
AIX)
|
||||||
AC_DEFINE(_ALL_SOURCE)dnl
|
AC_DEFINE(_ALL_SOURCE)dnl
|
||||||
;; #(
|
;; #(
|
||||||
|
Interix)
|
||||||
|
AC_DEFINE(_ALL_SOURCE)dnl
|
||||||
|
;; #(
|
||||||
ISC)
|
ISC)
|
||||||
AC_DEFINE(OS_ISC)dnl
|
AC_DEFINE(OS_ISC)dnl
|
||||||
;; #(
|
;; #(
|
||||||
|
8
chvt.c
8
chvt.c
@ -1,4 +1,4 @@
|
|||||||
/** $MirBSD: chvt.c,v 1.5 2004/12/09 23:25:17 tg Exp $ */
|
/** $MirBSD: chvt.c,v 1.6 2004/12/10 15:01:05 tg Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2004
|
* Copyright (c) 2004
|
||||||
@ -24,11 +24,12 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "ksh_stat.h"
|
#include "ksh_stat.h"
|
||||||
|
|
||||||
__RCSID("$MirBSD: chvt.c,v 1.5 2004/12/09 23:25:17 tg Exp $");
|
__RCSID("$MirBSD: chvt.c,v 1.6 2004/12/10 15:01:05 tg Exp $");
|
||||||
|
|
||||||
char *
|
char *
|
||||||
chvt(char *f)
|
chvt(char *f)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_SETSID
|
||||||
#ifdef TIOCSCTTY
|
#ifdef TIOCSCTTY
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -68,4 +69,7 @@ chvt(char *f)
|
|||||||
#else
|
#else
|
||||||
return "ioctl - TIOCSCTTY not implemented";
|
return "ioctl - TIOCSCTTY not implemented";
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
return "setsid not implemented";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
5
config.h
5
config.h
@ -1,4 +1,4 @@
|
|||||||
/** $MirBSD: config.h,v 1.14 2004/12/09 23:23:29 tg Exp $ */
|
/** $MirBSD: config.h,v 1.15 2004/12/10 15:01:05 tg Exp $ */
|
||||||
/* $OpenBSD: config.h,v 1.9 2003/10/22 07:40:38 jmc Exp $ */
|
/* $OpenBSD: config.h,v 1.9 2003/10/22 07:40:38 jmc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -254,6 +254,9 @@
|
|||||||
/* Define if you have the setrlimit function. */
|
/* Define if you have the setrlimit function. */
|
||||||
#define HAVE_SETRLIMIT 1
|
#define HAVE_SETRLIMIT 1
|
||||||
|
|
||||||
|
/* Define if you have the setsid function. */
|
||||||
|
#define HAVE_SETSID 1
|
||||||
|
|
||||||
/* Define if you have the sigsetjmp function. */
|
/* Define if you have the sigsetjmp function. */
|
||||||
#define HAVE_SIGSETJMP 1
|
#define HAVE_SIGSETJMP 1
|
||||||
|
|
||||||
|
15
configure.in
15
configure.in
@ -1,4 +1,4 @@
|
|||||||
dnl $MirBSD: configure.in,v 1.9 2004/12/09 23:23:29 tg Exp $
|
dnl $MirBSD: configure.in,v 1.10 2004/12/10 15:01:05 tg Exp $
|
||||||
dnl
|
dnl
|
||||||
dnl Process this file with autoconf to produce a configure script
|
dnl Process this file with autoconf to produce a configure script
|
||||||
dnl
|
dnl
|
||||||
@ -7,13 +7,6 @@ test -s config.h.in || sed -e 's!^/\* #undef \(.*\) \*/!#undef \1!' \
|
|||||||
-e 's!^#define \(.*\) 1!#undef \1!' <config.h >config.h.in
|
-e 's!^#define \(.*\) 1!#undef \1!' <config.h >config.h.in
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
dnl
|
dnl
|
||||||
dnl This could be Interix/SFU
|
|
||||||
dnl
|
|
||||||
case $INTERIX_ROOT:$MIROS in
|
|
||||||
*:) CPPFLAGS="$CPPFLAGS -DINTERIX -D_ALL_SOURCE"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
dnl
|
|
||||||
dnl
|
dnl
|
||||||
dnl Start of auto-configuration stuff...
|
dnl Start of auto-configuration stuff...
|
||||||
dnl
|
dnl
|
||||||
@ -77,9 +70,9 @@ KSH_MEMMOVE
|
|||||||
KSH_MEMSET
|
KSH_MEMSET
|
||||||
AC_CHECK_FUNCS(arc4random arc4random_addrandom arc4random_push confstr \
|
AC_CHECK_FUNCS(arc4random arc4random_addrandom arc4random_push confstr \
|
||||||
dup2 flock getcwd getgroups getpagesize getrusage getwd killpg \
|
dup2 flock getcwd getgroups getpagesize getrusage getwd killpg \
|
||||||
mkstemp nice random revoke setrlimit srandom strcasecmp strerror \
|
mkstemp nice random revoke setrlimit setsid srandom strcasecmp \
|
||||||
strlcat strlcpy strstr sysconf tcsetpgrp ulimit valloc wait3 \
|
strerror strlcat strlcpy strstr sysconf tcsetpgrp ulimit valloc \
|
||||||
waitpid)
|
wait3 waitpid)
|
||||||
AC_CHECK_FUNCS(sigsetjmp _setjmp, break)
|
AC_CHECK_FUNCS(sigsetjmp _setjmp, break)
|
||||||
AC_FUNC_MMAP
|
AC_FUNC_MMAP
|
||||||
KSH_FUNC_LSTAT
|
KSH_FUNC_LSTAT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user