0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd::info: Add GNUC version information.

This commit is contained in:
Jason Volk 2019-06-01 22:03:53 -07:00
parent 110dafde18
commit 1f4b7a0468
2 changed files with 28 additions and 0 deletions

View file

@ -57,10 +57,13 @@ namespace ircd::info
extern const ::utsname utsname;
#endif
// Kernel information
extern const string_view kernel_name;
extern const string_view kernel_release;
extern const versions kernel_version;
// Toolchain and library information
extern const versions gnuc_version_api;
extern const versions glibc_version_api;
extern const versions glibc_version_abi;

View file

@ -295,6 +295,31 @@ ircd::info::kernel_version
utsname.release
};
//
// gnuc
//
#if defined(__GNUC__) && defined(__GLIBC__)
decltype(ircd::info::gnuc_version_api)
ircd::info::gnuc_version_api
{
"gnuc", versions::API, 0,
{
__GNUC__,
__GNUC_MINOR__,
__GNUC_PATCHLEVEL__,
},
// version string
#if defined(__VERSION__)
__VERSION__
#else
"<__VERSION__ undefined>"
#endif
};
#endif defined(__GNUC__) && defined(__GLIBC__)
//
// glibc
//