diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
|---|---|---|
| committer | <> | 2015-03-17 16:26:24 +0000 |
| commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
| tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /dist/aclocal/mmap.m4 | |
| parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
| download | berkeleydb-master.tar.gz | |
Diffstat (limited to 'dist/aclocal/mmap.m4')
| -rw-r--r-- | dist/aclocal/mmap.m4 | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/dist/aclocal/mmap.m4 b/dist/aclocal/mmap.m4 index 727c6c35..cb20228c 100644 --- a/dist/aclocal/mmap.m4 +++ b/dist/aclocal/mmap.m4 @@ -1,4 +1,4 @@ -# Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. # Detect mmap capability: If the file underlying an mmap is extended, # does the addressable memory grow too? @@ -28,8 +28,10 @@ if test "$mmap_ok" = "yes" ; then /* Not all these includes are needed, but the minimal set varies from * system to system. */ + #include <stdlib.h> #include <stdio.h> #include <string.h> + #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -41,18 +43,25 @@ if test "$mmap_ok" = "yes" ; then #ifndef MAP_FAILED #define MAP_FAILED (-1) #endif + /* Prevent unused variabl warnings by setting and using it. */ + #define COMPQUIET(n, v) do { \ + (n) = (v); \ + (n) = (n); \ + } while (0) - int catch_sig(sig) + + void catch_sig(sig) int sig; { + COMPQUIET(sig,0); exit(1); } - main() { + int main() { const char *underlying; unsigned gapsize; char *base; - int count, fd, i, mode, open_flags, ret, total_size; + int count, fd, i, mode, open_flags, total_size; char buf[TEST_MMAP_BUFSIZE]; gapsize = 1024; |
