94 lines
2.2 KiB
Diff
94 lines
2.2 KiB
Diff
|
--- configure.in
|
||
|
+++ configure.in
|
||
|
@@ -55,46 +55,7 @@
|
||
|
dnl figure out where acct.h lives
|
||
|
dnl and whether fields are int/comp_t
|
||
|
dnl
|
||
|
-AC_CHECK_HEADER(sys/acct.h,
|
||
|
- [AC_DEFINE(HAVE_SYS_ACCT_H)
|
||
|
- DUMP_ACCT_PROG=dump-acct
|
||
|
- ACCTON_PROG=accton
|
||
|
- LASTCOMM_PROG=lastcomm
|
||
|
- SA_PROG=sa
|
||
|
- ACCTON_MAN=accton.8
|
||
|
- LASTCOMM_MAN=lastcomm.1
|
||
|
- SA_MAN=sa.8
|
||
|
- AC_HEADER_EGREP(ac_utime, sys/acct.h,
|
||
|
- AC_DEFINE(HAVE_ACUTIME)
|
||
|
- AC_HEADER_EGREP(comp_t.*ac_utime, sys/acct.h,
|
||
|
- AC_DEFINE(ACUTIME_COMPT))
|
||
|
- )
|
||
|
- AC_HEADER_EGREP(ac_stime, sys/acct.h,
|
||
|
- AC_DEFINE(HAVE_ACSTIME)
|
||
|
- AC_HEADER_EGREP(comp_t.*ac_stime, sys/acct.h,
|
||
|
- AC_DEFINE(ACSTIME_COMPT))
|
||
|
- )
|
||
|
- AC_HEADER_EGREP(ac_etime, sys/acct.h,
|
||
|
- AC_DEFINE(HAVE_ACETIME)
|
||
|
- AC_HEADER_EGREP(comp_t.*ac_etime, sys/acct.h,
|
||
|
- AC_DEFINE(ACETIME_COMPT))
|
||
|
- )
|
||
|
- AC_HEADER_EGREP(ac_io, sys/acct.h,
|
||
|
- AC_DEFINE(HAVE_ACIO)
|
||
|
- AC_HEADER_EGREP(comp_t.*ac_io, sys/acct.h,
|
||
|
- AC_DEFINE(ACIO_COMPT))
|
||
|
- )
|
||
|
- AC_HEADER_EGREP(ac_mem, sys/acct.h,
|
||
|
- AC_DEFINE(HAVE_ACMEM)
|
||
|
- AC_HEADER_EGREP(comp_t.*ac_mem, sys/acct.h,
|
||
|
- AC_DEFINE(ACMEM_COMPT))
|
||
|
- )
|
||
|
- AC_HEADER_EGREP(comp_t, sys/acct.h, AC_DEFINE(HAVE_COMP_T))]
|
||
|
- ,[
|
||
|
- dnl
|
||
|
- dnl here is the "else" clause for the above AC_CHECK_HEADER
|
||
|
- dnl (for older versions of linux, which didn't have a sys/acct.h)
|
||
|
- dnl
|
||
|
+
|
||
|
AC_CHECK_HEADER(linux/acct.h,
|
||
|
[AC_DEFINE(HAVE_LINUX_ACCT_H)
|
||
|
DUMP_ACCT_PROG=dump-acct
|
||
|
@@ -134,7 +95,6 @@
|
||
|
)
|
||
|
AC_HEADER_EGREP(comp_t, linux/acct.h, AC_DEFINE(HAVE_COMP_T))
|
||
|
])
|
||
|
-])
|
||
|
dnl
|
||
|
dnl find out where utmp/pacct are stored
|
||
|
dnl
|
||
|
--- dump-acct.c
|
||
|
+++ dump-acct.c
|
||
|
@@ -14,7 +14,6 @@
|
||
|
#include "pacct_rd.h"
|
||
|
#include "getopt.h"
|
||
|
|
||
|
-
|
||
|
char *program_name;
|
||
|
int debugging_enabled = 0; /* no -- we don't care about bad
|
||
|
records or the file-reading
|
||
|
--- pacct_rd.h
|
||
|
+++ pacct_rd.h
|
||
|
@@ -6,6 +6,10 @@
|
||
|
|
||
|
#include "files.h"
|
||
|
|
||
|
+#ifndef acct
|
||
|
+#define acct acct_v3
|
||
|
+#endif
|
||
|
+
|
||
|
/* This looks strange, but it's real ANSI C. */
|
||
|
|
||
|
extern struct acct pacct_rd_never_used;
|
||
|
--- sa.c
|
||
|
+++ sa.c
|
||
|
@@ -78,6 +78,9 @@
|
||
|
#include "hashtab.h"
|
||
|
#include "version.h"
|
||
|
|
||
|
+#ifndef acct
|
||
|
+#define acct acct_v3
|
||
|
+#endif
|
||
|
|
||
|
/* defines, structures, and the like */
|
||
|
|