sessreg 1.0.7.

This commit is contained in:
Julien Cristau 2012-01-12 18:47:39 +01:00
parent c181d85a77
commit f7b278c245
17 changed files with 2495 additions and 1663 deletions

1
debian/changelog vendored
View File

@ -6,6 +6,7 @@ x11-xserver-utils (7.6+4) UNRELEASED; urgency=low
* Drop --disable-xprint from configure flags, it's not used anywhere. * Drop --disable-xprint from configure flags, it's not used anywhere.
* Stop passing RSH and MANCONF to configure. The former was only needed by * Stop passing RSH and MANCONF to configure. The former was only needed by
xsm, the latter by xman, before the xbase-clients split. xsm, the latter by xman, before the xbase-clients split.
* sessreg 1.0.7.
[ Moritz Muehlenhoff ] [ Moritz Muehlenhoff ]
* Enable hardened build flags (closes: #655503) * Enable hardened build flags (closes: #655503)

View File

@ -22,7 +22,7 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization other dealings in this Software without prior written authorization
from The Open Group. from The Open Group.
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),

View File

@ -1,3 +1,255 @@
commit 7ac51a652bfb8423604bb1a120568d44516c9de9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Oct 21 21:09:43 2011 -0700
sessreg 1.0.7
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit fbe6fa7019309672c311184dd3bce3c25fb578d3
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Sep 26 16:01:40 2011 -0700
Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 18d68ce74bd810bc09f99a476798b8e4a66ec494
Author: Ed Schouten <ed@80386.nl>
Date: Sun Jun 26 14:04:20 2011 +0200
Make lastlog work on BSD systems without <lastlog.h>.
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>
commit 9e93c5f65a22824f6b4af7ee68944f2226f7efa7
Author: Ed Schouten <ed@80386.nl>
Date: Sun Jun 26 13:50:36 2011 +0200
Simply define LLOG_FILE and TTYS_FILE unconditionally.
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>
commit 92d2628e3b1db4b0217d91d532e21018371445bc
Author: Ed Schouten <ed@80386.nl>
Date: Sun Jun 26 10:15:59 2011 +0200
Fix whitespace inconsistencies.
Signed-off-by: Ed Schouten <ed@80386.nl>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 38dd87854f106f6d7a3c8bd8916b65c0d1a87697
Author: Ed Schouten <ed@80386.nl>
Date: Sun Jun 26 09:51:01 2011 +0200
Just use time_t directly.
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>
commit 6675a07badfb688aacbd8fd12ba55e16854ba0ab
Author: Ed Schouten <ed@80386.nl>
Date: Sun Jun 26 09:47:40 2011 +0200
Only expose the sflag variable when needed.
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>
commit 6b9a2f7bfa823a3dc0befd039ee08ec1596a3c64
Author: Ed Schouten <ed@80386.nl>
Date: Sun Jun 26 09:43:37 2011 +0200
Get rid of SYSV definition. Just check for pututline().
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>
commit 578b76086edb834aa447ce9aed60c585e44e6cc1
Author: Ed Schouten <ed@80386.nl>
Date: Sat Jun 25 10:35:25 2011 +0200
Don't forget to include <sys/types.h> before <utmp.h>.
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>
commit dd5d4c9721417a21133bb44a0567a041a166bd5e
Author: Ed Schouten <ed@80386.nl>
Date: Fri Jun 24 15:52:18 2011 +0200
Get rid of bzero() calls. Replace them by memset().
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>
commit 301cbd433bb698147e05e7dbfb4de2ce2e0e9cbb
Author: Ed Schouten <ed@80386.nl>
Date: Fri Jun 24 15:46:43 2011 +0200
Use Autoconf to check for utmp field existence.
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>
commit eb6eb771ff9f53c56bd60f28c5598eee9e2fb9b2
Author: Ed Schouten <ed@80386.nl>
Date: Wed Jun 22 00:36:41 2011 +0200
Only split off /dev/ instead trimming to last /.
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>
commit aad7bed11410413b186e0d5af1783686405b47e6
Author: Ed Schouten <ed@80386.nl>
Date: Wed Jun 22 00:10:17 2011 +0200
Fix typo in function name check.
Signed-off-by: Ed Schouten <ed@80386.nl>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 1e20098384961230c3652078fed09e77b2ba2808
Author: Ed Schouten <ed@80386.nl>
Date: Wed Jun 22 00:09:59 2011 +0200
Correct whitespace and indentation.
Signed-off-by: Ed Schouten <ed@80386.nl>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit ba2ea124ff10cadaf1fc96f7e76372b5400e76d1
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Mon Mar 14 14:25:22 2011 +0000
Fix non-srcdir builds
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>
commit 5a886e2fc5f4b3f062a20f66ee68bad4a0b98ad1
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Jan 19 11:20:21 2011 -0500
config: use AC_CHECK_MEMBERS rather than AC_CHECK_MEMBER
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>
commit 4eaaa6a84a52b7c60df964102f0fb8d860b00308
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Jan 19 10:52:55 2011 -0500
config: remove AC_CANONICAL_HOST already included by XORG_DEFAULT_OPTIONS
Fix some quoting and comments, no functional changes.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 3bb9256b8e3a56b94281ea787c07f080c0a80312
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Jan 19 10:06:55 2011 -0500
config: move man pages into their own directory
Use services provided by XORG_MANPAGE_SECTIONS.
Use standard Makefile for man pages.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit f9d0aa7ca56c68aee0ba53a9ad9c232c544264b0
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Jan 13 17:15:36 2011 -0500
man: replace hard coded man page section with substitution strings
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 3ad465bf134560234e75bf421acbe1481bccfde4
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Jan 13 11:15:47 2011 -0500
man: remove trailing spaces and tabs
Using s/[ \t]*$//
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit d3055b5828d5ffd92134de31c44c3d14f6bd283d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Nov 10 21:08:09 2010 -0800
config: Remove unnecessary calls from configure.ac
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>
commit 2d33ed0f648314f661aa5e429834a8f886904f94
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Nov 10 21:06:15 2010 -0800
config: upgrade to util-macros 1.8 for additional man page support
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>
commit 87666632a0f066cb9df3fb4ae258f89f1edb56cc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Nov 10 21:03:59 2010 -0800
Sun's copyrights belong to Oracle now
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7f1e17aed0027e4040a1fcc96e6319fca36af233 commit 7f1e17aed0027e4040a1fcc96e6319fca36af233
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jun 3 17:32:57 2010 -0700 Date: Thu Jun 3 17:32:57 2010 -0700

View File

@ -18,6 +18,7 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE. # PERFORMANCE OF THIS SOFTWARE.
SUBDIRS = man
bin_PROGRAMS = sessreg bin_PROGRAMS = sessreg
AM_CFLAGS = $(CWARNFLAGS) $(SESSREG_CFLAGS) AM_CFLAGS = $(CWARNFLAGS) $(SESSREG_CFLAGS)
@ -26,47 +27,6 @@ sessreg_SOURCES = \
sessreg.h \ sessreg.h \
sessreg.c sessreg.c
appman_PRE = sessreg.man
appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST = $(appman_PRE) filenames.sed.c
MAINTAINERCLEANFILES = ChangeLog INSTALL
CLEANFILES = $(appman_DATA) filenames.sed
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MAN_SUBSTS = -f filenames.sed \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__apploaddir__|$(appdefaultdir)|' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
sessreg.$(APP_MAN_SUFFIX): filenames.sed
filenames.sed: filenames.sed.c
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \
grep 's|__' > $@
if LINT if LINT
ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
@ -75,6 +35,7 @@ lint:
$(LINT) $(ALL_LINT_FLAGS) $(sessreg_SOURCES) $(LINT) $(ALL_LINT_FLAGS) $(sessreg_SOURCES)
endif LINT endif LINT
MAINTAINERCLEANFILES = ChangeLog INSTALL
.PHONY: ChangeLog INSTALL .PHONY: ChangeLog INSTALL

View File

@ -35,7 +35,6 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE. # PERFORMANCE OF THIS SOFTWARE.
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
@ -71,7 +70,7 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS) PROGRAMS = $(bin_PROGRAMS)
am_sessreg_OBJECTS = sessreg.$(OBJEXT) am_sessreg_OBJECTS = sessreg.$(OBJEXT)
sessreg_OBJECTS = $(am_sessreg_OBJECTS) sessreg_OBJECTS = $(am_sessreg_OBJECTS)
@ -98,30 +97,21 @@ am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(sessreg_SOURCES) SOURCES = $(sessreg_SOURCES)
DIST_SOURCES = $(sessreg_SOURCES) DIST_SOURCES = $(sessreg_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
am__vpath_adj = case $$p in \ html-recursive info-recursive install-data-recursive \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ install-dvi-recursive install-exec-recursive \
*) f=$$p;; \ install-html-recursive install-info-recursive \
esac; install-pdf-recursive install-ps-recursive install-recursive \
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; installcheck-recursive installdirs-recursive pdf-recursive \
am__install_max = 40 ps-recursive uninstall-recursive
am__nobase_strip_setup = \ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` distclean-recursive maintainer-clean-recursive
am__nobase_strip = \ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
am__nobase_list = $(am__nobase_strip_setup); \ distdir dist dist-all distcheck
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DATA = $(appman_DATA)
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)
@ -129,6 +119,31 @@ am__remove_distdir = \
{ test ! -d "$(distdir)" \ { test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; } && rm -fr "$(distdir)"; }; }
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
@ -180,19 +195,7 @@ LINT_FLAGS = @LINT_FLAGS@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MAN_SUBSTS = -f filenames.sed \ MAN_SUBSTS = @MAN_SUBSTS@
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__apploaddir__|$(appdefaultdir)|' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
@ -206,10 +209,12 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
SED = @SED@
SESSREG_CFLAGS = @SESSREG_CFLAGS@ SESSREG_CFLAGS = @SESSREG_CFLAGS@
SESSREG_LIBS = @SESSREG_LIBS@ SESSREG_LIBS = @SESSREG_LIBS@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
@ -263,31 +268,21 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
SUBDIRS = man
AM_CFLAGS = $(CWARNFLAGS) $(SESSREG_CFLAGS) AM_CFLAGS = $(CWARNFLAGS) $(SESSREG_CFLAGS)
sessreg_SOURCES = \ sessreg_SOURCES = \
sessreg.h \ sessreg.h \
sessreg.c sessreg.c
appman_PRE = sessreg.man
appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST = $(appman_PRE) filenames.sed.c
MAINTAINERCLEANFILES = ChangeLog INSTALL
CLEANFILES = $(appman_DATA) filenames.sed
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
SUFFIXES = .$(APP_MAN_SUFFIX) .man
@LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
@LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) @LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS)
MAINTAINERCLEANFILES = ChangeLog INSTALL
all: config.h all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am $(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj .SUFFIXES: .c .o .obj
am--refresh: am--refresh:
@: @:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@ -403,26 +398,76 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
install-appmanDATA: $(appman_DATA)
@$(NORMAL_INSTALL)
test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
done
uninstall-appmanDATA: # This directory's subdirectories are mostly independent; you can cd
@$(NORMAL_UNINSTALL) # into them and run `make' without going through this Makefile.
@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ # To change the values of `make' variables: instead of editing Makefiles,
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ # (1) if the variable is set in `config.status', edit `config.status'
test -n "$$files" || exit 0; \ # (which will cause the Makefiles to be regenerated when you run `make');
echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \ # (2) otherwise, pass the desired values on the `make' command line.
cd "$(DESTDIR)$(appmandir)" && rm -f $$files $(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -434,10 +479,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
set x; \ set x; \
here=`pwd`; \ here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@ -456,7 +514,7 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
fi; \ fi; \
fi fi
ctags: CTAGS ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
@ -508,6 +566,34 @@ distdir: $(DISTFILES)
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \ $(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \ top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook dist-hook
@ -627,21 +713,22 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \ $(distcleancheck_listfiles) ; \
exit 1; } >&2 exit 1; } >&2
check-am: all-am check-am: all-am
check: check-am check: check-recursive
all-am: Makefile $(PROGRAMS) $(DATA) config.h all-am: Makefile $(PROGRAMS) config.h
installdirs: installdirs: installdirs-recursive
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \ installdirs-am:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-recursive
install-exec: install-exec-am install-exec: install-exec-recursive
install-data: install-data-am install-data: install-data-recursive
uninstall: uninstall-am uninstall: uninstall-recursive
install-am: all-am install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am installcheck: installcheck-recursive
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@ -650,7 +737,6 @@ install-strip:
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@ -660,108 +746,99 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am clean: clean-recursive
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-tags distclean-hdr distclean-tags
dvi: dvi-am dvi: dvi-recursive
dvi-am: dvi-am:
html: html-am html: html-recursive
html-am: html-am:
info: info-am info: info-recursive
info-am: info-am:
install-data-am: install-appmanDATA install-data-am:
install-dvi: install-dvi-am install-dvi: install-dvi-recursive
install-dvi-am: install-dvi-am:
install-exec-am: install-binPROGRAMS install-exec-am: install-binPROGRAMS
install-html: install-html-am install-html: install-html-recursive
install-html-am: install-html-am:
install-info: install-info-am install-info: install-info-recursive
install-info-am: install-info-am:
install-man: install-man:
install-pdf: install-pdf-am install-pdf: install-pdf-recursive
install-pdf-am: install-pdf-am:
install-ps: install-ps-am install-ps: install-ps-recursive
install-ps-am: install-ps-am:
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache -rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
-rm -f Makefile -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am pdf: pdf-recursive
pdf-am: pdf-am:
ps: ps-am ps: ps-recursive
ps-am: ps-am:
uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS uninstall-am: uninstall-binPROGRAMS
.MAKE: all install-am install-strip .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
ctags-recursive install-am install-strip tags-recursive
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ all all-am am--refresh check check-am clean clean-binPROGRAMS \
clean-generic ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
dist-zip distcheck distclean distclean-compile \ dist-zip distcheck distclean distclean-compile \
distclean-generic distclean-hdr distclean-tags distcleancheck \ distclean-generic distclean-hdr distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \ distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-appmanDATA \ info-am install install-am install-binPROGRAMS install-data \
install-binPROGRAMS install-data install-data-am install-dvi \ install-data-am install-dvi install-dvi-am install-exec \
install-dvi-am install-exec install-exec-am install-html \ install-exec-am install-html install-html-am install-info \
install-html-am install-info install-info-am install-man \ install-info-am install-man install-pdf install-pdf-am \
install-pdf install-pdf-am install-ps install-ps-am \ install-ps install-ps-am install-strip installcheck \
install-strip installcheck installcheck-am installdirs \ installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean maintainer-clean-generic mostlyclean \ maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
tags uninstall uninstall-am uninstall-appmanDATA \ uninstall uninstall-am uninstall-binPROGRAMS
uninstall-binPROGRAMS
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
sessreg.$(APP_MAN_SUFFIX): filenames.sed
filenames.sed: filenames.sed.c
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \
grep 's|__' > $@
@LINT_TRUE@lint: @LINT_TRUE@lint:
@LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(sessreg_SOURCES) @LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(sessreg_SOURCES)

686
sessreg/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

18
sessreg/config.guess vendored Executable file → Normal file
View File

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
timestamp='2009-11-20' timestamp='2010-08-21'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -56,8 +56,9 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -91,7 +92,7 @@ if test $# != 0; then
exit 1 exit 1
fi fi
trap 'exit 1' 1 2 15 trap 'exit 1' HUP INT TERM
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires # compiler to aid in system detection is discouraged as it requires
@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
set_cc_for_build=' set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
: ${TMPDIR=/tmp} ; : ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@ -551,7 +552,7 @@ EOF
echo rs6000-ibm-aix3.2 echo rs6000-ibm-aix3.2
fi fi
exit ;; exit ;;
*:AIX:*:[456]) *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000 IBM_ARCH=rs6000
@ -967,6 +968,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*) sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-tilera-linux-gnu
exit ;;
vax:Linux:*:*) vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;; exit ;;

View File

@ -9,6 +9,12 @@
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MEMORY_H
/* Define to 1 if you have the `pututline' function. */
#undef HAVE_PUTUTLINE
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
@ -21,6 +27,24 @@
/* Define to 1 if you have the <string.h> header file. */ /* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H #undef HAVE_STRING_H
/* Define to 1 if the system has the type `struct lastlog'. */
#undef HAVE_STRUCT_LASTLOG
/* Define to 1 if `ut_syslen' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_SYSLEN
/* Define to 1 if `ut_host' is a member of `struct utmp'. */
#undef HAVE_STRUCT_UTMP_UT_HOST
/* Define to 1 if `ut_id' is a member of `struct utmp'. */
#undef HAVE_STRUCT_UTMP_UT_ID
/* Define to 1 if `ut_pid' is a member of `struct utmp'. */
#undef HAVE_STRUCT_UTMP_UT_PID
/* Define to 1 if `ut_type' is a member of `struct utmp'. */
#undef HAVE_STRUCT_UTMP_UT_TYPE
/* Define to 1 if you have the <sys/param.h> header file. */ /* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H #undef HAVE_SYS_PARAM_H
@ -42,9 +66,6 @@
/* Define to 1 if you have the <utmpx.h> header file. */ /* Define to 1 if you have the <utmpx.h> header file. */
#undef HAVE_UTMPX_H #undef HAVE_UTMPX_H
/* utmpx structure includes ut_syslen field */
#undef HAVE_UTMPX_UT_SYSLEN
/* Define to 1 if you have the <utmp.h> header file. */ /* Define to 1 if you have the <utmp.h> header file. */
#undef HAVE_UTMP_H #undef HAVE_UTMP_H

76
sessreg/config.sub vendored Executable file → Normal file
View File

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
timestamp='2009-11-20' timestamp='2010-09-11'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@ -75,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -123,8 +124,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*) storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
@ -281,6 +283,7 @@ case $basic_machine in
| moxie \ | moxie \
| mt \ | mt \
| msp430 \ | msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \ | nios | nios2 \
| ns16k | ns32k \ | ns16k | ns32k \
| or32 \ | or32 \
@ -294,7 +297,7 @@ case $basic_machine in
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \ | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \ | ubicom32 \
| v850 | v850e \ | v850 | v850e \
| we32k \ | we32k \
@ -302,6 +305,15 @@ case $basic_machine in
| z8k | z80) | z8k | z80)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip) m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12. # Motorola 68HC11/12.
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
@ -333,7 +345,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \ | avr-* | avr32-* \
| bfin-* | bs2000-* \ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
@ -367,6 +379,7 @@ case $basic_machine in
| mmix-* \ | mmix-* \
| mt-* \ | mt-* \
| msp430-* \ | msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \ | orion-* \
@ -380,7 +393,8 @@ case $basic_machine in
| sparclite-* \ | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \ | tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tron-* \ | tron-* \
| ubicom32-* \ | ubicom32-* \
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | vax-* \
@ -480,6 +494,15 @@ case $basic_machine in
basic_machine=powerpc-ibm basic_machine=powerpc-ibm
os=-cnk os=-cnk
;; ;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90) c90)
basic_machine=c90-cray basic_machine=c90-cray
os=-unicos os=-unicos
@ -839,6 +862,12 @@ case $basic_machine in
np1) np1)
basic_machine=np1-gould basic_machine=np1-gould
;; ;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem) nsr-tandem)
basic_machine=nsr-tandem basic_machine=nsr-tandem
;; ;;
@ -1073,17 +1102,10 @@ case $basic_machine in
basic_machine=t90-cray basic_machine=t90-cray
os=-unicos os=-unicos
;; ;;
tic54x | c54x*) # This must be matched before tile*.
basic_machine=tic54x-unknown tilegx*)
os=-coff basic_machine=tilegx-unknown
;; os=-linux-gnu
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;; ;;
tile*) tile*)
basic_machine=tile-unknown basic_machine=tile-unknown
@ -1294,7 +1316,8 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@ -1435,6 +1458,8 @@ case $os in
-dicos*) -dicos*)
os=-dicos os=-dicos
;; ;;
-nacl*)
;;
-none) -none)
;; ;;
*) *)
@ -1475,6 +1500,15 @@ case $basic_machine in
c4x-* | tic4x-*) c4x-* | tic4x-*)
os=-coff os=-coff
;; ;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry. # This must come before the *-dec entry.
pdp10-*) pdp10-*)
os=-tops20 os=-tops20

1860
sessreg/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -22,12 +22,10 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT(sessreg, [1.0.6], AC_INIT([sessreg], [1.0.7],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [sessreg])
sessreg)
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
AC_USE_SYSTEM_EXTENSIONS AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
@ -35,32 +33,44 @@ AC_SYS_LARGEFILE
AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
# Require xorg-macros: XORG_DEFAULT_OPTIONS # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION], m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])]) [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.4) XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS XORG_DEFAULT_OPTIONS
XORG_WITH_LINT XORG_WITH_LINT
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_INSTALL
# Checks for header files. # Checks for header files.
AC_CHECK_HEADERS([lastlog.h utmp.h utmpx.h sys/param.h]) AC_CHECK_HEADERS([lastlog.h pwd.h utmp.h utmpx.h sys/param.h])
AC_CHECK_MEMBER([struct utmpx.ut_syslen],
HAVE_SYSLEN=1,
HAVE_SYSLEN=0,
[#include <utmpx.h>])
AC_DEFINE_UNQUOTED(HAVE_UTMPX_UT_SYSLEN,$HAVE_SYSLEN,
[utmpx structure includes ut_syslen field])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_FUNCS([updwtmpx utmpxname]) AC_CHECK_MEMBERS([
struct utmp.ut_host,
struct utmp.ut_id,
struct utmp.ut_pid,
struct utmp.ut_type], [], [], [
#include <sys/types.h>
#include <utmp.h>
])
AC_CHECK_MEMBERS([struct utmpx.ut_syslen], [], [], [#include <utmpx.h>])
AC_CHECK_TYPES([
struct lastlog], [], [],[
#include <sys/types.h>
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_LASTLOG_H
#include <lastlog.h>
#endif
])
# Checks for pkg-config packages # Checks for library functions.
AC_CHECK_FUNCS([pututline updwtmpx utmpxname])
# Obtain compiler/linker options for depedencies
PKG_CHECK_MODULES(SESSREG, xproto) PKG_CHECK_MODULES(SESSREG, xproto)
AC_SUBST(SESSREG_CFLAGS)
AC_OUTPUT([Makefile]) AC_CONFIG_FILES([
Makefile
man/Makefile])
AC_OUTPUT

22
sessreg/man/Makefile.am Normal file
View File

@ -0,0 +1,22 @@
appmandir = $(APP_MAN_DIR)
appman_PRE = sessreg.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE) filenames.sed.c
CLEANFILES = $(appman_DATA) filenames.sed
SUFFIXES = .$(APP_MAN_SUFFIX) .man
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
filenames.sed: filenames.sed.c
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \
grep 's|__' > $@
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS += -f filenames.sed
sessreg.$(APP_MAN_SUFFIX): filenames.sed
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@

423
sessreg/man/Makefile.in Normal file
View File

@ -0,0 +1,423 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = man
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(appmandir)"
DATA = $(appman_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LINT = @LINT@
LINT_FLAGS = @LINT_FLAGS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS = @MAN_SUBSTS@ -f filenames.sed
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
SED = @SED@
SESSREG_CFLAGS = @SESSREG_CFLAGS@
SESSREG_LIBS = @SESSREG_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
appmandir = $(APP_MAN_DIR)
appman_PRE = sessreg.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE) filenames.sed.c
CLEANFILES = $(appman_DATA) filenames.sed
SUFFIXES = .$(APP_MAN_SUFFIX) .man
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
all: all-am
.SUFFIXES:
.SUFFIXES: .$(APP_MAN_SUFFIX) .man
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign man/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-appmanDATA: $(appman_DATA)
@$(NORMAL_INSTALL)
test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
done
uninstall-appmanDATA:
@$(NORMAL_UNINSTALL)
@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(appmandir)" && rm -f $$files
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(appmandir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-appmanDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-appmanDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-appmanDATA install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am uninstall uninstall-am uninstall-appmanDATA
filenames.sed: filenames.sed.c
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \
grep 's|__' > $@
sessreg.$(APP_MAN_SUFFIX): filenames.sed
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,15 +1,15 @@
.\" $Xorg: sessreg.man,v 1.4 2001/02/09 02:05:40 xorgcvs Exp $ .\" $Xorg: sessreg.man,v 1.4 2001/02/09 02:05:40 xorgcvs Exp $
.\" Copyright 1994, 1998 The Open Group .\" Copyright 1994, 1998 The Open Group
.\" .\"
.\" Permission to use, copy, modify, distribute, and sell this software and its .\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that .\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that .\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting .\" copyright notice and this permission notice appear in supporting
.\" documentation. .\" documentation.
.\" .\"
.\" The above copyright notice and this permission notice shall be included .\" The above copyright notice and this permission notice shall be included
.\" in all copies or substantial portions of the Software. .\" in all copies or substantial portions of the Software.
.\" .\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -17,7 +17,7 @@
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE. .\" OTHER DEALINGS IN THE SOFTWARE.
.\" .\"
.\" Except as contained in this notice, the name of The Open Group shall .\" Except as contained in this notice, the name of The Open Group shall
.\" not be used in advertising or otherwise to promote the sale, use or .\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization .\" other dealings in this Software without prior written authorization
@ -48,19 +48,19 @@ entries for xdm sessions.
.PP .PP
System V has a better interface to utmp than BSD; it System V has a better interface to utmp than BSD; it
dynamically allocates entries in the file, instead of writing them at fixed dynamically allocates entries in the file, instead of writing them at fixed
positions indexed by position in positions indexed by position in
.BR __ttys_file__ . .BR __ttys_file__ .
.PP .PP
To manage BSD-style utmp files, \fIsessreg\fP has two strategies. In To manage BSD-style utmp files, \fIsessreg\fP has two strategies. In
conjunction with xdm, the -x option counts the number of lines in conjunction with xdm, the -x option counts the number of lines in
.B __ttys_file__ .B __ttys_file__
and then adds to that the number of the line in the Xservers file which and then adds to that the number of the line in the Xservers file which
specifies the display. The display name must be specified as the specifies the display. The display name must be specified as the
"line-name" using the -l option. This sum is used as the "slot-number" in "line-name" using the -l option. This sum is used as the "slot-number" in
the utmp file that this entry will be written at. In the more general case, the utmp file that this entry will be written at. In the more general case,
the -s option specifies the slot-number directly. If for some strange reason the -s option specifies the slot-number directly. If for some strange reason
your system uses a file other than your system uses a file other than
.B __ttys_file__ .B __ttys_file__
to manage init, the -t option can direct to manage init, the -t option can direct
\fIsessreg\fP to look elsewhere for a count of terminal sessions. \fIsessreg\fP to look elsewhere for a count of terminal sessions.
.PP .PP
@ -87,11 +87,11 @@ and in Xreset:
.fi .fi
.SH OPTIONS .SH OPTIONS
.IP "\fB-w\fP \fIwtmp-file\fP" .IP "\fB-w\fP \fIwtmp-file\fP"
This specifies an alternate wtmp file, instead of This specifies an alternate wtmp file, instead of
.BR __wtmp_file__ . .BR __wtmp_file__ .
The special name "none" disables writing records to the wtmp file. The special name "none" disables writing records to the wtmp file.
.IP "\fB-u\fP \fIutmp-file\fP" .IP "\fB-u\fP \fIutmp-file\fP"
This specifies an alternate utmp file, instead of This specifies an alternate utmp file, instead of
.BR __utmp_file__ . .BR __utmp_file__ .
The special name "none" disables writing records to the utmp file. The special name "none" disables writing records to the utmp file.
.IP "\fB-L\fP \fIlastlog-file\fP" .IP "\fB-L\fP \fIlastlog-file\fP"
@ -104,16 +104,16 @@ This describes the "line" name of the entry. For terminal sessions,
this is the final pathname segment of the terminal device filename this is the final pathname segment of the terminal device filename
(e.g. ttyd0). For X sessions, it should probably be the local display name (e.g. ttyd0). For X sessions, it should probably be the local display name
given to the users session (e.g. :0). If none is specified, the given to the users session (e.g. :0). If none is specified, the
terminal name will be determined with ttyname(3) and stripped of leading terminal name will be determined with ttyname(__libmansuffix__) and stripped of leading
components. components.
.IP "\fB-h\fP \fIhost-name\fP" .IP "\fB-h\fP \fIhost-name\fP"
This is set for BSD hosts to indicate that the session was initiated from This is set for BSD hosts to indicate that the session was initiated from
a remote host. In typical xdm usage, this options is not used. a remote host. In typical xdm usage, this options is not used.
.IP "\fB-s\fP \fIslot-number\fP" .IP "\fB-s\fP \fIslot-number\fP"
Each potential session has a unique slot number in BSD systems, most are Each potential session has a unique slot number in BSD systems, most are
identified by the position of the \fIline-name\fP in the identified by the position of the \fIline-name\fP in the
.BR __ttys_file__ file. .BR __ttys_file__ file.
This option overrides the default position determined with ttyslot(3). This option overrides the default position determined with ttyslot(__libmansuffix__).
This option is inappropriate for use with xdm, the -x option is more useful. This option is inappropriate for use with xdm, the -x option is more useful.
.IP "\fB-x\fP \fIXservers-file\fP" .IP "\fB-x\fP \fIXservers-file\fP"
As X sessions are one-per-display, and each display is entered in this file, As X sessions are one-per-display, and each display is entered in this file,

View File

@ -6,10 +6,10 @@
* the above copyright notice appear in all copies and that both that * the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting * copyright notice and this permission notice appear in supporting
* documentation. * documentation.
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -17,7 +17,7 @@
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
* *
* Except as contained in this notice, the name of The Open Group shall * Except as contained in this notice, the name of The Open Group shall
* not be used in advertising or otherwise to promote the sale, use or * not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization * other dealings in this Software without prior written authorization
@ -25,7 +25,8 @@
* *
*/ */
/* Copyright 2005 Sun Microsystems, Inc. All rights reserved. /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
@ -60,47 +61,42 @@
* *
* usage: sessreg [ -w <wtmp-file> ] [ -u <utmp-file> ] * usage: sessreg [ -w <wtmp-file> ] [ -u <utmp-file> ]
* [ -l <line> ] * [ -l <line> ]
* [ -L <lastlog-file> ] / #ifndef NO_LASTLOG * [ -L <lastlog-file> ] / #ifdef USE_LASTLOG
* [ -h <host-name> ] / BSD only * [ -h <host-name> ] / BSD only
* [ -s <slot-number> ] [ -x Xservers-file ] / BSD only * [ -s <slot-number> ] [ -x Xservers-file ] / BSD only
* [ -t <ttys-file> ] / BSD only * [ -t <ttys-file> ] / BSD only
* [ -a ] [ -d ] user-name * [ -a ] [ -d ] user-name
* *
* one of -a or -d must be specified * one of -a or -d must be specified
*/ */
#include "sessreg.h" #include "sessreg.h"
# include <X11/Xos.h> #include <X11/Xos.h>
# include <X11/Xfuncs.h> #include <X11/Xfuncs.h>
# include <stdio.h> #include <stdio.h>
# include <stdlib.h> #include <stdlib.h>
#if defined(__SVR4) || defined(SVR4) || defined(linux) || defined(__GLIBC__)
# define SYSV
#endif
#include <time.h> #include <time.h>
#define Time_t time_t
#ifdef USE_UTMP #ifdef USE_UTMP
static void set_utmp (struct utmp *u, char *line, char *user, char *host, static void set_utmp (struct utmp *u, char *line, char *user, char *host,
Time_t date, int addp); time_t date, int addp);
#endif #endif
#ifdef USE_UTMPX #ifdef USE_UTMPX
static void set_utmpx (struct utmpx *u, const char *line, const char *user, static void set_utmpx (struct utmpx *u, const char *line, const char *user,
const char *host, Time_t date, int addp); const char *host, time_t date, int addp);
#endif #endif
static int wflag, uflag, lflag; static int wflag, uflag, lflag;
static char *wtmp_file, *utmp_file, *line; static const char *wtmp_file, *utmp_file;
static char *line;
#ifdef USE_UTMPX #ifdef USE_UTMPX
#ifdef HAVE_UPDWTMPX #ifdef HAVE_UPDWTMPX
static char *wtmpx_file = NULL; static const char *wtmpx_file = NULL;
#endif #endif
#ifdef HAVE_UTMPXNAME #ifdef HAVE_UTMPXNAME
static char *utmpx_file = NULL; static const char *utmpx_file = NULL;
#endif #endif
#endif #endif
static int utmp_none, wtmp_none; static int utmp_none, wtmp_none;
@ -108,22 +104,23 @@ static int utmp_none, wtmp_none;
* BSD specific variables. To make life much easier for Xstartup/Xreset * BSD specific variables. To make life much easier for Xstartup/Xreset
* maintainers, these arguments are accepted but ignored for sysV * maintainers, these arguments are accepted but ignored for sysV
*/ */
static int hflag, sflag, xflag, tflag; static int hflag, xflag, tflag;
static char *host_name = NULL; static char *host_name = NULL;
#ifdef USE_UTMP #if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
static int sflag;
static int slot_number; static int slot_number;
#endif #endif
static char *xservers_file, *ttys_file; static char *xservers_file, *ttys_file;
static char *user_name; static char *user_name;
static int aflag, dflag; static int aflag, dflag;
#ifndef NO_LASTLOG #ifdef USE_LASTLOG
static char *llog_file; static const char *llog_file;
static int llog_none, Lflag; static int llog_none, Lflag;
#endif #endif
static char *program_name; static char *program_name;
#ifndef SYSV #if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
static int findslot (char *line_name, char *host_name, int addp, int slot); static int findslot (char *line_name, char *host_name, int addp, int slot);
static int Xslot (char *ttys_file, char *servers_file, char *tty_line, static int Xslot (char *ttys_file, char *servers_file, char *tty_line,
char *host_name, int addp); char *host_name, int addp);
@ -134,7 +131,7 @@ usage (int x)
{ {
if (x) { if (x) {
fprintf (stderr, "%s: usage %s {-a -d} [-w wtmp-file] [-u utmp-file]", program_name, program_name); fprintf (stderr, "%s: usage %s {-a -d} [-w wtmp-file] [-u utmp-file]", program_name, program_name);
#ifndef NO_LASTLOG #ifdef USE_LASTLOG
fprintf (stderr, " [-L lastlog-file]"); fprintf (stderr, " [-L lastlog-file]");
#endif #endif
fprintf (stderr, "\n"); fprintf (stderr, "\n");
@ -159,7 +156,7 @@ getstring (char ***avp, int *flagp)
return *a; return *a;
} }
#ifndef SYSV #if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
static int static int
syserr (int x, const char *s) syserr (int x, const char *s)
{ {
@ -184,14 +181,13 @@ sysnerr (int x, const char *s)
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
#if defined(USE_UTMP) && !defined(SYSV) #if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
int utmp; int utmp;
#endif #endif
char *line_tmp; #ifndef USE_UTMPX
#ifndef USE_UTMPX
int wtmp; int wtmp;
#endif #endif
Time_t current_time; time_t current_time;
#ifdef USE_UTMP #ifdef USE_UTMP
struct utmp utmp_entry; struct utmp utmp_entry;
#endif #endif
@ -212,7 +208,7 @@ main (int argc, char **argv)
if (!strcmp (utmp_file, "none")) if (!strcmp (utmp_file, "none"))
utmp_none = 1; utmp_none = 1;
break; break;
#ifndef NO_LASTLOG #ifdef USE_LASTLOG
case 'L': case 'L':
llog_file = getstring (&argv, &Lflag); llog_file = getstring (&argv, &Lflag);
if (!strcmp (llog_file, "none")) if (!strcmp (llog_file, "none"))
@ -229,7 +225,7 @@ main (int argc, char **argv)
host_name = getstring (&argv, &hflag); host_name = getstring (&argv, &hflag);
break; break;
case 's': case 's':
#ifdef USE_UTMP #if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
slot_number = atoi (getstring (&argv, &sflag)); slot_number = atoi (getstring (&argv, &sflag));
#endif #endif
break; break;
@ -271,11 +267,11 @@ main (int argc, char **argv)
#else #else
utmp_none = 1; utmp_none = 1;
#endif #endif
#ifndef NO_LASTLOG #ifdef USE_LASTLOG
if (!Lflag) if (!Lflag)
llog_file = LLOG_FILE; llog_file = LLOG_FILE;
#endif #endif
#if defined(USE_UTMP) && !defined(SYSV) && !defined(linux) && !defined(__QNX__) #if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
if (!tflag) if (!tflag)
ttys_file = TTYS_FILE; ttys_file = TTYS_FILE;
if (!sflag && !utmp_none) { if (!sflag && !utmp_none) {
@ -286,12 +282,9 @@ main (int argc, char **argv)
} }
#endif #endif
if (!lflag) { if (!lflag) {
sysnerr ((line_tmp = ttyname (0)) != NULL, "ttyname"); sysnerr ((line = ttyname (0)) != NULL, "ttyname");
line = strrchr(line_tmp, '/'); if (strncmp(line, "/dev/", 5) == 0)
if (line) line += 5;
line = line + 1;
else
line = line_tmp;
} }
time (&current_time); time (&current_time);
#ifdef USE_UTMP #ifdef USE_UTMP
@ -303,27 +296,27 @@ main (int argc, char **argv)
UtmpxIdOpen to work */ UtmpxIdOpen to work */
# ifdef HAVE_UTMPXNAME # ifdef HAVE_UTMPXNAME
if (utmpx_file != NULL) { if (utmpx_file != NULL) {
utmpxname (utmpx_file); utmpxname (utmpx_file);
} }
# endif # endif
set_utmpx (&utmpx_entry, line, user_name, set_utmpx (&utmpx_entry, line, user_name,
host_name, current_time, aflag); host_name, current_time, aflag);
#endif #endif
if (!utmp_none) { if (!utmp_none) {
#ifdef USE_UTMPX #ifdef USE_UTMPX
# ifdef HAVE_UTMPX_NAME # ifdef HAVE_UTMPXNAME
if (utmpx_file != NULL) if (utmpx_file != NULL)
# endif # endif
{ {
setutxent (); setutxent ();
(void) getutxid (&utmpx_entry); (void) getutxid (&utmpx_entry);
pututxline (&utmpx_entry); pututxline (&utmpx_entry);
endutxent (); endutxent ();
} }
#endif #endif
#ifdef USE_UTMP #ifdef USE_UTMP
# ifdef SYSV # ifdef HAVE_PUTUTLINE
utmpname (utmp_file); utmpname (utmp_file);
setutent (); setutent ();
(void) getutid (&utmp_entry); (void) getutid (&utmp_entry);
@ -334,7 +327,7 @@ main (int argc, char **argv)
if (utmp != -1) { if (utmp != -1) {
syserr ((int) lseek (utmp, (long) slot_number * sizeof (struct utmp), 0), "lseek"); syserr ((int) lseek (utmp, (long) slot_number * sizeof (struct utmp), 0), "lseek");
sysnerr (write (utmp, (char *) &utmp_entry, sizeof (utmp_entry)) sysnerr (write (utmp, (char *) &utmp_entry, sizeof (utmp_entry))
== sizeof (utmp_entry), "write utmp entry"); == sizeof (utmp_entry), "write utmp entry");
close (utmp); close (utmp);
} }
# endif # endif
@ -351,25 +344,25 @@ main (int argc, char **argv)
wtmp = open (wtmp_file, O_WRONLY|O_APPEND); wtmp = open (wtmp_file, O_WRONLY|O_APPEND);
if (wtmp != -1) { if (wtmp != -1) {
sysnerr (write (wtmp, (char *) &utmp_entry, sizeof (utmp_entry)) sysnerr (write (wtmp, (char *) &utmp_entry, sizeof (utmp_entry))
== sizeof (utmp_entry), "write wtmp entry"); == sizeof (utmp_entry), "write wtmp entry");
close (wtmp); close (wtmp);
} }
#endif #endif
} }
#ifndef NO_LASTLOG #ifdef USE_LASTLOG
if (aflag && !llog_none) { if (aflag && !llog_none) {
int llog; int llog;
struct passwd *pwd = getpwnam(user_name); struct passwd *pwd = getpwnam(user_name);
sysnerr( pwd != NULL, "get user id"); sysnerr( pwd != NULL, "get user id");
llog = open (llog_file, O_RDWR); llog = open (llog_file, O_RDWR);
if (llog != -1) { if (llog != -1) {
struct lastlog ll; struct lastlog ll;
sysnerr (lseek(llog, (long) pwd->pw_uid*sizeof(ll), 0) sysnerr (lseek(llog, (long) pwd->pw_uid*sizeof(ll), 0)
!= -1, "seeking lastlog entry"); != -1, "seeking lastlog entry");
bzero((char *)&ll, sizeof(ll)); memset(&ll, 0, sizeof(ll));
ll.ll_time = current_time; ll.ll_time = current_time;
if (line) if (line)
(void) strncpy (ll.ll_line, line, sizeof (ll.ll_line)); (void) strncpy (ll.ll_line, line, sizeof (ll.ll_line));
@ -377,7 +370,7 @@ main (int argc, char **argv)
(void) strncpy (ll.ll_host, host_name, sizeof (ll.ll_host)); (void) strncpy (ll.ll_host, host_name, sizeof (ll.ll_host));
sysnerr (write (llog, (char *) &ll, sizeof (ll)) sysnerr (write (llog, (char *) &ll, sizeof (ll))
== sizeof (ll), "write lastlog entry"); == sizeof (ll), "write lastlog entry");
close (llog); close (llog);
} }
} }
@ -391,18 +384,18 @@ main (int argc, char **argv)
#ifdef USE_UTMP #ifdef USE_UTMP
static void static void
set_utmp (struct utmp *u, char *line, char *user, char *host, Time_t date, int addp) set_utmp (struct utmp *u, char *line, char *user, char *host, time_t date, int addp)
{ {
bzero (u, sizeof (*u)); memset (u, 0, sizeof (*u));
if (line) if (line)
(void) strncpy (u->ut_line, line, sizeof (u->ut_line)); (void) strncpy (u->ut_line, line, sizeof (u->ut_line));
else else
bzero (u->ut_line, sizeof (u->ut_line)); memset (u->ut_line, 0, sizeof (u->ut_line));
if (addp && user) if (addp && user)
(void) strncpy (u->ut_name, user, sizeof (u->ut_name)); (void) strncpy (u->ut_name, user, sizeof (u->ut_name));
else else
bzero (u->ut_name, sizeof (u->ut_name)); memset (u->ut_name, 0, sizeof (u->ut_name));
#ifdef SYSV #ifdef HAVE_STRUCT_UTMP_UT_ID
if (line) { if (line) {
int i; int i;
/* /*
@ -419,20 +412,25 @@ set_utmp (struct utmp *u, char *line, char *user, char *host, Time_t date, int a
i = 0; i = 0;
(void) strncpy (u->ut_id, line + i, sizeof (u->ut_id)); (void) strncpy (u->ut_id, line + i, sizeof (u->ut_id));
} else } else
bzero (u->ut_id, sizeof (u->ut_id)); memset (u->ut_id, 0, sizeof (u->ut_id));
if (addp) {
u->ut_pid = getppid ();
u->ut_type = USER_PROCESS;
} else {
u->ut_pid = 0;
u->ut_type = DEAD_PROCESS;
}
#endif #endif
#if (!defined(SYSV) && !defined(__QNX__)) || defined(linux) #ifdef HAVE_STRUCT_UTMP_UT_PID
if (addp)
u->ut_pid = getppid ();
else
u->ut_pid = 0;
#endif
#ifdef HAVE_STRUCT_UTMP_UT_TYPE
if (addp)
u->ut_type = USER_PROCESS;
else
u->ut_type = DEAD_PROCESS;
#endif
#ifdef HAVE_STRUCT_UTMP_UT_HOST
if (addp && host) if (addp && host)
(void) strncpy (u->ut_host, host, sizeof (u->ut_host)); (void) strncpy (u->ut_host, host, sizeof (u->ut_host));
else else
bzero (u->ut_host, sizeof (u->ut_host)); memset (u->ut_host, 0, sizeof (u->ut_host));
#endif #endif
u->ut_time = date; u->ut_time = date;
} }
@ -446,105 +444,105 @@ UtmpxIdOpen( char *utmpId )
int status = 1; /* return code */ int status = 1; /* return code */
setutxent(); setutxent();
while ( (u = getutxent()) != NULL ) { while ( (u = getutxent()) != NULL ) {
if ( (strncmp(u->ut_id, utmpId, 4) == 0 ) && if ( (strncmp(u->ut_id, utmpId, 4) == 0 ) &&
u->ut_type != DEAD_PROCESS ) { u->ut_type != DEAD_PROCESS ) {
status = 0; status = 0;
break; break;
} }
} }
endutxent(); endutxent();
return (status); return (status);
} }
static void static void
set_utmpx (struct utmpx *u, const char *line, const char *user, set_utmpx (struct utmpx *u, const char *line, const char *user,
const char *host, Time_t date, int addp) const char *host, time_t date, int addp)
{ {
static const char letters[] = static const char letters[] =
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (line) if (line)
{ {
if(strcmp(line, ":0") == 0) if(strcmp(line, ":0") == 0)
(void) strcpy(u->ut_line, "console"); (void) strcpy(u->ut_line, "console");
else else
(void) strncpy (u->ut_line, line, sizeof (u->ut_line)); (void) strncpy (u->ut_line, line, sizeof (u->ut_line));
strncpy(u->ut_host, line, sizeof(u->ut_host)); strncpy(u->ut_host, line, sizeof(u->ut_host));
#if HAVE_UTMPX_UT_SYSLEN #ifdef HAVE_STRUCT_UTMPX_UT_SYSLEN
u->ut_syslen = strlen(line); u->ut_syslen = strlen(line);
#endif #endif
} }
else else
bzero (u->ut_line, sizeof (u->ut_line)); memset (u->ut_line, 0, sizeof (u->ut_line));
if (addp && user) if (addp && user)
(void) strncpy (u->ut_user, user, sizeof (u->ut_user)); (void) strncpy (u->ut_user, user, sizeof (u->ut_user));
else else
bzero (u->ut_user, sizeof (u->ut_user)); memset (u->ut_user, 0, sizeof (u->ut_user));
if (line) { if (line) {
int i; int i;
/* /*
* this is a bit crufty, but * this is a bit crufty, but
* follows the apparent conventions in * follows the apparent conventions in
* the ttys file. ut_id is only 4 bytes * the ttys file. ut_id is only 4 bytes
* long, and the last 4 bytes of the line * long, and the last 4 bytes of the line
* name are written into it, left justified. * name are written into it, left justified.
*/ */
i = strlen (line); i = strlen (line);
if (i >= sizeof (u->ut_id)) if (i >= sizeof (u->ut_id))
i -= sizeof (u->ut_id); i -= sizeof (u->ut_id);
else else
i = 0; i = 0;
(void) strncpy (u->ut_id, line + i, sizeof (u->ut_id)); (void) strncpy (u->ut_id, line + i, sizeof (u->ut_id));
/* make sure there is no entry using identical ut_id */ /* make sure there is no entry using identical ut_id */
if (!UtmpxIdOpen(u->ut_id) && addp) { if (!UtmpxIdOpen(u->ut_id) && addp) {
int limit = sizeof(letters) - 1; int limit = sizeof(letters) - 1;
int t = 0; int t = 0;
u->ut_id[1] = line[i]; u->ut_id[1] = line[i];
u->ut_id[2] = line[i+1]; u->ut_id[2] = line[i+1];
u->ut_id[3] = line[i+2]; u->ut_id[3] = line[i+2];
do { do {
u->ut_id[0] = letters[t]; u->ut_id[0] = letters[t];
t++; t++;
} while (!UtmpxIdOpen(u->ut_id) && (t < limit)); } while (!UtmpxIdOpen(u->ut_id) && (t < limit));
} }
if (!addp && strstr(line, ":") != NULL) { if (!addp && strstr(line, ":") != NULL) {
struct utmpx *tmpu; struct utmpx *tmpu;
while ( (tmpu = getutxent()) != NULL ) { while ( (tmpu = getutxent()) != NULL ) {
if ( (strcmp(tmpu->ut_host, line) == 0 ) && if ( (strcmp(tmpu->ut_host, line) == 0 ) &&
tmpu->ut_type != DEAD_PROCESS ) { tmpu->ut_type != DEAD_PROCESS ) {
strncpy(u->ut_id, tmpu->ut_id, strncpy(u->ut_id, tmpu->ut_id,
sizeof(u->ut_id)); sizeof(u->ut_id));
break; break;
} }
} }
endutxent(); endutxent();
} }
} else } else
bzero (u->ut_id, sizeof (u->ut_id)); memset (u->ut_id, 0, sizeof (u->ut_id));
if (addp) { if (addp) {
u->ut_pid = getppid (); u->ut_pid = getppid ();
u->ut_type = USER_PROCESS; u->ut_type = USER_PROCESS;
} else { } else {
u->ut_pid = 0; u->ut_pid = 0;
u->ut_type = DEAD_PROCESS; u->ut_type = DEAD_PROCESS;
} }
u->ut_tv.tv_sec = date; u->ut_tv.tv_sec = date;
u->ut_tv.tv_usec = 0; u->ut_tv.tv_usec = 0;
} }
#endif /* USE_UTMPX */ #endif /* USE_UTMPX */
#if defined(USE_UTMP) && !defined(SYSV) #if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
/* /*
* compute the slot-number for an X display. This is computed * compute the slot-number for an X display. This is computed
* by counting the lines in /etc/ttys and adding the line-number * by counting the lines in /etc/ttys and adding the line-number
@ -572,9 +570,9 @@ Xslot (char *ttys_file, char *servers_file, char *tty_line, char *host_name,
strncpy(disp_name, host_name ? host_name : tty_line, sizeof(disp_name)-1); strncpy(disp_name, host_name ? host_name : tty_line, sizeof(disp_name)-1);
pos = strrchr(disp_name, ':'); pos = strrchr(disp_name, ':');
if (pos) { if (pos) {
pos = strchr(pos, '.'); pos = strchr(pos, '.');
if (pos) if (pos)
*pos = '\0'; *pos = '\0';
} }
sysnerr ((int)(long)(ttys = fopen (ttys_file, "r")), ttys_file); sysnerr ((int)(long)(ttys = fopen (ttys_file, "r")), ttys_file);
while ((c = getc (ttys)) != EOF) while ((c = getc (ttys)) != EOF)
@ -635,13 +633,13 @@ findslot (char *line_name, char *host_name, int addp, int slot)
while (read (utmp, (char *) &entry, sizeof (entry)) == sizeof (entry)) { while (read (utmp, (char *) &entry, sizeof (entry)) == sizeof (entry)) {
if (strncmp(entry.ut_line, line_name, if (strncmp(entry.ut_line, line_name,
sizeof(entry.ut_line)) == 0 sizeof(entry.ut_line)) == 0
#ifndef __QNX__ #ifdef HAVE_STRUCT_UTMP_UT_HOST
&& &&
strncmp(entry.ut_host, host_name, strncmp(entry.ut_host, host_name,
sizeof(entry.ut_host)) == 0 sizeof(entry.ut_host)) == 0
#endif #endif
) { ) {
found = 1; found = 1;
break; break;
} }

View File

@ -6,10 +6,10 @@
* the above copyright notice appear in all copies and that both that * the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting * copyright notice and this permission notice appear in supporting
* documentation. * documentation.
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -17,7 +17,7 @@
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
* *
* Except as contained in this notice, the name of The Open Group shall * Except as contained in this notice, the name of The Open Group shall
* not be used in advertising or otherwise to promote the sale, use or * not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization * other dealings in this Software without prior written authorization
@ -25,7 +25,8 @@
* *
*/ */
/* Copyright 2005 Sun Microsystems, Inc. All rights reserved. /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
@ -66,19 +67,12 @@
# include <sys/param.h> # include <sys/param.h>
#endif #endif
#ifndef HAVE_LASTLOG_H #if defined(HAVE_STRUCT_LASTLOG) && defined(HAVE_PWD_H)
# define NO_LASTLOG # ifdef HAVE_LASTLOG_H
#endif # include <lastlog.h>
#ifndef NO_LASTLOG
# ifdef CSRG_BASED
# if (BSD < 199103)
# include <lastlog.h>
# endif
# else
# include <lastlog.h>
# endif # endif
# include <pwd.h> # include <pwd.h>
# define USE_LASTLOG
#endif #endif
#ifdef CSRG_BASED #ifdef CSRG_BASED
@ -102,18 +96,13 @@
# define UTMP_FILE "/etc/utmp" # define UTMP_FILE "/etc/utmp"
# endif # endif
#endif #endif
#ifndef NO_LASTLOG #ifndef LLOG_FILE
# ifndef LLOG_FILE # ifdef _PATH_LASTLOG
# ifdef _PATH_LASTLOG # define LLOG_FILE _PATH_LASTLOG
# define LLOG_FILE _PATH_LASTLOG # else
# else # define LLOG_FILE "/usr/adm/lastlog"
# define LLOG_FILE "/usr/adm/lastlog"
# endif
# endif # endif
#endif #endif
#ifndef SYSV #ifndef TTYS_FILE
# ifndef TTYS_FILE # define TTYS_FILE "/etc/ttys"
# define TTYS_FILE "/etc/ttys"
# endif
#endif #endif