/* Copyright (C) 2001-2014, Parrot Foundation. */ /* config.h * * Platform-specific config file * */ #ifndef PARROT_CONFIG_H_GUARD #define PARROT_CONFIG_H_GUARD /* ** ONLY PUT EMBEDDER-ACCESSIBLE SYMBOLS UP HERE!!! ** Other symbols may go below. */ #define PARROT_VERSION "@VERSION@@DEVEL@" #define PARROT_CONFIG_DATE "@configdate@" #define PARROT_MAJOR_VERSION @MAJOR@ #define PARROT_MINOR_VERSION @MINOR@ #define PARROT_PATCH_VERSION @PATCH@ #define PARROT_ARCHNAME "@cpuarch@-@osname@" #define PARROT_SHARE_EXT "@share_ext@" #define PARROT_LOAD_EXT "@load_ext@" #define PARROT_OBJ_EXT "@o@" typedef @iv@ Parrot_Int; typedef unsigned @iv@ Parrot_UInt; typedef @nv@ Parrot_Float; typedef @opcode_t@ Parrot_Opcode; typedef void * Parrot_Pointer; typedef signed char Parrot_Int1; typedef unsigned char Parrot_UInt1; typedef @int2_t@ Parrot_Int2; typedef unsigned @int2_t@ Parrot_UInt2; typedef @int4_t@ Parrot_Int4; typedef unsigned @int4_t@ Parrot_UInt4; #if @HAS_INT64@ typedef @int8_t@ Parrot_Int8; typedef unsigned @int8_t@ Parrot_UInt8; #endif typedef @float4_t@ Parrot_Float4; typedef @float8_t@ Parrot_Float8; /* Required for proper compilation of StructView PMC */ #define HAS_LONGLONG @HAS_LONGLONG@ #define HAS_INT64 @HAS_INT64@ #ifndef PARROT_INTVAL_MIN # define PARROT_INTVAL_MIN @intvalmin@ #endif #ifndef PARROT_INTVAL_MAX # define PARROT_INTVAL_MAX @intvalmax@ #endif #ifndef PARROT_FLOATVAL_MIN # define PARROT_FLOATVAL_MIN @floatvalmin@ #endif #ifndef PARROT_FLOATVAL_MAX # define PARROT_FLOATVAL_MAX @floatvalmax@ #endif /* Symbol export and import decoration. At the time of writing, note that * PARROT_IN_CORE won't always imply !PARROT_IN_EXTENSION. */ #if defined(PARROT_IN_EXTENSION) #if defined(__cplusplus) # define PARROT_EXPORT extern "C" @sym_import@ # define PARROT_DATA extern "C" @sym_import@ # define PARROT_DYNEXT_EXPORT extern "C" @sym_export@ #else # define PARROT_EXPORT @sym_import@ # define PARROT_DATA extern @sym_import@ # define PARROT_DYNEXT_EXPORT @sym_export@ #endif #else #if defined(__cplusplus) # define PARROT_EXPORT extern "C" @sym_export@ # define PARROT_DATA extern "C" @sym_export@ #else # define PARROT_EXPORT @sym_export@ # define PARROT_DATA extern @sym_export@ #endif #endif #define PARROT_NOINLINE @noinline@ /* * GC_DEFAULT_TYPE selection * MS -- stop-the-world mark & sweep * INF -- infinite memory "collector" * MS2 -- new style mark & sweep * GMS -- Generational M&S based on MS2 */ #ifndef PARROT_GC_DEFAULT_TYPE # define PARROT_GC_DEFAULT_TYPE @gc_type@ #endif /* Deprecate the ListChunk objects in src/list.c. Still needed for imageiofreeze */ #define PARROT_BUFFERLIKE_LIST #if defined(PARROT_IN_CORE) /* Put any other symbols here. */ #include #define PARROT_CPU_ARCH "@cpuarch@" #define PARROT_CPU_TYPE "@cputype@" #define PARROT_BYTEORDER 0x@byteorder@ #define PARROT_BIGENDIAN @bigendian@ #define PARROT_LITTLEENDIAN !(PARROT_BIGENDIAN) typedef Parrot_Int INTVAL; typedef Parrot_UInt UINTVAL; typedef Parrot_Float FLOATVAL; typedef @hugeintval@ HUGEINTVAL; typedef unsigned @hugeintval@ UHUGEINTVAL; typedef @hugefloatval@ HUGEFLOATVAL; #define INTVAL_SIZE @intvalsize@ #define NUMVAL_SIZE @nvsize@ #define OPCODE_T_SIZE @opcodesize@ #define PTR_SIZE @ptrsize@ #define SHORT_SIZE @shortsize@ #define INT_SIZE @intsize@ #define LONG_SIZE @longsize@ #if @HAS_LONGLONG@ # define LONGLONG_SIZE @longlongsize@ #endif #define HUGEINTVAL_SIZE @hugeintvalsize@ #define DOUBLE_SIZE @doublesize@ typedef Parrot_Opcode opcode_t; typedef @ptrcast@ ptrcast_t; typedef struct _vtable VTABLE; typedef void DPOINTER; /* Oplib and dynamic ops related. */ #include "parrot/pbcversion.h" #define PARROT_CORE_OPLIB_NAME "core_ops" #define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_ ## PARROT_PBC_MAJOR ## _ ## PARROT_PBC_MINOR #define PARROT_GET_CORE_OPLIB(i) PARROT_CORE_OPLIB_INIT((i), 1) /* ICU. */ #define PARROT_HAS_ICU @has_icu@ /* Int and float formats. */ #define UINTVAL_FMT "@uintvalfmt@" #define INTVAL_FMT "@intvalfmt@" #if PTR_SIZE == 4 # define SIZE_FMT "%d" #else # define SIZE_FMT "%ld" #endif #define FLOATVAL_FMT "@floatvalfmt@" #include "parrot/has_header.h" #include "parrot/feature.h" #endif #endif /* PARROT_CONFIG_H_GUARD */ /* * Local variables: * c-file-style: "parrot" * End: * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : */