summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-06-02autogen.sh: Honor NOCONFIGURE=1Alan Coopersmith
See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-02configure: Drop AM_MAINTAINER_MODEAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-10sessreg 1.0.8sessreg-1.0.8Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-19Add -V option to print version numberAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-19Combine usage message into a single stringAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-16Fix some clang warnings about implicit conversionsAlan Coopersmith
sessreg.c:360:43: warning: implicit conversion changes signedness: 'unsigned long' to 'off_t' (aka 'long') [-Wsign-conversion] sysnerr (lseek(llog, (long) pwd->pw_uid*sizeof(ll), 0) ~~~~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ sessreg.c:360:25: warning: implicit conversion changes signedness: 'long' to 'unsigned long' [-Wsign-conversion] sysnerr (lseek(llog, (long) pwd->pw_uid*sizeof(ll), 0) ^~~~~~~~~~~~~~~~~~~ sessreg.c:405:7: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] i = strlen (line); ~ ^~~~~~~~~~~~~ sessreg.c:406:9: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] if (i >= sizeof (u->ut_id)) ~ ^ ~~~~~~~~~~~~~~~~~ sessreg.c:494:7: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] i = strlen (line); ~ ^~~~~~~~~~~~~ sessreg.c:495:9: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] if (i >= sizeof (u->ut_id)) ~ ^ ~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-16Remove dubious code.Ed Schouten
The NO_UTMP definition is set on non-FreeBSD, non-OpenBSD, BSD-based systems. When looking at the commonly used BSD-based operating systems, they either use utmpx, or I can't think of a reason why the utmp code wouldn't work. If it turns out some obscure operating system breaks because of this change, we should replace this by something more accurate, such as an Autoconf check or an #ifdef specific to that operating system. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-16Make the `line' variable local to main().Ed Schouten
It is only used within main(). This prevents a compilation failure when building with -Wshadow. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-16Place NetBSD specific #defines in the proper place.Ed Schouten
For all the other databases (utmp, wtmp, lastlog) we already do it in sessreg.h. There's no reason why we should place the utmpx specific ones in sessreg.c. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-08Fix compilation on NetBSD - undefined *TMPX pathsThomas Klausner
Make sure file name defines exist on NetBSD. https://bugs.freedesktop.org/show_bug.cgi?id=50940 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-21sessreg 1.0.7sessreg-1.0.7Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-26Add const attributes to fix gcc -Wwrite-strings warningsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Make lastlog work on BSD systems without <lastlog.h>.Ed Schouten
FreeBSD 8.x and lower have struct lastlog in <utmp.h>. Add a specific Autoconf check for struct lastlog, where we include both <utmp.h> and <lastlog.h>. Also, change NO_LASTLOG to a definition for the opposite; USE_LASTLOG. This is more consistent with USE_UTMP and USE_UTMPX. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Simply define LLOG_FILE and TTYS_FILE unconditionally.Ed Schouten
It doesn't matter if we define these pathnames, even if we're not going to use them in the code itself. It is already done that way for utmp and wtmp. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Fix whitespace inconsistencies.Ed Schouten
Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Just use time_t directly.Ed Schouten
There is no use for this #define (anymore). We can already assume that any decent system has time_t defined. It has to, otherwise struct utmp and struct utmpx can't even be defined. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Only expose the sflag variable when needed.Ed Schouten
The sflag variable is only used when using BSD-style utmp. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Get rid of SYSV definition. Just check for pututline().Ed Schouten
If the system provides pututline(), we just want to use that, instead of specifically checking for certain operating systems. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Don't forget to include <sys/types.h> before <utmp.h>.Ed Schouten
Some operating systems (e.g. FreeBSD) require <sys/types.h> to be included before <utmp.h>, because they depend on type definitions such as int32_t, time_t, etc. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-24Get rid of bzero() calls. Replace them by memset().Ed Schouten
bzero() is not part of POSIX; memset() is. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-24Use Autoconf to check for utmp field existence.Ed Schouten
Don't use the quirky SYSV and __QNX__ definitions to determine whether the utmp fields exist. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-24Only split off /dev/ instead trimming to last /.Ed Schouten
This prevents pseudo-terminals with names like /dev/pts/0 from getting trimmed to just 0 instead of pts/0. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-24Fix typo in function name check.Ed Schouten
Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-24Correct whitespace and indentation.Ed Schouten
Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-03-23Fix non-srcdir buildsJon TURNEY
Commit 3bb9256b8e3a56b94281ea787c07f080c0a80312 introduces an -I.. which should be -I$(top_builddir) -I$(top_srcdir) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-21config: use AC_CHECK_MEMBERS rather than AC_CHECK_MEMBERGaetan Nadon
Let Autoconf do the work of setting up the #define in config.h. Apply and comment standard sections layout. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-19config: remove AC_CANONICAL_HOST already included by XORG_DEFAULT_OPTIONSGaetan Nadon
Fix some quoting and comments, no functional changes. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-19config: move man pages into their own directoryGaetan Nadon
Use services provided by XORG_MANPAGE_SECTIONS. Use standard Makefile for man pages. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13man: replace hard coded man page section with substitution stringsGaetan Nadon
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13man: remove trailing spaces and tabsGaetan Nadon
Using s/[ \t]*$// Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-11-10config: Remove unnecessary calls from configure.acAlan Coopersmith
AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-10config: upgrade to util-macros 1.8 for additional man page supportAlan Coopersmith
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS Enables use of platform appropriate version of sed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-10Sun's copyrights belong to Oracle nowAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-03sessreg 1.0.6sessreg-1.0.6Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-02-05Add AC_USE_SYSTEM_EXTENSIONS providing needed WTMPX_FILE defineGaetan Nadon
The WTMPX_FILE is only defined under __USE_GNU conditional compilation. Autoconf provides AC_USE_SYSTEM_EXTENSIONS to enable platform extensions. It must be expanded before any other macros that uses the compiler. To reduce the risk of being misplaced, the statements have been grouped (mostly) as per the GNU standard layout.This macro requires Autoconf level 2.60 or later. The compilation failed under a GNU-Linux OS. Tested-by (on darwin): Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-01-16Allow sessreg to be built without <utmp.h>.Ed Schouten
As of 9.0, FreeBSD will only support <utmpx.h>. It only implements the POSIX interface with minor extensions. There is no need to write to wtmp and lastlog separately, because this is already done by pututxline(). Add additional checks to configure.ac to search for the presence of utmpxname() and updwtmpx(). Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-11Update Sun license notices to current X.Org standard formAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-11COPYING: add missing copyright noticeGaetan Nadon
Refer to sessreg.h file. Copyright 2005 Sun Microsystems, Inc. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-11-26Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILESGaetan Nadon
Now that the INSTALL file is generated. Allows running make maintainer-clean.
2009-10-28INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206Gaetan Nadon
Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet.
2009-10-26Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432Gaetan Nadon
ChangeLog filename is known to Automake and requires no further coding in the makefile.
2009-10-22.gitignore: use common defaults with custom section # 24239Gaetan Nadon
Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults.
2009-10-12sessreg 1.0.5sessreg-1.0.5Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-10-12Document -L option for lastlog filesAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-10-12Add utmp/utmpx man page to See Also section of man pageAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-10-12Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONSAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-10-01Add README with pointers to mailing lists, bugzilla, & gitAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-01-19Ansification and compile warning fixes.Paulo Cesar Pereira de Andrade
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects make distcheck and all gcc 4.3 and sparse warnings.
2008-06-11Version bump: 1.0.4sessreg-1.0.4Alan Coopersmith
2008-06-11X_NOT_POSIX bits for pre-POSIX-1990 systems not needed any moreAlan Coopersmith