diff options
author | Patrick Griffis <tingping@tingping.se> | 2016-12-13 16:12:03 -0500 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2017-06-13 23:54:51 -0400 |
commit | 628100c19f5d82747170acdf2917cba8c119ccbf (patch) | |
tree | 351a7e9714a1a58390ba349808df5703cef25c3e /src/common/util.c | |
parent | 2edf50d4ddc61ce6f73bf02263c9bdd09632c66b (diff) |
build: Replace Autotools with Meson
Quick rundown of benefits: - Much faster: - Autotools (with autogen): 22 seconds - Meson: 7 seconds - Meson (with ccache): 2 seconds - Simpler: - ~1000 lines smaller - Single simple language - Potentially better Windows (Visual Studio) support What is not done: - Complete Windows support - OSX support (easy) Closes #2013 Closes #1937 Closes #1803
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/util.c b/src/common/util.c index bf1acb05..8f4c3abe 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -48,7 +48,7 @@ #include <ctype.h> #include "util.h" -#if defined (USING_FREEBSD) || defined (__APPLE__) +#if defined (__FreeBSD__) || defined (__APPLE__) #include <sys/sysctl.h> #endif @@ -360,13 +360,13 @@ strip_hidden_attribute (char *src, char *dst) return len; } -#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (__CYGWIN__) +#if defined (__linux__) || defined (__FreeBSD__) || defined (__APPLE__) || defined (__CYGWIN__) static void get_cpu_info (double *mhz, int *cpus) { -#if defined(USING_LINUX) || defined (__CYGWIN__) +#if defined(__linux__) || defined (__CYGWIN__) char buf[256]; int fh; @@ -404,7 +404,7 @@ get_cpu_info (double *mhz, int *cpus) *cpus = 1; #endif -#ifdef USING_FREEBSD +#ifdef __FreeBSD__ int mib[2], ncpu; u_long freq; @@ -495,7 +495,7 @@ get_sys_str (int with_cpu) char * get_sys_str (int with_cpu) { -#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (__CYGWIN__) +#if defined (__linux__) || defined (__FreeBSD__) || defined (__APPLE__) || defined (__CYGWIN__) double mhz; #endif int cpus = 1; @@ -507,7 +507,7 @@ get_sys_str (int with_cpu) uname (&un); -#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (__CYGWIN__) +#if defined (__linux__) || defined (__FreeBSD__) || defined (__APPLE__) || defined (__CYGWIN__) get_cpu_info (&mhz, &cpus); if (mhz && with_cpu) { |