/* $Progeny: busybox.h,v 1.18 2002/04/19 18:20:43 branden Exp $ */

/******************************************************************************
 * Applications */

/* Common */
#define BB_CHROOT
#define BB_SLEEP
#define BB_SYSLOGD
#define BB_TEE

#if defined(__i386__)
#define BB_INSMOD
#endif

#ifdef PGI_LIVE_FS
#define BB_BASENAME
#define BB_CHVT
#define BB_CLEAR
#define BB_DATE
#define BB_DC
#define BB_DEALLOCVT
#define BB_DIRNAME
#define BB_DMESG
#define BB_DUTMP
#define BB_DUMPKMAP
#define BB_ECHO
#define BB_EXPR
#define BB_FBSET
#define BB_FDFLUSH
#define BB_FIND
#define BB_FREE
#define BB_FREERAMDISK
#define BB_FSCK_MINIX
#define BB_GETOPT
#define BB_HALT
#define BB_HOSTID
#define BB_HOSTNAME
#define BB_ID
#define BB_LENGTH
#define BB_LOADACM
#define BB_LOADFONT
#define BB_LOADKMAP
#define BB_LOGGER
#define BB_LOGNAME
#define BB_LSMOD
#define BB_MAKEDEVS
#define BB_MD5SUM
#define BB_MKFS_MINIX
#define BB_MKSWAP
#define BB_MORE
#define BB_MT
#define BB_POWEROFF
#define BB_PRINTF
#define BB_PWD
#define BB_RDATE
#define BB_REBOOT
#define BB_RENICE
#define BB_RESET
#define BB_RMMOD
#define BB_SETKEYCODES
#define BB_TEST
#define BB_TELNET
#define BB_TRUE_FALSE
#define BB_TTY
#define BB_UNRPM
#define BB_UPTIME
#define BB_USLEEP
#define BB_WHOAMI
#define BB_UUENCODE
#define BB_UUDECODE
#define BB_UNAME
#define BB_XARGS
#define BB_YES
#else
/* initrd only */
#define BB_AR
#define BB_CAT
#define BB_CUT
#define BB_GUNZIP
#define BB_GREP
#define BB_GZIP
#define BB_HEAD
#define BB_LN
#define BB_LS
#define BB_MORE
#define BB_MOUNT
#define BB_RM
#define BB_SWAPONOFF
#define BB_TAIL
#define BB_TAR
#define BB_UMOUNT
#endif

/******************************************************************************
 * Features */

/* Common */
#define BB_FEATURE_EXTRA_QUIET
#define BB_FEATURE_INSMOD_NEW_KERNEL
#define BB_FEATURE_KLOGD
#define BB_FEATURE_LINUXRC
#define BB_FEATURE_MOUNT_FORCE
#define BB_FEATURE_NFSMOUNT
#define BB_FEATURE_USE_PROCFS

#ifdef PGI_LIVE_FS
#define BB_FEATURE_AUTOWIDTH
#define BB_FEATURE_USE_TERMIOS
#endif

/******************************************************************************
 * Base stuff from busybox-${version}/Config.h.  If these guys had
 * half a clue this stuff would not be in Config.h and we could just
 * #include it.  Since they don't, we have to do the extra work of
 * keeping this up-to-date.
 */

#include <features.h>
#if defined __UCLIBC__ && ! defined __UCLIBC_HAS_MMU__
	#undef BB_RPM2CPIO		/* Uses gz_open(), which uses fork() */
	#undef BB_DPKG_DEB		/* Uses gz_open(), which uses fork() */
	#undef BB_ASH			/* Uses fork() */
	#undef BB_HUSH			/* Uses fork() */
	#undef BB_LASH			/* Uses fork() */
	#undef BB_INIT			/* Uses fork() */
	#undef BB_FEATURE_TAR_GZIP	/* Uses fork() */
	#undef BB_SYSLOGD		/* Uses daemon() */
	#undef BB_KLOGD			/* Uses daemon() */
	#undef BB_UPDATE		/* Uses daemon() */
#endif
#if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH
	#if defined BB_FEATURE_COMMAND_EDITING
		#define BB_CMDEDIT
	#else
		#undef BB_FEATURE_COMMAND_EDITING
		#undef BB_FEATURE_COMMAND_TAB_COMPLETION
		#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
		#undef BB_FEATURE_SH_FANCY_PROMPT
	#endif
#else
	#undef BB_FEATURE_SH_APPLETS_ALWAYS_WIN
	#undef BB_FEATURE_SH_STANDALONE_SHELL
	#undef BB_FEATURE_SH_FANCY_PROMPT
#endif
//
#ifdef BB_KILLALL
	#ifndef BB_KILL
		#define BB_KILL
	#endif
#endif
//
#ifndef BB_INIT
	#undef BB_FEATURE_LINUXRC
#endif
//
#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
	#define BB_NFSMOUNT
#endif
//
#if defined BB_FEATURE_AUTOWIDTH
	#ifndef BB_FEATURE_USE_TERMIOS
		#define BB_FEATURE_USE_TERMIOS
	#endif
#endif
//
#if defined BB_INSMOD || defined BB_LSMOD
	#if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
		#define BB_FEATURE_NEW_MODULE_INTERFACE
	#endif
#endif
//
#ifdef BB_UNIX2DOS
	#define BB_DOS2UNIX
#endif	
//
#ifdef BB_SYSLOGD
	#if defined BB_FEATURE_IPC_SYSLOG
		#define BB_LOGREAD
	#endif
#endif
//
#if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH
# define BB_SH
# define shell_main ash_main
#elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH
# define BB_SH
# define shell_main hush_main
#elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH
# define BB_SH
# define shell_main lash_main
#elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH
# define BB_SH
# define shell_main msh_main
#endif
