svn commit: r215321 - in head/sys: amd64/amd64 i386/i386 sys vm
Konstantin Belousov
kib at FreeBSD.org
Sun Nov 14 21:59:12 UTC 2010
Author: kib
Date: Sun Nov 14 21:59:11 2010
New Revision: 215321
URL: http://svn.freebsd.org/changeset/base/215321
Log:
Do not use __FreeBSD_version prefix for the special osrel version.
The ports/Mk/bsd.port.mk uses sys/param.h to fetch osrel, and cannot
grok several constants with the prefix.
Reported and tested by: swell.k gmail com
MFC after: 1 week
Modified:
head/sys/amd64/amd64/trap.c
head/sys/i386/i386/trap.c
head/sys/sys/param.h
head/sys/vm/vm_mmap.c
Modified: head/sys/amd64/amd64/trap.c
==============================================================================
--- head/sys/amd64/amd64/trap.c Sun Nov 14 20:47:30 2010 (r215320)
+++ head/sys/amd64/amd64/trap.c Sun Nov 14 21:59:11 2010 (r215321)
@@ -416,8 +416,7 @@ trap(struct trapframe *frame)
* without the ABI-tag ELF note.
*/
if (SV_CURPROC_ABI() == SV_ABI_FREEBSD
- && p->p_osrel >=
- __FreeBSD_version_SIGSEGV) {
+ && p->p_osrel >= P_OSREL_SIGSEGV) {
i = SIGSEGV;
ucode = SEGV_ACCERR;
} else {
Modified: head/sys/i386/i386/trap.c
==============================================================================
--- head/sys/i386/i386/trap.c Sun Nov 14 20:47:30 2010 (r215320)
+++ head/sys/i386/i386/trap.c Sun Nov 14 21:59:11 2010 (r215321)
@@ -462,8 +462,7 @@ trap(struct trapframe *frame)
* without the ABI-tag ELF note.
*/
if (SV_CURPROC_ABI() == SV_ABI_FREEBSD
- && p->p_osrel >=
- __FreeBSD_version_SIGSEGV) {
+ && p->p_osrel >= P_OSREL_SIGSEGV) {
i = SIGSEGV;
ucode = SEGV_ACCERR;
} else {
Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h Sun Nov 14 20:47:30 2010 (r215320)
+++ head/sys/sys/param.h Sun Nov 14 21:59:11 2010 (r215321)
@@ -61,8 +61,8 @@
#define __FreeBSD_version 900025 /* Master, propagated to newvers */
#ifdef _KERNEL
-#define __FreeBSD_version_SIGSEGV 700004
-#define __FreeBSD_version_MAP_ANON 800104
+#define P_OSREL_SIGSEGV 700004
+#define P_OSREL_MAP_ANON 800104
#endif
#ifndef LOCORE
Modified: head/sys/vm/vm_mmap.c
==============================================================================
--- head/sys/vm/vm_mmap.c Sun Nov 14 20:47:30 2010 (r215320)
+++ head/sys/vm/vm_mmap.c Sun Nov 14 21:59:11 2010 (r215321)
@@ -232,7 +232,7 @@ mmap(td, uap)
/* Make sure mapping fits into numeric range, etc. */
if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) &&
- curproc->p_osrel >= __FreeBSD_version_MAP_ANON) ||
+ curproc->p_osrel >= P_OSREL_MAP_ANON) ||
((flags & MAP_ANON) && (uap->fd != -1 || pos != 0)))
return (EINVAL);
More information about the svn-src-all
mailing list