aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall/source/Heimdall.h
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-04-30 10:00:29 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-04-30 10:00:29 +0200
commitd9c6729c9df44fcaf894cc966e4e2a8ae7109bc3 (patch)
tree24f0e6518939f38330ea51095c88e7f08fdb8bcf /heimdall/source/Heimdall.h
parent61f67d4dd3f81560417c7b8d1bd5b2611eb7a001 (diff)
parentb6fe7f8535355eb8025f4872efef6cd7d3993db6 (diff)
downloadexternal_heimdall-d9c6729c9df44fcaf894cc966e4e2a8ae7109bc3.zip
external_heimdall-d9c6729c9df44fcaf894cc966e4e2a8ae7109bc3.tar.gz
external_heimdall-d9c6729c9df44fcaf894cc966e4e2a8ae7109bc3.tar.bz2
Merge branch 'master' of https://github.com/Benjamin-Dobell/Heimdall into cm-12.1
Diffstat (limited to 'heimdall/source/Heimdall.h')
-rw-r--r--heimdall/source/Heimdall.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/heimdall/source/Heimdall.h b/heimdall/source/Heimdall.h
index d0194a5..205f01d 100644
--- a/heimdall/source/Heimdall.h
+++ b/heimdall/source/Heimdall.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
+/* Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -21,21 +21,36 @@
#ifndef HEIMDALL_H
#define HEIMDALL_H
-#include "../config.h"
-
-#ifdef OS_WINDOWS
+#ifdef _MSC_VER // Microsoft Visual C Standard Library
#include <Windows.h>
#undef GetBinaryType
-#else
+#ifndef va_copy
+#define va_copy(d, s) ((d) = (s))
+#endif
+
+#define FileOpen(FILE, MODE) fopen(FILE, MODE)
+#define FileClose(FILE) fclose(FILE)
+#define FileSeek(FILE, OFFSET, ORIGIN) _fseeki64(FILE, OFFSET, ORIGIN)
+#define FileTell(FILE) _ftelli64(FILE)
+#define FileRewind(FILE) rewind(FILE)
+
+#else // POSIX Standard Library
+
+#ifdef AUTOCONF
+#include "../config.h"
+#endif
-#if defined(OS_DARWIN) || defined(OS_LINUX)
#include <unistd.h>
+
#define Sleep(t) usleep(1000*t)
-#else
-#error operating system not supported
-#endif
+
+#define FileOpen(FILE, MODE) fopen(FILE, MODE)
+#define FileClose(FILE) fclose(FILE)
+#define FileSeek(FILE, OFFSET, ORIGIN) fseeko(FILE, OFFSET, ORIGIN)
+#define FileTell(FILE) ftello(FILE)
+#define FileRewind(FILE) rewind(FILE)
#endif