/* 4m v2.15 (version.h)
 * (C) Copyright 1990 by Carrick Sean Casey
 * (C) Copyright 1993 by Scott Chasin and Michaeljon Miller
 *
 * 3-22-93 See file COPYING for copyright information.
 *
 * Machine & Environment Definition
 *
 */

/* These are optional defines for cross-platforms 
   Most should be defined in specific platform areas */
   
/* defined this if your system has strings.h */
/* #define HAS_STRINGS */

/* defined this if your system has string.h */
/* #define HAS_STRING */

/* define this if your system has limits in /usr/include */
/* #define HAS_LIMITS */

/* otherwise define this is limits.h is in /usr/include/sys */
/* #define HAS_SYSLIMITS */

/* if you system has neither limits.h nor sys/limits.h then leave */
/* these *both* undefined */

/* if your system has void signal() then define */
/* #define SIGTYPE void */
/* else define */
/* #define SIGTYPE int */

/* if you system doesn't have S_ISDIR in stat.h define */
/* #define NEEDS_ISDIR */

/* if your system doesn't define getcwd() anywhere then define */
/* #define USE_GETWD */

/* if your system uses an older C development set that doesn't */
/* have stdlib.h in /usr/include, then define */
/* #define NO_STDLIB_H */

/* if your system doesn't have sys/select.h, define this */
/* define NEEDS_SELECT */

/* if your system has FD_SET and company in sys/types.h */
/* #define FDSET_IN_TYPES */

/* if your system uses bzero(), bcmp() and bcopy() instead */
/* of the SYSV flavors memset(), memcmp() and memcpy() define this */
/* #define BSD_MEM */

/* if your system puts gmtime() and company in sys/time, define */
/* #define SYSTIME */

/* if your system has/supports the SIGWINCH signal */
/* #define RESIZE_ME */


/**************************************************************************/

/**************************************************************************/


/* HP/UX Hewlett-Packard Unix */
 
#ifdef HPUX
# define SYSV
#endif

/* SUN OS */

#ifdef SUN
# define FDSET_IN_TYPES
#endif

#ifdef SOLARIS
# define HAS_STRING
# undef HAS_LIMITS
# undef HAS_SYSLIMITS
# define index strchr
#endif

/* Silicon Graphics Irix */
 
#ifdef IRIX
# define SYSV
#endif

/* ESicks */
#ifdef ESIX
# define SYSV
#endif

/* HCX Unix */

#ifdef HCX
#endif

/* NeXTStep 2.0 */

#ifdef NEXT
# define NO_STDLIB_H
# define NEEDS_ISDIR
# define USE_GETWD
# define HAS_LIMITS
#endif

/* IBM's AIX Unix */

#ifdef AIX
# define BSD_MEM
#endif

/* Dynix on a Sequent Symmetry V1.x */

#ifdef DYNIX
# define SYSV
#endif

/* ulgix */

#ifdef ULTRIX
#endif

/* APOLLO */

#ifdef APOLLO
# define BSD
#endif

#ifdef HPUX9
# define SYSV
#endif

/* Pyramid */
#ifdef PYR
# define NO_STDLIB_H
# ifdef HAS_LIMITS
#  undef HAS_LIMITS
# endif
# ifdef HAS_SYSLIMITS
#  undef HAS_SYSLIMITS
# endif
# ifndef BSD
#  define BSD
# endif
# ifndef SYSTIME
#  define SYSTIME
# endif
#endif

/* AT&T System V and clones */
#if defined(SYSV) && !defined (SOLARIS)
# ifndef HAS_STRING
#  define HAS_STRING
# endif
# ifndef HAS_LIMITS
#  define HAS_LIMITS
# endif
#endif

#ifdef MACHBSD
# ifndef HAS_STRINGS
#  define HAS_STRINGS
# endif
# ifndef NEEDS_ISDIR
#  define NEEDS_ISDIR
# endif
# ifndef USE_GETWD
#  define USE_GETWD
# endif
# define SIGTYPE int
#endif

/* DG/UX skunkworks */
#ifdef DGUX
# ifndef HAS_STRINGS
#  define HAS_STRINGS
# endif
# ifndef USE_GETWD
#  define USE_GETWD
# endif
# define SIGTYPE int
#endif


/* BSD and it's *close* variants */
#ifdef BSD
# ifndef HAS_STRINGS
#  define HAS_STRINGS
# endif
# ifndef NEEDS_ISDIR
#  define NEEDS_ISDIR
# endif
# ifndef USE_GETWD
#  define USE_GETWD
# endif
# define BSD_MEM
# define SIGTYPE int
#endif

#ifndef SIGTYPE
# define SIGTYPE void
#endif

#ifdef NEEDS_ISDIR
# define S_ISDIR(_stat_buf) (_stat_buf & S_IFDIR)
#endif

#ifdef USE_GETWD
# define getcwd(_pathname, _pathlen) getwd(_pathname)
#endif

#ifdef BSD_MEM
# define memcpy(_d, _s, _l) bcopy(_s, _d, _l)
# define memset(_d, _v, _l) bzero(_d, _l)
# define memcmp(_s1, _s2, _l) bcmp(_s1, _s2, _cmp)

# define strrchr(_s, _c) rindex(_s, _c)
# define strchr(_s, _c) index(_s, _c)
#endif
