From 781e42d66c120183e4dea1058dc539bdc4c53651 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 26 May 2006 14:41:40 +0000 Subject: - introduce and use bb_path_wtmp_file for portability (saves 11 Bytes). - fix last.c to also look at the double-underscore UT_ defines. --- libbb/messages.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libbb/messages.c') diff --git a/libbb/messages.c b/libbb/messages.c index ab4c5d4b1..89ac94e13 100644 --- a/libbb/messages.c +++ b/libbb/messages.c @@ -93,6 +93,20 @@ const char * const bb_default_login_shell = LIBBB_DEFAULT_LOGIN_SHELL; const char * const bb_dev_null = "/dev/null"; #endif +#ifdef L_bb_path_wtmp_file +#include +/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ +const char * const bb_path_wtmp_file = +#if defined _PATH_WTMP +_PATH_WTMP; +#elif defined WTMP_FILE +WTMP_FILE; +#else +# error unknown path to wtmp file +#endif +#endif + + #ifdef L_bb_common_bufsiz1 char bb_common_bufsiz1[BUFSIZ+1]; #endif -- cgit v1.2.3