git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6390 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2011-06-13 23:54:36 +00:00
parent dde2b01e0e
commit cb50d5d933
2 changed files with 42 additions and 1 deletions

View File

@ -117,7 +117,7 @@ typedef int bigint;
// settings to enable LAMMPS build under Windows
#ifdef _WIN32
#include "lmp_windows.h"
#include "lmpwindows.h"
#endif
#endif

41
src/lmpwindows.h Normal file
View File

@ -0,0 +1,41 @@
#include <iso646.h>
#include "erf.h"
#include "direct.h"
#include "math.h"
// LAMMPS uses usleep with 100 ms arguments, no microsecond precision needed
#include "sleep.h"
// some symbols have different names in Windows
#undef ATOBIGINT
#define ATOBIGINT _atoi64
#define pclose _pclose
#define __restrict__ __restrict
// the following functions ared defined to get rid of
// 'ambiguous call to overloaded function' error in VSS for mismathched type arguments
inline double pow(int i, int j){
return pow((double)i,(double) j);
}
inline double sqrt(int i){
return sqrt((double) i);
}
inline double fabs(int i){
return fabs((double) i);
}
inline double trunc(double x) {
return x > 0 ? floor(x) : ceil(x);
}
// Windows version of mkdir function does not have permission flags
# define S_IRWXU 0
# define S_IRGRP 0
# define S_IXGRP 0
inline int mkdir(const char *path, int flags){
return _mkdir(path);
}