|
|
Created:
6 years, 8 months ago by jfroy Modified:
6 years, 7 months ago CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Visibility:
Public. |
DescriptionImport C++11 headers for unordered map and set when using libc++ in protobuf's config header to avoid warnings.
BUG=366218
TBR=brettw
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269646
Patch Set 1 #
Total comments: 2
Patch Set 2 : Removed changes to README.chromium #
Total comments: 3
Patch Set 3 : Added note in config.h that it has been manually edited. #Patch Set 4 : Use cstdbool instead of ciso646 to avoid side-effects in MSVS and add comment to explain. #Patch Set 5 : Changed the strategy to work on all Chromium configurations and updated the comment. #Patch Set 6 : Strip whitespace. #Messages
Total messages: 18 (0 generated)
First patch to Chromium, please be nice. Submitting a set of patches to improve and fix compiling a subset of chromium for including into the Google Cast SDK for iOS (to support video and audio casting).
I'm not sure on the reasoning behind this change (libc++ has <ext/hash_map> and <ext/hash_set> AFAIK) - is there a reason you need to use unordered_map/set instead? In any case, I think it would make more sense to make your changes upstream at https://code.google.com/p/protobuf/ changing config.ac as necessary, otherwise your changes will be replaced the next time someone runs configure and uploads the auto-generated config.h. https://codereview.chromium.org/246633012/diff/1/third_party/protobuf/README.... File third_party/protobuf/README.chromium (right): https://codereview.chromium.org/246633012/diff/1/third_party/protobuf/README.... third_party/protobuf/README.chromium:19: The config file has been patched to support both libstdc++ and libc++. You don't need this line, since you are changing a local file, not one taken from upstream (see list above).
On 2014/04/24 10:13:31, rmcilroy wrote: > I'm not sure on the reasoning behind this change (libc++ has <ext/hash_map> and > <ext/hash_set> AFAIK) - is there a reason you need to use unordered_map/set > instead? It does, but it warns. Just trying to cleanup. > > In any case, I think it would make more sense to make your changes upstream at > https://code.google.com/p/protobuf/ changing config.ac as necessary, otherwise > your changes will be replaced the next time someone runs configure and uploads > the auto-generated config.h. protobuf has already been updated and generates a sensible config.h when targeting libc++. The issue here is that chromium needs a "adaptive" config.h header that will work with the various platforms and configurations that get used to build it. Hence the conditional code. Note that the existing STLPORT conditions are not in upstream protobuf either. > > https://codereview.chromium.org/246633012/diff/1/third_party/protobuf/README.... > File third_party/protobuf/README.chromium (right): > > https://codereview.chromium.org/246633012/diff/1/third_party/protobuf/README.... > third_party/protobuf/README.chromium:19: The config file has been patched to > support both libstdc++ and libc++. > You don't need this line, since you are changing a local file, not one taken > from upstream (see list above). I just thought I should make a note of the change. I can remove that chunk.
I see - lgtm modulo the comments below. I'm not an OWNER though so you will need an LGTM from an OWNER. https://codereview.chromium.org/246633012/diff/40001/third_party/protobuf/con... File third_party/protobuf/config.h (right): https://codereview.chromium.org/246633012/diff/40001/third_party/protobuf/con... third_party/protobuf/config.h:2: /* config.h.in. Generated from configure.ac by autoheader. */ Please replace this comment to make it clear that this file was originally autogenerated, but has since been modified to enable adaptive support for stlport and libc++. https://codereview.chromium.org/246633012/diff/40001/third_party/protobuf/con... third_party/protobuf/config.h:6: /* the name of <hash_map> */ nit - <unordered_map> or <hash_map> https://codereview.chromium.org/246633012/diff/40001/third_party/protobuf/con... third_party/protobuf/config.h:29: /* the name of <hash_set> */ nit - <unordered_set> or <hash_set>
I added a note, but the other comments are exactly as found in the generated config.h from a protobuf checkout and configure, so I'm leaving them alone.
https://codereview.chromium.org/246633012/diff/1/third_party/protobuf/config.h File third_party/protobuf/config.h (right): https://codereview.chromium.org/246633012/diff/1/third_party/protobuf/config.... third_party/protobuf/config.h:4: #include <ciso646> This seems a bit mysterious. I assume you picked this to be the simplest "standard" header so _LIBCPP_VERSION is defined? I think we should document this.
Sure, I'll add a comment. The header file “ciso646″ is required by both the C++03 and C++11 standards, and defined to do nothing. http://cplusplusmusings.wordpress.com/2013/02/26/c-and-xcode-4-6/ On Sat, Apr 26, 2014 at 8:55, <brettw@chromium.org> wrote: > > https://codereview.chromium.org/246633012/diff/1/third_ > party/protobuf/config.h > File third_party/protobuf/config.h (right): > > https://codereview.chromium.org/246633012/diff/1/third_ > party/protobuf/config.h#newcode4 > third_party/protobuf/config.h:4<https://codereview.chromium.org/246633012/diff/1/third_party/protobuf/config.h#newcode4third_party/protobuf/config.h:4>: > #include <ciso646> > This seems a bit mysterious. I assume you picked this to be the simplest > "standard" header so _LIBCPP_VERSION is defined? I think we should > document this. > > https://codereview.chromium.org/246633012/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Although https://qt.gitorious.org/qt/junfs-qt/commit/9deca2ef28e1f593d3882ba0c7e9dd7b0... we should use <new> instead for MSVS. I assume we care about that toolchain. On Sat, Apr 26, 2014 at 10:47, Jean-François Roy <jfroy@google.com> wrote: > Sure, I'll add a comment. > > The header file “ciso646″ is required by both the C++03 and C++11 > standards, and defined to do nothing. > > http://cplusplusmusings.wordpress.com/2013/02/26/c-and-xcode-4-6/ > On Sat, Apr 26, 2014 at 8:55, <brettw@chromium.org> wrote: > >> >> https://codereview.chromium.org/246633012/diff/1/third_party >> /protobuf/config.h >> File third_party/protobuf/config.h (right): >> >> https://codereview.chromium.org/246633012/diff/1/third_party >> /protobuf/config.h#newcode4 >> third_party/protobuf/config.h:4<https://codereview.chromium.org/246633012/diff/1/third_party/protobuf/config.h#newcode4third_party/protobuf/config.h:4>: >> #include <ciso646> >> This seems a bit mysterious. I assume you picked this to be the simplest >> "standard" header so _LIBCPP_VERSION is defined? I think we should >> document this. >> >> https://codereview.chromium.org/246633012/ >> > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
cpu@, git cl owners says you own this config file. Can you take a look?
not exactly, see third_party\owners file.
On 2014/05/08 17:27:35, cpu wrote: > not exactly, see third_party\owners file. Oops, sorry!
The CQ bit was checked by jfroy@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jfroy@chromium.org/246633012/100001
The CQ bit was checked by jfroy@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jfroy@chromium.org/246633012/120001
Message was sent while issue was closed.
Change committed as 269646 |