40#ifndef GEOGRAM_BASIC_COMMON
41#define GEOGRAM_BASIC_COMMON
194#if (defined(NDEBUG) || defined(GEOGRAM_PSM)) && !defined(GEOGRAM_PSM_DEBUG)
204#if defined(__ANDROID__)
205#define GEO_OS_ANDROID
208#if defined(__linux__)
213#ifndef GEO_OS_ANDROID
221#if defined(__INTEL_COMPILER)
222# define GEO_COMPILER_INTEL
223#elif defined(__clang__)
224# define GEO_COMPILER_CLANG
225#elif defined(__GNUC__)
226# define GEO_COMPILER_GCC
228# error "Unsupported compiler"
234# define GEO_PROCESSOR_X86
241#elif defined(_WIN32) || defined(_WIN64)
243#define GEO_OS_WINDOWS
244#define GEO_PROCESSOR_X86
251# define GEO_COMPILER_MSVC
252#elif defined(__MINGW32__) || defined(__MINGW64__)
253# define GEO_COMPILER_MINGW
264#elif defined(__APPLE__)
273#if defined(__clang__)
274# define GEO_COMPILER_CLANG
275#elif defined(__GNUC__)
276# define GEO_COMPILER_GCC
278# error "Unsupported compiler"
281#if defined(__x86_64) || defined(__ppc64__) || defined(__arm64__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch_lp64)
289#elif defined(__EMSCRIPTEN__)
293#define GEO_OS_EMSCRIPTEN
295#define GEO_COMPILER_EMSCRIPTEN
296#define GEO_COMPILER_CLANG
300#error "Unsupported operating system"
303#if defined(GEO_COMPILER_GCC) || \
304 defined(GEO_COMPILER_CLANG) || \
305 defined(GEO_COMPILER_MINGW) || \
306 defined(GEO_COMPILER_EMSCRIPTEN)
307#define GEO_COMPILER_GCC_FAMILY
312#define GEO_OS_WINDOWS
314#define GEO_OS_ANDROID
316#define GEO_COMPILER_INTEL
317#define GEO_COMPILER_MSVC
324#define CPP_CONCAT_(A, B) A ## B
330#define CPP_CONCAT(A, B) CPP_CONCAT_(A, B)
334#elif defined(GEO_COMPILER_GCC_FAMILY) || \
335 defined(GEO_COMPILER_INTEL)
336#define GEO_NORETURN __attribute__((noreturn))
342#define GEO_NORETURN_DECL
343#elif defined(GEO_COMPILER_MSVC)
344#define GEO_NORETURN_DECL __declspec(noreturn)
346#define GEO_NORETURN_DECL
349#if defined(GEO_COMPILER_CLANG) || defined(GEO_COMPILER_EMSCRIPTEN)
350#if __has_feature(cxx_noexcept)
351#define GEO_NOEXCEPT noexcept
361#define GEO_NOEXCEPT throw()
364#define FOR(I,UPPERBND) for(index_t I = 0; I<index_t(UPPERBND); ++I)
369#ifdef GEO_COMPILER_CLANG
370#pragma GCC diagnostic ignored "-Walloca"
Basic definitions for the Geogram C API.
Global Vorpaline namespace.
void terminate()
Cleans up Geogram.
@ GEOGRAM_INSTALL_LOCALE
Sets the locale to POSIX.
@ GEOGRAM_INSTALL_HANDLERS
Install Geogram's signal handlers.
@ GEOGRAM_INSTALL_BIBLIO
Enable global citation database.
@ GEOGRAM_INSTALL_NONE
Do not install error handlers.
@ GEOGRAM_INSTALL_FPE
Enable or disable FPE during initialization.
@ GEOGRAM_INSTALL_ALL
Install everything.
@ GEOGRAM_INSTALL_ERRNO
Reset errno to 0.
void initialize(int flags=GEOGRAM_INSTALL_NONE)
Initialize Geogram.