first step for GNU/Cygwin support
This commit is contained in:
parent
c4629baed6
commit
37d4f1e874
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.8 2005/05/23 16:23:18 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.9 2005/06/24 15:36:57 tg Exp $ */
|
||||
/* $OpenBSD: history.c,v 1.30 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: trap.c,v 1.22 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.8 2005/05/23 16:23:18 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.9 2005/06/24 15:36:57 tg Exp $");
|
||||
|
||||
static int histfd;
|
||||
static int hsize;
|
||||
@ -41,7 +41,7 @@ static Source *hist_source;
|
||||
#elif defined(__INTERIX)
|
||||
#define mksh_signame(x) _sys_signame[(x)]
|
||||
#define mksh_siglist(x) _sys_siglist[(x)]
|
||||
#elif defined(__gnu_linux__) || defined(__sun__)
|
||||
#elif defined(__gnu_linux__) || defined(__sun__) || defined(__CYGWIN__)
|
||||
#define NEED_MKSH_SIGNAME
|
||||
#define mksh_siglist(x) strerror(x)
|
||||
#else
|
||||
|
6
main.c
6
main.c
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/main.c,v 1.14 2005/06/08 22:35:45 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/main.c,v 1.15 2005/06/24 15:36:57 tg Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.38 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: io.c,v 1.21 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
@ -13,7 +13,7 @@
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.14 2005/06/08 22:35:45 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.15 2005/06/24 15:36:57 tg Exp $");
|
||||
|
||||
const char ksh_version[] = "@(#)MIRBSD KSH R23 2005/06/08";
|
||||
|
||||
@ -123,6 +123,7 @@ main(int argc, char *argv[])
|
||||
init_histvec();
|
||||
|
||||
def_path = _PATH_DEFPATH;
|
||||
#if !defined(__CYGWIN__)
|
||||
{
|
||||
size_t len;
|
||||
char *new;
|
||||
@ -132,6 +133,7 @@ main(int argc, char *argv[])
|
||||
def_path = new;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set PATH to def_path (will set the path global variable).
|
||||
* (import of environment below will probably change this setting).
|
||||
|
6
sh.h
6
sh.h
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/sh.h,v 1.11 2005/06/08 21:51:22 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/sh.h,v 1.12 2005/06/24 15:36:57 tg Exp $ */
|
||||
/* $OpenBSD: sh.h,v 1.27 2005/03/28 21:33:04 deraadt Exp $ */
|
||||
/* $OpenBSD: shf.h,v 1.5 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: table.h,v 1.6 2004/12/18 20:55:52 millert Exp $ */
|
||||
@ -239,7 +239,7 @@ struct temp {
|
||||
#define shl_out (&shf_iob[2])
|
||||
EXTERN int shl_stdout_ok;
|
||||
|
||||
#ifdef __sun__
|
||||
#if defined(__sun__) || defined(__CYGWIN__)
|
||||
typedef void (*sig_t)(int);
|
||||
#endif
|
||||
|
||||
@ -1315,7 +1315,7 @@ size_t confstr(int, char *, size_t);
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM
|
||||
#if defined(__gnu_linux__) || defined(__INTERIX) || defined(__sun__) \
|
||||
|| defined(__NetBSD__)
|
||||
|| defined(__NetBSD__) || defined(__CYGWIN__)
|
||||
#define HAVE_ARC4RANDOM 0
|
||||
#else
|
||||
#define HAVE_ARC4RANDOM 1
|
||||
|
Loading…
Reference in New Issue
Block a user