Use gmx_int64_t for gmx_off_t
authorRoland Schulz <roland@utk.edu>
Wed, 5 Mar 2014 06:34:53 +0000 (01:34 -0500)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 6 Mar 2014 06:56:31 +0000 (07:56 +0100)
We anyhow require 64-bit file support and 64-bit integer
support. Thus the defintion of gmx_off_t can be dont
trivially.

Partial fix for #1452

Change-Id: I6ae70454cfa8ace3ca84a047149b6f4648e84b00

src/gromacs/fileio/futil.h

index 0e23661cd5480b67da5f0de13319ae1fe8e7b546..bb76b03ff437086710a48f25bc8b010625b70bbd 100644 (file)
@@ -59,7 +59,6 @@ extern "C" {
 #define DIR_SEPARATOR '/'
 #endif
 
-
 /* Now get the maximum path size. */
 #ifdef PATH_MAX
 #  define GMX_PATH_MAX PATH_MAX
@@ -69,20 +68,7 @@ extern "C" {
 #  define GMX_PATH_MAX 4096
 #endif
 
-
-#ifdef HAVE_FSEEKO
-typedef off_t              gmx_off_t;
-#elif defined HAVE__FSEEKI64
-typedef __int64            gmx_off_t;
-#else
-/* cmake checked that if fseeko and fseeki64 aren't avaiable that long is 64bit */
-#if GMX_INT64_MAX != LONG_MAX
-#error "Configuration error. fseeko or fseeki64 or 64bit long should be available."
-#endif
-typedef long               gmx_off_t;
-#endif
-
-
+typedef gmx_int64_t    gmx_off_t;
 
 void no_buffers(void);
 /* Turn off buffering of files (which is default) for debugging purposes */