--- libgig/trunk/src/RIFF.h 2007/02/28 06:53:42 1049 +++ libgig/trunk/src/RIFF.h 2007/03/02 01:04:45 1050 @@ -2,7 +2,7 @@ * * * libgig - C++ cross-platform Gigasampler format file access library * * * - * Copyright (C) 2003-2006 by Christian Schoenebeck * + * Copyright (C) 2003-2007 by Christian Schoenebeck * * * * * * This library is free software; you can redistribute it and/or modify * @@ -24,8 +24,17 @@ #ifndef __RIFF_H__ #define __RIFF_H__ -#define POSIX 1 -#define DEBUG 0 +#ifdef WIN32 +# define POSIX 0 +#endif + +#ifndef POSIX +# define POSIX 1 +#endif + +#ifndef DEBUG +# define DEBUG 0 +#endif #include #include @@ -45,9 +54,16 @@ #include -//typedef unsigned char uint8_t; -//typedef unsigned short uint16_t; -//typedef unsigned int uint32_t; +#ifdef WIN32 +# include "../win32/libgig_private.h" // like config.h, automatically generated by Dev-C++ +# include + typedef unsigned int uint; + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; +# define PACKAGE "libgig" +# define VERSION VER_STRING // VER_STRING defined in libgig_private.h +#endif // WIN32 #include @@ -244,6 +260,9 @@ #if POSIX int hFileRead; ///< handle / descriptor for reading from file int hFileWrite; ///< handle / descriptor for writing to (some) file + #elif defined(WIN32) + HANDLE hFileRead; ///< handle / descriptor for reading from file + HANDLE hFileWrite; ///< handle / descriptor for writing to (some) file #else FILE* hFileRead; ///< handle / descriptor for reading from file FILE* hFileWrite; ///< handle / descriptor for writing to (some) file @@ -262,6 +281,8 @@ void ResizeFile(unsigned long ulNewSize); #if POSIX unsigned long __GetFileSize(int hFile); + #elif defined(WIN32) + unsigned long __GetFileSize(HANDLE hFile); #else unsigned long __GetFileSize(FILE* hFile); #endif