It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
dnl Checks for header files.
AC_CHECK_HEADERS(crypt.h utmp.h \
- utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \
+ termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \
utime.h ulimit.h sys/capability.h sys/random.h sys/resource.h \
gshadow.h lastlog.h rpc/key_prot.h netdb.h acl/libacl.h \
attr/libattr.h attr/error_context.h)
#endif
/* Maximum length of usernames */
-#ifdef HAVE_UTMPX_H
-# include <utmpx.h>
-# define USER_NAME_MAX_LENGTH (sizeof (((struct utmpx *)NULL)->ut_user))
-#else
-# include <utmp.h>
-# ifdef HAVE_STRUCT_UTMP_UT_USER
-# define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_user))
-# else
-# ifdef HAVE_STRUCT_UTMP_UT_NAME
-# define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_name))
-# else
-# define USER_NAME_MAX_LENGTH 32
-# endif
-# endif
-#endif
+#include <utmpx.h>
+#define USER_NAME_MAX_LENGTH (sizeof (((struct utmpx *)NULL)->ut_user))
/* Maximum length of passwd entry */
#define PASSWD_ENTRY_MAX_LENGTH 32768