ftp.nice.ch/pub/next/developer/languages/smalltalk/squeak-2.0-0.3d109.NIHS.bs.tar.gz#/squeak-2.0/src/sqConfig.h

This is sqConfig.h in view mode; [Download] [Up]

/* sqConfig.h -- platform identification and configuration */

#if defined(__MWERKS__) && !defined(macintosh)
  /* CodeWarrior 8 neglects to define "macintosh" */
# define macintosh
#endif

#if defined(WIN32) || defined(_WIN32) || defined(Win32)
  /* Some compilers use different win32 definitions.
     Define WIN32 so we have only to check for one symbol. */
# if !defined(WIN32)
#  define WIN32
# endif
#endif

#if defined(macintosh)
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif
# define SQ_CONFIG_DONE
#endif

#if defined(ACORN)
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif
# define USE_CLOCK_MSECS
# define SQ_CONFIG_DONE
#endif

#if defined(WIN32)
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif
# if defined(_M_IX86) || defined(X86)
  /* x86 systems */
#  define DOUBLE_WORD_ALIGNMENT
#  define DOUBLE_WORD_ORDER
  /* Note: We include a generic sqWin32.h to override some settings */
#  include "sqWin32.h"
#  define SQ_CONFIG_DONE
# else
#  error unsupported win32 processor type (alpha?!)
# endif
#endif

/* for Unix variants, this file must define the following symbols as appropriate:

   HAS_D_NAMLEN
      defined if struct dirent has d_namlen field and hence directory names
      are not null terminated.  if underfined then directory names are null
      terminated.

   HAS_TIMEZONE
      defined if the external variable timezone is available, containing the
      local offset from GMT in seconds.  if  undefined then the tm structure
      must contain the same information in the tm_gmtoff field.  (Consider
      defining NEED_TZSET too!)

   HAS_ON_EXIT
      defined if cleanup functions are declared with on_exit().  If
      undefined then cleanup functions are declared with atexit().

   HAS_MSB_FIRST
      defined if the most significant byte is first in an int.

   HAS_LSB_FIRST
      defined if the least significant byte is first in an int.
      (Complains if neither of the last two are defined.)

   HAS_SUN_AUDIO
      defined if the platform supports the Sun /dev/audio device.

   DOUBLE_WORD_ALIGNMENT
      defined if the platform CANNOT support double-word accesses at an
      arbitrary word address.
      
   DOUBLE_WORD_ORDER
      defined if the platform stores floats in the opposite order
      to the Squeak image (the image is always PowerPC order).

   SUN_FUN_KEYS
      defined for Sun type 3 or 4 keyboards to enable the editing keys
      (Again, Undo, Copy, Paste, Cut, Find, Stop on the "left keypad",
      and PgUp, PgDn, Home, End keys on the right keypad).

   NEED_FILIO
      defined if the platform requires <sys/filio.h> to be included
      to get a definition for FIONBIO.

   NEED_SELECT
      defined if the platform requires <sys/select.h> to be included
      to get definitions for select().

   NEED_TZSET
      defined if the platform required tzset() to be called explicitly
      before reading the local wall clock.

   JUMP_ALIGN_BYTE
      defined if the platform has no instruction alignment restrictions
      (e.g. Pentium).

   JUMP_ALIGN_STRICT
      defined if the platform has word-aligned instructions, and cannot
      tolerate the low two bits of an address being non-zero (e.g.
      Sparc).
*/

#if defined(sun) && (defined(sparc) || defined(__sparc))
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif
# include <errno.h>
# ifdef ECHRNG					/* Sparc/Solaris */
#   undef  HAS_D_NAMLEN
#   define HAS_TIMEZONE
#   undef  HAS_ON_EXIT
#   define HAS_MSB_FIRST
#   undef  HAS_SUN_AUDIO
#   define DOUBLE_WORD_ALIGNMENT
#   undef  DOUBLE_WORD_ORDER
#   define SUN_FUN_KEYS
#   define NEED_FILIO
#   define NEED_TZSET
#   define JUMP_ALIGN_STRICT
#   define SQ_CONFIG_DONE
# else						/* Sparc/SunOS */
#   include <unistd.h>
#   define HAS_D_NAMLEN
#   undef  HAS_TIMEZONE
#   define HAS_ON_EXIT
#   define HAS_MSB_FIRST
#   undef  HAS_SUN_AUDIO
#   define DOUBLE_WORD_ALIGNMENT
#   undef  DOUBLE_WORD_ORDER
#   define SUN_FUN_KEYS
#   define NEED_TZSET
#   define JUMP_ALIGN_STRICT
#   define SQ_CONFIG_DONE
# endif
#endif

#if defined(sun) && defined(i386)		/* iX86/Solaris */
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif
# undef  HAS_D_NAMLEN
# define HAS_TIMEZONE
# undef  HAS_ON_EXIT
# define HAS_LSB_FIRST
# undef  HAS_SUN_AUDIO
# undef  DOUBLE_WORD_ALIGNMENT
# define DOUBLE_WORD_ORDER
# define NEED_FILIO
# define NEED_TZSET
# define JUMP_ALIGN_BYTE
# define SQ_CONFIG_DONE
#endif

#if defined(mips) || defined(__mips)
# if defined(_SYSTYPE_SVR4)			/* (SGI)/IRIX */
#  if defined(SQ_CONFIG_DONE)
#    error configuration conflict
#  endif
#  undef  HAS_D_NAMLEN
#  define HAS_TIMEZONE
#  undef  HAS_ON_EXIT
#  define HAS_MSB_FIRST
#  undef  HAS_SUN_AUDIO
#  define DOUBLE_WORD_ALIGNMENT
#  undef  DOUBLE_WORD_ORDER
#  define JUMP_ALIGN_STRICT
#  define SQ_CONFIG_DONE
# endif
#endif

#if defined(linux)
# if defined(i386)				/* iX86/Linux */
#   if defined(SQ_CONFIG_DONE)
#     error configuration conflict
#   endif
#   undef  HAS_D_NAMLEN
#   define HAS_TIMEZONE
#   undef  HAS_ON_EXIT
#   define HAS_LSB_FIRST
#   undef  HAS_SUN_AUDIO
#   undef  DOUBLE_WORD_ALIGNMENT
#   define DOUBLE_WORD_ORDER
#   define NEED_TZSET
#   define JUMP_ALIGN_BYTE
#  define SQ_CONFIG_DONE
# endif
# if defined(powerpc)				/* PPC/Linux */
#   if defined(SQ_CONFIG_DONE)
#     error configuration conflict
#   endif
#   undef  HAS_D_NAMLEN
#   define HAS_TIMEZONE
#   undef  HAS_ON_EXIT
#   define HAS_MSB_FIRST
#   undef  HAS_SUN_AUDIO
#   undef  DOUBLE_WORD_ALIGNMENT
#   undef  DOUBLE_WORD_ORDER
#   define NEED_TZSET
#   define SQ_CONFIG_DONE
# endif
#endif

#if defined(__FreeBSD__)
# if defined(i386)				/* iX86/FreeBSD */
#   if defined(SQ_CONFIG_DONE)
#     error configuration conflict
#   endif
#   undef  HAS_D_NAMLEN
#   undef  HAS_TIMEZONE
#   undef  HAS_ON_EXIT
#   define HAS_LSB_FIRST
#   undef  HAS_SUN_AUDIO
#   undef  DOUBLE_WORD_ALIGNMENT
#   define DOUBLE_WORD_ORDER
#   define JUMP_ALIGN_BYTE
#   define SQ_CONFIG_DONE
# endif
#endif

#if defined(__alpha)				/* Alpha/OSF1 */
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif
# define HAS_D_NAMLEN
# undef  HAS_TIMEZONE
# undef  HAS_ON_EXIT
# define HAS_LSB_FIRST
# undef  HAS_SUN_AUDIO
# define DOUBLE_WORD_ALIGNMENT
# define DOUBLE_WORD_ORDER
# define NEED_TZSET
# define SQ_CONFIG_DONE
#endif

#if defined(hpux) || defined (__hpux)		/* HPPA/HP-UX */
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif
# define HAS_D_NAMLEN
# define HAS_TIMEZONE
# undef  HAS_ON_EXIT
# define HAS_MSB_FIRST
# undef  HAS_SUN_AUDIO
# define DOUBLE_WORD_ALIGNMENT
# undef  DOUBLE_WORD_ORDER
# define NEED_TZSET
  extern int h_errno;	/* loser! */
# define SQ_CONFIG_DONE
#endif

#if defined(_AIX) || defined(_M_UNIX)
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif
# undef  HAS_D_NAMLEN				/* IBM RS6000/AIX */
# define HAS_TIMEZONE
# undef  HAS_ON_EXIT
# define HAS_MSB_FIRST
# undef  HAS_SUN_AUDIO
# undef  DOUBLE_WORD_ALIGNMENT
# undef  DOUBLE_WORD_ORDER
# define NEED_SELECT
# define SQ_CONFIG_DONE
#endif

#if defined(__NeXT__) || defined(NeXT) 
# if defined(SQ_CONFIG_DONE)
#   error configuration conflict
# endif

#undef HAS_D_NAMLEN
	/*
      defined if struct dirent has d_namlen field and hence directory names
      are not null terminated.  if underfined then directory names are null
      terminated.
	  
==> We do have a d_namlen, but the directory names are also null terminated.
	*/

#undef HAS_TIMEZONE
	/*
      defined if the external variable timezone is available, containing the
      local offset from GMT in seconds.  if  undefined then the tm structure
      must contain the same information in the tm_gmtoff field.  (Consider
      defining NEED_TZSET too!)
	*/

#undef HAS_ON_EXIT
	/*
      defined if cleanup functions are declared with on_exit().  If
      undefined then cleanup functions are declared with atexit().

==> We have atexit (in libsys_s).
	*/

#ifdef __BIG_ENDIAN__
// #warning BIG-ENDIAN is defined.
#define HAS_MSB_FIRST
	/*
      defined if the most significant byte is first in an int.
	*/
#else
// #warning BIG-ENDIAN is not defined.
#undef HAS_MSB_FIRST
	/*
      defined if the most significant byte is first in an int.
	*/
#endif
#warning HAS_MSB_FIRST IS NOT USED ANYWHERE!

#ifdef __LITTLE_ENDIAN__
// #warning LITTLE-ENDIAN is defined.
#define HAS_LSB_FIRST
	/*
      defined if the least significant byte is first in an int.
      (Complains if neither of the last two are defined.)
	*/
#define DOUBLE_WORD_ORDER
	/*
      defined if the platform stores floats in the opposite order
      to the Squeak image (the image is always PowerPC order).
	*/
#else
// #warning LITTLE-ENDIAN is not defined.
#undef HAS_LSB_FIRST
	/*
      defined if the least significant byte is first in an int.
      (Complains if neither of the last two are defined.)
	*/
#undef DOUBLE_WORD_ORDER
	/*
      defined if the platform stores floats in the opposite order
      to the Squeak image (the image is always PowerPC order).
	*/
#endif
#warning HAS_LSB_FIRST IS NOT USED ANYWHERE!

#undef HAS_SUN_AUDIO
	/*
      defined if the platform supports the Sun /dev/audio device.
	*/

#undef DOUBLE_WORD_ALIGNMENT
	/*
      defined if the platform CANNOT support double-word accesses at an
      arbitrary word address.
	*/

#undef SUN_FUN_KEYS
	/*
      defined for Sun type 3 or 4 keyboards to enable the editing keys
      (Again, Undo, Copy, Paste, Cut, Find, Stop on the "left keypad",
      and PgUp, PgDn, Home, End keys on the right keypad).
	*/

#undef NEED_FILIO
	/*
      defined if the platform requires <sys/filio.h> to be included
      to get a definition for FIONBIO.

==> We have it in ioctl.h.
	*/

#undef NEED_SELECT
	/*
      defined if the platform requires <sys/select.h> to be included
      to get definitions for select().

==> We have it in libc.h.
	*/

#undef NEED_TZSET
	/*
      defined if the platform required tzset() to be called explicitly
      before reading the local wall clock.
	*/

#undef JUMP_ALIGN_BYTE
	/*
      defined if the platform has no instruction alignment restrictions
      (e.g. Pentium).
	*/

#undef JUMP_ALIGN_STRICT
	/*
      defined if the platform has word-aligned instructions, and cannot
      tolerate the low two bits of an address being non-zero (e.g.
      Sparc).
	*/

# define SQ_CONFIG_DONE
#endif


#if !defined(SQ_CONFIG_DONE)
# error test for, and describe, your architecture here.
#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.