diff options
author | Ed Schouten <ed@FreeBSD.org> | 2010-01-13 17:56:54 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2010-01-13 17:56:54 +0000 |
commit | 759dba8c5a92bcc1b9335e0a13e3ac23ed80bc1a (patch) | |
tree | 7c6cb6ab13aa9dd8e121913d20f77bf933b35439 | |
parent | adc17f0a4243aa894abe084afcd19cd529be2819 (diff) | |
download | src-759dba8c5a92bcc1b9335e0a13e3ac23ed80bc1a.tar.gz src-759dba8c5a92bcc1b9335e0a13e3ac23ed80bc1a.zip |
Port everything in bin/ from utmp to utmpx.
date: use libc utmpx routines instead of the ones provided by libulog.
pax: don't depend on <utmp.h>
Notes
Notes:
svn path=/head/; revision=202193
-rw-r--r-- | bin/date/Makefile | 2 | ||||
-rw-r--r-- | bin/date/date.c | 3 | ||||
-rw-r--r-- | bin/pax/gen_subs.c | 10 |
3 files changed, 3 insertions, 12 deletions
diff --git a/bin/date/Makefile b/bin/date/Makefile index b466e1d3b3a3..4f5c3fea3a58 100644 --- a/bin/date/Makefile +++ b/bin/date/Makefile @@ -3,7 +3,5 @@ PROG= date SRCS= date.c netdate.c vary.c -DPADD= ${LIBULOG} -LDADD= -lulog .include <bsd.prog.mk> diff --git a/bin/date/date.c b/bin/date/date.c index c980b99d3d2a..1e9f281bc8a7 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -52,9 +52,8 @@ __FBSDID("$FreeBSD$"); #include <stdlib.h> #include <string.h> #include <syslog.h> -#define _ULOG_POSIX_NAMES -#include <ulog.h> #include <unistd.h> +#include <utmpx.h> #include "extern.h" #include "vary.h" diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c index ce2041985a1d..708e8af5ba29 100644 --- a/bin/pax/gen_subs.c +++ b/bin/pax/gen_subs.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include <langinfo.h> #include <stdint.h> #include <stdio.h> -#include <utmp.h> #include <unistd.h> #include <stdlib.h> #include <string.h> @@ -66,10 +65,6 @@ __FBSDID("$FreeBSD$"); #define OLDFRMTM "%b %e %Y" #define CURFRMTD "%e %b %H:%M" #define OLDFRMTD "%e %b %Y" -#ifndef UT_NAMESIZE -#define UT_NAMESIZE 8 -#endif -#define UT_GRPSIZE 6 static int d_first = -1; @@ -116,9 +111,8 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp) */ if (strftime(f_date,DATELEN,timefrmt,localtime(&(sbp->st_mtime))) == 0) f_date[0] = '\0'; - (void)fprintf(fp, "%s%2u %-*s %-*s ", f_mode, sbp->st_nlink, - UT_NAMESIZE, name_uid(sbp->st_uid, 1), UT_GRPSIZE, - name_gid(sbp->st_gid, 1)); + (void)fprintf(fp, "%s%2u %-12s %-12s ", f_mode, sbp->st_nlink, + name_uid(sbp->st_uid, 1), name_gid(sbp->st_gid, 1)); /* * print device id's for devices, or sizes for other nodes |