All pastes #1583123 Raw Edit

Stuff

public diff v1 · immutable
#1583123 ·published 2009-09-28 20:13 UTC
rendered paste body
Index: guilib/XBTFReader.cpp===================================================================--- guilib/XBTFReader.cpp	(revision 23215)+++ guilib/XBTFReader.cpp	(working copy)@@ -118,11 +118,10 @@   }       // Sanity check-  fpos_t pos;-  fgetpos(m_file, &pos);-  if ((unsigned int) pos != m_xbtf.GetHeaderSize())+  int64_t pos = ftell(m_file);+  if (pos != m_xbtf.GetHeaderSize())   {-    printf("Expected header size (%llu) != actual size (%llu)\n", m_xbtf.GetHeaderSize(), pos);+    printf("Expected header size (%"PRId64") != actual size (%"PRId64")\n", m_xbtf.GetHeaderSize(), pos);     return false;   }     Index: guilib/Makefile===================================================================--- guilib/Makefile	(revision 23215)+++ guilib/Makefile	(working copy)@@ -1,4 +1,4 @@-INCLUDES=-I. -I../ -Icommon -I../xbmc -I../xbmc/cores -I../xbmc/linux -I../xbmc/utils -I/usr/include/freetype2 -I/usr/include/SDL -I../xbmc/lib/squish+INCLUDES=-I. -I../ -Icommon -I../xbmc -I../xbmc/cores -I../xbmc/linux -I../xbmc/utils -I/usr/include/freetype2 -I/usr/include/SDL -I../xbmc/lib/libsquish  SRCS=AnimatedGif.cpp \      AudioContext.cpp \Index: guilib/XBTF.cpp===================================================================--- guilib/XBTF.cpp	(revision 23215)+++ guilib/XBTF.cpp	(working copy)@@ -18,7 +18,7 @@  *  http://www.gnu.org/copyleft/gpl.html  *  */-#include <strings.h>+#include <cstring> #include "XBTF.h"  CXBTFFrame::CXBTFFrame()Index: tools/XBMCTexXBT/XBTFWriter.cpp===================================================================--- tools/XBMCTexXBT/XBTFWriter.cpp	(revision 23215)+++ tools/XBMCTexXBT/XBTFWriter.cpp	(working copy)@@ -8,6 +8,11 @@ #define WRITE_U32(i, file) { unsigned long _n = i; _n = Endian_SwapLE32(i); fwrite(&_n, 4, 1, file); } #define WRITE_U64(i, file) { unsigned long long _n = i; _n = Endian_SwapLE64(i); fwrite(&_n, 8, 1, file); } +// I didn't want to pull in platformdefs.h for this.  Maybe that's a better solution though?+#ifdef _LINUX+#define PRIu64 "lld"+#endif+ CXBTFWriter::CXBTFWriter(CXBTF& xbtf, const std::string outputFile) : m_xbtf(xbtf) {   m_outputFile = outputFile;@@ -121,11 +126,10 @@   }      // Sanity check-  fpos_t pos;-  fgetpos(m_file, &pos);-  if ((unsigned int) pos != m_xbtf.GetHeaderSize())+  int64_t pos = ftell(m_file);+  if (pos != m_xbtf.GetHeaderSize())   {-    printf("Expected header size (%llu) != actual size (%llu)\n", m_xbtf.GetHeaderSize(), pos);+    printf("Expected header size (%" PRId64 ") != actual size (%" PRId64 ")\n", m_xbtf.GetHeaderSize(), pos);     return false;   }   Index: xbmc/lib/libsquish/Makefile===================================================================--- xbmc/lib/libsquish/Makefile	(revision 23215)+++ xbmc/lib/libsquish/Makefile	(working copy)@@ -1,6 +1,6 @@ SRCS=alpha.cpp clusterfit.cpp colourblock.cpp colourfit.cpp colourset.cpp maths.cpp rangefit.cpp singlecolourfit.cpp squish.cpp -CXXFLAGS+=-O3+CXXFLAGS+=-O3 -I. LIB=libsquish.a  include ../../../Makefile.include