~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to src/include/port/linux.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $PostgreSQL$ */
 
2
 
 
3
/*
 
4
 * As of July 2007, all known versions of the Linux kernel will sometimes
 
5
 * return EIDRM for a shmctl() operation when EINVAL is correct (it happens
 
6
 * when the low-order 15 bits of the supplied shm ID match the slot number
 
7
 * assigned to a newer shmem segment).  We deal with this by assuming that
 
8
 * EIDRM means EINVAL in PGSharedMemoryIsInUse().  This is reasonably safe
 
9
 * since in fact Linux has no excuse for ever returning EIDRM; it doesn't
 
10
 * track removed segments in a way that would allow distinguishing them from
 
11
 * private ones.  But someday that code might get upgraded, and we'd have
 
12
 * to have a kernel version test here.
 
13
 */
 
14
#define HAVE_LINUX_EIDRM_BUG