blob: d77e23370cc18a63b312cbe9380877628595f01d [file] [log] [blame] [raw]
/*
* reboot.h Headerfile that defines how to handle
* the reboot() system call.
*
* Version: @(#)reboot.h 2.85-17 04-Jun-2004 miquels@cistron.nl
*
*/
#if defined __CYGWIN__ || defined __INTERIX
#warning "This system doesn't support reboot system call"
#define init_reboot(magic)
#else
#include <sys/reboot.h>
#ifdef RB_ENABLE_CAD
# define BMAGIC_HARD RB_ENABLE_CAD
#endif
#ifdef RB_DISABLE_CAD
# define BMAGIC_SOFT RB_DISABLE_CAD
#endif
#ifdef RB_HALT_SYSTEM
# define BMAGIC_HALT RB_HALT_SYSTEM
#else
# define BMAGIC_HALT RB_HALT
#endif
#define BMAGIC_REBOOT RB_AUTOBOOT
#ifdef RB_POWER_OFF
# define BMAGIC_POWEROFF RB_POWER_OFF
#elif defined(RB_POWEROFF)
# define BMAGIC_POWEROFF RB_POWEROFF
#else
# define BMAGIC_POWEROFF BMAGIC_HALT
#endif
#ifdef RB_KEXEC
# define BMAGIC_KEXEC RB_KEXEC
#endif
#if defined __sun || defined __NetBSD__ || defined _AIX
#define init_reboot(magic) reboot(magic,NULL)
#else
#define init_reboot(magic) reboot(magic)
#endif
#if defined _AIX && !defined reboot
#ifndef RB_AUTOBOOT
#define RB_AUTOBOOT RB_SOFTIPL
#endif
extern int reboot(int, void *);
#endif
#endif