diff --git a/aclocal.m4 b/aclocal.m4 index 03f3ac4..039656f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 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 ------------------------------------------------------------ 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 Currently tests for: 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 incorperated in this test. AC_DEFUN(KSH_OS_TYPE, @@ -797,7 +815,7 @@ AC_DEFUN(KSH_OS_TYPE, [ ksh_cv_os_type=no # Some tests below add -C to 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 #(( AIX) AC_EGREP_CPP(yes, @@ -874,6 +892,10 @@ yes #endif ], ksh_cv_os_type=$i) ;; #( + Interix) + AC_EGREP_CPP(INTERIX_H, + [#include ], ksh_cv_os_type=$i)dnl + ;; #( esac #)) test $ksh_cv_os_type != no && break done @@ -882,6 +904,9 @@ yes AIX) AC_DEFINE(_ALL_SOURCE)dnl ;; #( + Interix) + AC_DEFINE(_ALL_SOURCE)dnl + ;; #( ISC) AC_DEFINE(OS_ISC)dnl ;; #( diff --git a/chvt.c b/chvt.c index 7e683e8..079e629 100644 --- a/chvt.c +++ b/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 @@ -24,11 +24,12 @@ #include #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 * chvt(char *f) { +#ifdef HAVE_SETSID #ifdef TIOCSCTTY int fd; @@ -68,4 +69,7 @@ chvt(char *f) #else return "ioctl - TIOCSCTTY not implemented"; #endif +#else + return "setsid not implemented"; +#endif } diff --git a/config.h b/config.h index 56de7b7..f941d11 100644 --- a/config.h +++ b/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 $ */ /* @@ -254,6 +254,9 @@ /* Define if you have the setrlimit function. */ #define HAVE_SETRLIMIT 1 +/* Define if you have the setsid function. */ +#define HAVE_SETSID 1 + /* Define if you have the sigsetjmp function. */ #define HAVE_SIGSETJMP 1 diff --git a/configure.in b/configure.in index c859aa1..da4ec98 100644 --- a/configure.in +++ b/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 Process this file with autoconf to produce a configure script dnl @@ -7,13 +7,6 @@ test -s config.h.in || sed -e 's!^/\* #undef \(.*\) \*/!#undef \1!' \ -e 's!^#define \(.*\) 1!#undef \1!' config.h.in AC_CONFIG_HEADER(config.h) dnl -dnl This could be Interix/SFU -dnl -case $INTERIX_ROOT:$MIROS in -*:) CPPFLAGS="$CPPFLAGS -DINTERIX -D_ALL_SOURCE" - ;; -esac -dnl dnl dnl Start of auto-configuration stuff... dnl @@ -77,9 +70,9 @@ KSH_MEMMOVE KSH_MEMSET AC_CHECK_FUNCS(arc4random arc4random_addrandom arc4random_push confstr \ dup2 flock getcwd getgroups getpagesize getrusage getwd killpg \ - mkstemp nice random revoke setrlimit srandom strcasecmp strerror \ - strlcat strlcpy strstr sysconf tcsetpgrp ulimit valloc wait3 \ - waitpid) + mkstemp nice random revoke setrlimit setsid srandom strcasecmp \ + strerror strlcat strlcpy strstr sysconf tcsetpgrp ulimit valloc \ + wait3 waitpid) AC_CHECK_FUNCS(sigsetjmp _setjmp, break) AC_FUNC_MMAP KSH_FUNC_LSTAT