dvander@353: /* dvander@353: * Things needed to compile under linux. dvander@353: * dvander@353: * Should be reworked totally to use GNU's 'configure' dvander@353: */ dvander@353: #ifndef SCLINUX_H dvander@353: #define SCLINUX_H dvander@353: dvander@353: /* getchar() is not a 'cool' replacement for MSDOS getch: Linux/unix depends on the features activated or not about the dvander@353: * controlling terminal's tty. This means that ioctl(2) calls must be performed, for instance to have the controlling dvander@353: * terminal tty's in 'raw' mode, if we want to be able to fetch a single character. This also means that everything must dvander@353: * be put back correctly when the function ends. See GETCH.C for an implementation. dvander@353: * dvander@353: * For interactive use of SRUN/SDBG if would be much better to use GNU's readline package: the user would be able to dvander@353: * have a complete emacs/vi like line editing system. dvander@353: */ dvander@353: #include "getch.h" dvander@353: dvander@353: #define stricmp(a,b) strcasecmp(a,b) dvander@353: #define strnicmp(a,b,c) strncasecmp(a,b,c) dvander@353: dvander@353: /* dvander@353: * WinWorld wants '\'. Unices do not. dvander@353: */ dvander@353: #define DIRECTORY_SEP_CHAR '/' dvander@353: #define DIRECTORY_SEP_STR "/" dvander@353: dvander@353: /* dvander@353: * SC assumes that a computer is Little Endian unless told otherwise. It uses dvander@353: * (and defines) the macros BYTE_ORDER and BIG_ENDIAN. dvander@353: * For Linux, we must overrule these settings with those defined in glibc. dvander@353: */ dvander@353: #if !defined __BYTE_ORDER dvander@353: # include dvander@353: #endif dvander@353: dvander@353: #if defined __OpenBSD__ || defined __FreeBSD__ dvander@353: # define __BYTE_ORDER BYTE_ORDER dvander@353: # define __LITTLE_ENDIAN LITTLE_ENDIAN dvander@353: # define __BIG_ENDIAN BIG_ENDIAN dvander@353: #endif dvander@353: dvander@353: #if !defined __BYTE_ORDER dvander@353: # error "Can't figure computer byte order (__BYTE_ORDER macro not found)" dvander@353: #endif dvander@353: dvander@353: #endif /* SCLINUX_H */