changes while trying to build on a Mac
parent
894caf8f12
commit
b7fcafc9ec
|
@ -21,3 +21,14 @@ src/Makefile.in
|
|||
src/config.h
|
||||
src/config.h.in
|
||||
src/stamp-h1
|
||||
*~
|
||||
NOTES.txt
|
||||
autom4te.cache
|
||||
contrib/cbif.o
|
||||
src/aiori-MPIIO.o
|
||||
src/aiori-PLFS.c
|
||||
src/aiori-POSIX.o
|
||||
src/ior
|
||||
src/ior.o
|
||||
src/parse_options.o
|
||||
src/utilities.o
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
\******************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -22,10 +22,12 @@
|
|||
#include <string.h>
|
||||
#include <sys/stat.h> /* struct stat */
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/time.h> /* gettimeofday() */
|
||||
#include <sys/utsname.h> /* uname() */
|
||||
# include <sys/time.h> /* gettimeofday() */
|
||||
# include <sys/utsname.h> /* uname() */
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "ior.h"
|
||||
|
|
|
@ -73,9 +73,13 @@ static size_t NodeMemoryStringToBytes(char *size_str)
|
|||
ERR("percentage must be between 0 and 100");
|
||||
|
||||
page_size = sysconf(_SC_PAGESIZE);
|
||||
#ifdef _SC_PHYS_PAGES
|
||||
num_pages = sysconf(_SC_PHYS_PAGES);
|
||||
if (num_pages == -1)
|
||||
ERR("sysconf(_SC_PHYS_PAGES) is not supported");
|
||||
#else
|
||||
ERR("sysconf(_SC_PHYS_PAGES) is not supported");
|
||||
#endif
|
||||
mem = page_size * num_pages;
|
||||
|
||||
return mem / 100 * percent;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
\******************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -25,14 +25,18 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <regex.h>
|
||||
#ifdef __sun /* SunOS does not support statfs(), instead uses statvfs() */
|
||||
#include <sys/statvfs.h>
|
||||
#else /* !__sun */
|
||||
#include <sys/statfs.h>
|
||||
#endif /* __sun */
|
||||
#include <sys/time.h> /* gettimeofday() */
|
||||
# include <regex.h>
|
||||
# ifdef __sun /* SunOS does not support statfs(), instead uses statvfs() */
|
||||
# include <sys/statvfs.h>
|
||||
# elif (defined __APPLE__)
|
||||
# include <sys/param.h>
|
||||
# include <sys/mount.h>
|
||||
# else /* ! __sun or __APPLE__ */
|
||||
# include <sys/statfs.h>
|
||||
# endif /* __sun */
|
||||
# include <sys/time.h> /* gettimeofday() */
|
||||
#endif
|
||||
|
||||
#include "utilities.h"
|
||||
|
|
Loading…
Reference in New Issue