Merge pull request #2644

a17efcb0 make this build on SunOS/Solaris (Pavel Maryanov)
This commit is contained in:
Riccardo Spagni
2017-11-14 21:31:09 +02:00
9 changed files with 42 additions and 3 deletions
+4
View File
@@ -40,6 +40,10 @@
#include <byteswap.h>
#endif
#if defined(__sun) && defined(__SVR4)
#include <endian.h>
#endif
#if defined(_MSC_VER)
#include <stdlib.h>
+1 -1
View File
@@ -405,7 +405,7 @@ namespace tools
#else
std::string get_nix_version_display_string()
{
utsname un;
struct utsname un;
if(uname(&un) < 0)
return std::string("*nix: failed to get os version");
+5
View File
@@ -31,8 +31,13 @@
#pragma once
#if defined(__GNUC__)
#if defined(__sun) && defined(__SVR4)
#define INITIALIZER(name) __attribute__((constructor)) static void name(void)
#define FINALIZER(name) __attribute__((destructor)) static void name(void)
#else
#define INITIALIZER(name) __attribute__((constructor(101))) static void name(void)
#define FINALIZER(name) __attribute__((destructor(101))) static void name(void)
#endif
#define REGISTER_FINALIZER(name) ((void) 0)
#elif defined(_MSC_VER)