This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[patch] MIPS/Linux: PROT_GROWS* undefined
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: libc-alpha at sources dot redhat dot com
- Cc: Nigel Stephens <nigel at mips dot com>, "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Mon, 18 Oct 2004 17:30:33 +0100 (BST)
- Subject: [patch] MIPS/Linux: PROT_GROWS* undefined
Hello,
The PROT_GROWSDOWN and PROT_GROWSUP macros are missing for MIPS/Linux.
Here's a fix. Tested with the mips-linux configuration using gcc 3.4.2.
The values are taken from the current version of Linux as available from
linux-mips.org (2.6.9-rc4).
2004-10-18 Maciej W. Rozycki <macro@mips.com>
* sysdeps/unix/sysv/linux/mips/bits/mman.h (PROT_GROWSDOWN):
Define.
(PROT_GROWSUP): Likewise.
Please apply.
Maciej
glibc-2.3.3-20041018-mips-prot_grows-1
diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/mman.h glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/mman.h
--- glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/mman.h Sat Mar 8 03:26:00 2003
+++ glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/mman.h Mon Oct 18 14:48:57 2004
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,6 +34,10 @@
#define PROT_WRITE 0x2 /* Page can be written. */
#define PROT_EXEC 0x4 /* Page can be executed. */
#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */