Bug 896704 - Remove the MSVC exemption for FAIL_ON_WARNINGS in media/mtransport. r=abr
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Thu, 05 Dec 2013 21:41:04 +0900
changeset 174591 ea36b327a1ee18c08613d1fe36cc6b8d18c8e47f
parent 174590 efaee7511571ee5a43daf68caa749d5c181f51e1
child 174592 4a61d432db433c9ccc98333b8ec22f6a72be00aa
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersabr
bugs896704
milestone28.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
Bug 896704 - Remove the MSVC exemption for FAIL_ON_WARNINGS in media/mtransport. r=abr
media/mtransport/build/moz.build
media/mtransport/third_party/nrappkit/src/port/win32/include/csi_platform.h
media/mtransport/third_party/nrappkit/upstream.diff
--- a/media/mtransport/build/moz.build
+++ b/media/mtransport/build/moz.build
@@ -27,17 +27,17 @@ EXPORTS.mtransport += [
 
 include('../objs.mozbuild')
 
 # These files cannot be built in unified mode because they force NSPR logging.
 SOURCES += mtransport_cppsrcs
 
 LIBRARY_NAME = 'mtransport'
 
-FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
+FAIL_ON_WARNINGS = True
 
 LOCAL_INCLUDES = [
     '/media/webrtc/trunk/third_party/libjingle/source/',
 ]
 LOCAL_INCLUDES += [
     '/media/mtransport/',
     '/media/mtransport/third_party/',
     '/media/mtransport/third_party/nICEr/src/crypto',
--- a/media/mtransport/third_party/nrappkit/src/port/win32/include/csi_platform.h
+++ b/media/mtransport/third_party/nrappkit/src/port/win32/include/csi_platform.h
@@ -46,16 +46,17 @@
 #endif
 
 #define UINT8 UBLAH_IGNORE_ME_PLEASE
 #define INT8 BLAH_IGNORE_ME_PLEASE
 #include <winsock2.h>
 #undef UINT8
 #undef INT8
 #include <r_types.h>
+#include <errno.h>
 
 #define strcasecmp _stricmp
 #define strncasecmp _strnicmp
 
 #define strcasestr stristr
 
 /* Hack version of strlcpy (in util/util.c) */
 size_t strlcat(char *dst, const char *src, size_t siz);
@@ -73,17 +74,19 @@ int gettimeofday(struct timeval *tv, voi
 typedef void* NR_SOCKET;
 #else
 typedef SOCKET NR_SOCKET;
 #define NR_SOCKET_READ(sock,buf,count)   recv((sock),(buf),(count),0)
 #define NR_SOCKET_WRITE(sock,buf,count)  send((sock),(buf),(count),0)
 #define NR_SOCKET_CLOSE(sock)            closesocket(sock)
 #endif
 
+#ifndef EHOSTUNREACH
 #define EHOSTUNREACH    WSAEHOSTUNREACH
+#endif
 
 #define LOG_EMERG       0
 #define LOG_ALERT       1
 #define LOG_CRIT        2
 #define LOG_ERR         3
 #define LOG_WARNING     4
 #define LOG_NOTICE      5
 #define LOG_INFO        6
--- a/media/mtransport/third_party/nrappkit/upstream.diff
+++ b/media/mtransport/third_party/nrappkit/upstream.diff
@@ -1,11 +1,11 @@
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/event/async_wait.h src/event/async_wait.h
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/event/async_wait.h	2007-06-26 15:37:44.000000000 -0700
-+++ src/event/async_wait.h	2012-10-03 22:15:41.000000000 -0700
+diff --git a/media/mtransport/third_party/nrappkit/src/event/async_wait.h b/media/mtransport/third_party/nrappkit/src/event/async_wait.h
+--- a/media/mtransport/third_party/nrappkit/src/event/async_wait.h
++++ b/media/mtransport/third_party/nrappkit/src/event/async_wait.h
 @@ -38,21 +38,21 @@
  
  
  #ifndef _async_wait_h
  #define _async_wait_h
  
  #ifdef HAVE_SYS_TIME_H
  #include <sys/time.h>
@@ -19,38 +19,39 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  #define NR_ASYNC_WAIT_WRITE 1
  
  
  int NR_async_wait_init(void);
  int NR_async_wait(NR_SOCKET sock, int how, NR_async_cb cb,void *cb_arg,
                              char *function,int line);
  int NR_async_cancel(NR_SOCKET sock,int how);
  int NR_async_schedule(NR_async_cb cb,void *arg,char *function,int line);
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/log/r_log.c src/log/r_log.c
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/log/r_log.c	2008-11-25 14:25:18.000000000 -0800
-+++ src/log/r_log.c	2012-10-03 22:15:41.000000000 -0700
-@@ -33,28 +33,40 @@
+diff --git a/media/mtransport/third_party/nrappkit/src/log/r_log.c b/media/mtransport/third_party/nrappkit/src/log/r_log.c
+--- a/media/mtransport/third_party/nrappkit/src/log/r_log.c
++++ b/media/mtransport/third_party/nrappkit/src/log/r_log.c
+@@ -33,28 +33,41 @@
     POSSIBILITY OF SUCH DAMAGE.
-    
+ 
  
     ekr@rtfm.com  Mon Dec  3 15:24:38 2001
   */
  
  
  static char *RCSSTRING __UNUSED__ ="$Id: r_log.c,v 1.10 2008/11/25 22:25:18 adamcain Exp $";
  
  
 +#ifdef LINUX
 +#define _BSD_SOURCE
 +#endif
 +
  #include "r_log.h"
  #include "hex.h"
 +
  #include <string.h>
++#include <errno.h>
 +#ifndef _MSC_VER
 +#include <strings.h>
 +#include <syslog.h>
 +#endif
  #include <registry.h>
  #include <time.h>
 +
 +
@@ -63,19 +64,19 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  int NR_LOG_LOGGING = 0;
  
  static char *log_level_strings[]={
       "EMERG",
       "ALERT",
       "CRIT",
       "ERR",
       "WARNING",
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/port/darwin/include/csi_platform.h src/port/darwin/include/csi_platform.h
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/port/darwin/include/csi_platform.h	2007-06-26 15:37:48.000000000 -0700
-+++ src/port/darwin/include/csi_platform.h	2012-10-03 22:15:41.000000000 -0700
+diff --git a/media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h b/media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
+--- a/media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
++++ b/media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
 @@ -37,17 +37,21 @@
   */
  
  
  #ifndef _platform_h
  #define _platform_h
  
  #include <unistd.h>
@@ -88,19 +89,19 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  typedef int NR_SOCKET;
  #define NR_SOCKET_READ(sock,buf,count)   read((sock),(buf),(count))
  #define NR_SOCKET_WRITE(sock,buf,count)  write((sock),(buf),(count))
  #define NR_SOCKET_CLOSE(sock)            close(sock)
 +#endif
  
  #endif
  
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/port/linux/include/csi_platform.h src/port/linux/include/csi_platform.h
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/port/linux/include/csi_platform.h	2007-06-26 15:37:49.000000000 -0700
-+++ src/port/linux/include/csi_platform.h	2012-10-03 22:15:41.000000000 -0700
+diff --git a/media/mtransport/third_party/nrappkit/src/port/linux/include/csi_platform.h b/media/mtransport/third_party/nrappkit/src/port/linux/include/csi_platform.h
+--- a/media/mtransport/third_party/nrappkit/src/port/linux/include/csi_platform.h
++++ b/media/mtransport/third_party/nrappkit/src/port/linux/include/csi_platform.h
 @@ -35,17 +35,21 @@
  
     ekr@rtfm.com  Mon Dec 13 17:26:51 2004
   */
  
  
  #ifndef _platform_h
  #define _platform_h
@@ -113,63 +114,38 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  typedef int NR_SOCKET;
  #define NR_SOCKET_READ(sock,buf,count)   read((sock),(buf),(count))
  #define NR_SOCKET_WRITE(sock,buf,count)  write((sock),(buf),(count))
  #define NR_SOCKET_CLOSE(sock)            close(sock)
 +#endif
  
  #endif
  
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/port/linux/include/sys/queue.h src/port/linux/include/sys/queue.h
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/port/linux/include/sys/queue.h	2012-10-03 18:04:13.000000000 -0700
-+++ src/port/linux/include/sys/queue.h	2012-10-03 17:49:05.000000000 -0700
-@@ -26,21 +26,21 @@
-  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-  * SUCH DAMAGE.
-  *
-  *	@(#)queue.h	8.5 (Berkeley) 8/20/94
-  * $FreeBSD: src/sys/sys/queue.h,v 1.58 2004/04/07 04:19:49 imp Exp $
-  */
- 
- #ifndef _SYS_QUEUE_H_
- #define	_SYS_QUEUE_H_
- 
--#include <stddef.h>
-+#include <linux/stddef.h>
- #define __offsetof offsetof
- 
- #include <sys/cdefs.h>
- 
- #define STAILQ_FOREACH_SAFE(var, head, field, tvar)                     \
-          for ((var) = STAILQ_FIRST((head));                              \
-              (var) && ((tvar) = STAILQ_NEXT((var), field), 1);           \
-              (var) = (tvar))
- 
- 
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/port/win32/include/csi_platform.h src/port/win32/include/csi_platform.h
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/port/win32/include/csi_platform.h	2008-04-29 20:19:10.000000000 -0700
-+++ src/port/win32/include/csi_platform.h	2012-10-03 22:15:41.000000000 -0700
-@@ -47,43 +47,46 @@
+diff --git a/media/mtransport/third_party/nrappkit/src/port/win32/include/csi_platform.h b/media/mtransport/third_party/nrappkit/src/port/win32/include/csi_platform.h
+--- a/media/mtransport/third_party/nrappkit/src/port/win32/include/csi_platform.h
++++ b/media/mtransport/third_party/nrappkit/src/port/win32/include/csi_platform.h
+@@ -44,45 +44,51 @@
+ #define _WIN32_WINNT 0x0400  // This prevents weird "'TryEnterCriticalSection': identifier not found"
+                              // compiler errors when poco/win32_mutex.h is included
+ #endif
  
  #define UINT8 UBLAH_IGNORE_ME_PLEASE
  #define INT8 BLAH_IGNORE_ME_PLEASE
  #include <winsock2.h>
  #undef UINT8
  #undef INT8
  #include <r_types.h>
++#include <errno.h>
  
  #define strcasecmp _stricmp
  #define strncasecmp _strnicmp
 -#define snprintf _snprintf
  
  #define strcasestr stristr
  
- /* Hack version of addr2ascii (in util/util.c) */
- char *addr2ascii(int af, const void *addrp, int len,char *buf);
- 
  /* Hack version of strlcpy (in util/util.c) */
  size_t strlcat(char *dst, const char *src, size_t siz);
  
  /* Hack version of getopt() (in util/getopt.c) */
  int getopt(int argc, char *argv[], char *opstring);
  extern char *optarg;
  extern int optind;
  extern int opterr;
@@ -181,34 +157,38 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
 +typedef void* NR_SOCKET;
 +#else
  typedef SOCKET NR_SOCKET;
  #define NR_SOCKET_READ(sock,buf,count)   recv((sock),(buf),(count),0)
  #define NR_SOCKET_WRITE(sock,buf,count)  send((sock),(buf),(count),0)
  #define NR_SOCKET_CLOSE(sock)            closesocket(sock)
 +#endif
  
++#ifndef EHOSTUNREACH
  #define EHOSTUNREACH    WSAEHOSTUNREACH
++#endif
  
  #define LOG_EMERG       0
  #define LOG_ALERT       1
  #define LOG_CRIT        2
  #define LOG_ERR         3
  #define LOG_WARNING     4
  #define LOG_NOTICE      5
  #define LOG_INFO        6
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/registry/registry.c src/registry/registry.c
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/registry/registry.c	2007-11-20 16:09:12.000000000 -0800
-+++ src/registry/registry.c	2012-10-03 22:15:41.000000000 -0700
+ #define LOG_DEBUG       7
+ 
+diff --git a/media/mtransport/third_party/nrappkit/src/registry/registry.c b/media/mtransport/third_party/nrappkit/src/registry/registry.c
+--- a/media/mtransport/third_party/nrappkit/src/registry/registry.c
++++ b/media/mtransport/third_party/nrappkit/src/registry/registry.c
 @@ -37,21 +37,22 @@
-  *    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+  *    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   *    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   *    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   *    POSSIBILITY OF SUCH DAMAGE.
-  *    
+  *
   *
   */
  
  #include <assert.h>
  #include <string.h>
 -#ifndef WIN32
 +#ifndef _MSC_VER
 +#include <strings.h>
@@ -217,19 +197,19 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  #endif
  #ifdef OPENSSL
  #include <openssl/ssl.h>
  #endif
  #include <ctype.h>
  #include "registry.h"
  #include "registry_int.h"
  #include "registry_vtbl.h"
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/libekr/r_crc32.c src/util/libekr/r_crc32.c
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/libekr/r_crc32.c	2008-11-25 19:22:02.000000000 -0800
-+++ src/util/libekr/r_crc32.c	2012-10-03 22:15:41.000000000 -0700
+diff --git a/media/mtransport/third_party/nrappkit/src/util/libekr/r_crc32.c b/media/mtransport/third_party/nrappkit/src/util/libekr/r_crc32.c
+--- a/media/mtransport/third_party/nrappkit/src/util/libekr/r_crc32.c
++++ b/media/mtransport/third_party/nrappkit/src/util/libekr/r_crc32.c
 @@ -58,20 +58,21 @@
   * the crc computation is finished.  The crc should be complemented
   * before transmission.
   * The variable corresponding to the macro argument "crc" should
   * be an unsigned long and should be preset to all ones for Ethernet
   * use.  An error-free packet will leave 0xDEBB20E3 in the crc.
   *			Spencer Garrett <srg@quick.com>
   */
@@ -242,19 +222,19 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  
  #ifdef WIN32
  #define u_int32_t  UINT4
  #endif
  
  #define CRC(crc, ch)	 (crc = (crc >> 8) ^ crctab[(crc ^ (ch)) & 0xff])
  
  /* generated using the AUTODIN II polynomial
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/libekr/r_macros.h src/util/libekr/r_macros.h
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/libekr/r_macros.h	2007-06-26 15:37:57.000000000 -0700
-+++ src/util/libekr/r_macros.h	2012-10-03 22:15:41.000000000 -0700
+diff --git a/media/mtransport/third_party/nrappkit/src/util/libekr/r_macros.h b/media/mtransport/third_party/nrappkit/src/util/libekr/r_macros.h
+--- a/media/mtransport/third_party/nrappkit/src/util/libekr/r_macros.h
++++ b/media/mtransport/third_party/nrappkit/src/util/libekr/r_macros.h
 @@ -118,20 +118,20 @@
  #ifndef MIN
  #define MIN(a,b) ((a)>(b))?(b):(a)
  #endif
  
  #ifndef MAX
  #define MAX(a,b) ((b)>(a))?(b):(a)
  #endif
@@ -266,20 +246,20 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  #else
  #define DBG(a)
  #endif
  
  #define UNIMPLEMENTED do { fprintf(stderr,"%s:%d Function %s unimplemented\n",__FILE__,__LINE__,__FUNCTION__); abort(); } while(0)
  
  #include "r_memory.h"
  
- #endif 
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/libekr/r_time.h src/util/libekr/r_time.h
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/libekr/r_time.h	2007-06-26 15:37:57.000000000 -0700
-+++ src/util/libekr/r_time.h	2012-10-03 22:15:46.000000000 -0700
+ #endif
+diff --git a/media/mtransport/third_party/nrappkit/src/util/libekr/r_time.h b/media/mtransport/third_party/nrappkit/src/util/libekr/r_time.h
+--- a/media/mtransport/third_party/nrappkit/src/util/libekr/r_time.h
++++ b/media/mtransport/third_party/nrappkit/src/util/libekr/r_time.h
 @@ -77,35 +77,25 @@
     $Id: r_time.h,v 1.4 2007/06/26 22:37:57 adamcain Exp $
  
  
     ekr@rtfm.com  Thu Mar  4 08:45:41 1999
   */
  
  
@@ -310,21 +290,21 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  int r_timeval_diff(struct timeval *t1,struct timeval *t0, struct timeval *diff);
  int r_timeval_add(struct timeval *t1,struct timeval *t2, struct timeval *sum);
  int r_timeval_cmp(struct timeval *t1,struct timeval *t2);
  
  UINT8 r_timeval2int(struct timeval *tv);
  int r_int2timeval(UINT8 t,struct timeval *tv);
  UINT8 r_gettimeint(void);
  
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/util.c src/util/util.c
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/util.c	2007-11-20 16:09:13.000000000 -0800
-+++ src/util/util.c	2012-10-03 22:15:41.000000000 -0700
-@@ -291,20 +291,22 @@
-     
+diff --git a/media/mtransport/third_party/nrappkit/src/util/util.c b/media/mtransport/third_party/nrappkit/src/util/util.c
+--- a/media/mtransport/third_party/nrappkit/src/util/util.c
++++ b/media/mtransport/third_party/nrappkit/src/util/util.c
+@@ -292,20 +292,22 @@ int nr_sha1_file(char *filename,UCHAR *o
+ 
      return(_status);
    }
  
  #endif
  
  #ifdef WIN32
    // TODO
  #else
@@ -335,40 +315,40 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
  
  int nr_rm_tree(char *path)
    {
      FTS *fts=0;
      FTSENT *p;
      int failed=0;
      int _status;
      char *argv[2];
-     
-@@ -336,20 +338,21 @@
+ 
+@@ -337,20 +339,21 @@ int nr_rm_tree(char *path)
      }
  
      if(failed)
        ABORT(R_FAILED);
-     
+ 
      _status=0;
    abort:
      if(fts) fts_close(fts);
      return(_status);
    }
 +#endif
  
  int nr_write_pid_file(char *pid_filename)
    {
      FILE *fp;
      int _status;
  
      if(!pid_filename)
        ABORT(R_BAD_ARGS);
  
      unlink(pid_filename);
-@@ -541,12 +544,24 @@
+@@ -739,12 +742,24 @@ int gettimeofday(struct timeval *tv, voi
       * since the Epoch */
      SystemTimeToFileTime(&st, &ft);
      u.HighPart = ft.dwHighDateTime;
      u.LowPart = ft.dwLowDateTime;
  
      tv->tv_sec = (long) (u.QuadPart / 10000000L);
      tv->tv_usec = (long) (st.wMilliseconds * 1000);;
  
@@ -381,30 +361,31 @@ diff -r -U10 /Users/ekr/dev/mtransport-i
 +  int ret;
 +  va_start(argp, format);
 +  ret = _vscprintf(format, argp);
 +  vsnprintf_s(buffer, n, _TRUNCATE, format, argp);
 +  va_end(argp);
 +  return ret;
 +}
 +
- #endif 
+ #endif
  
-diff -r -U10 /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/util.h src/util/util.h
---- /Users/ekr/dev/mtransport-import-references/nrappkit/src/util/util.h	2006-08-16 12:39:17.000000000 -0700
-+++ src/util/util.h	2012-10-03 22:15:41.000000000 -0700
-@@ -57,12 +57,16 @@
+diff --git a/media/mtransport/third_party/nrappkit/src/util/util.h b/media/mtransport/third_party/nrappkit/src/util/util.h
+--- a/media/mtransport/third_party/nrappkit/src/util/util.h
++++ b/media/mtransport/third_party/nrappkit/src/util/util.h
+@@ -57,12 +57,17 @@ int nr_drop_privileges(char *username);
  int nr_hex_ascii_dump(Data *data);
  int nr_fwrite_all(FILE *fp,UCHAR *buf,int len);
  int nr_sha1_file(char *filename,UCHAR *out);
  int nr_bin2hex(UCHAR *in,int len,UCHAR *out);
  int nr_rm_tree(char *path);
  int nr_write_pid_file(char *pid_filename);
  
  int nr_reg_uint4_fetch_and_check(NR_registry key, UINT4 min, UINT4 max, int log_fac, int die, UINT4 *val);
  int nr_reg_uint8_fetch_and_check(NR_registry key, UINT8 min, UINT8 max, int log_fac, int die, UINT8 *val);
  
 +#ifdef WIN32
 +int snprintf(char *buffer, size_t n, const char *format, ...);
++const char *inet_ntop(int af, const void *src, char *dst, size_t size);
+ #endif
+ 
 +#endif
 +
- #endif
-