2002-11-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* include/rtems/userenv.h: Rely upon <limits.h> for
	_POSIX_LOGIN_NAME_MAX.
This commit is contained in:
Ralf Corsepius
2002-11-15 14:50:44 +00:00
parent 8a2e2aaa2a
commit 2d3c472b0f
2 changed files with 16 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
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.

View File

@@ -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 {