/************************************************************************
Realms of Aurealis James Rhone aka Vall of RoA
sysdep.h System dependant configuration
items. Based on conf.h settings.
******** Heavily modified and expanded ********
*** BE AWARE OF ALL RIGHTS AND RESERVATIONS ***
******** Heavily modified and expanded ********
All rights reserved henceforth.
Please note that no guarantees are associated with any code from
Realms of Aurealis. All code which has been released to the general
public has been done so with an 'as is' pretense. RoA is based on both
Diku and CircleMUD and ALL licenses from both *MUST* be adhered to as well
as the RoA license. *** Read, Learn, Understand, Improve ***
*************************************************************************/
#ifndef ROA_SYSDEP_H
#define ROA_SYSDEP_H
/* #define NOCRYPT */
/************************************************************************/
/*** Do not change anything below this line *****************************/
/************************************************************************/
/*
* Set up various machine-specific things based on the values determined
* from configure and conf.h.
*/
/* Standard C headers *************************************************/
#include <stdio.h>
#include <ctype.h>
#if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__))
#include <stdlib.h>
#include <string.h>
#else /* No standard headers. */
#ifdef HAVE_STRING_H
#include <string.h>
#else
#include <strings.h>
#endif
#ifdef HAVE_MEMORY_H
#include <memory.h>
#endif
extern void free ();
extern void abort (), exit ();
#endif /* Standard headers. */
/* POSIX compliance *************************************************/
#ifdef HAVE_UNISTD_H
# include <sys/types.h>
# include <unistd.h>
# include <sys/stat.h>
# ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
# endif
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */
#if defined (_POSIX_VERSION) && !defined (ultrix)
#define POSIX
#endif
#endif
/* Some systems define _POSIX_VERSION but are not really POSIX.1. */
#if (defined (butterfly) || defined (__arm) || \
(defined (__mips) && defined (_SYSTYPE_SVR3)) || \
(defined (sequent) && defined (i386)))
#undef POSIX
#endif
#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
#define POSIX
#endif
#if defined(_AIX)
#define POSIX_NONBLOCK_BROKEN
#endif
/* Header files *******************************************************/
# include <sys/time.h>
# include <time.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_ASSERT_H
#include <assert.h>
#else
#define assert(arg)
#endif
/* for DMALLOC stuff */
#include "dmalloc.h"
/* if we're not using dmalloc... 4/22/98 -jtrhone */
#ifndef DMALLOC_DISABLE
#undef strdup
#define strdup(str)\
_xstrdup_leap(__FILE__, __LINE__, str)
#endif /* DMALLOC_DISABLE */
#define str_dup strdup
/* Function prototypes ************************************************/
/*
* For reasons that perplex me, the header files of many OS's do not contain
* function prototypes for the standard C library functions. This produces
* annoying warning messages (sometimes, a huge number of them) on such OS's
* when compiling with gcc's -Wall.
*
* Some versions of CircleMUD prior to 3.0 patchlevel 9 attempted to include
* prototypes taken from OS man pages for a large number of OS's in the
* header files. I now think such an approach is a bad idea: maintaining that
* list is very difficult and time-consuming, and when new revisions of OS's
* are released with new new header files, Circle can break if the
* prototypes contained in Circle's .h files differs from the new OS header
* files (for example, Circle 3.0 patchlevel 8 failed with compiler errors
* under Solaris 2.5 and Linux 1.3.xx whereas under previous revisions of
* those OS's it had been fine.
*
* Thus, to silence the compiler warnings but still maintain some level of
* portability (albiet at the expense of worse error checking in the code),
* my solution is to define a "typeless" function prototype for all problem
* functions that have not already been prototyped by the OS.
*/
#ifndef atoi
int atoi();
#endif
#ifndef atol
long atol();
#endif
#ifndef bzero
void bzero();
#endif
#ifndef crypt
char *crypt();
#endif
#ifndef fclose
int fclose();
#endif
#ifndef fflush
int fflush();
#endif
#ifndef fprintf
int fprintf();
#endif
#ifndef fread
size_t fread();
#endif
#ifndef fscanf
int fscanf();
#endif
#ifndef fseek
int fseek();
#endif
#ifndef fwrite
size_t fwrite();
#endif
#ifndef gettimeofday
int gettimeofday();
#endif
#ifndef perror
void perror();
#endif
#ifndef random
long int random();
#endif
#ifndef rewind
void rewind();
#endif
#ifndef srandom
void srandom();
#endif
#ifndef sscanf
int sscanf();
#endif
#ifndef system
int system();
#endif
#ifndef time
time_t time();
#endif
#ifndef unlink
int unlink();
#endif
#endif /* ROA_SYSDEP_H */