/* Public domain */ #ifndef _AGAR_CORE_CORE_H_ #define _AGAR_CORE_CORE_H_ #if !defined(AG_BIG_ENDIAN) && !defined(AG_LITTLE_ENDIAN) # define AG_BIG_ENDIAN 4321 # define AG_LITTLE_ENDIAN 1234 # include # include # if defined(_MK_BIG_ENDIAN) # define AG_BYTEORDER AG_BIG_ENDIAN # elif defined(_MK_LITTLE_ENDIAN) # define AG_BYTEORDER AG_LITTLE_ENDIAN # else # error "Byte order is unknown" # endif # undef _MK_BIG_ENDIAN # undef _MK_LITTLE_ENDIAN #endif #if !defined(_AGAR_INTERNAL) # include # include # include # include # include # include # include # include # include # include # include #else /* _AGAR_INTERNAL */ /* For inlinables (TODO move to inline_*.h) */ # include # ifdef _MK_HAVE_STDLIB_H # include # endif # include # ifdef _MK_HAVE_UNISTD_H # include # endif # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include /* NOTE: Inlinables must use AG_MIN() and AG_MAX() */ # ifndef MIN # define MIN(a,b) (((a)<(b))?(a):(b)) # endif # ifndef MAX # define MAX(a,b) (((a)>(b))?(a):(b)) # endif # ifndef MIN3 # define MIN3(a,b,c) MIN((a),MIN((b),(c))) # endif # ifndef MAX3 # define MAX3(a,b,c) MAX((a),MAX((b),(c))) # endif # ifdef _MSC_VER # pragma warning(disable: 4018) # pragma warning(disable: 4267) # pragma warning(disable: 4244) # endif # include # ifdef AG_SERIALIZATION # include # include # ifdef AG_HAVE_FLOAT # include # endif # include # endif # include # include # include # include # include # include # include # include # include # include # include # include #endif /* _AGAR_INTERNAL */ #endif /* !_AGAR_CORE_CORE_H_ */