| @@ -1,24 +1,49 @@ | | | @@ -1,24 +1,49 @@ |
1 | $NetBSD: patch-Source_kwsys_SystemInformation.cxx,v 1.4 2013/10/24 04:50:57 obache Exp $ | | 1 | $NetBSD: patch-Source_kwsys_SystemInformation.cxx,v 1.5 2013/10/25 10:49:23 obache Exp $ |
2 | | | 2 | |
3 | Use correct cmake define. | | 3 | * Add more conditional handling for NetBSD, same as others. |
| | | 4 | * Treat Solaris same as Linux. |
| | | 5 | * Use correct cmake define. |
4 | | | 6 | |
5 | --- Source/kwsys/SystemInformation.cxx.orig 2013-10-07 15:31:00.000000000 +0000 | | 7 | --- Source/kwsys/SystemInformation.cxx.orig 2013-10-07 15:31:00.000000000 +0000 |
6 | +++ Source/kwsys/SystemInformation.cxx | | 8 | +++ Source/kwsys/SystemInformation.cxx |
7 | @@ -130,7 +130,7 @@ typedef int siginfo_t; | | 9 | @@ -93,6 +93,22 @@ typedef int siginfo_t; |
| | | 10 | #if defined(__OpenBSD__) || defined(__NetBSD__) |
| | | 11 | # include <sys/param.h> |
| | | 12 | # include <sys/sysctl.h> |
| | | 13 | +# include <sys/socket.h> |
| | | 14 | +# include <netdb.h> |
| | | 15 | +# include <netinet/in.h> |
| | | 16 | +# if defined(KWSYS_SYS_HAS_IFADDRS_H) |
| | | 17 | +# include <ifaddrs.h> |
| | | 18 | +# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN |
| | | 19 | +# endif |
| | | 20 | +# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE) |
| | | 21 | +# include <execinfo.h> |
| | | 22 | +# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE) |
| | | 23 | +# include <cxxabi.h> |
| | | 24 | +# endif |
| | | 25 | +# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP) |
| | | 26 | +# include <dlfcn.h> |
| | | 27 | +# endif |
| | | 28 | +# endif |
| | | 29 | #endif |
| | | 30 | |
| | | 31 | #if defined(KWSYS_SYS_HAS_MACHINE_CPU_H) |
| | | 32 | @@ -130,7 +146,7 @@ typedef int siginfo_t; |
8 | # endif | | 33 | # endif |
9 | #endif | | 34 | #endif |
10 | | | 35 | |
11 | -#ifdef __linux | | 36 | -#ifdef __linux |
12 | +#if defined(__linux) || defined (__sun) | | 37 | +#if defined(__linux) || defined (__sun) |
13 | # include <fenv.h> | | 38 | # include <fenv.h> |
14 | # include <sys/socket.h> | | 39 | # include <sys/socket.h> |
15 | # include <netdb.h> | | 40 | # include <netdb.h> |
16 | @@ -4616,7 +4616,7 @@ bool SystemInformationImplementation::Qu | | 41 | @@ -4616,7 +4632,7 @@ bool SystemInformationImplementation::Qu |
17 | // a 32 bit process on a 64 bit host the returned memory will be | | 42 | // a 32 bit process on a 64 bit host the returned memory will be |
18 | // limited to 4GiB. So if this is a 32 bit process or if the sysconf | | 43 | // limited to 4GiB. So if this is a 32 bit process or if the sysconf |
19 | // method fails use the kstat interface. | | 44 | // method fails use the kstat interface. |
20 | -#if SIZEOF_VOID_P == 8 | | 45 | -#if SIZEOF_VOID_P == 8 |
21 | +#if CMAKE_SIZEOF_VOID_P == 8 | | 46 | +#if CMAKE_SIZEOF_VOID_P == 8 |
22 | if (this->QueryMemoryBySysconf()) | | 47 | if (this->QueryMemoryBySysconf()) |
23 | { | | 48 | { |
24 | return true; | | 49 | return true; |