#include "config.h" #define STRINGIZE(x) #x #define STRINGIZE_VALUE_OF(x) STRINGIZE(x) #ifndef MOON_MAJOR #define MOON_MAJOR 0 #endif #ifndef MOON_MINOR #define MOON_MINOR 10 #endif #ifndef _MOON_SUFFIX #define MOON_SUFFIX "" #else #define MOON_SUFFIX STRINGIZE_VALUE_OF(_MOON_SUFFIX) #endif int __moon_version_major() { return MOON_MAJOR; } int __moon_version_minor() { return MOON_MINOR; } const char* __moon_version_suffix() { return MOON_SUFFIX; } const char* moon_version() { return STRINGIZE_VALUE_OF(MOON_MAJOR) "." STRINGIZE_VALUE_OF(MOON_MINOR) MOON_SUFFIX; }