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