/* $Id: system.h.in,v 1.13 2004/03/29 11:57:03 pekberg Exp $
******************************************************************************

   GGI - Architecture specific things (autogenerated by configure)

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

#ifndef _GGI_SYSTEM_H
#define _GGI_SYSTEM_H

#include <stdlib.h>

#include <sys/time.h>


#ifndef __BEGIN_DECLS
# ifdef __cplusplus
#  define __BEGIN_DECLS extern "C" {
#  define __END_DECLS }
# else
#  define __BEGIN_DECLS /* empty */
#  define __END_DECLS /* empty */
# endif
#endif

#ifdef __CYGWIN32__
# ifndef __CYGWIN__
#  define __CYGWIN__	1
# endif
#endif

#ifndef __WIN32__
# if defined(__CYGWIN__)  || \
    defined(__MINGW32__) || \
    defined(__MINGW__)   || \
    defined(_WIN32)
# define __WIN32__
# endif
#endif /* ! __WIN32__ */

/* EXPORTVAR and IMPORTVAR are supposed to be used in
 * declarations of exported and imported variables
 * respectively.
 */

#ifdef __WIN32__
# define EXPORTVAR	extern __declspec(dllexport)
# define IMPORTVAR	extern __declspec(dllimport)
# define EXPORTFUNC	__declspec(dllexport)
# define IMPORTFUNC	extern __declspec(dllimport)
#else
# define EXPORTVAR	extern
# define IMPORTVAR	extern
# define EXPORTFUNC	/* empty */
# define IMPORTFUNC	extern
#endif


typedef signed char		sint8;
typedef unsigned char		uint8;

typedef signed short		sint16;
typedef unsigned short		uint16;

typedef signed int		sint32;
typedef unsigned int		uint32;

typedef	signed int		ggi_sint;
typedef unsigned int		ggi_uint;

typedef	signed int		gg_sint;
typedef unsigned int		gg_uint;

#define GG_HAVE_INT64

#ifdef GG_HAVE_INT64
typedef signed long		sint64;
typedef unsigned long		uint64;
#endif

#define GGI_BIG_ENDIAN		1

#ifdef GGI_LITTLE_ENDIAN
#define GG_LITTLE_ENDIAN
#endif
#ifdef GGI_BIG_ENDIAN
#define GG_BIG_ENDIAN
#endif
/* TODO: what about PDP endian? */



#endif /* _GGI_SYSTEM_H */
