add MKSH_DEFAULT_TMPDIR
This commit is contained in:
parent
6e98fbe27b
commit
5abce90817
3
Build.sh
3
Build.sh
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.450 2010/03/30 13:29:03 tg Exp $'
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.451 2010/04/20 17:28:20 tg Exp $'
|
||||
#-
|
||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
# Thorsten Glaser <tg@mirbsd.org>
|
||||
@ -29,6 +29,7 @@ srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.450 2010/03/30 13:29:03 tg Exp $'
|
||||
# MKSH_CONSERVATIVE_FDS MKSH_MIDNIGHTBSD01ASH_COMPAT
|
||||
# MKSH_NOPWNAM MKSH_NO_LIMITS MKSH_SMALL MKSH_S_NOVI
|
||||
# MKSH_UNEMPLOYED MKSH_DEFAULT_EXECSHELL MKSHRC_PATH
|
||||
# MKSH_DEFAULT_TMPDIR
|
||||
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
8
main.c
8
main.c
@ -33,7 +33,7 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.163 2010/03/27 20:36:26 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.164 2010/04/20 17:28:20 tg Exp $");
|
||||
|
||||
extern char **environ;
|
||||
|
||||
@ -46,6 +46,10 @@ extern gid_t kshgid, kshegid;
|
||||
#define MKSHRC_PATH "~/.mkshrc"
|
||||
#endif
|
||||
|
||||
#ifndef MKSH_DEFAULT_TMPDIR
|
||||
#define MKSH_DEFAULT_TMPDIR "/tmp"
|
||||
#endif
|
||||
|
||||
static void reclaim(void);
|
||||
static void remove_temps(struct temp *);
|
||||
void chvt_reinit(void);
|
||||
@ -1247,7 +1251,7 @@ maketemp(Area *ap, Temp_type type, struct temp **tlist)
|
||||
char *pathname;
|
||||
const char *dir;
|
||||
|
||||
dir = tmpdir ? tmpdir : "/tmp";
|
||||
dir = tmpdir ? tmpdir : MKSH_DEFAULT_TMPDIR;
|
||||
#if HAVE_MKSTEMP
|
||||
len = strlen(dir) + 6 + 10 + 1;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user