Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Define _POSIX_SPAWN in unistd.h and also provide its value v...



details:   https://anonhg.NetBSD.org/src/rev/3ab9c7e3eb4a
branches:  trunk
changeset: 780645:3ab9c7e3eb4a
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Aug 01 15:24:22 2012 +0000

description:
Define _POSIX_SPAWN in unistd.h and also provide its value via sysconf(),
as required by posix since we support posix_spawn().

diffstat:

 lib/libc/gen/sysconf.c |   6 ++++--
 sys/sys/unistd.h       |  10 +++++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (58 lines):

diff -r eb787ab1a53b -r 3ab9c7e3eb4a lib/libc/gen/sysconf.c
--- a/lib/libc/gen/sysconf.c    Wed Aug 01 10:50:05 2012 +0000
+++ b/lib/libc/gen/sysconf.c    Wed Aug 01 15:24:22 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysconf.c,v 1.33 2008/08/06 17:17:04 matt Exp $        */
+/*     $NetBSD: sysconf.c,v 1.34 2012/08/01 15:24:22 martin Exp $      */
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)sysconf.c  8.2 (Berkeley) 3/20/94";
 #else
-__RCSID("$NetBSD: sysconf.c,v 1.33 2008/08/06 17:17:04 matt Exp $");
+__RCSID("$NetBSD: sysconf.c,v 1.34 2012/08/01 15:24:22 martin Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -346,6 +346,8 @@
                return _POSIX_REGEXP;
        case _SC_SHELL:
                return _POSIX_SHELL;
+       case _SC_SPAWN:
+               return _POSIX_SPAWN;
        case _SC_SYMLOOP_MAX:
                return MAXSYMLINKS;
 
diff -r eb787ab1a53b -r 3ab9c7e3eb4a sys/sys/unistd.h
--- a/sys/sys/unistd.h  Wed Aug 01 10:50:05 2012 +0000
+++ b/sys/sys/unistd.h  Wed Aug 01 15:24:22 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unistd.h,v 1.52 2009/08/30 16:38:48 christos Exp $     */
+/*     $NetBSD: unistd.h,v 1.53 2012/08/01 15:24:22 martin Exp $       */
 
 /*
  * Copyright (c) 1989, 1993
@@ -62,6 +62,11 @@
 #define        _POSIX_VERSION                  200112L
 #define        _POSIX2_VERSION                 200112L
 
+/*
+ * We support the posix_spawn() family of functions (unconditionally).
+ */
+#define        _POSIX_SPAWN                    200809L
+
 /* execution-time symbolic constants */
 
 /*
@@ -298,6 +303,9 @@
 #define        _SC_2_PBS_MESSAGE               84
 #define        _SC_2_PBS_TRACK                 85
 
+/* This is implemented */
+#define        _SC_SPAWN                       86
+
 #ifdef _NETBSD_SOURCE
 /* Commonly provided sysconf() extensions */
 #define        _SC_NPROCESSORS_CONF    1001



Home | Main Index | Thread Index | Old Index