From 2d3c472b0f4793800c4fb3db2d154581e5ec9233 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 15 Nov 2002 14:50:44 +0000 Subject: 2002-11-15 Ralf Corsepius * include/rtems/userenv.h: Rely upon for _POSIX_LOGIN_NAME_MAX. --- cpukit/include/rtems/userenv.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'cpukit/include') 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 + +#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 { -- cgit v1.2.3