0

replace platform conditions with os_posix and os_bsd where applicable

this patch also adds a comment that describes why
EAI_NODATA is disabled on FreeBSD

BUG=
TEST=
TBR=wtc

Review URL: http://codereview.chromium.org/8598010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111253 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
robert.nagy@gmail.com
2011-11-22 23:41:45 +00:00
parent 7a3abb9ed2
commit c48aef9240
16 changed files with 20 additions and 18 deletions

@ -365,7 +365,7 @@
'test/scoped_locale.h', 'test/scoped_locale.h',
], ],
}], }],
['OS=="openbsd"', { ['os_bsd==1', {
'sources!': [ 'sources!': [
'test/test_file_util_linux.cc', 'test/test_file_util_linux.cc',
], ],

@ -711,7 +711,7 @@
'browser/renderer_host/gtk_key_bindings_handler.h', 'browser/renderer_host/gtk_key_bindings_handler.h',
], ],
}], }],
['OS=="openbsd"', { ['os_bsd==1', {
'sources/': [ 'sources/': [
['exclude', '^browser/geolocation/wifi_data_provider_linux\\.cc$'], ['exclude', '^browser/geolocation/wifi_data_provider_linux\\.cc$'],
], ],

@ -34,7 +34,7 @@
# These are layered in conditionals in the event other platforms # These are layered in conditionals in the event other platforms
# end up using this module as well. # end up using this module as well.
'conditions': [ 'conditions': [
['OS=="openbsd"', { ['os_bsd==1', {
'sources/': [ 'sources/': [
['exclude', '^plugin/plugin_main_linux\\.cc$'], ['exclude', '^plugin/plugin_main_linux\\.cc$'],
], ],

@ -52,7 +52,7 @@
['exclude', 'ec_private_key_nss\.cc$'], ['exclude', 'ec_private_key_nss\.cc$'],
], ],
}], }],
[ 'OS == "freebsd" or OS == "openbsd"', { [ 'os_bsd==1', {
'link_settings': { 'link_settings': {
'libraries': [ 'libraries': [
'-L/usr/local/lib -lexecinfo', '-L/usr/local/lib -lexecinfo',

@ -84,9 +84,11 @@ std::vector<int> GetAllGetAddrinfoOSErrors() {
#if defined(OS_POSIX) #if defined(OS_POSIX)
#if !defined(OS_FREEBSD) #if !defined(OS_FREEBSD)
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
// EAI_ADDRFAMILY has been declared obsolete in Android's netdb.h. // EAI_ADDRFAMILY has been declared obsolete in Android's and
// FreeBSD's netdb.h.
EAI_ADDRFAMILY, EAI_ADDRFAMILY,
#endif #endif
// EAI_NODATA has been declared obsolete in FreeBSD's netdb.h.
EAI_NODATA, EAI_NODATA,
#endif #endif
EAI_AGAIN, EAI_AGAIN,

@ -846,7 +846,7 @@
'../build/linux/system.gyp:ssl', '../build/linux/system.gyp:ssl',
], ],
}], }],
['OS=="openbsd"', { ['os_bsd==1', {
'sources!': [ 'sources!': [
'base/network_change_notifier_linux.cc', 'base/network_change_notifier_linux.cc',
'base/network_change_notifier_netlink_linux.cc', 'base/network_change_notifier_netlink_linux.cc',

@ -1,4 +1,4 @@
# Copyright (c) 2010 The Chromium Authors. All rights reserved. # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
@ -13,7 +13,7 @@
# TODO(ajwong): For internal pepper plugins, which are statically linked # TODO(ajwong): For internal pepper plugins, which are statically linked
# into chrome, do we want to build w/o -fPIC? If so, how can we express # into chrome, do we want to build w/o -fPIC? If so, how can we express
# that in the build system? # that in the build system?
['OS=="linux" or OS=="openbsd" or OS=="freebsd" or OS=="solaris"', { ['os_posix==1 and OS!="android" and OS!="mac"', {
'cflags': ['-fPIC', '-fvisibility=hidden'], 'cflags': ['-fPIC', '-fvisibility=hidden'],
# This is needed to make the Linux shlib build happy. Without this, # This is needed to make the Linux shlib build happy. Without this,

@ -242,7 +242,7 @@
'direct_dependent_settings': { 'direct_dependent_settings': {
'product_name': '>(_target_name)', 'product_name': '>(_target_name)',
'conditions': [ 'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" or OS=="android"', { ['os_posix==1 and OS!="mac"', {
'cflags': ['-fvisibility=hidden'], 'cflags': ['-fvisibility=hidden'],
'type': 'shared_library', 'type': 'shared_library',
# -gstabs, used in the official builds, causes an ICE. Simply remove # -gstabs, used in the official builds, causes an ICE. Simply remove

@ -261,7 +261,7 @@
], ],
}, },
}], }],
[ 'OS == "openbsd"', { [ 'os_bsd==1', {
'cflags': [ 'cflags': [
'<!@(python cups_config_helper.py --cflags)', '<!@(python cups_config_helper.py --cflags)',
], ],

@ -54,7 +54,7 @@
}, },
'conditions': [ 'conditions': [
[ 'OS == "linux" or OS == "android"', { 'include_dirs': [ 'linux' ] } ], [ 'OS == "linux" or OS == "android"', { 'include_dirs': [ 'linux' ] } ],
[ 'OS == "freebsd" or OS == "openbsd" or OS=="solaris"', { 'include_dirs': [ 'bsd' ] } ], [ 'os_bsd==1 or OS=="solaris"', { 'include_dirs': [ 'bsd' ] } ],
[ 'OS == "mac"', { 'include_dirs': [ 'mac' ] } ], [ 'OS == "mac"', { 'include_dirs': [ 'mac' ] } ],
[ 'OS == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ], [ 'OS == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ],
], ],

@ -59,7 +59,7 @@
'COMPILED_FROM_DSP', 'COMPILED_FROM_DSP',
], ],
}], }],
['OS=="mac" or OS=="android" or OS=="freebsd" or OS=="openbsd"', { ['OS=="mac" or OS=="android" or os_bsd==1', {
'defines': [ 'defines': [
'HAVE_EXPAT_CONFIG_H', 'HAVE_EXPAT_CONFIG_H',
], ],

@ -13,6 +13,6 @@ in the file LICENSE.
Documentation for ICC profile can be found at: http://www.color.org Documentation for ICC profile can be found at: http://www.color.org
Local Modifications: Local Modifications:
* On at least OpenBSD we might need to include to correct header file from * On BSD platforms we might need to include to correct header file from
the system, so a USE_SYSTEM_LIBJPEG ifdef is added to iccjpeg.h in order the system, so a USE_SYSTEM_LIBJPEG ifdef is added to iccjpeg.h in order
to be able to decide which jpeglib.h header to include. to be able to decide which jpeglib.h header to include.

@ -15,7 +15,7 @@
'iccjpeg.h', 'iccjpeg.h',
], ],
'conditions': [ 'conditions': [
['OS=="openbsd" and use_system_libjpeg==1', { ['os_bsd==1 and use_system_libjpeg==1', {
'include_dirs': [ 'include_dirs': [
'/usr/local/include', '/usr/local/include',
], ],

@ -54,7 +54,7 @@
'sources': [ 'epoll.c' ], 'sources': [ 'epoll.c' ],
'include_dirs': [ 'android' ], 'include_dirs': [ 'android' ],
}], }],
[ 'OS == "mac" or OS == "freebsd" or OS == "openbsd"', { [ 'OS == "mac" or os_bsd==1', {
'sources': [ 'kqueue.c' ], 'sources': [ 'kqueue.c' ],
'include_dirs': [ 'mac' ] 'include_dirs': [ 'mac' ]
}], }],

@ -89,7 +89,7 @@
'POSIX', 'POSIX',
], ],
}], }],
['OS=="openbsd" or OS=="freebsd"', { ['os_bsd==1', {
'defines': [ 'defines': [
'BSD', 'BSD',
], ],
@ -133,7 +133,7 @@
'POSIX', 'POSIX',
], ],
}], }],
['OS=="openbsd" or OS=="freebsd"', { ['os_bsd==1', {
'defines': [ 'defines': [
'BSD', 'BSD',
], ],

@ -590,7 +590,7 @@
'-ldl', '-ldl',
], ],
}], }],
['OS=="openbsd" and use_system_libjpeg==1', { ['os_bsd==1 and use_system_libjpeg==1', {
'include_dirs': [ 'include_dirs': [
'/usr/local/include', '/usr/local/include',
], ],