[haiku-commits] haiku: hrev53464 - src/system/libroot/posix/unistd headers/posix

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 7 Sep 2019 11:04:21 -0400 (EDT)

hrev53464 adds 1 changeset to branch 'master'
old head: 857799062053e8d56356d9c38d9088244bd6d04f
new head: af0281a8c20afe53d805b5f3f14935a59b214bdb
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=af0281a8c20a+%5E857799062053

----------------------------------------------------------------------------

af0281a8c20a: POSIX: add a few constants for sysconf.
  
  Change-Id: I400efdbccc97b287844917e21d8e08e26029f2f8
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1839
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53464
Commit:      af0281a8c20afe53d805b5f3f14935a59b214bdb
URL:         https://git.haiku-os.org/haiku/commit/?id=af0281a8c20a
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Sat Sep  7 13:19:59 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sat Sep  7 15:04:14 2019 UTC

----------------------------------------------------------------------------

2 files changed, 12 insertions(+)
headers/posix/unistd.h                   | 4 ++++
src/system/libroot/posix/unistd/conf.cpp | 8 ++++++++

----------------------------------------------------------------------------

diff --git a/headers/posix/unistd.h b/headers/posix/unistd.h
index fd2c0684cb..88efb7143f 100644
--- a/headers/posix/unistd.h
+++ b/headers/posix/unistd.h
@@ -131,6 +131,10 @@
 #define        _SC_TIMERS                                              58
 #define        _SC_CPUTIME                                             59
 #define        _SC_THREAD_CPUTIME                              60
+#define _SC_HOST_NAME_MAX                              61
+#define _SC_REGEXP                                             62
+#define _SC_SYMLOOP_MAX                                        63
+#define _SC_SHELL                                              64
 
 
 /* confstr() constants */
diff --git a/src/system/libroot/posix/unistd/conf.cpp 
b/src/system/libroot/posix/unistd/conf.cpp
index b05dab5364..1bcc8d1e73 100644
--- a/src/system/libroot/posix/unistd/conf.cpp
+++ b/src/system/libroot/posix/unistd/conf.cpp
@@ -71,14 +71,22 @@ __sysconf(int name)
                        return CLK_TCK;
                case _SC_JOB_CONTROL:
                        return 1;
+               case _SC_HOST_NAME_MAX:
+                       return _POSIX_HOST_NAME_MAX;
                case _SC_NGROUPS_MAX:
                        return NGROUPS_MAX;
                case _SC_OPEN_MAX:
                        return getdtablesize();
+               case _SC_REGEXP:
+                       return 1;
                case _SC_SAVED_IDS:
                        return 1;
+               case _SC_SHELL:
+                       return 1;
                case _SC_STREAM_MAX:
                        return STREAM_MAX;
+               case _SC_SYMLOOP_MAX:
+                       return SYMLOOP_MAX;
                case _SC_TZNAME_MAX:
                        return TZNAME_MAX;
                case _SC_VERSION:


Other related posts:

  • » [haiku-commits] haiku: hrev53464 - src/system/libroot/posix/unistd headers/posix - waddlesplash