Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
6fad748b
Commit
6fad748b
authored
Oct 09, 2013
by
Uwe Schulzweida
Browse files
file.c: replaced getpagesize() by sysconf(_SC_PAGESIZE)
parent
c5edb29e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
6fad748b
...
...
@@ -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)
...
...
src/file.c
View file @
6fad748b
...
...
@@ -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
"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment