Manually sort some includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxlib / checkpoint.cpp
index 9162172255cd75e9164027d12f1717640173565d..bec5b71652101e227368ff40e1adaf74889d425f 100644 (file)
 
 #include "gromacs/legacyheaders/checkpoint.h"
 
-#include "config.h"
-
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
 #include <fcntl.h>
+
+#include "config.h"
+
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
 #ifdef GMX_NATIVE_WINDOWS
 /* _chsize_s */
 #include <io.h>
 #include <sys/locking.h>
 #endif
 
+#include "buildinfo.h"
+#include "gromacs/fileio/filenm.h"
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/xdr_datatype.h"
+#include "gromacs/fileio/xdrf.h"
 #include "gromacs/legacyheaders/copyrite.h"
 #include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/txtdump.h"
 #include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/txtdump.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/legacyheaders/network.h"
-
-#include "gromacs/fileio/filenm.h"
-#include "gromacs/utility/futil.h"
-#include "gromacs/fileio/gmxfio.h"
-#include "gromacs/fileio/xdrf.h"
-#include "gromacs/fileio/xdr_datatype.h"
 #include "gromacs/utility/basenetwork.h"
 #include "gromacs/utility/baseversion.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
 
-#include "buildinfo.h"
-
 #ifdef GMX_FAHCORE
 #include "corewrap.h"
 #endif
@@ -177,7 +174,11 @@ gmx_wintruncate(const char *filename, __int64 size)
         return -1;
     }
 
+#ifdef _MSC_VER
     return _chsize_s( fileno(fp), size);
+#else
+    return _chsize( fileno(fp), size);
+#endif
 #endif
 }
 #endif