From 5730fa61825fcf13cad0686caf219f8980d9e8e8 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 4 Oct 2007 12:09:30 +0000 Subject: [PATCH] firm revision and build changed to strings [r16076] --- include/libfirm/firm.h | 9 ++------- ir/common/firm.c | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/libfirm/firm.h b/include/libfirm/firm.h index 9c1b829f6..e0b57692d 100644 --- a/include/libfirm/firm.h +++ b/include/libfirm/firm.h @@ -196,19 +196,14 @@ typedef struct _firm_parameter_t firm_parameter_t; #define libfirm_VERSION_MINOR 4 #endif -#ifndef libfirm_VERSION_MICRO -#define libfirm_VERSION_MICRO 0 -#endif - - /** * The Firm version number. */ typedef struct _firm_version_t { unsigned major; unsigned minor; - unsigned micro; - unsigned build; + const char *revision; + const char *build; } firm_version_t; /** diff --git a/ir/common/firm.c b/ir/common/firm.c index f2f78862e..e3a8b7616 100644 --- a/ir/common/firm.c +++ b/ir/common/firm.c @@ -27,6 +27,10 @@ # include "config.h" #endif +#ifdef HAVE_FIRM_REVISION_H +# include "firm_revision.h" +#endif + #include "firm_config.h" #ifdef HAVE_STRING_H @@ -169,8 +173,12 @@ void free_firm(void) { /* Returns the libFirm version number. */ void firm_get_version(firm_version_t *version) { - version->major = libfirm_VERSION_MAJOR; - version->minor = libfirm_VERSION_MINOR; - version->micro = libfirm_VERSION_MICRO; - version->build = 0; + version->major = libfirm_VERSION_MAJOR; + version->minor = libfirm_VERSION_MINOR; +#ifdef libfirm_VERSION_REVISION + version->revision = libfirm_VERSION_REVISION; +#else + version->revision = ""; +#endif + version->build = ""; } -- 2.20.1