Skip to content

Commit

Permalink
replace platform conditions with os_posix and os_bsd where applicable
Browse files Browse the repository at this point in the history
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
  • Loading branch information
robert.nagy@gmail.com committed Nov 22, 2011
1 parent 7a3abb9 commit c48aef9
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion base/base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@
'test/scoped_locale.h',
],
}],
['OS=="openbsd"', {
['os_bsd==1', {
'sources!': [
'test/test_file_util_linux.cc',
],
Expand Down
2 changes: 1 addition & 1 deletion content/content_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@
'browser/renderer_host/gtk_key_bindings_handler.h',
],
}],
['OS=="openbsd"', {
['os_bsd==1', {
'sources/': [
['exclude', '^browser/geolocation/wifi_data_provider_linux\\.cc$'],
],
Expand Down
2 changes: 1 addition & 1 deletion content/content_plugin.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# These are layered in conditionals in the event other platforms
# end up using this module as well.
'conditions': [
['OS=="openbsd"', {
['os_bsd==1', {
'sources/': [
['exclude', '^plugin/plugin_main_linux\\.cc$'],
],
Expand Down
2 changes: 1 addition & 1 deletion crypto/crypto.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
['exclude', 'ec_private_key_nss\.cc$'],
],
}],
[ 'OS == "freebsd" or OS == "openbsd"', {
[ 'os_bsd==1', {
'link_settings': {
'libraries': [
'-L/usr/local/lib -lexecinfo',
Expand Down
4 changes: 3 additions & 1 deletion net/base/host_resolver_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ std::vector<int> GetAllGetAddrinfoOSErrors() {
#if defined(OS_POSIX)
#if !defined(OS_FREEBSD)
#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,
#endif
// EAI_NODATA has been declared obsolete in FreeBSD's netdb.h.
EAI_NODATA,
#endif
EAI_AGAIN,
Expand Down
2 changes: 1 addition & 1 deletion net/net.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@
'../build/linux/system.gyp:ssl',
],
}],
['OS=="openbsd"', {
['os_bsd==1', {
'sources!': [
'base/network_change_notifier_linux.cc',
'base/network_change_notifier_netlink_linux.cc',
Expand Down
4 changes: 2 additions & 2 deletions ppapi/ppapi_internal.gyp
Original file line number Diff line number Diff line change
@@ -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
# found in the LICENSE file.

Expand All @@ -13,7 +13,7 @@
# 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
# 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'],

# This is needed to make the Linux shlib build happy. Without this,
Expand Down
2 changes: 1 addition & 1 deletion ppapi/ppapi_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
'direct_dependent_settings': {
'product_name': '>(_target_name)',
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" or OS=="android"', {
['os_posix==1 and OS!="mac"', {
'cflags': ['-fvisibility=hidden'],
'type': 'shared_library',
# -gstabs, used in the official builds, causes an ICE. Simply remove
Expand Down
2 changes: 1 addition & 1 deletion printing/printing.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
],
},
}],
[ 'OS == "openbsd"', {
[ 'os_bsd==1', {
'cflags': [
'<!@(python cups_config_helper.py --cflags)',
],
Expand Down
2 changes: 1 addition & 1 deletion sdch/sdch.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
'conditions': [
[ '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 == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ],
],
Expand Down
2 changes: 1 addition & 1 deletion third_party/expat/expat.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
'COMPILED_FROM_DSP',
],
}],
['OS=="mac" or OS=="android" or OS=="freebsd" or OS=="openbsd"', {
['OS=="mac" or OS=="android" or os_bsd==1', {
'defines': [
'HAVE_EXPAT_CONFIG_H',
],
Expand Down
2 changes: 1 addition & 1 deletion third_party/iccjpeg/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ in the file LICENSE.
Documentation for ICC profile can be found at: http://www.color.org

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
to be able to decide which jpeglib.h header to include.
2 changes: 1 addition & 1 deletion third_party/iccjpeg/iccjpeg.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'iccjpeg.h',
],
'conditions': [
['OS=="openbsd" and use_system_libjpeg==1', {
['os_bsd==1 and use_system_libjpeg==1', {
'include_dirs': [
'/usr/local/include',
],
Expand Down
2 changes: 1 addition & 1 deletion third_party/libevent/libevent.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
'sources': [ 'epoll.c' ],
'include_dirs': [ 'android' ],
}],
[ 'OS == "mac" or OS == "freebsd" or OS == "openbsd"', {
[ 'OS == "mac" or os_bsd==1', {
'sources': [ 'kqueue.c' ],
'include_dirs': [ 'mac' ]
}],
Expand Down
4 changes: 2 additions & 2 deletions third_party/libjingle/libjingle.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
'POSIX',
],
}],
['OS=="openbsd" or OS=="freebsd"', {
['os_bsd==1', {
'defines': [
'BSD',
],
Expand Down Expand Up @@ -133,7 +133,7 @@
'POSIX',
],
}],
['OS=="openbsd" or OS=="freebsd"', {
['os_bsd==1', {
'defines': [
'BSD',
],
Expand Down
2 changes: 1 addition & 1 deletion ui/ui.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
'-ldl',
],
}],
['OS=="openbsd" and use_system_libjpeg==1', {
['os_bsd==1 and use_system_libjpeg==1', {
'include_dirs': [
'/usr/local/include',
],
Expand Down

0 comments on commit c48aef9

Please sign in to comment.