X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/16fc8bc14719d7f309c3d334ef5c03fe31e11504..8855bb48b449ed06cfd3ce528b3c0a77c37cb24b:/lib/version.h diff --git a/lib/version.h b/lib/version.h index 582ec971..447ae885 100644 --- a/lib/version.h +++ b/lib/version.h @@ -5,9 +5,11 @@ #ifndef BUILDID #define _BUILDID "unknown" #else -#define _BUILDID "BUILDID" +#define XStringify(x) Stringify(x) +#define Stringify(x) #x +#define _BUILDID "" XStringify(BUILDID) "" #endif -#define MODULE_VERSION(id) const char *_version(void) { return (id[0]=='\0')?_BUILDID:(id "/" _BUILDID); }; +#define MODULE_VERSION(id) const char *_version(const char **version) { *version=(id[0]=='\0')?NULL:id; return _BUILDID; } #endif