"Fossies" - the Fresh Open Source Software Archive

Member "userinfo-2.5/src/modules/login.h" (15 Jan 2015, 1872 Bytes) of package /linux/privat/userinfo-2.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "login.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.4_vs_2.5.

    1 /*
    2     Copyright (C) 2001-2015 Ben Kibbey <bjk@luxsci.net>
    3 
    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.
    8 
    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.
   13 
   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
   17 */
   18 #ifndef LOGIN_H
   19 #define LOGIN_H
   20 
   21 #ifdef HAVE_LIMITS_H
   22 #include <limits.h>
   23 #endif
   24 
   25 #ifdef HAVE_ERR_H
   26 #include <err.h>
   27 #endif
   28 
   29 #ifdef HAVE_STRING_H
   30 #include <string.h>
   31 #endif
   32 
   33 #ifdef HAVE_FCNTL_H
   34 #include <fcntl.h>
   35 #endif
   36 
   37 #ifdef HAVE_PATHS_H
   38 #include <paths.h>
   39 #else
   40 #ifndef _PATH_DEV
   41 #define _PATH_DEV   "/dev/"
   42 #endif
   43 #endif
   44 
   45 #ifdef HAVE_LASTLOG_H
   46 #include <lastlog.h>
   47 #endif
   48 
   49 #ifndef _PATH_LASTLOG
   50 #define _PATH_LASTLOG   "/var/adm/lastlog"
   51 #endif
   52 
   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 #ifndef UTX_NAMESIZE
   60 #ifdef UTX_USERSIZE
   61 #define UTX_NAMESIZE UTX_USERSIZE
   62 #endif
   63 #endif
   64 #endif
   65 typedef struct utmpx UTMP;
   66 #else
   67 #ifdef HAVE_UTMP_H
   68 #include <utmp.h>
   69 typedef struct utmp UTMP;
   70 #endif
   71 #endif
   72 
   73 #define TIMEBUFSIZE 64
   74 
   75 #ifdef HAVE_PROCFS
   76 #ifdef HAVE_DIRENT_H
   77 #include <dirent.h>
   78 static DIR *procdir;
   79 #endif
   80 #endif
   81 
   82 #ifdef HAVE_KVM_H
   83 #include <sys/param.h>
   84 #include <sys/sysctl.h>
   85 #include <sys/user.h>
   86 #include <kvm.h>
   87 static kvm_t *kd;
   88 #endif
   89 
   90 #ifdef WITH_DMALLOC
   91 #include <dmalloc.h>
   92 #endif
   93 
   94 #endif