commit
5c847f552a
10
configure.ac
10
configure.ac
|
@ -50,7 +50,7 @@ AC_CHECK_HEADERS([fcntl.h libintl.h stdlib.h string.h strings.h sys/ioctl.h sys/
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_CHECK_FUNCS([getpagesize gettimeofday memset mkdir pow putenv realpath regcomp sqrt strcasecmp strchr strerror strncasecmp strstr uname statfs statvfs])
|
AC_CHECK_FUNCS([sysconf gettimeofday memset mkdir pow putenv realpath regcomp sqrt strcasecmp strchr strerror strncasecmp strstr uname statfs statvfs])
|
||||||
AC_SEARCH_LIBS([sqrt], [m], [],
|
AC_SEARCH_LIBS([sqrt], [m], [],
|
||||||
[AC_MSG_ERROR([Math library not found])])
|
[AC_MSG_ERROR([Math library not found])])
|
||||||
|
|
||||||
|
@ -76,6 +76,8 @@ AS_IF([test "$ac_cv_header_gpfs_h" = "yes" -o "$ac_cv_header_gpfs_fcntl_h" = "ye
|
||||||
# Check for system capabilities
|
# Check for system capabilities
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
|
AC_DEFINE([_XOPEN_SOURCE], [700], [C99 compatibility])
|
||||||
|
|
||||||
# Check for lustre availability
|
# Check for lustre availability
|
||||||
AC_ARG_WITH([lustre],
|
AC_ARG_WITH([lustre],
|
||||||
[AS_HELP_STRING([--with-lustre],
|
[AS_HELP_STRING([--with-lustre],
|
||||||
|
@ -254,12 +256,6 @@ Consider --with-aws4c=, CPPFLAGS, LDFLAGS, etc])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Enable building "IOR", in all capitals
|
# Enable building "IOR", in all capitals
|
||||||
AC_ARG_ENABLE([caps],
|
AC_ARG_ENABLE([caps],
|
||||||
[AS_HELP_STRING([--enable-caps],
|
[AS_HELP_STRING([--enable-caps],
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -466,10 +464,10 @@ static void *aligned_buffer_alloc(size_t size)
|
||||||
char *buf, *tmp;
|
char *buf, *tmp;
|
||||||
char *aligned;
|
char *aligned;
|
||||||
|
|
||||||
#ifdef HAVE_GETPAGESIZE
|
#ifdef HAVE_SYSCONF
|
||||||
size_t pageSize = getpagesize();
|
|
||||||
#else
|
|
||||||
long pageSize = sysconf(_SC_PAGESIZE);
|
long pageSize = sysconf(_SC_PAGESIZE);
|
||||||
|
#else
|
||||||
|
size_t pageSize = getpagesize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pageMask = pageSize - 1;
|
pageMask = pageSize - 1;
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
# define srandom srand
|
# define srandom srand
|
||||||
# define random() (rand() * (RAND_MAX+1) + rand()) /* Note: only 30 bits */
|
# define random() (rand() * (RAND_MAX+1) + rand()) /* Note: only 30 bits */
|
||||||
# define sleep(X) Sleep((X)*1000)
|
# define sleep(X) Sleep((X)*1000)
|
||||||
# define getpagesize() 4096
|
# define sysconf(X) 4096
|
||||||
#else
|
#else
|
||||||
# include <sys/param.h> /* MAXPATHLEN */
|
# include <sys/param.h> /* MAXPATHLEN */
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
* $Date: 2013/11/27 17:05:31 $
|
* $Date: 2013/11/27 17:05:31 $
|
||||||
* $Author: brettkettering $
|
* $Author: brettkettering $
|
||||||
*/
|
*/
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -53,7 +51,12 @@ static size_t NodeMemoryStringToBytes(char *size_str)
|
||||||
if (percent > 100 || percent < 0)
|
if (percent > 100 || percent < 0)
|
||||||
ERR("percentage must be between 0 and 100");
|
ERR("percentage must be between 0 and 100");
|
||||||
|
|
||||||
|
#ifdef HAVE_SYSCONF
|
||||||
page_size = sysconf(_SC_PAGESIZE);
|
page_size = sysconf(_SC_PAGESIZE);
|
||||||
|
#else
|
||||||
|
page_size = getpagesize();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _SC_PHYS_PAGES
|
#ifdef _SC_PHYS_PAGES
|
||||||
num_pages = sysconf(_SC_PHYS_PAGES);
|
num_pages = sysconf(_SC_PHYS_PAGES);
|
||||||
if (num_pages == -1)
|
if (num_pages == -1)
|
||||||
|
|
Loading…
Reference in New Issue