summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-12-08 21:59:13 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-12-08 21:59:13 +0000
commit5ffd2f759847cf52ff728605ac964e80cee70bff (patch)
tree3300b74e98375b50324acba01411fcd0322ee125 /rbutil
parentd2c1ece304d0a9eb1a29401ee24b889aea1bff8c (diff)
downloadrockbox-5ffd2f759847cf52ff728605ac964e80cee70bff.tar.gz
rockbox-5ffd2f759847cf52ff728605ac964e80cee70bff.tar.bz2
rockbox-5ffd2f759847cf52ff728605ac964e80cee70bff.zip
Various adjustments for MSVC.
- MSVC uses different namings in some places. Adjust the sources via the preprocessor if build with MSVC. - MSVC doesn't know about __func__, use name instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31185 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/ipodpatcher/ipodio.h7
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallbase.cpp2
-rw-r--r--rbutil/sansapatcher/sansaio.h4
3 files changed, 10 insertions, 3 deletions
diff --git a/rbutil/ipodpatcher/ipodio.h b/rbutil/ipodpatcher/ipodio.h
index 6aa675535a..e08d74a785 100644
--- a/rbutil/ipodpatcher/ipodio.h
+++ b/rbutil/ipodpatcher/ipodio.h
@@ -23,9 +23,14 @@
#define __IPODIO_H
#include <stdint.h>
+#if !defined(_WIN32)
#include <unistd.h>
+#elif defined(_MSC_VER)
+/* MSVC uses a different name for ssize_t */
+#define ssize_t SSIZE_T
+#endif
-#ifdef __WIN32__
+#if defined(__WIN32__) || defined(_WIN32)
#include <windows.h>
#else
#define HANDLE int
diff --git a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp
index a67dbc0386..b718db8729 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp
@@ -139,7 +139,7 @@ void BootloaderInstallBase::downloadBlFinish(bool error)
void BootloaderInstallBase::installBlfile(void)
{
- qDebug() << "[BootloaderInstallBase]" << __func__;
+ qDebug() << "[BootloaderInstallBase] installBlFile(void)";
}
diff --git a/rbutil/sansapatcher/sansaio.h b/rbutil/sansapatcher/sansaio.h
index d705c121b8..de25433765 100644
--- a/rbutil/sansapatcher/sansaio.h
+++ b/rbutil/sansapatcher/sansaio.h
@@ -23,7 +23,9 @@
#define __SANSAIO_H
#include <stdint.h>
-#include <unistd.h>
+#if !defined(_MSC_VER)
+#include <unistd.h> /* not available on MSVC */
+#endif
#if defined(__WIN32__) || defined(_WIN32)
#include <windows.h>