]> git.donarmstrong.com Git - bamtools.git/blobdiff - BGZF.h
Added cross-platform LFS for tell/seek. Removed fopen64/freopen64 - hopefully unecess...
[bamtools.git] / BGZF.h
diff --git a/BGZF.h b/BGZF.h
index 5904fe5f2ff25acee256f4f84a1759835e48f46b..303684e148dddc1c45d5921f2b7f38de2b405cd4 100644 (file)
--- a/BGZF.h
+++ b/BGZF.h
@@ -3,7 +3,7 @@
 // Marth Lab, Department of Biology, Boston College\r
 // All rights reserved.\r
 // ---------------------------------------------------------------------------\r
-// Last modified: 9 July 2010 (DB)\r
+// Last modified: 19 July 2010 (DB)\r
 // ---------------------------------------------------------------------------\r
 // BGZF routines were adapted from the bgzf.c code developed at the Broad\r
 // Institute.\r
 // zlib includes\r
 #include "zlib.h"\r
 \r
+// Platform-specific large-file support\r
+#ifndef BAMTOOLS_LFS\r
+#define BAMTOOLS_LFS\r
+    #ifdef WIN32\r
+        #define ftell64(a)     _ftelli64(a)\r
+        #define fseek64(a,b,c) _fseeki64(a,b,c)\r
+    #else\r
+        #define ftell64(a)     ftello(a)\r
+        #define fseek64(a,b,c) fseeko(a,b,c) \r
+    #endif\r
+#endif // BAMTOOLS_LFS\r
+\r
 // Platform-specific type definitions\r
 #ifndef BAMTOOLS_TYPES\r
 #define BAMTOOLS_TYPES\r