r3609 - glibc-package/branches/eglibc-2.10/debian/patches/kfreebsd
Author: aurel32
Date: 2009-07-11 17:52:25 +0000 (Sat, 11 Jul 2009)
New Revision: 3609
Modified:
glibc-package/branches/eglibc-2.10/debian/patches/kfreebsd/local-sysdeps-2.10.diff
Log:
Update kfreebsd/local-sysdeps-2.10.diff from glibc-bsd SVN.
Modified: glibc-package/branches/eglibc-2.10/debian/patches/kfreebsd/local-sysdeps-2.10.diff
===================================================================
--- glibc-package/branches/eglibc-2.10/debian/patches/kfreebsd/local-sysdeps-2.10.diff 2009-07-11 13:23:59 UTC (rev 3608)
+++ glibc-package/branches/eglibc-2.10/debian/patches/kfreebsd/local-sysdeps-2.10.diff 2009-07-11 17:52:25 UTC (rev 3609)
@@ -319,3 +319,89 @@
#else
return -1;
#endif
+--- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/Makefile
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/Makefile
+@@ -13,5 +13,5 @@
+
+ ifeq ($(subdir),misc)
+ # For <sys/io.h> and <sys/perm.h>.
+-sysdep_routines += iopl
++sysdep_routines += iopl ioperm
+ endif
+--- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/Versions
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/Versions
+@@ -2,4 +2,7 @@
+ GLIBC_2.3.4 {
+ iopl;
+ }
++ GLIBC_2.10 {
++ ioperm;
++ }
+ }
+--- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ioperm.c
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ioperm.c
+@@ -0,0 +1,32 @@
++/* Copyright (C) 2002 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
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sys/perm.h>
++#include <sysarch.h>
++
++int
++ioperm (unsigned long int from, unsigned long int num, int turn_on)
++{
++ struct i386_ioperm_args args;
++
++ args.start = from;
++ args.length = num;
++ args.enable = turn_on;
++
++ return __sysarch (I386_SET_IOPERM, &args);
++}
+--- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sys/perm.h
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sys/perm.h
+@@ -23,6 +23,11 @@
+
+ __BEGIN_DECLS
+
++/* Set port input/output permissions. */
++extern int ioperm (unsigned long int __from, unsigned long int __num,
++ int __turn_on) __THROW;
++
++
+ /* Change I/O privilege level. */
+ extern int iopl (int __level) __THROW;
+
+--- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sys/io.h
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/sys/io.h
+@@ -23,6 +23,15 @@
+
+ __BEGIN_DECLS
+
++/* If TURN_ON is TRUE, request for permission to do direct i/o on the
++ port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
++ permission off for that range. This call requires root privileges.
++
++ Portability note: not all kFreeBSD platforms support this call. Most
++ platforms based on the PC I/O architecture probably will, however. */
++extern int ioperm (unsigned long int __from, unsigned long int __num,
++ int __turn_on) __THROW;
++
+ /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
+ access any I/O port is granted. This call requires root
+ privileges. */
Reply to: