/* $Id: gncompat.h,v 1.2 2009/01/04 15:32:25 kiesling Exp $ */

/*
  This file is part of Ctalk.
  Copyright © 2005-2009 Robert Kiesling, ctalk@ctalklang.org.
  Permission is granted to copy this software provided that this copyright
  notice is included in all source code modules.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/* 
 *   The cpp.info file contains information about predefined macros. 
 */

/* 
 *   NOTE - Compiler-specific header preprocessing does not have the same
 *   degree of error checking as normal include files.  Be careful when
 *   making changes to this file!
 */

/* Version history:
   2005-12-21 : Version 1.2.  Predefined types documented in cpp.info.
   2006-02-17 : Version 1.3.  Added types for DJGPP. 
 */

/*  __GNUC__, __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ are 
    normally set at compile time. */
#ifndef __GNUC__
#define __GNUC__ 2
#endif

#ifndef __GNUC_MINOR__
#define __GNUC_MINOR__ 95
#endif

#ifndef __GNUC_PATCHLEVEL__
#define __GNUC_PATCHLEVEL__ 4
#endif


/* __VERSION__ is set at run time, but if the compiler's version string
   is unparsable, then you might need to set it here.
*/

#ifndef __VERSION__
#define __VERSION__   "<gcc-version>"
#endif

#ifdef __linux__
#ifndef __ELF__
#define __ELF__  1
#endif
#endif

/* `__STRICT_ANSI__' is not used here. */
/* `__BASE_FILE__' is redundant with __FILE__ */
/* `__INCLUDE_LEVEL__' should be set during execution. */
/* `__VERSION__' should be set to the version string produced by "gcc -v" */
/* `__OPTIMIZE__', 
`__OPTIMIZE_SIZE__', and 
`__NO_INLINE__' are not used. */
/* `__CHAR_UNSIGNED__' is not used. */
/* `__WCHAR_UNSIGNED__' is not defined here - requires C++ */
/* `__REGISTER_PREFIX__'
   `__USER_LABEL_PREFIX__' probably are not needed. */

#ifdef __i386__

/* stddef.h uses these to define typedefs. */

#  ifndef __SIZE_TYPE__
#    ifdef __DJGPP__
#      define __SIZE_TYPE__ long unsigned int
#    else
#      define __SIZE_TYPE__ unsigned int
#    endif
#  endif

#  ifndef __PTRDIFF_TYPE
#    ifdef __DJGPP__
#      define __PTRDIFF_TYPE__ int
#    else
#      define __PTRDIFF_TYPE__ long int
#    endif
#  endif

#  ifndef __WCHAR_TYPE__
#    ifdef __DJGPP__
#      define __WCHAR_TYPE short unsigned int
#    else
#      define __WCHAR_TYPE__ long int
#    endif
#  endif

#  ifndef __WINT_TYPE__
#    ifdef __DJGPP__
#      define __WINT_TYPE__ int
#    else
#      define __WINT_TYPE__ unsigned int
#    endif
#  endif

/* These values are normally defined in limits.h */

#  ifndef __CHAR_BIT__
#    define __CHAR_BIT__ 8
#  endif

#  ifndef __INT_MAX__
#    define __INT_MAX__ 2147483647
#  endif

#  ifndef __LONG_MAX__
#    define __LONG_MAX__ 2147483647L
#  endif

#  ifndef __SCHAR_MAX__
#    define __SCHAR_MAX__ 127
#  endif

#  ifndef __SHRT_MAX__
#    define __SHRT_MAX__ 32767
#  endif

/* This value is defined in bits/wchar.h */

#  ifndef __WCHAR_MAX__
#    define __WCHAR_MAX__	2147483647l
#  endif

#  ifndef __LONG_LONG_MAX__
#    define __LONG_LONG_MAX__ 9223372036854775807LL
#  endif

/* Nothing seems to need  __INTMAX_TYPE__, __UINTMAX_TYPE__,
   __INTMAX_MAX__, __USING_SJLJ_EXCEPTIONS__, __NEXT_RUNTIME__,
   __LP64__,  and _LP64. */

#endif /* #ifdef __i386__ */
