nixpkgs/pkgs/applications/misc/djvulibre/gcc-4.6.patch
Yury G. Kudryashov 80d21cb05b Fix djvulibre compilation
Also remove djview3. Use djview4 instead.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31307
2012-01-05 09:54:46 +00:00

659 lines
15 KiB
Diff

commit 3341545edba359b292a8ef6db1b7d342caf3dcf1
Author: Leon Bottou <leon@bottou.org>
Date: Wed May 4 21:25:35 2011 -0700
Added include <stddef.h> for gcc-4.6
diff --git a/libdjvu/BSByteStream.cpp b/libdjvu/BSByteStream.cpp
index b762ccf..d662ab0 100644
--- a/libdjvu/BSByteStream.cpp
+++ b/libdjvu/BSByteStream.cpp
@@ -62,6 +62,7 @@
// - Author: Leon Bottou, 07/1998
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/libdjvu/BSEncodeByteStream.cpp b/libdjvu/BSEncodeByteStream.cpp
index 5d80e51..68bc3e3 100644
--- a/libdjvu/BSEncodeByteStream.cpp
+++ b/libdjvu/BSEncodeByteStream.cpp
@@ -71,6 +71,7 @@
#include "GOS.h"
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/libdjvu/ByteStream.cpp b/libdjvu/ByteStream.cpp
index 158c33c..be01847 100644
--- a/libdjvu/ByteStream.cpp
+++ b/libdjvu/ByteStream.cpp
@@ -73,6 +73,7 @@
#include "GOS.h"
#include "GURL.h"
#include "DjVuMessage.h"
+#include <stddef.h>
#include <fcntl.h>
#if defined(WIN32) || defined(__CYGWIN32__)
# include <io.h>
diff --git a/libdjvu/DjVuFileCache.cpp b/libdjvu/DjVuFileCache.cpp
index 6b1e85d..7d7a192 100644
--- a/libdjvu/DjVuFileCache.cpp
+++ b/libdjvu/DjVuFileCache.cpp
@@ -63,6 +63,7 @@
#include "DjVuFileCache.h"
#include "debug.h"
+#include <stddef.h>
#include <stdlib.h>
diff --git a/libdjvu/DjVuGlobal.cpp b/libdjvu/DjVuGlobal.cpp
index e6d3cec..df9278e 100644
--- a/libdjvu/DjVuGlobal.cpp
+++ b/libdjvu/DjVuGlobal.cpp
@@ -76,6 +76,8 @@
#include "GThreads.h"
#include "GException.h"
#include "GContainer.h"
+
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/libdjvu/DjVuGlobalMemory.cpp b/libdjvu/DjVuGlobalMemory.cpp
index 3c6012c..c8ba309 100644
--- a/libdjvu/DjVuGlobalMemory.cpp
+++ b/libdjvu/DjVuGlobalMemory.cpp
@@ -67,6 +67,8 @@
#include "DjVuGlobal.h"
#include "GException.h"
+
+#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "debug.h"
diff --git a/libdjvu/DjVuMessage.cpp b/libdjvu/DjVuMessage.cpp
index 6f5a735..1726025 100644
--- a/libdjvu/DjVuMessage.cpp
+++ b/libdjvu/DjVuMessage.cpp
@@ -71,6 +71,7 @@
#include "debug.h"
#include <ctype.h>
#include <string.h>
+#include <stddef.h>
#include <stdlib.h>
#ifdef WIN32
# include <tchar.h>
diff --git a/libdjvu/DjVuMessageLite.cpp b/libdjvu/DjVuMessageLite.cpp
index b8c1010..5daa9d9 100644
--- a/libdjvu/DjVuMessageLite.cpp
+++ b/libdjvu/DjVuMessageLite.cpp
@@ -73,8 +73,8 @@
#include "debug.h"
#include <ctype.h>
#include <string.h>
+#include <stddef.h>
#include <stdlib.h>
-// #include <stdio.h>
#ifdef WIN32
#include <tchar.h>
#include <windows.h>
diff --git a/libdjvu/DjVuPalette.cpp b/libdjvu/DjVuPalette.cpp
index c489f7b..76b0bf4 100644
--- a/libdjvu/DjVuPalette.cpp
+++ b/libdjvu/DjVuPalette.cpp
@@ -64,6 +64,8 @@
#include "ByteStream.h"
#include "BSByteStream.h"
#include "DjVuPalette.h"
+
+#include <stddef.h>
#include <stdlib.h>
#include <math.h>
diff --git a/libdjvu/DjVuPort.h b/libdjvu/DjVuPort.h
index f6a92f6..e2b3125 100644
--- a/libdjvu/DjVuPort.h
+++ b/libdjvu/DjVuPort.h
@@ -65,6 +65,7 @@
#include "GThreads.h"
#include "GURL.h"
+#include "stddef.h"
#ifdef HAVE_NAMESPACES
namespace DJVU {
diff --git a/libdjvu/DjVuToPS.cpp b/libdjvu/DjVuToPS.cpp
index 5517bf3..6914ff9 100644
--- a/libdjvu/DjVuToPS.cpp
+++ b/libdjvu/DjVuToPS.cpp
@@ -72,6 +72,7 @@
#include "GPixmap.h"
#include "debug.h"
#include <stdarg.h>
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
diff --git a/libdjvu/GBitmap.cpp b/libdjvu/GBitmap.cpp
index ab5c0de..797edcc 100644
--- a/libdjvu/GBitmap.cpp
+++ b/libdjvu/GBitmap.cpp
@@ -66,6 +66,8 @@
#include "GString.h"
#include "GThreads.h"
#include "GException.h"
+#include <stddef.h>
+#include <stdlib.h>
#include <string.h>
// - Author: Leon Bottou, 05/1997
diff --git a/libdjvu/GException.cpp b/libdjvu/GException.cpp
index 2ea179a..89da70f 100644
--- a/libdjvu/GException.cpp
+++ b/libdjvu/GException.cpp
@@ -60,6 +60,7 @@
# pragma implementation
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/libdjvu/GOS.cpp b/libdjvu/GOS.cpp
index e784932..d2088e2 100644
--- a/libdjvu/GOS.cpp
+++ b/libdjvu/GOS.cpp
@@ -65,6 +65,7 @@
#include "GOS.h"
#include "GURL.h"
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/libdjvu/GPixmap.cpp b/libdjvu/GPixmap.cpp
index 392df54..4bf6f57 100644
--- a/libdjvu/GPixmap.cpp
+++ b/libdjvu/GPixmap.cpp
@@ -75,6 +75,8 @@
#include "GThreads.h"
#include "Arrays.h"
#include "JPEGDecoder.h"
+
+#include <stddef.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
diff --git a/libdjvu/GSmartPointer.cpp b/libdjvu/GSmartPointer.cpp
index 6e523e7..58aef5b 100644
--- a/libdjvu/GSmartPointer.cpp
+++ b/libdjvu/GSmartPointer.cpp
@@ -67,6 +67,7 @@
// Our original implementation consisted of multiple classes.
// <http://prdownloads.sourceforge.net/djvu/DjVu2_2b-src.tgz>.
+#include <stddef.h>
#include <string.h>
#if PARANOID_DEBUG
# include <assert.h>
diff --git a/libdjvu/GSmartPointer.h b/libdjvu/GSmartPointer.h
index 82781bd..8a8bb8a 100644
--- a/libdjvu/GSmartPointer.h
+++ b/libdjvu/GSmartPointer.h
@@ -97,6 +97,8 @@
#include "DjVuGlobal.h"
#include "atomic.h"
+#include <stddef.h>
+
#ifdef HAVE_NAMESPACES
namespace DJVU {
# ifdef NOT_DEFINED // Just to fool emacs c++ mode
diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp
index 03f6226..350b11b 100644
--- a/libdjvu/GString.cpp
+++ b/libdjvu/GString.cpp
@@ -73,6 +73,7 @@
#include "GThreads.h"
#include "debug.h"
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/libdjvu/GString.h b/libdjvu/GString.h
index b63b753..3aa1f76 100644
--- a/libdjvu/GString.h
+++ b/libdjvu/GString.h
@@ -108,6 +108,7 @@
#include "DjVuGlobal.h"
#include "GContainer.h"
+#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#ifdef WIN32
diff --git a/libdjvu/GThreads.cpp b/libdjvu/GThreads.cpp
index d81f3c3..253fed8 100644
--- a/libdjvu/GThreads.cpp
+++ b/libdjvu/GThreads.cpp
@@ -71,6 +71,8 @@
#include "GThreads.h"
#include "GException.h"
#include "DjVuMessageLite.h"
+
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/libdjvu/GURL.cpp b/libdjvu/GURL.cpp
index c37bf52..a80078c 100644
--- a/libdjvu/GURL.cpp
+++ b/libdjvu/GURL.cpp
@@ -72,6 +72,7 @@
#include "GURL.h"
#include "debug.h"
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/libdjvu/GUnicode.cpp b/libdjvu/GUnicode.cpp
index 415c081..a8b25b8 100644
--- a/libdjvu/GUnicode.cpp
+++ b/libdjvu/GUnicode.cpp
@@ -62,6 +62,8 @@
#include "GString.h"
+#include <stddef.h>
+
#if HAS_ICONV
#include <iconv.h>
#endif
diff --git a/libdjvu/IFFByteStream.h b/libdjvu/IFFByteStream.h
index a653f8c..e31b216 100644
--- a/libdjvu/IFFByteStream.h
+++ b/libdjvu/IFFByteStream.h
@@ -124,6 +124,7 @@
#include "DjVuGlobal.h"
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp
index 8d7b12c..49081b7 100644
--- a/libdjvu/IW44EncodeCodec.cpp
+++ b/libdjvu/IW44EncodeCodec.cpp
@@ -76,6 +76,7 @@
#include "IFFByteStream.h"
#include "GRect.h"
+#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
diff --git a/libdjvu/IW44Image.cpp b/libdjvu/IW44Image.cpp
index 9476726..4a19fb5 100644
--- a/libdjvu/IW44Image.cpp
+++ b/libdjvu/IW44Image.cpp
@@ -76,6 +76,7 @@
#include "IFFByteStream.h"
#include "GRect.h"
+#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
diff --git a/libdjvu/JPEGDecoder.h b/libdjvu/JPEGDecoder.h
index bd430a0..fad1d4c 100644
--- a/libdjvu/JPEGDecoder.h
+++ b/libdjvu/JPEGDecoder.h
@@ -64,6 +64,7 @@
#ifdef NEED_JPEG_DECODER
+#include <stddef.h>
#include <string.h>
#include <setjmp.h>
diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp
index 5ab60bb..528dab6 100644
--- a/libdjvu/MMX.cpp
+++ b/libdjvu/MMX.cpp
@@ -62,6 +62,7 @@
#include "MMX.h"
#include <stdio.h>
+#include <stddef.h>
#include <stdlib.h>
diff --git a/libdjvu/UnicodeByteStream.h b/libdjvu/UnicodeByteStream.h
index 0ae112b..9b49a17 100644
--- a/libdjvu/UnicodeByteStream.h
+++ b/libdjvu/UnicodeByteStream.h
@@ -88,6 +88,7 @@
#include "GString.h"
#include "ByteStream.h"
+#include <stddef.h>
#ifdef HAVE_NAMESPACES
namespace DJVU {
diff --git a/libdjvu/XMLParser.cpp b/libdjvu/XMLParser.cpp
index 84386c5..7da923a 100644
--- a/libdjvu/XMLParser.cpp
+++ b/libdjvu/XMLParser.cpp
@@ -75,6 +75,7 @@
#include "debug.h"
#include <stdio.h>
#include <ctype.h>
+#include <stddef.h>
#include <stdlib.h>
diff --git a/libdjvu/ZPCodec.cpp b/libdjvu/ZPCodec.cpp
index f6e971d..ff5b9bf 100644
--- a/libdjvu/ZPCodec.cpp
+++ b/libdjvu/ZPCodec.cpp
@@ -66,6 +66,8 @@
#include "ZPCodec.h"
#include "ByteStream.h"
#include "GException.h"
+
+#include <stddef.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>
diff --git a/libdjvu/atomic.cpp b/libdjvu/atomic.cpp
index bdc193e..63fd483 100644
--- a/libdjvu/atomic.cpp
+++ b/libdjvu/atomic.cpp
@@ -28,6 +28,7 @@
# include "config.h"
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <assert.h>
#include "atomic.h"
diff --git a/libdjvu/ddjvuapi.cpp b/libdjvu/ddjvuapi.cpp
index b18b84b..f40f5aa 100644
--- a/libdjvu/ddjvuapi.cpp
+++ b/libdjvu/ddjvuapi.cpp
@@ -60,6 +60,7 @@
# pragma implementation "ddjvuapi.h"
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/libdjvu/ddjvuapi.h b/libdjvu/ddjvuapi.h
index d0ed48f..841f223 100644
--- a/libdjvu/ddjvuapi.h
+++ b/libdjvu/ddjvuapi.h
@@ -64,6 +64,7 @@ extern "C" {
}
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp
index e0fb087..fc51297 100644
--- a/libdjvu/miniexp.cpp
+++ b/libdjvu/miniexp.cpp
@@ -23,6 +23,7 @@
# pragma implementation "miniexp.h"
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/libdjvu/miniexp.h b/libdjvu/miniexp.h
index 91e345d..993005b 100644
--- a/libdjvu/miniexp.h
+++ b/libdjvu/miniexp.h
@@ -38,7 +38,8 @@ extern "C" {
#ifndef MINILISPAPI
# define MINILISPAPI /**/
#endif
-
+
+#include <stddef.h>
/* -------------------------------------------------- */
/* LISP EXPRESSIONS */
diff --git a/tools/bzz.cpp b/tools/bzz.cpp
index ca092e1..2ebc7b9 100644
--- a/tools/bzz.cpp
+++ b/tools/bzz.cpp
@@ -94,6 +94,7 @@
#include "GURL.h"
#include "DjVuMessage.h"
#include <locale.h>
+#include <stddef.h>
#include <stdlib.h>
static const char *program = "(unknown)";
diff --git a/tools/c44.cpp b/tools/c44.cpp
index 6f23b53..855504b 100644
--- a/tools/c44.cpp
+++ b/tools/c44.cpp
@@ -226,6 +226,7 @@
#include <locale.h>
#include <stdio.h>
#include <string.h>
+#include <stddef.h>
#include <stdlib.h>
// command line data
diff --git a/tools/cjb2.cpp b/tools/cjb2.cpp
index 8cf89b9..11eb662 100644
--- a/tools/cjb2.cpp
+++ b/tools/cjb2.cpp
@@ -120,6 +120,7 @@
#include "jb2tune.h"
#include <locale.h>
+#include <stddef.h>
#include <stdlib.h>
#if HAVE_TIFF
#include <tiffio.h>
diff --git a/tools/cpaldjvu.cpp b/tools/cpaldjvu.cpp
index 111cbd3..b640a7a 100644
--- a/tools/cpaldjvu.cpp
+++ b/tools/cpaldjvu.cpp
@@ -118,6 +118,7 @@
#include "jb2tune.h"
#include <locale.h>
+#include <stddef.h>
#include <stdlib.h>
#include <math.h>
diff --git a/tools/csepdjvu.cpp b/tools/csepdjvu.cpp
index cd721f8..d5203d5 100644
--- a/tools/csepdjvu.cpp
+++ b/tools/csepdjvu.cpp
@@ -162,6 +162,7 @@
#include "jb2tune.h"
#include <locale.h>
+#include <stddef.h>
#include <stdlib.h>
#undef MIN
diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
index 817e045..981a270 100644
--- a/tools/ddjvu.cpp
+++ b/tools/ddjvu.cpp
@@ -62,6 +62,7 @@
# include "config.h"
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
diff --git a/tools/djvm.cpp b/tools/djvm.cpp
index 951bd66..6ea88c2 100644
--- a/tools/djvm.cpp
+++ b/tools/djvm.cpp
@@ -135,9 +135,9 @@
#include "DjVuMessage.h"
#include <locale.h>
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdlib.h>
static const char * progname;
diff --git a/tools/djvmcvt.cpp b/tools/djvmcvt.cpp
index 9ca1c54..20b468a 100644
--- a/tools/djvmcvt.cpp
+++ b/tools/djvmcvt.cpp
@@ -144,6 +144,7 @@
#include <locale.h>
#include <stdio.h>
+#include <stddef.h>
#include <stdlib.h>
static const char * progname;
diff --git a/tools/djvudump.cpp b/tools/djvudump.cpp
index 6a0215a..2dddbdf 100644
--- a/tools/djvudump.cpp
+++ b/tools/djvudump.cpp
@@ -119,6 +119,7 @@ xxx
#include <locale.h>
#include <stdio.h>
#include <ctype.h>
+#include <stddef.h>
#include <stdlib.h>
void
diff --git a/tools/djvuextract.cpp b/tools/djvuextract.cpp
index 4a9f381..907b99c 100644
--- a/tools/djvuextract.cpp
+++ b/tools/djvuextract.cpp
@@ -105,6 +105,7 @@
#include "GOS.h"
#include "DjVuMessage.h"
#include <locale.h>
+#include <stddef.h>
#include <stdlib.h>
diff --git a/tools/djvumake.cpp b/tools/djvumake.cpp
index 7020484..4c5fc0f 100644
--- a/tools/djvumake.cpp
+++ b/tools/djvumake.cpp
@@ -153,6 +153,7 @@
#include <locale.h>
#include <stdio.h>
+#include <stddef.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/tools/djvups.cpp b/tools/djvups.cpp
index 51aa999..632b832 100644
--- a/tools/djvups.cpp
+++ b/tools/djvups.cpp
@@ -57,6 +57,7 @@
# include "config.h"
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
diff --git a/tools/djvused.cpp b/tools/djvused.cpp
index de84dcd..687fdca 100644
--- a/tools/djvused.cpp
+++ b/tools/djvused.cpp
@@ -61,6 +61,7 @@
#endif
#include <stdio.h>
+#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
diff --git a/tools/djvuserve.cpp b/tools/djvuserve.cpp
index 19a17da..818fe78 100644
--- a/tools/djvuserve.cpp
+++ b/tools/djvuserve.cpp
@@ -73,6 +73,7 @@
#include <locale.h>
#include <stdio.h>
+#include <stddef.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <time.h>
diff --git a/tools/djvutxt.cpp b/tools/djvutxt.cpp
index ba2c745..9e9124c 100644
--- a/tools/djvutxt.cpp
+++ b/tools/djvutxt.cpp
@@ -61,6 +61,7 @@
# include "config.h"
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
diff --git a/tools/tiff2pdf.h b/tools/tiff2pdf.h
index 082f5fb..656dc43 100644
--- a/tools/tiff2pdf.h
+++ b/tools/tiff2pdf.h
@@ -22,6 +22,7 @@
# endif
# if HAVE_TIFF
# include <stdio.h>
+# include <stddef.h>
# include <stdlib.h>
# include <tiff.h>
# include <tiffio.h>
diff --git a/xmltools/djvutoxml.cpp b/xmltools/djvutoxml.cpp
index 17c769b..b40535e 100644
--- a/xmltools/djvutoxml.cpp
+++ b/xmltools/djvutoxml.cpp
@@ -71,6 +71,7 @@
#include <locale.h>
#include <stdio.h>
+#include <stddef.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <assert.h>
diff --git a/xmltools/djvuxmlparser.cpp b/xmltools/djvuxmlparser.cpp
index bdc5768..6679a9d 100644
--- a/xmltools/djvuxmlparser.cpp
+++ b/xmltools/djvuxmlparser.cpp
@@ -70,6 +70,7 @@
#include <stdio.h>
#include <ctype.h>
#include <locale.h>
+#include <stddef.h>
#include <stdlib.h>
static void