summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Norum <WENorum@lbl.gov>2002-11-29 19:06:54 +0000
committerEric Norum <WENorum@lbl.gov>2002-11-29 19:06:54 +0000
commitc7cba294417b1d7170681ff006994928daad1443 (patch)
tree1dc0feecc99ba927f18bd54f21a6643d34196aa8
parentf1de6bcea4ad9979ac3ad65d896f3eada12e6d4f (diff)
downloadrtems-c7cba294417b1d7170681ff006994928daad1443.tar.bz2
Return error rather than panic if argument is unsupported.
-rw-r--r--cpukit/posix/ChangeLog5
-rw-r--r--cpukit/posix/src/sysconf.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/cpukit/posix/ChangeLog b/cpukit/posix/ChangeLog
index 96e49e4342..36b6fb1e54 100644
--- a/cpukit/posix/ChangeLog
+++ b/cpukit/posix/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-29 Eric Norum <eric.norum@usask.ca>
+
+ * src/sysconf.c: Add support for _SC_GETPW_R_SIZE_MAX.
+ Return error rather than panic if argument is unsupported.
+
2002-11-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Cosmetical fixes.
diff --git a/cpukit/posix/src/sysconf.c b/cpukit/posix/src/sysconf.c
index 905f53696c..2d11473c5c 100644
--- a/cpukit/posix/src/sysconf.c
+++ b/cpukit/posix/src/sysconf.c
@@ -8,6 +8,7 @@
#include <time.h>
#include <unistd.h>
+#include <errno.h>
#include <rtems/system.h>
#include <rtems/score/tod.h>
@@ -31,6 +32,9 @@ long sysconf(
return rtems_libio_number_iops;
}
+ case _SC_GETPW_R_SIZE_MAX:
+ return 1024;
+
#if defined(__sparc__)
case 515: /* Solaris _SC_STACK_PROT */
return 0;
@@ -40,5 +44,6 @@ long sysconf(
break;
}
- return POSIX_NOT_IMPLEMENTED();
+ errno = EINVAL;
+ return -1;
}