summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-07-22 08:56:55 +0000
committerEric Andersen <andersen@codepoet.org>2003-07-22 08:56:55 +0000
commit85e5e72bc1acd9d58c11bde6e14c8270cd9f169f (patch)
tree9971c6951256dd0bba5ff2a7db08ed6f65ef218d /miscutils
parent0a14c9f924eaf6a64e78959a190d187d646b3c0c (diff)
downloadbusybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.tar.gz
busybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.tar.bz2
busybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.zip
Remove remaining libc5 support code
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/adjtimex.c7
-rw-r--r--miscutils/dutmp.c17
-rw-r--r--miscutils/update.c7
3 files changed, 1 insertions, 30 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c
index d541848f0..e941f6b4f 100644
--- a/miscutils/adjtimex.c
+++ b/miscutils/adjtimex.c
@@ -44,14 +44,7 @@
44#include <sys/types.h> 44#include <sys/types.h>
45#include <stdlib.h> 45#include <stdlib.h>
46#include <unistd.h> 46#include <unistd.h>
47
48#if __GNU_LIBRARY__ < 5
49#include <sys/timex.h>
50extern int adjtimex(struct timex *buf);
51#else
52#include <sys/timex.h> 47#include <sys/timex.h>
53#endif
54
55#include "busybox.h" 48#include "busybox.h"
56 49
57static struct {int bit; char *name;} statlist[] = { 50static struct {int bit; char *name;} statlist[] = {
diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c
index 113f850fe..86d7ce4b3 100644
--- a/miscutils/dutmp.c
+++ b/miscutils/dutmp.c
@@ -28,13 +28,9 @@
28 * Do what we can while still keeping this reasonably small. 28 * Do what we can while still keeping this reasonably small.
29 * Note: We are assuming the ut_id[] size is fixed at 4. */ 29 * Note: We are assuming the ut_id[] size is fixed at 4. */
30 30
31#if __GNU_LIBRARY__ < 5
32#warning the format string needs to be changed
33#else
34#if (UT_LINESIZE != 32) || (UT_NAMESIZE != 32) || (UT_HOSTSIZE != 256) 31#if (UT_LINESIZE != 32) || (UT_NAMESIZE != 32) || (UT_HOSTSIZE != 256)
35#error struct utmp member char[] size(s) have changed! 32#error struct utmp member char[] size(s) have changed!
36#endif 33#endif
37#endif
38 34
39extern int dutmp_main(int argc, char **argv) 35extern int dutmp_main(int argc, char **argv)
40{ 36{
@@ -57,18 +53,6 @@ extern int dutmp_main(int argc, char **argv)
57 bb_perror_msg_and_die("short read"); 53 bb_perror_msg_and_die("short read");
58 } 54 }
59 55
60 /* Kludge around the fact that the binary format for utmp has changed. */
61#if __GNU_LIBRARY__ < 5
62 /* Linux libc5 */
63
64 bb_printf("%d|%d|%s|%s|%s|%s|%s|%lx\n",
65 ut.ut_type, ut.ut_pid, ut.ut_line,
66 ut.ut_id, ut.ut_user, ut.ut_host,
67 ctime(&(ut.ut_time)),
68 (long)ut.ut_addr);
69#else
70 /* Glibc, uClibc, etc. */
71
72 bb_printf("%d|%d|%.32s|%.4s|%.32s|%.256s|%d|%d|%ld|%ld|%ld|%x\n", 56 bb_printf("%d|%d|%.32s|%.4s|%.32s|%.256s|%d|%d|%ld|%ld|%ld|%x\n",
73 ut.ut_type, ut.ut_pid, ut.ut_line, 57 ut.ut_type, ut.ut_pid, ut.ut_line,
74 ut.ut_id, ut.ut_user, ut.ut_host, 58 ut.ut_id, ut.ut_user, ut.ut_host,
@@ -76,7 +60,6 @@ extern int dutmp_main(int argc, char **argv)
76 ut.ut_session, 60 ut.ut_session,
77 ut.ut_tv.tv_sec, ut.ut_tv.tv_usec, 61 ut.ut_tv.tv_sec, ut.ut_tv.tv_usec,
78 ut.ut_addr); 62 ut.ut_addr);
79#endif
80 } 63 }
81 64
82 bb_fflush_stdout_and_exit(EXIT_SUCCESS); 65 bb_fflush_stdout_and_exit(EXIT_SUCCESS);
diff --git a/miscutils/update.c b/miscutils/update.c
index 48ea02deb..c51f42183 100644
--- a/miscutils/update.c
+++ b/miscutils/update.c
@@ -32,12 +32,7 @@
32#include <sys/syslog.h> 32#include <sys/syslog.h>
33#include <unistd.h> /* for getopt() */ 33#include <unistd.h> /* for getopt() */
34#include <stdlib.h> 34#include <stdlib.h>
35 35#include <sys/kdaemon.h>
36#if __GNU_LIBRARY__ > 5
37 #include <sys/kdaemon.h>
38#else
39 extern int bdflush (int func, long int data);
40#endif
41 36
42#include "busybox.h" 37#include "busybox.h"
43 38