File: files.h.in

package info (click to toggle)
acct 6.6.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,368 kB
  • sloc: ansic: 15,912; sh: 11,380; cpp: 290; makefile: 147
file content (129 lines) | stat: -rw-r--r-- 3,253 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/* files.h.in
 *
 * file locations
 *
 */

#ifndef FILES_H
#define FILES_H

#include "config.h"

#include <sys/types.h>

#ifdef LINUX_MULTIFORMAT
# include "linux-acct.h"
#else
# include <stdint.h> /* GNU/kFreeBSD */
# include <sys/acct.h>
# if defined __FreeBSD__ || defined __FreeBSD_kernel__
#  include <osreldate.h>
#  if defined __FreeBSD_kernel__
#   define __FreeBSD_version __FreeBSD_kernel_version
#  endif /* __FreeBSD_kernel__ */
#  if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
#   define acct acctv2
#   define ac_flag ac_flagx
#  endif
# endif
#endif

#include <utmp.h>

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <stdint.h>     /* GNU/kFreeBSD */
#include <utmp.h>

#ifndef WTMP_FILE
#  if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
        || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
#    define WTMP_FILE "/var/log/wtmp"
#  else
#    if defined(sun) || defined(AMIX)
#      define WTMP_FILE "/var/adm/wtmp"
#    else
#      if defined(sgi) || defined(SVR4)
#        define WTMP_FILE "/usr/adm/wtmp"
#      else
#        define WTMP_FILE "/usr/adm/wtmp"
#      endif
#    endif
#  endif
#endif
#ifndef ACCT_FILE
#  if defined(__FreeBSD__) || defined(__linux__) \
        || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
#    define ACCT_FILE "/var/log/account/pacct"
#  else
#    if defined(__NetBSD__)
#      define ACCT_FILE "/var/account/acct"
#    else
#      if defined(sun) || defined(AMIX)
#        define ACCT_FILE "/var/adm/pacct"
#      else
#        if defined(sgi) || defined(SVR4) || defined(M_XENIX)
#          define ACCT_FILE "/usr/adm/pacct"
#        else
#          define ACCT_FILE "/usr/adm/acct"
#        endif
#      endif
#    endif
#  endif
#endif

#ifndef SAVACCT_FILE
#  if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
        || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
#    define SAVACCT_FILE "/var/log/account/savacct"
#  else
#    if defined(sun) || defined(AMIX)
#      define SAVACCT_FILE "/var/adm/savacct"
#    else
#      if defined(sgi) || defined(SVR4)
#        define SAVACCT_FILE "/usr/adm/savacct"
#      else
#        define SAVACCT_FILE "/usr/adm/savacct"
#      endif
#    endif
#  endif
#endif

#ifndef USRACCT_FILE
#  if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
        || defined(__FreeBSD_kernel__) || defined(__GLIBC__)
#    define USRACCT_FILE "/var/log/account/usracct"
#  else
#    if defined(sun) || defined(AMIX)
#      define USRACCT_FILE "/var/adm/usracct"
#    else
#      if defined(sgi) || defined(SVR4)
#        define USRACCT_FILE "/usr/adm/usracct"
#      else
#        define USRACCT_FILE "/usr/adm/usracct"
#      endif
#    endif
#  endif
#endif

#if !defined(WTMP_FILE) || !defined(ACCT_FILE) || !defined(SAVACCT_FILE) \
    || !defined(USRACCT_FILE)
#error Could not locate your wtmp and acct files.
#endif
#define WTMP_FILE_LOC WTMP_FILE
#define ACCT_FILE_LOC ACCT_FILE
#define SAVACCT_FILE_LOC SAVACCT_FILE
#define USRACCT_FILE_LOC USRACCT_FILE

/* Workaround for a kernel includes problem */
#if defined(__linux__) && defined(__alpha__)
#undef AHZ
#define AHZ 1024
#endif

#ifndef AHZ
#define AHZ 64
#endif

#endif /* ! FILES_H */