diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-01 00:35:15 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-01 00:35:15 +0000 |
commit | 93f21e4ceb7b2bda9d50657cce47f2e640e567b5 (patch) | |
tree | 701675d956c23c5bd600141342b867a411bd1a2c | |
parent | 466cd64ae3c3550a5c5695a6d5fa8f9ab47f2456 (diff) | |
download | chromium_src-93f21e4ceb7b2bda9d50657cce47f2e640e567b5.zip chromium_src-93f21e4ceb7b2bda9d50657cce47f2e640e567b5.tar.gz chromium_src-93f21e4ceb7b2bda9d50657cce47f2e640e567b5.tar.bz2 |
Solaris: various edits towards compiling Chromium on Solaris. Changed __Solaris__ to __sun. Defined NAME_MAX as MAXNAMLEN for systems where it is undefined.
BUG=30101
TEST=compiles
Patch by James Choi <jchoi42 at pha.jhu.edu>
Review URL: http://codereview.chromium.org/652166
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43297 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/base.gypi | 12 | ||||
-rw-r--r-- | base/data_pack.cc | 2 | ||||
-rw-r--r-- | base/float_util.h | 4 | ||||
-rw-r--r-- | base/process_util.h | 8 | ||||
-rw-r--r-- | base/third_party/nspr/prcpucfg.h | 2 | ||||
-rw-r--r-- | build/build_config.h | 2 | ||||
-rw-r--r-- | build/common.gypi | 9 |
7 files changed, 30 insertions, 9 deletions
diff --git a/base/base.gypi b/base/base.gypi index 484b7bf..0e6d6b4 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -288,7 +288,7 @@ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks', ], 'conditions': [ - [ 'OS != "linux" and OS != "freebsd" and OS != "openbsd"', { + [ 'OS != "linux" and OS != "freebsd" and OS != "openbsd" and OS != "solaris"', { 'sources/': [ ['exclude', '/xdg_user_dirs/'], ['exclude', '_nss\.cc$'], @@ -588,7 +588,7 @@ }, ], }], - [ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', { + [ 'OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', { 'targets': [ { 'target_name': 'symbolize', @@ -596,6 +596,14 @@ 'variables': { 'chromium_code': 0, }, + 'conditions': [ + [ 'OS == "solaris"', { + 'include_dirs': [ + '/usr/gnu/include', + '/usr/gnu/include/libelf', + ], + },], + ], 'cflags': [ '-Wno-sign-compare', ], diff --git a/base/data_pack.cc b/base/data_pack.cc index 1078d0a..4e5a569 100644 --- a/base/data_pack.cc +++ b/base/data_pack.cc @@ -22,7 +22,6 @@ static const uint32 kFileFormatVersion = 1; // Length of file header: version and entry count. static const size_t kHeaderLength = 2 * sizeof(uint32); -#pragma pack(push,1) struct DataPackEntry { uint32 resource_id; uint32 file_offset; @@ -41,7 +40,6 @@ struct DataPackEntry { } } }; -#pragma pack(pop) COMPILE_ASSERT(sizeof(DataPackEntry) == 12, size_of_header_must_be_twelve); diff --git a/base/float_util.h b/base/float_util.h index 5909995..a71b639 100644 --- a/base/float_util.h +++ b/base/float_util.h @@ -10,6 +10,10 @@ #include <float.h> #include <math.h> +#if defined(OS_SOLARIS) +#include <ieeefp.h> +#endif + namespace base { inline bool IsFinite(const double& number) { diff --git a/base/process_util.h b/base/process_util.h index 09431db..705b90b 100644 --- a/base/process_util.h +++ b/base/process_util.h @@ -32,6 +32,14 @@ struct kinfo_proc; #include "base/file_path.h" #include "base/process.h" +#ifndef NAME_MAX // Solaris and some BSDs have no NAME_MAX +#ifdef MAXNAMLEN +#define NAME_MAX MAXNAMLEN +#else +#define NAME_MAX 256 +#endif +#endif + #if defined(OS_WIN) typedef PROCESSENTRY32 ProcessEntry; typedef IO_COUNTERS IoCounters; diff --git a/base/third_party/nspr/prcpucfg.h b/base/third_party/nspr/prcpucfg.h index c0dc1f0..5643d4c 100644 --- a/base/third_party/nspr/prcpucfg.h +++ b/base/third_party/nspr/prcpucfg.h @@ -40,7 +40,7 @@ #include "base/third_party/nspr/prcpucfg_freebsd.h" #elif defined(__OpenBSD__) #include "base/third_party/nspr/prcpucfg_openbsd.h" -#elif defined(__Solaris__) +#elif defined(__sun) #include "base/third_party/nspr/prcpucfg_solaris.h" #else #error Provide a prcpucfg.h appropriate for your platform diff --git a/build/build_config.h b/build/build_config.h index 154f237..c0a7bee 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -32,7 +32,7 @@ #elif defined(__OpenBSD__) #define OS_OPENBSD 1 #define TOOLKIT_GTK -#elif defined(__Solaris__) +#elif defined(__sun) #define OS_SOLARIS 1 #define TOOLKIT_GTK #else diff --git a/build/common.gypi b/build/common.gypi index 6774034..6db0932 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -689,7 +689,7 @@ }, }, 'conditions': [ - ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { + ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 'target_defaults': { # Enable -Werror by default, but put it in a variable so it can # be disabled in ~/.gyp/include.gypi on the valgrind builders. @@ -996,6 +996,10 @@ ], }, }], + ['OS=="solaris"', { + 'cflags!': ['-fvisibility=hidden'], + 'cflags_cc!': ['-fvisibility-inlines-hidden'], + }], ['OS=="mac"', { 'target_defaults': { 'variables': { @@ -1170,8 +1174,7 @@ }, }, }], - # Disable native client on FreeBSD/OpenBSD for now - ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd"', { + ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 'target_defaults': { 'defines': [ 'DISABLE_NACL', |