1da2e3ebdSchin /***********************************************************************
2da2e3ebdSchin * *
3da2e3ebdSchin * This software is part of the ast package *
4*3e14f97fSRoger A. Faulkner * Copyright (c) 1982-2010 AT&T Intellectual Property *
5da2e3ebdSchin * and is licensed under the *
6da2e3ebdSchin * Common Public License, Version 1.0 *
77c2fbfb3SApril Chin * by AT&T Intellectual Property *
8da2e3ebdSchin * *
9da2e3ebdSchin * A copy of the License is available at *
10da2e3ebdSchin * http://www.opensource.org/licenses/cpl1.0.txt *
11da2e3ebdSchin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
12da2e3ebdSchin * *
13da2e3ebdSchin * Information and Software Systems Research *
14da2e3ebdSchin * AT&T Research *
15da2e3ebdSchin * Florham Park NJ *
16da2e3ebdSchin * *
17da2e3ebdSchin * David Korn <dgk@research.att.com> *
18da2e3ebdSchin * *
19da2e3ebdSchin ***********************************************************************/
20da2e3ebdSchin #pragma prototyped
21da2e3ebdSchin
22da2e3ebdSchin #include <shell.h>
23da2e3ebdSchin
247c2fbfb3SApril Chin #include "FEATURE/externs"
257c2fbfb3SApril Chin
267c2fbfb3SApril Chin #if defined(__sun) && _sys_mman && _lib_memcntl && defined(MHA_MAPSIZE_STACK) && defined(MC_HAT_ADVISE)
277c2fbfb3SApril Chin # undef VM_FLAGS /* solaris vs vmalloc.h symbol clash */
287c2fbfb3SApril Chin # include <sys/mman.h>
297c2fbfb3SApril Chin #else
307c2fbfb3SApril Chin # undef _lib_memcntl
317c2fbfb3SApril Chin #endif
327c2fbfb3SApril Chin
33da2e3ebdSchin typedef int (*Shnote_f)(int, long, int);
34da2e3ebdSchin
main(int argc,char * argv[])35da2e3ebdSchin int main(int argc, char *argv[])
36da2e3ebdSchin {
377c2fbfb3SApril Chin #if _lib_memcntl
387c2fbfb3SApril Chin /* advise larger stack size */
397c2fbfb3SApril Chin struct memcntl_mha mha;
407c2fbfb3SApril Chin mha.mha_cmd = MHA_MAPSIZE_STACK;
417c2fbfb3SApril Chin mha.mha_flags = 0;
427c2fbfb3SApril Chin mha.mha_pagesize = 64 * 1024;
437c2fbfb3SApril Chin (void)memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t)&mha, 0, 0);
447c2fbfb3SApril Chin #endif
45da2e3ebdSchin sh_waitnotify((Shnote_f)0);
467c2fbfb3SApril Chin return(sh_main(argc, argv, (Shinit_f)0));
47da2e3ebdSchin }
48