Fix issues with missing the printf()-function on newer distributions (thanks to svannon and brian for helping)

--HG--
branch : trunk
This commit is contained in:
click
2010-06-12 00:45:24 +02:00
parent ccbff7a194
commit 057ea32adf
4 changed files with 15 additions and 16 deletions

View File

@@ -2,6 +2,7 @@
#include "loadlib.h"
#include "mpq_libmpq04.h"
#include <cstdio>
class MPQFile;

View File

@@ -3,28 +3,26 @@
#ifdef WIN32
typedef __int64 int64;
typedef __int32 int32;
typedef __int16 int16;
typedef __int8 int8;
typedef long int32;
typedef short int16;
typedef char int8;
typedef unsigned __int64 uint64;
typedef unsigned __int32 uint32;
typedef unsigned __int16 uint16;
typedef unsigned __int8 uint8;
typedef unsigned long uint32;
typedef unsigned short uint16;
typedef unsigned char uint8;
#else
#include <stdint.h>
#ifndef uint64_t
#ifdef __linux__
#include <linux/types.h>
#endif
#endif
typedef int64_t int64;
typedef int32_t int32;
typedef int16_t int16;
typedef int8_t int8;
typedef long int32;
typedef short int16;
typedef char int8;
typedef uint64_t uint64;
typedef uint32_t uint32;
typedef uint16_t uint16;
typedef uint8_t uint8;
typedef unsigned long uint32;
typedef unsigned short uint16;
typedef unsigned char uint8;
#endif
#define FILE_FORMAT_VERSION 18

View File

@@ -50,7 +50,7 @@ MPQFile::MPQFile(const char* filename):
{
mpq_archive *mpq_a = (*i)->mpq_a;
uint32 filenum;
uint32_t filenum;
if(libmpq__file_number(mpq_a, filename, &filenum)) continue;
libmpq__off_t transferred;
libmpq__file_unpacked_size(mpq_a, filenum, &size);

View File

@@ -24,7 +24,7 @@ public:
void close();
void GetFileListTo(vector<string>& filelist) {
uint32 filenum;
uint32_t filenum;
if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return;
libmpq__off_t size, transferred;
libmpq__file_unpacked_size(mpq_a, filenum, &size);