summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-11-15 14:50:44 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-11-15 14:50:44 +0000
commit2d3c472b0f4793800c4fb3db2d154581e5ec9233 (patch)
treec73a59af82c4d919105f74882419572b0aff98da /cpukit
parent2002-11-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-2d3c472b0f4793800c4fb3db2d154581e5ec9233.tar.bz2
2002-11-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/rtems/userenv.h: Rely upon <limits.h> for _POSIX_LOGIN_NAME_MAX.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/include/rtems/userenv.h15
2 files changed, 16 insertions, 4 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 55ebb28e92..857c6d9413 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,10 @@
2002-11-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+ * include/rtems/userenv.h: Rely upon <limits.h> for
+ _POSIX_LOGIN_NAME_MAX.
+
+2002-11-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
* aclocal/prog-cc.m4: Acknowledge configuration-time CFLAGS.
* automake/compile.am: Acknowledge configuration-time CFLAGS.
Remove CFLAGS_DEFAULT.
diff --git a/cpukit/include/rtems/userenv.h b/cpukit/include/rtems/userenv.h
index d86abd7e3d..e5f0c291e8 100644
--- a/cpukit/include/rtems/userenv.h
+++ b/cpukit/include/rtems/userenv.h
@@ -24,12 +24,19 @@ extern "C" {
/*
* External structures
*/
-#if !defined(LOGIN_NAME_MAX)
-#if defined(__linux__)
+
+/*
+ * According to IEEE Std 1003.1-2001,
+ * limits.h is supposed to provide _POSIX_LOGIN_NAME_MAX
+ * FIXME: We should not rely on this.
+ */
+#include <limits.h>
+
+#ifdef _POSIX_LOGIN_NAME_MAX
#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
#else
-#error "don't know how to set LOGIN_NAME_MAX"
-#endif
+/* Fallback */
+#define LOGIN_NAME_MAX 9
#endif
typedef struct {