Commit c1494b73 authored by Tom Lane's avatar Tom Lane

Provide MAP_FAILED if sys/mman.h doesn't.

On old HPUX this has to be #defined to -1.  It might be that other values
are required on other dinosaur systems, but we'll worry about that when
and if we get reports.
parent 8f85667a
...@@ -56,6 +56,12 @@ typedef int IpcMemoryId; /* shared memory ID returned by shmget(2) */ ...@@ -56,6 +56,12 @@ typedef int IpcMemoryId; /* shared memory ID returned by shmget(2) */
#define PG_MMAP_FLAGS (MAP_SHARED|MAP_ANONYMOUS|MAP_HASSEMAPHORE) #define PG_MMAP_FLAGS (MAP_SHARED|MAP_ANONYMOUS|MAP_HASSEMAPHORE)
/* Some really old systems don't define MAP_FAILED. */
#ifndef MAP_FAILED
#define MAP_FAILED ((void *) -1)
#endif
unsigned long UsedShmemSegID = 0; unsigned long UsedShmemSegID = 0;
void *UsedShmemSegAddr = NULL; void *UsedShmemSegAddr = NULL;
static Size AnonymousShmemSize; static Size AnonymousShmemSize;
......
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