* external/zlib/zlib.dif
* external/jpeg/Makefile
+ external/jpeg/jpeg.dif
+ Added/updated diffs after VxWorks changes.
Patch by Tamas Tevesz. Thanks!
209 lines
6.6 KiB
Plaintext
209 lines
6.6 KiB
Plaintext
diff -urN zlib.orig/crc32.c zlib/crc32.c
|
|
--- zlib.orig/crc32.c 2010-07-15 17:16:00.380244239 +0200
|
|
+++ zlib/crc32.c 2010-07-15 17:16:00.390235257 +0200
|
|
@@ -19,6 +19,8 @@
|
|
one thread to use crc32().
|
|
*/
|
|
|
|
+#define NOBYFOUR
|
|
+
|
|
#ifdef MAKECRCH
|
|
# include <stdio.h>
|
|
# ifndef DYNAMIC_CRC_TABLE
|
|
diff -urN zlib.orig/deflate.c zlib/deflate.c
|
|
--- zlib.orig/deflate.c 2010-07-15 17:16:00.580233893 +0200
|
|
+++ zlib/deflate.c 2010-07-15 17:16:00.600241073 +0200
|
|
@@ -51,6 +51,10 @@
|
|
|
|
#include "deflate.h"
|
|
|
|
+#ifdef STDC /* need ANSI C limits.h to determine sizes */
|
|
+# include <limits.h>
|
|
+#endif
|
|
+
|
|
const char deflate_copyright[] =
|
|
" deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
|
|
/*
|
|
@@ -345,7 +349,7 @@
|
|
for (n = 0; n <= length - MIN_MATCH; n++) {
|
|
INSERT_STRING(s, n, hash_head);
|
|
}
|
|
- if (hash_head) hash_head = 0; /* to make compiler happy */
|
|
+ if (hash_head) {;} /* to make compiler happy */
|
|
return Z_OK;
|
|
}
|
|
|
|
@@ -1314,6 +1318,7 @@
|
|
more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
|
|
|
|
/* Deal with !@#$% 64K limit: */
|
|
+#if defined( UINT_MAX ) && UINT_MAX <= 0xFFFF
|
|
if (sizeof(int) <= 2) {
|
|
if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
|
|
more = wsize;
|
|
@@ -1325,6 +1330,7 @@
|
|
more--;
|
|
}
|
|
}
|
|
+#endif
|
|
|
|
/* If the window is almost full and there is insufficient lookahead,
|
|
* move the upper half to the lower one to make room in the upper half.
|
|
@@ -1743,7 +1749,7 @@
|
|
int flush;
|
|
{
|
|
int bflush; /* set if current block must be flushed */
|
|
- uInt prev; /* byte at distance one to match */
|
|
+ Byte prev; /* byte at distance one to match */
|
|
Bytef *scan, *strend; /* scan goes up to strend for length of run */
|
|
|
|
for (;;) {
|
|
diff -urN zlib.orig/gzguts.h zlib/gzguts.h
|
|
--- zlib.orig/gzguts.h 2010-07-15 17:16:00.630234244 +0200
|
|
+++ zlib/gzguts.h 2010-07-15 17:16:00.630234244 +0200
|
|
@@ -31,9 +31,19 @@
|
|
# define NO_GZCOMPRESS
|
|
#endif
|
|
|
|
-#ifdef _MSC_VER
|
|
-# include <io.h>
|
|
-# define vsnprintf _vsnprintf
|
|
+#if defined(MSDOS)
|
|
+ /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
|
|
+ but for now we just assume it doesn't. */
|
|
+# define NO_vsnprintf
|
|
+#elif defined(OS2) || defined(WINDOWS) || defined(WIN32)
|
|
+# ifndef _WINCE
|
|
+# include <io.h>
|
|
+# if defined(_MSC_VER) && !defined(__XCC__)
|
|
+# define vsnprintf _vsnprintf
|
|
+# endif
|
|
+# endif
|
|
+#else
|
|
+# include <unistd.h>
|
|
#endif
|
|
|
|
#ifndef local
|
|
diff -urN zlib.orig/gzread.c zlib/gzread.c
|
|
--- zlib.orig/gzread.c 2010-07-15 17:16:00.670240781 +0200
|
|
+++ zlib/gzread.c 2010-07-15 17:16:00.670240781 +0200
|
|
@@ -167,12 +167,12 @@
|
|
gz_error(state, Z_DATA_ERROR, "unknown header flags set");
|
|
return -1;
|
|
}
|
|
- NEXT(); /* modification time */
|
|
- NEXT();
|
|
- NEXT();
|
|
- NEXT();
|
|
- NEXT(); /* extra flags */
|
|
- NEXT(); /* operating system */
|
|
+ (void) NEXT(); /* modification time */
|
|
+ (void) NEXT();
|
|
+ (void) NEXT();
|
|
+ (void) NEXT();
|
|
+ (void) NEXT(); /* extra flags */
|
|
+ (void) NEXT(); /* operating system */
|
|
if (flags & 4) { /* extra field */
|
|
len = (unsigned)NEXT();
|
|
len += (unsigned)NEXT() << 8;
|
|
@@ -187,8 +187,8 @@
|
|
while (NEXT() > 0)
|
|
;
|
|
if (flags & 2) { /* header crc */
|
|
- NEXT();
|
|
- NEXT();
|
|
+ (void) NEXT();
|
|
+ (void) NEXT();
|
|
}
|
|
/* an unexpected end of file is not checked for here -- it will be
|
|
noticed on the first request for uncompressed data */
|
|
diff -urN zlib.orig/inflate.c zlib/inflate.c
|
|
--- zlib.orig/inflate.c 2010-07-15 17:16:00.890234828 +0200
|
|
+++ zlib/inflate.c 2010-07-15 17:16:00.900240372 +0200
|
|
@@ -408,6 +408,7 @@
|
|
/* Macros for inflate(): */
|
|
|
|
/* check function to use adler32() for zlib or crc32() for gzip */
|
|
+#undef UPDATE /* VxWorks defines it */
|
|
#ifdef GUNZIP
|
|
# define UPDATE(check, buf, len) \
|
|
(state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
|
|
diff -urN zlib.orig/zconf.h zlib/zconf.h
|
|
--- zlib.orig/zconf.h 2010-07-15 17:16:01.130237445 +0200
|
|
+++ zlib/zconf.h 2010-07-15 17:16:01.150234568 +0200
|
|
@@ -140,7 +140,18 @@
|
|
#if defined(_WINDOWS) && !defined(WINDOWS)
|
|
# define WINDOWS
|
|
#endif
|
|
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
|
+#if defined(__CEGCC__) || defined(__MINGW32CE__) || \
|
|
+ defined(UNDER_CE) || defined(_WIN32_WCE)
|
|
+# ifndef _WINCE
|
|
+# define _WINCE
|
|
+# endif
|
|
+#endif
|
|
+#if defined(_WINCE)
|
|
+# ifndef NO_ERRNO_H
|
|
+# define NO_ERRNO_H
|
|
+# endif
|
|
+#endif
|
|
+#if defined(_WIN32) || defined(_WINCE) || defined(__WIN32__)
|
|
# ifndef WIN32
|
|
# define WIN32
|
|
# endif
|
|
diff -urN zlib.orig/zutil.c zlib/zutil.c
|
|
--- zlib.orig/zutil.c 2010-07-15 17:16:01.300235057 +0200
|
|
+++ zlib/zutil.c 2010-07-15 17:16:01.310242277 +0200
|
|
@@ -136,7 +136,7 @@
|
|
return ERR_MSG(err);
|
|
}
|
|
|
|
-#if defined(_WIN32_WCE)
|
|
+#if defined(_WINCE)
|
|
/* The Microsoft C Run-Time Library for Windows CE doesn't have
|
|
* errno. We define it as a global variable to simplify porting.
|
|
* Its value is always 0 and should not be used.
|
|
diff -urN zlib.orig/zutil.h zlib/zutil.h
|
|
--- zlib.orig/zutil.h 2010-07-15 17:16:01.330241914 +0200
|
|
+++ zlib/zutil.h 2010-07-15 17:16:01.350234287 +0200
|
|
@@ -22,7 +22,7 @@
|
|
#include "zlib.h"
|
|
|
|
#ifdef STDC
|
|
-# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
|
|
+# if !(defined(_WINCE) && defined(_MSC_VER))
|
|
# include <stddef.h>
|
|
# endif
|
|
# include <string.h>
|
|
@@ -142,14 +142,18 @@
|
|
#endif
|
|
|
|
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
|
|
-# if defined(_WIN32_WCE)
|
|
+# if defined(_WINCE)
|
|
# define fdopen(fd,mode) NULL /* No fdopen() */
|
|
# ifndef _PTRDIFF_T_DEFINED
|
|
typedef int ptrdiff_t;
|
|
# define _PTRDIFF_T_DEFINED
|
|
# endif
|
|
# else
|
|
-# define fdopen(fd,type) _fdopen(fd,type)
|
|
+# if defined(__XCC__)
|
|
+# define fdopen(fd,mode) NULL /* No fdopen() */
|
|
+# else
|
|
+# define fdopen(fd,type) _fdopen(fd,type)
|
|
+# endif
|
|
# endif
|
|
#endif
|
|
|
|
@@ -199,7 +203,8 @@
|
|
# ifdef WIN32
|
|
/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
|
|
# if !defined(vsnprintf) && !defined(NO_vsnprintf)
|
|
-# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
|
|
+# if !defined(_MSC_VER) || \
|
|
+ ( defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__XCC__) )
|
|
# define vsnprintf _vsnprintf
|
|
# endif
|
|
# endif
|