Update copyright year.
[userinfo.git] / src / modules / login.h
blobdbab0a0b1db883c9d4f495890061a50eea26a1ac
1 /*
2 Copyright (C) 2001-2013 Ben Kibbey <bjk@luxsci.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA
18 #ifndef LOGIN_H
19 #define LOGIN_H
21 #ifdef HAVE_LIMITS_H
22 #include <limits.h>
23 #endif
25 #ifdef HAVE_ERR_H
26 #include <err.h>
27 #endif
29 #ifdef HAVE_STRING_H
30 #include <string.h>
31 #endif
33 #ifdef HAVE_FCNTL_H
34 #include <fcntl.h>
35 #endif
37 #ifdef HAVE_PATHS_H
38 #include <paths.h>
39 #else
40 #ifndef _PATH_DEV
41 #define _PATH_DEV "/dev/"
42 #endif
43 #endif
45 #ifdef HAVE_LASTLOG_H
46 #include <lastlog.h>
47 #endif
49 #ifndef _PATH_LASTLOG
50 #define _PATH_LASTLOG "/var/adm/lastlog"
51 #endif
53 #ifdef HAVE_UTMPX_H
54 #include <utmpx.h>
55 #ifndef UT_HOSTSIZE
56 #define UT_HOSTSIZE 256
57 #define UT_LINESIZE 32
58 #define UT_NAMESIZE 32
59 #endif
60 typedef struct utmpx UTMP;
61 #else
62 #ifdef HAVE_UTMP_H
63 #include <utmp.h>
64 typedef struct utmp UTMP;
65 #endif
66 #endif
68 #define TIMEBUFSIZE 64
70 #ifdef HAVE_PROCFS
71 #ifdef HAVE_DIRENT_H
72 #include <dirent.h>
73 DIR *procdir;
74 #endif
75 #endif
77 #ifdef HAVE_KVM_H
78 #include <sys/param.h>
79 #include <sys/sysctl.h>
80 #include <sys/user.h>
81 #include <kvm.h>
82 static kvm_t *kd;
83 #endif
85 #ifdef WITH_DMALLOC
86 #include <dmalloc.h>
87 #endif
89 #endif