tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mozilla.diff (3434B)


      1 diff --git a/media/libjpeg/jmorecfg.h b/media/libjpeg/jmorecfg.h
      2 --- a/media/libjpeg/jmorecfg.h
      3 +++ b/media/libjpeg/jmorecfg.h
      4 @@ -9,16 +9,17 @@
      5  * For conditions of distribution and use, see the accompanying README.ijg
      6  * file.
      7  *
      8  * This file contains additional configuration options that customize the
      9  * JPEG software for special applications or support machine-dependent
     10  * optimizations.  Most users will not need to touch this file.
     11  */
     12 
     13 +#include <stdint.h>
     14 
     15 /*
     16  * Maximum number of components (color channels) allowed in JPEG image.
     17  * To meet the letter of Rec. ITU-T T.81 | ISO/IEC 10918-1, set this to 255.
     18  * However, darn few applications need more than 4 channels (maybe 5 for CMYK +
     19  * alpha mask).  We recommend 10 as a reasonable compromise; use 4 if you are
     20  * really short on memory.  (Each allowed component costs a hundred or so
     21  * bytes of storage, whether actually used in an image or not.)
     22 @@ -91,27 +92,25 @@ typedef unsigned char JOCTET;
     23  * They must be at least as wide as specified; but making them too big
     24  * won't cost a huge amount of memory, so we don't provide special
     25  * extraction code like we did for JSAMPLE.  (In other words, these
     26  * typedefs live at a different point on the speed/space tradeoff curve.)
     27  */
     28 
     29 /* UINT8 must hold at least the values 0..255. */
     30 
     31 -typedef unsigned char UINT8;
     32 +typedef uint8_t UINT8;
     33 
     34 /* UINT16 must hold at least the values 0..65535. */
     35 
     36 -typedef unsigned short UINT16;
     37 +typedef uint16_t UINT16;
     38 
     39 /* INT16 must hold at least the values -32768..32767. */
     40 
     41 -#ifndef XMD_H                   /* X11/xmd.h correctly defines INT16 */
     42 -typedef short INT16;
     43 -#endif
     44 +typedef int16_t INT16;
     45 
     46 /* INT32 must hold at least signed 32-bit values.
     47  *
     48  * NOTE: The INT32 typedef dates back to libjpeg v5 (1994.)  Integers were
     49  * sometimes 16-bit back then (MS-DOS), which is why INT32 is typedef'd to
     50  * long.  It also wasn't common (or at least as common) in 1994 for INT32 to be
     51  * defined by platform headers.  Since then, however, INT32 is defined in
     52  * several other common places:
     53 @@ -128,25 +127,17 @@ typedef short INT16;
     54  * This is a recipe for conflict, since "long" and "int" aren't always
     55  * compatible types.  Since the definition of INT32 has technically been part
     56  * of the libjpeg API for more than 20 years, we can't remove it, but we do not
     57  * use it internally any longer.  We instead define a separate type (JLONG)
     58  * for internal use, which ensures that internal behavior will always be the
     59  * same regardless of any external headers that may be included.
     60  */
     61 
     62 -#ifndef XMD_H                   /* X11/xmd.h correctly defines INT32 */
     63 -#ifndef _BASETSD_H_             /* Microsoft defines it in basetsd.h */
     64 -#ifndef _BASETSD_H              /* MinGW is slightly different */
     65 -#ifndef QGLOBAL_H               /* Qt defines it in qglobal.h */
     66 -typedef long INT32;
     67 -#endif
     68 -#endif
     69 -#endif
     70 -#endif
     71 +typedef int32_t INT32;
     72 
     73 /* Datatype used for image dimensions.  The JPEG standard only supports
     74  * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
     75  * "unsigned int" is sufficient on all machines.  However, if you need to
     76  * handle larger images and you don't mind deviating from the spec, you
     77  * can change this datatype.  (Note that changing this datatype will
     78  * potentially require modifying the SIMD code.  The x86-64 SIMD extensions,
     79  * in particular, assume a 32-bit JDIMENSION.)