summaryrefslogtreecommitdiffstats
path: root/exfat/libexfat/platform.h
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2014-09-05 02:58:41 +0200
committerEthan Yonker <dees_troy@teamw.in>2014-09-05 15:46:39 +0200
commit2e33c5ee0b1a1ece068489e8fd99f3e4eb3501b5 (patch)
tree697067dc07351c8e6a6a7d5e3228143304a6b8ae /exfat/libexfat/platform.h
parentMTP: Use fork instead of pthread (diff)
downloadandroid_bootable_recovery-2e33c5ee0b1a1ece068489e8fd99f3e4eb3501b5.tar
android_bootable_recovery-2e33c5ee0b1a1ece068489e8fd99f3e4eb3501b5.tar.gz
android_bootable_recovery-2e33c5ee0b1a1ece068489e8fd99f3e4eb3501b5.tar.bz2
android_bootable_recovery-2e33c5ee0b1a1ece068489e8fd99f3e4eb3501b5.tar.lz
android_bootable_recovery-2e33c5ee0b1a1ece068489e8fd99f3e4eb3501b5.tar.xz
android_bootable_recovery-2e33c5ee0b1a1ece068489e8fd99f3e4eb3501b5.tar.zst
android_bootable_recovery-2e33c5ee0b1a1ece068489e8fd99f3e4eb3501b5.zip
Diffstat (limited to 'exfat/libexfat/platform.h')
-rw-r--r--exfat/libexfat/platform.h73
1 files changed, 29 insertions, 44 deletions
diff --git a/exfat/libexfat/platform.h b/exfat/libexfat/platform.h
index 320f757e8..c81e10e9e 100644
--- a/exfat/libexfat/platform.h
+++ b/exfat/libexfat/platform.h
@@ -3,11 +3,12 @@
OS-specific code (libc-specific in fact). Note that systems with the
same kernel can use different libc implementations.
- Copyright (C) 2010-2013 Andrew Nayenko
+ Free exFAT implementation.
+ Copyright (C) 2010-2014 Andrew Nayenko
- This program is free software: you can redistribute it and/or modify
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
+ the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -15,8 +16,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef PLATFORM_H_INCLUDED
@@ -26,54 +28,37 @@
#include <endian.h>
#include <byteswap.h>
+#define exfat_bswap16(x) bswap_16(x)
+#define exfat_bswap32(x) bswap_32(x)
+#define exfat_bswap64(x) bswap_64(x)
+#define EXFAT_BYTE_ORDER __BYTE_ORDER
+#define EXFAT_LITTLE_ENDIAN __LITTLE_ENDIAN
+#define EXFAT_BIG_ENDIAN __BIG_ENDIAN
#elif defined(__APPLE__)
#include <machine/endian.h>
#include <libkern/OSByteOrder.h>
-#define bswap_16(x) OSSwapInt16(x)
-#define bswap_32(x) OSSwapInt32(x)
-#define bswap_64(x) OSSwapInt64(x)
-#define __BYTE_ORDER BYTE_ORDER
-#define __LITTLE_ENDIAN LITTLE_ENDIAN
-#define __BIG_ENDIAN BIG_ENDIAN
+#define exfat_bswap16(x) OSSwapInt16(x)
+#define exfat_bswap32(x) OSSwapInt32(x)
+#define exfat_bswap64(x) OSSwapInt64(x)
+#define EXFAT_BYTE_ORDER BYTE_ORDER
+#define EXFAT_LITTLE_ENDIAN LITTLE_ENDIAN
+#define EXFAT_BIG_ENDIAN BIG_ENDIAN
-#elif defined(__FreeBSD__) || defined(__DragonFlyBSD__) || defined(__NetBSD__)
+#endif
+//#elif defined(__FreeBSD__) || defined(__DragonFlyBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/endian.h>
-#define bswap_16(x) bswap16(x)
-#define bswap_32(x) bswap32(x)
-#define bswap_64(x) bswap64(x)
-#define __BYTE_ORDER _BYTE_ORDER
-#define __LITTLE_ENDIAN _LITTLE_ENDIAN
-#define __BIG_ENDIAN _BIG_ENDIAN
-
-#elif defined(__OpenBSD__)
-
-#include <machine/endian.h>
-#define bswap_16(x) swap16(x)
-#define bswap_32(x) swap32(x)
-#define bswap_64(x) swap64(x)
-#define __BYTE_ORDER _BYTE_ORDER
-#define __LITTLE_ENDIAN _LITTLE_ENDIAN
-#define __BIG_ENDIAN _BIG_ENDIAN
-
-#elif defined(__sun)
-
-#include <sys/byteorder.h>
-#define bswap_16(x) BSWAP_16(x)
-#define bswap_32(x) BSWAP_32(x)
-#define bswap_64(x) BSWAP_64(x)
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
-#ifdef _LITTLE_ENDIAN
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#else
-#define __BYTE_ORDER __BIG_ENDIAN
-#endif
+#define exfat_bswap16(x) bswap16(x)
+#define exfat_bswap32(x) bswap32(x)
+#define exfat_bswap64(x) bswap64(x)
+#define EXFAT_BYTE_ORDER _BYTE_ORDER
+#define EXFAT_LITTLE_ENDIAN _LITTLE_ENDIAN
+#define EXFAT_BIG_ENDIAN _BIG_ENDIAN
+/*
#else
#error Unknown platform
-#endif
-
+*/
#endif /* ifndef PLATFORM_H_INCLUDED */