summaryrefslogtreecommitdiffstats
path: root/rbutil/sansapatcher/sansaio.h
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-12-04 19:40:35 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-12-04 19:40:35 +0000
commit38890ac6dc1e3cebb90e60d70cea8da8009ee8da (patch)
tree47ac7a259bf7dcd2785170e903695598aa6ccad4 /rbutil/sansapatcher/sansaio.h
parenta43df152c2adf737208bbeb294a0a13608d3cc43 (diff)
downloadrockbox-38890ac6dc1e3cebb90e60d70cea8da8009ee8da.tar.gz
rockbox-38890ac6dc1e3cebb90e60d70cea8da8009ee8da.tar.bz2
rockbox-38890ac6dc1e3cebb90e60d70cea8da8009ee8da.zip
sansapatcher: guard platform specific files.
Use the preprocessor to make platform specific files compile as empty files if built for a different platform. This removes the need to distinguish in the Makefile and simplifies creating a libsansapatcher. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31143 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/sansapatcher/sansaio.h')
-rw-r--r--rbutil/sansapatcher/sansaio.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/rbutil/sansapatcher/sansaio.h b/rbutil/sansapatcher/sansaio.h
index 9563b572a7..d705c121b8 100644
--- a/rbutil/sansapatcher/sansaio.h
+++ b/rbutil/sansapatcher/sansaio.h
@@ -25,7 +25,7 @@
#include <stdint.h>
#include <unistd.h>
-#ifdef __WIN32__
+#if defined(__WIN32__) || defined(_WIN32)
#include <windows.h>
#define loff_t int64_t
#else
@@ -40,6 +40,10 @@
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct sansa_partinfo_t {
unsigned long start; /* first sector (LBA) */
unsigned long size; /* number of sectors */
@@ -74,4 +78,7 @@ int sansa_read(struct sansa_t* sansa, unsigned char* buf, int nbytes);
int sansa_write(struct sansa_t* sansa, unsigned char* buf, int nbytes);
int sansa_alloc_buffer(unsigned char** sectorbuf, int bufsize);
+#ifdef __cplusplus
+}
+#endif
#endif