Commit 6fad748b authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

file.c: replaced getpagesize() by sysconf(_SC_PAGESIZE)

parent c5edb29e
......@@ -3,6 +3,10 @@
* Version 1.6.2 released
* using CGRIBEX library version 1.6.2
2013-10-09 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* file.c: replaced getpagesize() by sysconf(_SC_PAGESIZE)
2013-10-07 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* listSizeExtend: initialize ops, val and status (Bug #3994)
......
......@@ -13,9 +13,7 @@
#include <sys/stat.h>
#include <sys/time.h> // gettimeofday()
#include <fcntl.h>
/*
size_t getpagesize(void);
*/
#include "dmemory.h"
#include "error.h"
#include "file.h"
......@@ -350,9 +348,8 @@ const char *fileLibraryVersion(void)
static
int pagesize(void)
{
#if defined(HAVE_MMAP) && defined(HAVE_GETPAGESIZE)
int getpagesize(void);
return ((int) getpagesize());
#if defined(_SC_PAGESIZE)
return ((int) sysconf(_SC_PAGESIZE));
#else
return ((int) POSIXIO_DEFAULT_PAGESIZE);
#endif
......@@ -1278,9 +1275,7 @@ int fileClose_serial(int fileID)
}
fprintf(stderr, " buffer size : %lu\n", (unsigned long) fileptr->bufferSize);
fprintf(stderr, " block size : %lu\n", (unsigned long) fileptr->blockSize);
#if defined (HAVE_MMAP)
fprintf(stderr, " page size : %d\n", pagesize());
#endif
fprintf(stderr, "--------------------------------------------\n");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment