Messages in this thread |  | | Subject | Re: #define MADV_NORMAL different in kernel and glibc | From | Andreas Jaeger <> | Date | Sun, 28 Oct 2001 19:53:22 +0100 |
| |
rwhron@earthlink.net writes:
> Not a bug, just an inconsistency: > > #defines for MADV_* are different between glibc-2.2.4 and recent linux kernels. > > Most src/linux/include/asm*/mman.h define MADV_* in hex. > asm-alpha and asm-parisc in Linus and Alan trees use decimal. > > /usr/include/bits comes from glibc. > > hrandoz@rushmore:/$ grep " MADV_" /usr/include/bits/mman.h > # define MADV_NORMAL 0 /* No further special treatment. */ > # define MADV_RANDOM 1 /* Expect random page references. */ > # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ > # define MADV_WILLNEED 3 /* Will need these pages. */ > # define MADV_DONTNEED 4 /* Don't need these pages. */ > > /usr/include/asm comes from src/linux/include/asm. > > hrandoz@rushmore:/$ grep " MADV_" /usr/include/asm/mman.h > #define MADV_NORMAL 0x0 /* default page-in behavior */ > #define MADV_RANDOM 0x1 /* page-in minimum required */ > #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ > #define MADV_WILLNEED 0x3 /* pre-fault pages */ > #define MADV_DONTNEED 0x4 /* discard these pages */ > > > Programs like mremap04.c from the Linux Test Project that include mman.h > give a warning like:
Those programs should not include asm/mman.h. Just remove the inclusion of that header and use only glibc's headers.
Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |