GNU99 extracted _XOPEN_SOURCE to config.h.
parent
3a4f2ea33e
commit
5a8071fbd8
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
|
||||
|
||||
# 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_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
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_DEFINE([_XOPEN_SOURCE], [700], [C99 compatibility])
|
||||
|
||||
# Check for lustre availability
|
||||
AC_ARG_WITH([lustre],
|
||||
[AS_HELP_STRING([--with-lustre],
|
||||
|
@ -254,12 +256,6 @@ Consider --with-aws4c=, CPPFLAGS, LDFLAGS, etc])
|
|||
])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Enable building "IOR", in all capitals
|
||||
AC_ARG_ENABLE([caps],
|
||||
[AS_HELP_STRING([--enable-caps],
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 700
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 700
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 700
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 700
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
@ -466,10 +464,10 @@ static void *aligned_buffer_alloc(size_t size)
|
|||
char *buf, *tmp;
|
||||
char *aligned;
|
||||
|
||||
#ifdef HAVE_GETPAGESIZE
|
||||
size_t pageSize = getpagesize();
|
||||
#else
|
||||
#ifdef HAVE_SYSCONF
|
||||
long pageSize = sysconf(_SC_PAGESIZE);
|
||||
#else
|
||||
size_t pageSize = getpagesize();
|
||||
#endif
|
||||
|
||||
pageMask = pageSize - 1;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
# define srandom srand
|
||||
# define random() (rand() * (RAND_MAX+1) + rand()) /* Note: only 30 bits */
|
||||
# define sleep(X) Sleep((X)*1000)
|
||||
# define getpagesize() 4096
|
||||
# define sysconf(X) 4096
|
||||
#else
|
||||
# include <sys/param.h> /* MAXPATHLEN */
|
||||
# include <unistd.h>
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
* $Date: 2013/11/27 17:05:31 $
|
||||
* $Author: brettkettering $
|
||||
*/
|
||||
#define _XOPEN_SOURCE 700
|
||||
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#define _XOPEN_SOURCE 700
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 700
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
@ -53,7 +51,12 @@ static size_t NodeMemoryStringToBytes(char *size_str)
|
|||
if (percent > 100 || percent < 0)
|
||||
ERR("percentage must be between 0 and 100");
|
||||
|
||||
#ifdef HAVE_SYSCONF
|
||||
page_size = sysconf(_SC_PAGESIZE);
|
||||
#else
|
||||
page_size = getpagesize();
|
||||
#endif
|
||||
|
||||
#ifdef _SC_PHYS_PAGES
|
||||
num_pages = sysconf(_SC_PHYS_PAGES);
|
||||
if (num_pages == -1)
|
||||
|
|
Loading…
Reference in New Issue