From 84135275cfeebc0b233c1c96eeada4d4178a0b18 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Tue, 15 Mar 2011 15:29:14 +0100 Subject: utent.c, wtent.c: move functions from utxent.c before the change (threads enabled) text data bss dec hex filename 1107 8 408 1523 5f3 libc/misc/utmp/utent.os 152 0 0 152 98 libc/misc/utmp/wtent.os 240 0 0 240 f0 libc/misc/utmp/utxent.os after the change text data bss dec hex filename 1072 8 408 1488 5d0 libc/misc/utmp/utent.os 157 0 0 157 9d libc/misc/utmp/wtent.os 200 0 0 200 c8 libc/misc/utmp/utxent.os The smaller size on utent.os is unexpected, could be due to better inlining/not inlining Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/misc/utmp/wtent.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'libc/misc/utmp/wtent.c') diff --git a/libc/misc/utmp/wtent.c b/libc/misc/utmp/wtent.c index c97f89cff..97254262f 100644 --- a/libc/misc/utmp/wtent.c +++ b/libc/misc/utmp/wtent.c @@ -11,6 +11,9 @@ #include #include #include +#ifdef __UCLIBC_HAS_UTMPX__ +# include +#endif #include #include #include @@ -33,7 +36,7 @@ void logwtmp (const char *line, const char *name, const char *host) } #endif -void updwtmp(const char *wtmp_file, const struct utmp *lutmp) +static void __updwtmp(const char *wtmp_file, const struct utmp *lutmp) { int fd; @@ -46,4 +49,11 @@ void updwtmp(const char *wtmp_file, const struct utmp *lutmp) } } } -libc_hidden_def(updwtmp) +strong_alias(__updwtmp,updwtmp) + +#ifdef __UCLIBC_HAS_UTMPX__ +void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx) +{ + __updwtmp (wtmpx_file, (const struct utmp *) utmpx); +} +#endif -- cgit v1.2.3