security/nss/lib/zlib/patches/msvc-vsnprintf.patch

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 --- zlib-1.2.5/zutil.h	2010-04-18 12:29:24 -0700
     2 +++ zlib/zutil.h	2010-08-21 18:07:03 -0700
     3 @@ -172,17 +172,18 @@
     4  #endif
     6  #ifndef F_OPEN
     7  #  define F_OPEN(name, mode) fopen((name), (mode))
     8  #endif
    10           /* functions */
    12 -#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
    13 +#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) || \
    14 +   (defined(_MSC_VER) && _MSC_VER >= 1500)
    15  #  ifndef HAVE_VSNPRINTF
    16  #    define HAVE_VSNPRINTF
    17  #  endif
    18  #endif
    19  #if defined(__CYGWIN__)
    20  #  ifndef HAVE_VSNPRINTF
    21  #    define HAVE_VSNPRINTF
    22  #  endif

mercurial