[Glibc-bsd-commits] r2805 - in trunk/glibc-ports: . kfreebsd kfreebsd/linuxthreads/bits kfreebsd/nptl/bits kfreebsd/x86_64 kfreebsd/x86_64/sys

Petr Salinger ps-guest at alioth.debian.org
Mon Oct 19 12:13:20 UTC 2009


Author: ps-guest
Date: 2009-10-19 12:13:20 +0000 (Mon, 19 Oct 2009)
New Revision: 2805

Added:
   trunk/glibc-ports/kfreebsd/x86_64/ioperm.c
Removed:
   trunk/glibc-ports/glibc-sysdeps-2.10.patch
Modified:
   trunk/glibc-ports/kfreebsd/Versions
   trunk/glibc-ports/kfreebsd/dl-osinfo.h
   trunk/glibc-ports/kfreebsd/linuxthreads/bits/posix_opt.h
   trunk/glibc-ports/kfreebsd/nptl/bits/posix_opt.h
   trunk/glibc-ports/kfreebsd/sysconf.c
   trunk/glibc-ports/kfreebsd/x86_64/Makefile
   trunk/glibc-ports/kfreebsd/x86_64/Versions
   trunk/glibc-ports/kfreebsd/x86_64/sys/io.h
   trunk/glibc-ports/kfreebsd/x86_64/sys/perm.h
Log:
apply glibc-sysdeps-2.10.patch



Deleted: trunk/glibc-ports/glibc-sysdeps-2.10.patch
===================================================================
--- trunk/glibc-ports/glibc-sysdeps-2.10.patch	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/glibc-sysdeps-2.10.patch	2009-10-19 12:13:20 UTC (rev 2805)
@@ -1,422 +0,0 @@
-To be applied for glibc 2.10
-
---- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-osinfo.h
-+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-osinfo.h
-@@ -62,7 +62,7 @@
-   } while (0)
- 
- static inline uintptr_t __attribute__ ((always_inline))
--_dl_setup_stack_chk_guard (void)
-+_dl_setup_stack_chk_guard (void *dl_random)
- {
-   uintptr_t ret;
- #ifdef ENABLE_STACKGUARD_RANDOMIZE
-@@ -81,3 +81,18 @@
-   p[sizeof (ret) - 2] = '\n';
-   return ret;
- }
-+
-+static inline uintptr_t __attribute__ ((always_inline))
-+_dl_setup_pointer_guard (void *dl_random, uintptr_t stack_chk_guard)
-+{
-+  uintptr_t ret;
-+
-+  ret = stack_chk_guard;
-+# ifndef HP_TIMING_NONAVAIL
-+  hp_timing_t now;
-+  HP_TIMING_NOW (now);
-+  ret ^= now;
-+# endif
-+  return ret;
-+}
-+
---- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/posix_opt.h
---- b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/posix_opt.h
-@@ -31,25 +31,25 @@
- #define	_POSIX_SAVED_IDS	1
- 
- /* Priority scheduling is supported.  */
--#define	_POSIX_PRIORITY_SCHEDULING	200112L
-+#define	_POSIX_PRIORITY_SCHEDULING	200809L
- 
- /* Synchronizing file data is supported.  */
--#define	_POSIX_SYNCHRONIZED_IO	200112L
-+#define	_POSIX_SYNCHRONIZED_IO	200809L
- 
- /* The fsync function is present.  */
--#define	_POSIX_FSYNC	200112L
-+#define	_POSIX_FSYNC	200809L
- 
- /* Mapping of files to memory is supported.  */
--#define	_POSIX_MAPPED_FILES	200112L
-+#define	_POSIX_MAPPED_FILES	200809L
- 
- /* Locking of all memory is supported.  */
--#define	_POSIX_MEMLOCK	200112L
-+#define	_POSIX_MEMLOCK	200809L
- 
- /* Locking of ranges of memory is supported.  */
--#define	_POSIX_MEMLOCK_RANGE	200112L
-+#define	_POSIX_MEMLOCK_RANGE	200809L
- 
- /* Setting of memory protections is supported.  */
--#define	_POSIX_MEMORY_PROTECTION	200112L
-+#define	_POSIX_MEMORY_PROTECTION	200809L
- 
- /* Only root can change owner of file.  */
- #define	_POSIX_CHOWN_RESTRICTED	1
-@@ -76,29 +76,29 @@
- #define	_XOPEN_SHM	1
- 
- /* Tell we have POSIX threads.  */
--#define _POSIX_THREADS	200112L
-+#define _POSIX_THREADS	200809L
- 
- /* We have the reentrant functions described in POSIX.  */
- #define _POSIX_REENTRANT_FUNCTIONS	1
--#define _POSIX_THREAD_SAFE_FUNCTIONS	200112L
-+#define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
- 
- /* We provide priority scheduling for threads.  */
--#define _POSIX_THREAD_PRIORITY_SCHEDULING	200112L
-+#define _POSIX_THREAD_PRIORITY_SCHEDULING	200809L
- 
- /* We support user-defined stack sizes.  */
--#define _POSIX_THREAD_ATTR_STACKSIZE	200112L
-+#define _POSIX_THREAD_ATTR_STACKSIZE	200809L
- 
- /* We support user-defined stacks.  */
--#define _POSIX_THREAD_ATTR_STACKADDR	200112L
-+#define _POSIX_THREAD_ATTR_STACKADDR	200809L
- 
- /* We support POSIX.1b semaphores, but only the non-shared form for now.  */
--#define _POSIX_SEMAPHORES	200112L
-+#define _POSIX_SEMAPHORES	200809L
- 
- /* Real-time signals are not available.  */
- #define _POSIX_REALTIME_SIGNALS	-1
- 
- /* We support asynchronous I/O.  */
--#define _POSIX_ASYNCHRONOUS_IO	200112L
-+#define _POSIX_ASYNCHRONOUS_IO	200809L
- #define _POSIX_ASYNC_IO		1
- /* Alternative name for Unix98.  */
- #define _LFS_ASYNCHRONOUS_IO	1
-@@ -114,7 +114,7 @@
- #define _LFS64_STDIO		1
- 
- /* POSIX shared memory objects are implemented.  */
--#define _POSIX_SHARED_MEMORY_OBJECTS	200112L
-+#define _POSIX_SHARED_MEMORY_OBJECTS	200809L
- 
- /* CPU-time clocks somewhere supported.  */
- #define _POSIX_CPUTIME	0
-@@ -126,25 +126,25 @@
- #define _POSIX_REGEXP	1
- 
- /* Reader/Writer locks are available.  */
--#define _POSIX_READER_WRITER_LOCKS	200112L
-+#define _POSIX_READER_WRITER_LOCKS	200809L
- 
- /* We have a POSIX shell.  */
- #define _POSIX_SHELL	1
- 
- /* We support the Timeouts option.  */
--#define _POSIX_TIMEOUTS	200112L
-+#define _POSIX_TIMEOUTS	200809L
- 
- /* We support spinlocks.  */
--#define _POSIX_SPIN_LOCKS	200112L
-+#define _POSIX_SPIN_LOCKS	200809L
- 
- /* The `spawn' function family is supported.  */
--#define _POSIX_SPAWN	200112L
-+#define _POSIX_SPAWN	200809L
- 
- /* We have POSIX timers.  */
--#define _POSIX_TIMERS	200112L
-+#define _POSIX_TIMERS	200809L
- 
- /* The barrier functions are available.  */
--#define _POSIX_BARRIERS	200112L
-+#define _POSIX_BARRIERS	200809L
- 
- /* POSIX message queues are not available.  */
- #define _POSIX_MESSAGE_PASSING	-1
-@@ -153,7 +153,7 @@
- #define _POSIX_THREAD_PROCESS_SHARED	-1
- 
- /* The monotonic clock is available.  */
--#define _POSIX_MONOTONIC_CLOCK	200112L
-+#define _POSIX_MONOTONIC_CLOCK	200809L
- 
- /* The clock selection interfaces are not available.  */
- #define _POSIX_CLOCK_SELECTION	-1
-@@ -162,13 +162,13 @@
- #define _POSIX_ADVISORY_INFO	-1
- 
- /* IPv6 support is available.  */
--#define _POSIX_IPV6	200112L
-+#define _POSIX_IPV6	200809L
- 
- /* Raw socket support is available.  */
--#define _POSIX_RAW_SOCKETS	200112L
-+#define _POSIX_RAW_SOCKETS	200809L
- 
- /* We have at least one terminal.  */
--#define _POSIX2_CHAR_TERM	200112L
-+#define _POSIX2_CHAR_TERM	200809L
- 
- /* Neither process nor thread sporadic server interfaces is available.  */
- #define _POSIX_SPORADIC_SERVER	-1
---- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/bits/posix_opt.h
---- b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/bits/posix_opt.h
-@@ -31,25 +31,25 @@
- #define	_POSIX_SAVED_IDS	1
- 
- /* Priority scheduling is supported.  */
--#define	_POSIX_PRIORITY_SCHEDULING	200112L
-+#define	_POSIX_PRIORITY_SCHEDULING	200809L
- 
- /* Synchronizing file data is supported.  */
--#define	_POSIX_SYNCHRONIZED_IO	200112L
-+#define	_POSIX_SYNCHRONIZED_IO	200809L
- 
- /* The fsync function is present.  */
--#define	_POSIX_FSYNC	200112L
-+#define	_POSIX_FSYNC	200809L
- 
- /* Mapping of files to memory is supported.  */
--#define	_POSIX_MAPPED_FILES	200112L
-+#define	_POSIX_MAPPED_FILES	200809L
- 
- /* Locking of all memory is supported.  */
--#define	_POSIX_MEMLOCK	200112L
-+#define	_POSIX_MEMLOCK	200809L
- 
- /* Locking of ranges of memory is supported.  */
--#define	_POSIX_MEMLOCK_RANGE	200112L
-+#define	_POSIX_MEMLOCK_RANGE	200809L
- 
- /* Setting of memory protections is supported.  */
--#define	_POSIX_MEMORY_PROTECTION	200112L
-+#define	_POSIX_MEMORY_PROTECTION	200809L
- 
- /* Only root can change owner of file.  */
- #define	_POSIX_CHOWN_RESTRICTED	1
-@@ -76,29 +76,29 @@
- #define	_XOPEN_SHM	1
- 
- /* Tell we have POSIX threads.  */
--#define _POSIX_THREADS	200112L
-+#define _POSIX_THREADS	200809L
- 
- /* We have the reentrant functions described in POSIX.  */
- #define _POSIX_REENTRANT_FUNCTIONS	1
--#define _POSIX_THREAD_SAFE_FUNCTIONS	200112L
-+#define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
- 
- /* We provide priority scheduling for threads.  */
--#define _POSIX_THREAD_PRIORITY_SCHEDULING	200112L
-+#define _POSIX_THREAD_PRIORITY_SCHEDULING	200809L
- 
- /* We support user-defined stack sizes.  */
--#define _POSIX_THREAD_ATTR_STACKSIZE	200112L
-+#define _POSIX_THREAD_ATTR_STACKSIZE	200809L
- 
- /* We support user-defined stacks.  */
--#define _POSIX_THREAD_ATTR_STACKADDR	200112L
-+#define _POSIX_THREAD_ATTR_STACKADDR	200809L
- 
- /* We support POSIX.1b semaphores, but only the non-shared form for now.  */
--#define _POSIX_SEMAPHORES	200112L
-+#define _POSIX_SEMAPHORES	200809L
- 
- /* Real-time signals are not available.  */
- #define _POSIX_REALTIME_SIGNALS	-1
- 
- /* We support asynchronous I/O.  */
--#define _POSIX_ASYNCHRONOUS_IO	200112L
-+#define _POSIX_ASYNCHRONOUS_IO	200809L
- #define _POSIX_ASYNC_IO		1
- /* Alternative name for Unix98.  */
- #define _LFS_ASYNCHRONOUS_IO	1
-@@ -114,7 +114,7 @@
- #define _LFS64_STDIO		1
- 
- /* POSIX shared memory objects are implemented.  */
--#define _POSIX_SHARED_MEMORY_OBJECTS	200112L
-+#define _POSIX_SHARED_MEMORY_OBJECTS	200809L
- 
- /* CPU-time clocks somewhere supported.  */
- #define _POSIX_CPUTIME	0
-@@ -126,25 +126,25 @@
- #define _POSIX_REGEXP	1
- 
- /* Reader/Writer locks are available.  */
--#define _POSIX_READER_WRITER_LOCKS	200112L
-+#define _POSIX_READER_WRITER_LOCKS	200809L
- 
- /* We have a POSIX shell.  */
- #define _POSIX_SHELL	1
- 
- /* We support the Timeouts option.  */
--#define _POSIX_TIMEOUTS	200112L
-+#define _POSIX_TIMEOUTS	200809L
- 
- /* We support spinlocks.  */
--#define _POSIX_SPIN_LOCKS	200112L
-+#define _POSIX_SPIN_LOCKS	200809L
- 
- /* The `spawn' function family is supported.  */
--#define _POSIX_SPAWN	200112L
-+#define _POSIX_SPAWN	200809L
- 
- /* We have POSIX timers.  */
--#define _POSIX_TIMERS	200112L
-+#define _POSIX_TIMERS	200809L
- 
- /* The barrier functions are available.  */
--#define _POSIX_BARRIERS	200112L
-+#define _POSIX_BARRIERS	200809L
- 
- /* POSIX message queues are not available.  */
- #define _POSIX_MESSAGE_PASSING	-1
-@@ -153,7 +153,7 @@
- #define _POSIX_THREAD_PROCESS_SHARED	-1
- 
- /* The monotonic clock is available.  */
--#define _POSIX_MONOTONIC_CLOCK	200112L
-+#define _POSIX_MONOTONIC_CLOCK	200809L
- 
- /* The clock selection interfaces are not available.  */
- #define _POSIX_CLOCK_SELECTION	-1
-@@ -162,13 +162,13 @@
- #define _POSIX_ADVISORY_INFO	-1
- 
- /* IPv6 support is available.  */
--#define _POSIX_IPV6	200112L
-+#define _POSIX_IPV6	200809L
- 
- /* Raw socket support is available.  */
--#define _POSIX_RAW_SOCKETS	200112L
-+#define _POSIX_RAW_SOCKETS	200809L
- 
- /* We have at least one terminal.  */
--#define _POSIX2_CHAR_TERM	200112L
-+#define _POSIX2_CHAR_TERM	200809L
- 
- /* Neither process nor thread sporadic server interfaces is available.  */
- #define _POSIX_SPORADIC_SERVER	-1
---- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sysconf.c
-+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sysconf.c
-@@ -36,7 +36,7 @@
- #if HP_TIMING_AVAIL
-       // XXX We can add  here test for machines which cannot support a
-       // XXX usable TSC.
--      return 200112L;
-+      return 200809L;
- #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. */
---- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Versions
---- b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Versions
-@@ -81,6 +81,12 @@
-     # functions used in inline functions or macros
-     __libc_sa_len;
-   }
-+  GLIBC_2.10 {
-+    devname;
-+    devname_r;
-+    kenv;
-+    sysctlnametomib;
-+  }
-   GLIBC_PRIVATE {
-     # needed by libpthread.
-     __clone; __libc_fork; __libc_sigaction;

Modified: trunk/glibc-ports/kfreebsd/Versions
===================================================================
--- trunk/glibc-ports/kfreebsd/Versions	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/Versions	2009-10-19 12:13:20 UTC (rev 2805)
@@ -81,6 +81,12 @@
     # functions used in inline functions or macros
     __libc_sa_len;
   }
+  GLIBC_2.10 {
+    devname;
+    devname_r;
+    kenv;
+    sysctlnametomib;
+  }
   GLIBC_PRIVATE {
     # needed by libpthread.
     __clone; __libc_fork; __libc_sigaction;

Modified: trunk/glibc-ports/kfreebsd/dl-osinfo.h
===================================================================
--- trunk/glibc-ports/kfreebsd/dl-osinfo.h	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/dl-osinfo.h	2009-10-19 12:13:20 UTC (rev 2805)
@@ -62,7 +62,7 @@
   } while (0)
 
 static inline uintptr_t __attribute__ ((always_inline))
-_dl_setup_stack_chk_guard (void)
+_dl_setup_stack_chk_guard (void *dl_random)
 {
   uintptr_t ret;
 #ifdef ENABLE_STACKGUARD_RANDOMIZE
@@ -81,3 +81,18 @@
   p[sizeof (ret) - 2] = '\n';
   return ret;
 }
+
+static inline uintptr_t __attribute__ ((always_inline))
+_dl_setup_pointer_guard (void *dl_random, uintptr_t stack_chk_guard)
+{
+  uintptr_t ret;
+
+  ret = stack_chk_guard;
+# ifndef HP_TIMING_NONAVAIL
+  hp_timing_t now;
+  HP_TIMING_NOW (now);
+  ret ^= now;
+# endif
+  return ret;
+}
+

Modified: trunk/glibc-ports/kfreebsd/linuxthreads/bits/posix_opt.h
===================================================================
--- trunk/glibc-ports/kfreebsd/linuxthreads/bits/posix_opt.h	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/linuxthreads/bits/posix_opt.h	2009-10-19 12:13:20 UTC (rev 2805)
@@ -31,25 +31,25 @@
 #define	_POSIX_SAVED_IDS	1
 
 /* Priority scheduling is supported.  */
-#define	_POSIX_PRIORITY_SCHEDULING	200112L
+#define	_POSIX_PRIORITY_SCHEDULING	200809L
 
 /* Synchronizing file data is supported.  */
-#define	_POSIX_SYNCHRONIZED_IO	200112L
+#define	_POSIX_SYNCHRONIZED_IO	200809L
 
 /* The fsync function is present.  */
-#define	_POSIX_FSYNC	200112L
+#define	_POSIX_FSYNC	200809L
 
 /* Mapping of files to memory is supported.  */
-#define	_POSIX_MAPPED_FILES	200112L
+#define	_POSIX_MAPPED_FILES	200809L
 
 /* Locking of all memory is supported.  */
-#define	_POSIX_MEMLOCK	200112L
+#define	_POSIX_MEMLOCK	200809L
 
 /* Locking of ranges of memory is supported.  */
-#define	_POSIX_MEMLOCK_RANGE	200112L
+#define	_POSIX_MEMLOCK_RANGE	200809L
 
 /* Setting of memory protections is supported.  */
-#define	_POSIX_MEMORY_PROTECTION	200112L
+#define	_POSIX_MEMORY_PROTECTION	200809L
 
 /* Only root can change owner of file.  */
 #define	_POSIX_CHOWN_RESTRICTED	1
@@ -76,29 +76,29 @@
 #define	_XOPEN_SHM	1
 
 /* Tell we have POSIX threads.  */
-#define _POSIX_THREADS	200112L
+#define _POSIX_THREADS	200809L
 
 /* We have the reentrant functions described in POSIX.  */
 #define _POSIX_REENTRANT_FUNCTIONS	1
-#define _POSIX_THREAD_SAFE_FUNCTIONS	200112L
+#define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
 
 /* We provide priority scheduling for threads.  */
-#define _POSIX_THREAD_PRIORITY_SCHEDULING	200112L
+#define _POSIX_THREAD_PRIORITY_SCHEDULING	200809L
 
 /* We support user-defined stack sizes.  */
-#define _POSIX_THREAD_ATTR_STACKSIZE	200112L
+#define _POSIX_THREAD_ATTR_STACKSIZE	200809L
 
 /* We support user-defined stacks.  */
-#define _POSIX_THREAD_ATTR_STACKADDR	200112L
+#define _POSIX_THREAD_ATTR_STACKADDR	200809L
 
 /* We support POSIX.1b semaphores, but only the non-shared form for now.  */
-#define _POSIX_SEMAPHORES	200112L
+#define _POSIX_SEMAPHORES	200809L
 
 /* Real-time signals are not available.  */
 #define _POSIX_REALTIME_SIGNALS	-1
 
 /* We support asynchronous I/O.  */
-#define _POSIX_ASYNCHRONOUS_IO	200112L
+#define _POSIX_ASYNCHRONOUS_IO	200809L
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
@@ -114,7 +114,7 @@
 #define _LFS64_STDIO		1
 
 /* POSIX shared memory objects are implemented.  */
-#define _POSIX_SHARED_MEMORY_OBJECTS	200112L
+#define _POSIX_SHARED_MEMORY_OBJECTS	200809L
 
 /* CPU-time clocks somewhere supported.  */
 #define _POSIX_CPUTIME	0
@@ -126,25 +126,25 @@
 #define _POSIX_REGEXP	1
 
 /* Reader/Writer locks are available.  */
-#define _POSIX_READER_WRITER_LOCKS	200112L
+#define _POSIX_READER_WRITER_LOCKS	200809L
 
 /* We have a POSIX shell.  */
 #define _POSIX_SHELL	1
 
 /* We support the Timeouts option.  */
-#define _POSIX_TIMEOUTS	200112L
+#define _POSIX_TIMEOUTS	200809L
 
 /* We support spinlocks.  */
-#define _POSIX_SPIN_LOCKS	200112L
+#define _POSIX_SPIN_LOCKS	200809L
 
 /* The `spawn' function family is supported.  */
-#define _POSIX_SPAWN	200112L
+#define _POSIX_SPAWN	200809L
 
 /* We have POSIX timers.  */
-#define _POSIX_TIMERS	200112L
+#define _POSIX_TIMERS	200809L
 
 /* The barrier functions are available.  */
-#define _POSIX_BARRIERS	200112L
+#define _POSIX_BARRIERS	200809L
 
 /* POSIX message queues are not available.  */
 #define _POSIX_MESSAGE_PASSING	-1
@@ -153,7 +153,7 @@
 #define _POSIX_THREAD_PROCESS_SHARED	-1
 
 /* The monotonic clock is available.  */
-#define _POSIX_MONOTONIC_CLOCK	200112L
+#define _POSIX_MONOTONIC_CLOCK	200809L
 
 /* The clock selection interfaces are not available.  */
 #define _POSIX_CLOCK_SELECTION	-1
@@ -162,13 +162,13 @@
 #define _POSIX_ADVISORY_INFO	-1
 
 /* IPv6 support is available.  */
-#define _POSIX_IPV6	200112L
+#define _POSIX_IPV6	200809L
 
 /* Raw socket support is available.  */
-#define _POSIX_RAW_SOCKETS	200112L
+#define _POSIX_RAW_SOCKETS	200809L
 
 /* We have at least one terminal.  */
-#define _POSIX2_CHAR_TERM	200112L
+#define _POSIX2_CHAR_TERM	200809L
 
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1

Modified: trunk/glibc-ports/kfreebsd/nptl/bits/posix_opt.h
===================================================================
--- trunk/glibc-ports/kfreebsd/nptl/bits/posix_opt.h	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/nptl/bits/posix_opt.h	2009-10-19 12:13:20 UTC (rev 2805)
@@ -31,25 +31,25 @@
 #define	_POSIX_SAVED_IDS	1
 
 /* Priority scheduling is supported.  */
-#define	_POSIX_PRIORITY_SCHEDULING	200112L
+#define	_POSIX_PRIORITY_SCHEDULING	200809L
 
 /* Synchronizing file data is supported.  */
-#define	_POSIX_SYNCHRONIZED_IO	200112L
+#define	_POSIX_SYNCHRONIZED_IO	200809L
 
 /* The fsync function is present.  */
-#define	_POSIX_FSYNC	200112L
+#define	_POSIX_FSYNC	200809L
 
 /* Mapping of files to memory is supported.  */
-#define	_POSIX_MAPPED_FILES	200112L
+#define	_POSIX_MAPPED_FILES	200809L
 
 /* Locking of all memory is supported.  */
-#define	_POSIX_MEMLOCK	200112L
+#define	_POSIX_MEMLOCK	200809L
 
 /* Locking of ranges of memory is supported.  */
-#define	_POSIX_MEMLOCK_RANGE	200112L
+#define	_POSIX_MEMLOCK_RANGE	200809L
 
 /* Setting of memory protections is supported.  */
-#define	_POSIX_MEMORY_PROTECTION	200112L
+#define	_POSIX_MEMORY_PROTECTION	200809L
 
 /* Only root can change owner of file.  */
 #define	_POSIX_CHOWN_RESTRICTED	1
@@ -76,29 +76,29 @@
 #define	_XOPEN_SHM	1
 
 /* Tell we have POSIX threads.  */
-#define _POSIX_THREADS	200112L
+#define _POSIX_THREADS	200809L
 
 /* We have the reentrant functions described in POSIX.  */
 #define _POSIX_REENTRANT_FUNCTIONS	1
-#define _POSIX_THREAD_SAFE_FUNCTIONS	200112L
+#define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
 
 /* We provide priority scheduling for threads.  */
-#define _POSIX_THREAD_PRIORITY_SCHEDULING	200112L
+#define _POSIX_THREAD_PRIORITY_SCHEDULING	200809L
 
 /* We support user-defined stack sizes.  */
-#define _POSIX_THREAD_ATTR_STACKSIZE	200112L
+#define _POSIX_THREAD_ATTR_STACKSIZE	200809L
 
 /* We support user-defined stacks.  */
-#define _POSIX_THREAD_ATTR_STACKADDR	200112L
+#define _POSIX_THREAD_ATTR_STACKADDR	200809L
 
 /* We support POSIX.1b semaphores, but only the non-shared form for now.  */
-#define _POSIX_SEMAPHORES	200112L
+#define _POSIX_SEMAPHORES	200809L
 
 /* Real-time signals are not available.  */
 #define _POSIX_REALTIME_SIGNALS	-1
 
 /* We support asynchronous I/O.  */
-#define _POSIX_ASYNCHRONOUS_IO	200112L
+#define _POSIX_ASYNCHRONOUS_IO	200809L
 #define _POSIX_ASYNC_IO		1
 /* Alternative name for Unix98.  */
 #define _LFS_ASYNCHRONOUS_IO	1
@@ -114,7 +114,7 @@
 #define _LFS64_STDIO		1
 
 /* POSIX shared memory objects are implemented.  */
-#define _POSIX_SHARED_MEMORY_OBJECTS	200112L
+#define _POSIX_SHARED_MEMORY_OBJECTS	200809L
 
 /* CPU-time clocks somewhere supported.  */
 #define _POSIX_CPUTIME	0
@@ -126,25 +126,25 @@
 #define _POSIX_REGEXP	1
 
 /* Reader/Writer locks are available.  */
-#define _POSIX_READER_WRITER_LOCKS	200112L
+#define _POSIX_READER_WRITER_LOCKS	200809L
 
 /* We have a POSIX shell.  */
 #define _POSIX_SHELL	1
 
 /* We support the Timeouts option.  */
-#define _POSIX_TIMEOUTS	200112L
+#define _POSIX_TIMEOUTS	200809L
 
 /* We support spinlocks.  */
-#define _POSIX_SPIN_LOCKS	200112L
+#define _POSIX_SPIN_LOCKS	200809L
 
 /* The `spawn' function family is supported.  */
-#define _POSIX_SPAWN	200112L
+#define _POSIX_SPAWN	200809L
 
 /* We have POSIX timers.  */
-#define _POSIX_TIMERS	200112L
+#define _POSIX_TIMERS	200809L
 
 /* The barrier functions are available.  */
-#define _POSIX_BARRIERS	200112L
+#define _POSIX_BARRIERS	200809L
 
 /* POSIX message queues are not available.  */
 #define _POSIX_MESSAGE_PASSING	-1
@@ -153,7 +153,7 @@
 #define _POSIX_THREAD_PROCESS_SHARED	-1
 
 /* The monotonic clock is available.  */
-#define _POSIX_MONOTONIC_CLOCK	200112L
+#define _POSIX_MONOTONIC_CLOCK	200809L
 
 /* The clock selection interfaces are not available.  */
 #define _POSIX_CLOCK_SELECTION	-1
@@ -162,13 +162,13 @@
 #define _POSIX_ADVISORY_INFO	-1
 
 /* IPv6 support is available.  */
-#define _POSIX_IPV6	200112L
+#define _POSIX_IPV6	200809L
 
 /* Raw socket support is available.  */
-#define _POSIX_RAW_SOCKETS	200112L
+#define _POSIX_RAW_SOCKETS	200809L
 
 /* We have at least one terminal.  */
-#define _POSIX2_CHAR_TERM	200112L
+#define _POSIX2_CHAR_TERM	200809L
 
 /* Neither process nor thread sporadic server interfaces is available.  */
 #define _POSIX_SPORADIC_SERVER	-1

Modified: trunk/glibc-ports/kfreebsd/sysconf.c
===================================================================
--- trunk/glibc-ports/kfreebsd/sysconf.c	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/sysconf.c	2009-10-19 12:13:20 UTC (rev 2805)
@@ -36,7 +36,7 @@
 #if HP_TIMING_AVAIL
       // XXX We can add  here test for machines which cannot support a
       // XXX usable TSC.
-      return 200112L;
+      return 200809L;
 #else
       return -1;
 #endif

Modified: trunk/glibc-ports/kfreebsd/x86_64/Makefile
===================================================================
--- trunk/glibc-ports/kfreebsd/x86_64/Makefile	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/x86_64/Makefile	2009-10-19 12:13:20 UTC (rev 2805)
@@ -13,5 +13,5 @@
 
 ifeq ($(subdir),misc)
 # For <sys/io.h> and <sys/perm.h>.
-sysdep_routines += iopl
+sysdep_routines += iopl ioperm
 endif

Modified: trunk/glibc-ports/kfreebsd/x86_64/Versions
===================================================================
--- trunk/glibc-ports/kfreebsd/x86_64/Versions	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/x86_64/Versions	2009-10-19 12:13:20 UTC (rev 2805)
@@ -2,4 +2,7 @@
   GLIBC_2.3.4 {
     iopl;
   }
+  GLIBC_2.10 {
+    ioperm;
+  }
 }

Added: trunk/glibc-ports/kfreebsd/x86_64/ioperm.c
===================================================================
--- trunk/glibc-ports/kfreebsd/x86_64/ioperm.c	                        (rev 0)
+++ trunk/glibc-ports/kfreebsd/x86_64/ioperm.c	2009-10-19 12:13:20 UTC (rev 2805)
@@ -0,0 +1,64 @@
+/* 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);
+}
+/* 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);
+}

Modified: trunk/glibc-ports/kfreebsd/x86_64/sys/io.h
===================================================================
--- trunk/glibc-ports/kfreebsd/x86_64/sys/io.h	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/x86_64/sys/io.h	2009-10-19 12:13:20 UTC (rev 2805)
@@ -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. */

Modified: trunk/glibc-ports/kfreebsd/x86_64/sys/perm.h
===================================================================
--- trunk/glibc-ports/kfreebsd/x86_64/sys/perm.h	2009-10-18 09:32:45 UTC (rev 2804)
+++ trunk/glibc-ports/kfreebsd/x86_64/sys/perm.h	2009-10-19 12:13:20 UTC (rev 2805)
@@ -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;
 




More information about the Glibc-bsd-commits mailing list