Merge mozilla-central to mozilla-inbound
authorEd Morley <emorley@mozilla.com>
Thu, 18 Oct 2012 18:14:23 +0100
changeset 110681 32ef5e90397832d437d448288eb91e30a68fd1ca
parent 110680 2d43cfeb92e8a7d144d3c87e87e6d7ad22e6381d (current diff)
parent 110658 3779eb3f036fd4d1e5b7d56d4bc430cb209b6fd7 (diff)
child 110682 3b1ee99a8e618753d44f2b0677f10f2fa7a0ebc5
push id23708
push userryanvm@gmail.com
push dateFri, 19 Oct 2012 01:28:59 +0000
treeherdermozilla-central@fd5556088388 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central to mozilla-inbound
--- a/configure.in
+++ b/configure.in
@@ -180,16 +180,17 @@ if test -n "$gonkdir" ; then
     AS="$gonk_toolchain_prefix"as
     CC="$gonk_toolchain_prefix"gcc
     CXX="$gonk_toolchain_prefix"g++
     CPP="$gonk_toolchain_prefix"cpp
     LD="$gonk_toolchain_prefix"ld
     AR="$gonk_toolchain_prefix"ar
     RANLIB="$gonk_toolchain_prefix"ranlib
     STRIP="$gonk_toolchain_prefix"strip
+    OBJCOPY="$gonk_toolchain_prefix"objcopy
 
     STLPORT_CPPFLAGS="-I$gonkdir/ndk/sources/cxx-stl/stlport/stlport/ -I$gonkdir/external/stlport/stlport/"
     STLPORT_LIBS="-lstlport"
 
     case "$target_cpu" in
     arm)
         ARCH_DIR=arch-arm
         ;;
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -162,16 +162,17 @@ if test -n "$gonkdir" ; then
     AS="$gonk_toolchain_prefix"as
     CC="$gonk_toolchain_prefix"gcc
     CXX="$gonk_toolchain_prefix"g++
     CPP="$gonk_toolchain_prefix"cpp
     LD="$gonk_toolchain_prefix"ld
     AR="$gonk_toolchain_prefix"ar
     RANLIB="$gonk_toolchain_prefix"ranlib
     STRIP="$gonk_toolchain_prefix"strip
+    OBJCOPY="$gonk_toolchain_prefix"objcopy
 
     STLPORT_CPPFLAGS="-I$gonkdir/external/stlport/stlport"
     STLPORT_LIBS="-lstlport"
 
     case "$target_cpu" in
     arm)
         ARCH_DIR=arch-arm
         ;;
--- a/media/webrtc/signaling/src/sipcc/cpr/common/cpr_string.c
+++ b/media/webrtc/signaling/src/sipcc/cpr/common/cpr_string.c
@@ -173,16 +173,24 @@ void flex_string_append(flex_string *fs,
 void flex_string_sprintf(flex_string *fs, const char *format, ...) {
   va_list ap;
   int vsnprintf_result;
 
   va_start(ap, format);
   vsnprintf_result = vsnprintf(fs->buffer + fs->string_length, fs->buffer_length - fs->string_length, format, ap);
   va_end(ap);
 
+  /* Special case just for Windows where vsnprintf is broken
+     and returns -1 if buffer too large unless you size it 0. */
+  if (vsnprintf_result < 0) {
+    va_start(ap, format);
+    vsnprintf_result = vsnprintf(NULL, 0, format, ap);
+    va_end(ap);
+  }
+
   if (fs->string_length + vsnprintf_result >= fs->buffer_length) {
     /* Buffer overflow, resize */
     flex_string_check_alloc(fs, fs->string_length + vsnprintf_result + 1);
 
     /* Try again with new buffer */
     va_start(ap, format);
     vsnprintf_result = vsnprintf(fs->buffer + fs->string_length, fs->buffer_length - fs->string_length, format, ap);
     MOZ_ASSERT(vsnprintf_result > 0 && vsnprintf_result < (fs->buffer_length - fs->string_length));