Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 347123 Chromium fails to build on FreeBSD 9.2 as safe_sprintf.cc Mac/Andriod workaround needs to be applied there too
Starred by 3 users Reported by carpedd...@gmail.com, Feb 26, 2014 Back to list
Status: Archived
Owner: ----
Closed: Aug 2015
OS: ----
Pri: 2
Type: Bug


Sign in to add a comment
Chrome Version       : 33.0.1750.117

--- ./work/chromium-33.0.1750.117/base/strings/safe_sprintf.cc  2014-02-20 15:28:45.000000000 -0500
+++ /tmp/safe_sprintf.cc        2014-02-26 09:17:33.000000000 -0500
@@ -107,11 +107,11 @@
       : buffer_(buffer),
         size_(size - 1),  // Account for trailing NUL byte
         count_(0) {
-// The following assertion does not build on Mac and Android. This is because
-// static_assert only works with compile-time constants, but mac uses
-// libstdc++4.2 and android uses stlport, which both don't mark
-// numeric_limits::max() as constexp.
-#if __cplusplus >= 201103 && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS)
+// The following assertion does not build on Mac, Android and older FreeBSD.
+// This is because static_assert only works with compile-time constants, but
+// Mac and FreeBSD < 10 use libstdc++4.2 and android uses stlport, which both
+// don't mark numeric_limits::max() as constexp.
+#if __cplusplus >= 201103 && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_FREEBSD)
     COMPILE_ASSERT(kSSizeMaxConst == \
                    static_cast<size_t>(std::numeric_limits<ssize_t>::max()),
                    kSSizeMax_is_the_max_value_of_an_ssize_t);

 
Comment 1 by meh...@chromium.org, Feb 26, 2014
Labels: Build
Comment 2 by r.c.la...@gmail.com, Mar 7, 2014
How about changing the !defined(OS_FREEBSD) conditional to !(defined(OS_FREEBSD) && __FreeBSD_version > 1000054) ?

This allows the assert to compile on recent versions of FreeBSD.

You might need to include <sys/param.h> (I managed to compile it without).
Comment 3 by lafo...@chromium.org, Aug 25, 2015
Status: Archived
Archiving unconfirmed issues, which have not been modified (commented on, updated, etc...) in over 1 year.
Sign in to add a comment