summaryrefslogtreecommitdiff
path: root/libc/misc/utmp/wtent.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-03-15 15:29:14 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:24 +0200
commit84135275cfeebc0b233c1c96eeada4d4178a0b18 (patch)
treee733a09d70c81dcaaac73d25fd24cee8bd77a622 /libc/misc/utmp/wtent.c
parenta1281bdca476155f51bd5427c10ac1bb3e889423 (diff)
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 <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/misc/utmp/wtent.c')
-rw-r--r--libc/misc/utmp/wtent.c14
1 files changed, 12 insertions, 2 deletions
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 <time.h>
#include <unistd.h>
#include <utmp.h>
+#ifdef __UCLIBC_HAS_UTMPX__
+# include <utmpx.h>
+#endif
#include <fcntl.h>
#include <sys/file.h>
#include <not-cancel.h>
@@ -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