diff options
author | Michael Biebl <biebl@debian.org> | 2013-07-19 18:35:24 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2013-07-19 18:35:24 +0200 |
commit | 7c71e6733f2082d5842da95262f55a3621d1e714 (patch) | |
tree | 59f81b15b6dbc8ac2b17808b9cb24d35625aeb49 /src | |
parent | 00525c0cabbe3040080f499997de5a23a4675a7d (diff) | |
download | consolekit-7c71e6733f2082d5842da95262f55a3621d1e714.tar.gz |
Imported Upstream version 0.4.6upstream/0.4.6upstream
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 7 | ||||
-rw-r--r-- | src/Makefile.in | 407 | ||||
-rw-r--r-- | src/ck-manager-glue.h | 109 | ||||
-rw-r--r-- | src/ck-marshal.c | 2 | ||||
-rw-r--r-- | src/ck-seat-glue.h | 5 | ||||
-rw-r--r-- | src/ck-session-glue.h | 99 | ||||
-rw-r--r-- | src/ck-sysdeps-gnu.c | 402 |
7 files changed, 757 insertions, 274 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 869decd..217e531 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -57,11 +57,18 @@ libck_la_SOURCES += \ $(NULL) libck_la_LIBADD = $(KVM_LIBS) endif +if CK_COMPILE_GNU +libck_la_SOURCES += \ + ck-sysdeps-gnu.c \ + $(NULL) +libck_la_LIBADD = -lps +endif EXTRA_libck_la_SOURCES = \ ck-sysdeps-linux.c \ ck-sysdeps-solaris.c \ ck-sysdeps-freebsd.c \ + ck-sysdeps-gnu.c \ $(NULL) sbin_PROGRAMS = \ diff --git a/src/Makefile.in b/src/Makefile.in index 174a7e2..cde5062 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.3 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. +# Copyright (C) 1994-2013 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. @@ -18,6 +17,51 @@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,12 +92,17 @@ host_triplet = @host@ @CK_COMPILE_FREEBSD_TRUE@ ck-sysdeps-freebsd.c \ @CK_COMPILE_FREEBSD_TRUE@ $(NULL) +@CK_COMPILE_GNU_TRUE@am__append_4 = \ +@CK_COMPILE_GNU_TRUE@ ck-sysdeps-gnu.c \ +@CK_COMPILE_GNU_TRUE@ $(NULL) + sbin_PROGRAMS = console-kit-daemon$(EXEEXT) $(am__EXEEXT_1) noinst_PROGRAMS = test-event-logger$(EXEEXT) \ test-tty-idle-monitor$(EXEEXT) test-vt-monitor$(EXEEXT) \ $(am__EXEEXT_1) subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac @@ -68,22 +117,27 @@ libck_event_log_la_LIBADD = am__objects_1 = am_libck_event_log_la_OBJECTS = ck-log-event.lo $(am__objects_1) libck_event_log_la_OBJECTS = $(am_libck_event_log_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = am__DEPENDENCIES_1 = @CK_COMPILE_FREEBSD_TRUE@libck_la_DEPENDENCIES = \ @CK_COMPILE_FREEBSD_TRUE@ $(am__DEPENDENCIES_1) am__libck_la_SOURCES_DIST = ck-sysdeps.h ck-sysdeps-unix.c \ - ck-sysdeps-linux.c ck-sysdeps-solaris.c ck-sysdeps-freebsd.c + ck-sysdeps-linux.c ck-sysdeps-solaris.c ck-sysdeps-freebsd.c \ + ck-sysdeps-gnu.c @CK_COMPILE_LINUX_TRUE@am__objects_2 = ck-sysdeps-linux.lo \ @CK_COMPILE_LINUX_TRUE@ $(am__objects_1) @CK_COMPILE_SOLARIS_TRUE@am__objects_3 = ck-sysdeps-solaris.lo \ @CK_COMPILE_SOLARIS_TRUE@ $(am__objects_1) @CK_COMPILE_FREEBSD_TRUE@am__objects_4 = ck-sysdeps-freebsd.lo \ @CK_COMPILE_FREEBSD_TRUE@ $(am__objects_1) +@CK_COMPILE_GNU_TRUE@am__objects_5 = ck-sysdeps-gnu.lo \ +@CK_COMPILE_GNU_TRUE@ $(am__objects_1) am_libck_la_OBJECTS = ck-sysdeps-unix.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) libck_la_OBJECTS = $(am_libck_la_OBJECTS) am__EXEEXT_1 = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(dbusifdir)" @@ -97,16 +151,16 @@ am__console_kit_daemon_SOURCES_DIST = main.c ck-manager.h ck-manager.c \ ck-manager-glue.h ck-seat-glue.h ck-session-glue.h \ ck-marshal.c ck-marshal.h ck-file-monitor-dummy.c \ ck-file-monitor-inotify.c -am__objects_5 = ck-marshal.$(OBJEXT) $(am__objects_1) -@ENABLE_INOTIFY_FALSE@am__objects_6 = ck-file-monitor-dummy.$(OBJEXT) -@ENABLE_INOTIFY_TRUE@am__objects_6 = \ +am__objects_6 = ck-marshal.$(OBJEXT) $(am__objects_1) +@ENABLE_INOTIFY_FALSE@am__objects_7 = ck-file-monitor-dummy.$(OBJEXT) +@ENABLE_INOTIFY_TRUE@am__objects_7 = \ @ENABLE_INOTIFY_TRUE@ ck-file-monitor-inotify.$(OBJEXT) am_console_kit_daemon_OBJECTS = main.$(OBJEXT) ck-manager.$(OBJEXT) \ ck-vt-monitor.$(OBJEXT) ck-tty-idle-monitor.$(OBJEXT) \ ck-job.$(OBJEXT) ck-seat.$(OBJEXT) ck-session-leader.$(OBJEXT) \ ck-session.$(OBJEXT) ck-log.$(OBJEXT) \ ck-run-programs.$(OBJEXT) ck-event-logger.$(OBJEXT) \ - $(am__objects_5) $(am__objects_1) $(am__objects_6) + $(am__objects_6) $(am__objects_1) $(am__objects_7) console_kit_daemon_OBJECTS = $(am_console_kit_daemon_OBJECTS) console_kit_daemon_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libck.la \ @@ -122,7 +176,7 @@ am__test_tty_idle_monitor_SOURCES_DIST = ck-tty-idle-monitor.h \ ck-file-monitor-dummy.c ck-file-monitor-inotify.c \ test-tty-idle-monitor.c am_test_tty_idle_monitor_OBJECTS = ck-tty-idle-monitor.$(OBJEXT) \ - $(am__objects_6) test-tty-idle-monitor.$(OBJEXT) \ + $(am__objects_7) test-tty-idle-monitor.$(OBJEXT) \ $(am__objects_1) test_tty_idle_monitor_OBJECTS = $(am_test_tty_idle_monitor_OBJECTS) test_tty_idle_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @@ -132,6 +186,18 @@ am_test_vt_monitor_OBJECTS = ck-vt-monitor.$(OBJEXT) \ test_vt_monitor_OBJECTS = $(am_test_vt_monitor_OBJECTS) test_vt_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) libck.la $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -142,22 +208,18 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libck_event_log_la_SOURCES) $(libck_la_SOURCES) \ $(EXTRA_libck_la_SOURCES) $(console_kit_daemon_SOURCES) \ $(EXTRA_console_kit_daemon_SOURCES) \ @@ -170,13 +232,19 @@ DIST_SOURCES = $(libck_event_log_la_SOURCES) \ $(test_event_logger_SOURCES) \ $(am__test_tty_idle_monitor_SOURCES_DIST) \ $(test_vt_monitor_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -198,12 +266,38 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } DATA = $(dbusif_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -254,7 +348,6 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ -DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ @@ -335,6 +428,9 @@ SHELL = @SHELL@ STRIP = @STRIP@ TOOLS_CFLAGS = @TOOLS_CFLAGS@ TOOLS_LIBS = @TOOLS_LIBS@ +UDEVDIR = @UDEVDIR@ +UDEV_ACL_CFLAGS = @UDEV_ACL_CFLAGS@ +UDEV_ACL_LIBS = @UDEV_ACL_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ @@ -431,13 +527,16 @@ libck_event_log_la_SOURCES = \ $(NULL) libck_la_SOURCES = ck-sysdeps.h ck-sysdeps-unix.c $(NULL) \ - $(am__append_1) $(am__append_2) $(am__append_3) + $(am__append_1) $(am__append_2) $(am__append_3) \ + $(am__append_4) @CK_COMPILE_FREEBSD_TRUE@libck_la_LIBADD = $(KVM_LIBS) +@CK_COMPILE_GNU_TRUE@libck_la_LIBADD = -lps @CK_COMPILE_SOLARIS_TRUE@libck_la_LIBADD = -lscf EXTRA_libck_la_SOURCES = \ ck-sysdeps-linux.c \ ck-sysdeps-solaris.c \ ck-sysdeps-freebsd.c \ + ck-sysdeps-gnu.c \ $(NULL) BUILT_SOURCES = \ @@ -567,15 +666,19 @@ $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libck-event-log.la: $(libck_event_log_la_OBJECTS) $(libck_event_log_la_DEPENDENCIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libck-event-log.la: $(libck_event_log_la_OBJECTS) $(libck_event_log_la_DEPENDENCIES) $(EXTRA_libck_event_log_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libck_event_log_la_OBJECTS) $(libck_event_log_la_LIBADD) $(LIBS) -libck.la: $(libck_la_OBJECTS) $(libck_la_DEPENDENCIES) + +libck.la: $(libck_la_OBJECTS) $(libck_la_DEPENDENCIES) $(EXTRA_libck_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libck_la_OBJECTS) $(libck_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -588,14 +691,19 @@ clean-noinstPROGRAMS: rm -f $$list install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -616,7 +724,8 @@ uninstall-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files @@ -629,16 +738,20 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -console-kit-daemon$(EXEEXT): $(console_kit_daemon_OBJECTS) $(console_kit_daemon_DEPENDENCIES) + +console-kit-daemon$(EXEEXT): $(console_kit_daemon_OBJECTS) $(console_kit_daemon_DEPENDENCIES) $(EXTRA_console_kit_daemon_DEPENDENCIES) @rm -f console-kit-daemon$(EXEEXT) $(AM_V_CCLD)$(LINK) $(console_kit_daemon_OBJECTS) $(console_kit_daemon_LDADD) $(LIBS) -test-event-logger$(EXEEXT): $(test_event_logger_OBJECTS) $(test_event_logger_DEPENDENCIES) + +test-event-logger$(EXEEXT): $(test_event_logger_OBJECTS) $(test_event_logger_DEPENDENCIES) $(EXTRA_test_event_logger_DEPENDENCIES) @rm -f test-event-logger$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_event_logger_OBJECTS) $(test_event_logger_LDADD) $(LIBS) -test-tty-idle-monitor$(EXEEXT): $(test_tty_idle_monitor_OBJECTS) $(test_tty_idle_monitor_DEPENDENCIES) + +test-tty-idle-monitor$(EXEEXT): $(test_tty_idle_monitor_OBJECTS) $(test_tty_idle_monitor_DEPENDENCIES) $(EXTRA_test_tty_idle_monitor_DEPENDENCIES) @rm -f test-tty-idle-monitor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_tty_idle_monitor_OBJECTS) $(test_tty_idle_monitor_LDADD) $(LIBS) -test-vt-monitor$(EXEEXT): $(test_vt_monitor_OBJECTS) $(test_vt_monitor_DEPENDENCIES) + +test-vt-monitor$(EXEEXT): $(test_vt_monitor_OBJECTS) $(test_vt_monitor_DEPENDENCIES) $(EXTRA_test_vt_monitor_DEPENDENCIES) @rm -f test-vt-monitor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_vt_monitor_OBJECTS) $(test_vt_monitor_LDADD) $(LIBS) @@ -661,6 +774,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-session-leader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-session.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-freebsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-gnu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-linux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-solaris.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-unix.Plo@am__quote@ @@ -674,26 +788,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -702,8 +813,11 @@ clean-libtool: -rm -rf .libs _libs install-dbusifDATA: $(dbusif_DATA) @$(NORMAL_INSTALL) - test -z "$(dbusifdir)" || $(MKDIR_P) "$(DESTDIR)$(dbusifdir)" @list='$(dbusif_DATA)'; test -n "$(dbusifdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dbusifdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dbusifdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -717,27 +831,28 @@ uninstall-dbusifDATA: @$(NORMAL_UNINSTALL) @list='$(dbusif_DATA)'; test -n "$(dbusifdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(dbusifdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(dbusifdir)" && rm -f $$files + dir='$(DESTDIR)$(dbusifdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -752,57 +867,12 @@ $(RECURSIVE_TARGETS): $(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: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -818,12 +888,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -835,15 +900,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -852,6 +913,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -888,13 +964,10 @@ distdir: $(DISTFILES) 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 \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -934,10 +1007,15 @@ install-am: all-am installcheck: installcheck-recursive 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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1023,14 +1101,13 @@ ps-am: uninstall-am: uninstall-dbusifDATA uninstall-sbinPROGRAMS -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - ctags-recursive install install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) all check install install-am \ + install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - clean-sbinPROGRAMS ctags ctags-recursive distclean \ + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ @@ -1042,8 +1119,8 @@ uninstall-am: uninstall-dbusifDATA uninstall-sbinPROGRAMS installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-dbusifDATA uninstall-sbinPROGRAMS + tags tags-am uninstall uninstall-am uninstall-dbusifDATA \ + uninstall-sbinPROGRAMS ck-manager-glue.h: org.freedesktop.ConsoleKit.Manager.xml Makefile.am diff --git a/src/ck-manager-glue.h b/src/ck-manager-glue.h index b3f37f8..ab9c217 100644 --- a/src/ck-manager-glue.h +++ b/src/ck-manager-glue.h @@ -10,7 +10,7 @@ G_BEGIN_DECLS #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) @@ -55,6 +55,14 @@ G_BEGIN_DECLS #endif /* !G_ENABLE_DEBUG */ +/* NONE:POINTER */ +#define dbus_glib_marshal_ck_manager_VOID__POINTER g_cclosure_marshal_VOID__POINTER +#define dbus_glib_marshal_ck_manager_NONE__POINTER dbus_glib_marshal_ck_manager_VOID__POINTER + +/* NONE:UINT,POINTER */ +#define dbus_glib_marshal_ck_manager_VOID__UINT_POINTER g_cclosure_marshal_VOID__UINT_POINTER +#define dbus_glib_marshal_ck_manager_NONE__UINT_POINTER dbus_glib_marshal_ck_manager_VOID__UINT_POINTER + /* NONE:STRING,POINTER */ extern void dbus_glib_marshal_ck_manager_VOID__STRING_POINTER (GClosure *closure, GValue *return_value, @@ -99,6 +107,50 @@ dbus_glib_marshal_ck_manager_VOID__STRING_POINTER (GClosure *closure, } #define dbus_glib_marshal_ck_manager_NONE__STRING_POINTER dbus_glib_marshal_ck_manager_VOID__STRING_POINTER +/* NONE:BOXED,POINTER */ +extern void dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +void +dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__BOXED_POINTER) (gpointer data1, + gpointer arg_1, + gpointer arg_2, + gpointer data2); + register GMarshalFunc_VOID__BOXED_POINTER callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__BOXED_POINTER) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_boxed (param_values + 1), + g_marshal_value_peek_pointer (param_values + 2), + data2); +} +#define dbus_glib_marshal_ck_manager_NONE__BOXED_POINTER dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER + /* BOOLEAN:POINTER,POINTER */ extern void dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER (GClosure *closure, GValue *return_value, @@ -146,58 +198,6 @@ dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER (GClosure *closure, g_value_set_boolean (return_value, v_return); } -/* NONE:UINT,POINTER */ -#define dbus_glib_marshal_ck_manager_VOID__UINT_POINTER g_cclosure_marshal_VOID__UINT_POINTER -#define dbus_glib_marshal_ck_manager_NONE__UINT_POINTER dbus_glib_marshal_ck_manager_VOID__UINT_POINTER - -/* NONE:POINTER */ -#define dbus_glib_marshal_ck_manager_VOID__POINTER g_cclosure_marshal_VOID__POINTER -#define dbus_glib_marshal_ck_manager_NONE__POINTER dbus_glib_marshal_ck_manager_VOID__POINTER - -/* NONE:BOXED,POINTER */ -extern void dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); -void -dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER (GClosure *closure, - GValue *return_value G_GNUC_UNUSED, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint G_GNUC_UNUSED, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__BOXED_POINTER) (gpointer data1, - gpointer arg_1, - gpointer arg_2, - gpointer data2); - register GMarshalFunc_VOID__BOXED_POINTER callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 3); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__BOXED_POINTER) (marshal_data ? marshal_data : cc->callback); - - callback (data1, - g_marshal_value_peek_boxed (param_values + 1), - g_marshal_value_peek_pointer (param_values + 2), - data2); -} -#define dbus_glib_marshal_ck_manager_NONE__BOXED_POINTER dbus_glib_marshal_ck_manager_VOID__BOXED_POINTER - G_END_DECLS #endif /* __dbus_glib_marshal_ck_manager_MARSHAL_H__ */ @@ -222,8 +222,7 @@ static const DBusGMethodInfo dbus_glib_ck_manager_methods[] = { { (GCallback) ck_manager_get_system_idle_since_hint, dbus_glib_marshal_ck_manager_BOOLEAN__POINTER_POINTER, 1070 }, }; -const DBusGObjectInfo dbus_glib_ck_manager_object_info = { - 0, +const DBusGObjectInfo dbus_glib_ck_manager_object_info = { 1, dbus_glib_ck_manager_methods, 16, "org.freedesktop.ConsoleKit.Manager\0Restart\0A\0\0org.freedesktop.ConsoleKit.Manager\0CanRestart\0A\0can_restart\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Manager\0Stop\0A\0\0org.freedesktop.ConsoleKit.Manager\0CanStop\0A\0can_stop\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Manager\0OpenSession\0A\0cookie\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Manager\0OpenSessionWithParameters\0A\0parameters\0I\0a(sv)\0cookie\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Manager\0CloseSession\0A\0cookie\0I\0s\0result\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Manager\0GetSeats\0S\0seats\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSessions\0S\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionForCookie\0A\0cookie\0I\0s\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionForUnixProcess\0A\0pid\0I\0u\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetCurrentSession\0A\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionsForUnixUser\0A\0uid\0I\0u\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSessionsForUser\0A\0uid\0I\0u\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Manager\0GetSystemIdleHint\0S\0idle_hint\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Manager\0GetSystemIdleSinceHint\0S\0iso8601_datetime\0O\0F\0N\0s\0\0\0", diff --git a/src/ck-marshal.c b/src/ck-marshal.c index c01cfbb..290f9bf 100644 --- a/src/ck-marshal.c +++ b/src/ck-marshal.c @@ -5,7 +5,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff --git a/src/ck-seat-glue.h b/src/ck-seat-glue.h index 20e7240..7d4aef0 100644 --- a/src/ck-seat-glue.h +++ b/src/ck-seat-glue.h @@ -10,7 +10,7 @@ G_BEGIN_DECLS #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) @@ -160,8 +160,7 @@ static const DBusGMethodInfo dbus_glib_ck_seat_methods[] = { { (GCallback) ck_seat_activate_session, dbus_glib_marshal_ck_seat_NONE__BOXED_POINTER, 325 }, }; -const DBusGObjectInfo dbus_glib_ck_seat_object_info = { - 0, +const DBusGObjectInfo dbus_glib_ck_seat_object_info = { 1, dbus_glib_ck_seat_methods, 6, "org.freedesktop.ConsoleKit.Seat\0GetId\0S\0sid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Seat\0GetSessions\0S\0sessions\0O\0F\0N\0ao\0\0org.freedesktop.ConsoleKit.Seat\0GetDevices\0S\0devices\0O\0F\0N\0a(ss)\0\0org.freedesktop.ConsoleKit.Seat\0GetActiveSession\0S\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Seat\0CanActivateSessions\0S\0can_activate\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Seat\0ActivateSession\0A\0ssid\0I\0o\0\0\0", diff --git a/src/ck-session-glue.h b/src/ck-session-glue.h index 38cd0bf..c081afc 100644 --- a/src/ck-session-glue.h +++ b/src/ck-session-glue.h @@ -10,7 +10,7 @@ G_BEGIN_DECLS #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) @@ -55,49 +55,9 @@ G_BEGIN_DECLS #endif /* !G_ENABLE_DEBUG */ -/* NONE:BOOLEAN,POINTER */ -extern void dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); -void -dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER (GClosure *closure, - GValue *return_value G_GNUC_UNUSED, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint G_GNUC_UNUSED, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__BOOLEAN_POINTER) (gpointer data1, - gboolean arg_1, - gpointer arg_2, - gpointer data2); - register GMarshalFunc_VOID__BOOLEAN_POINTER callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 3); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback); - - callback (data1, - g_marshal_value_peek_boolean (param_values + 1), - g_marshal_value_peek_pointer (param_values + 2), - data2); -} -#define dbus_glib_marshal_ck_session_NONE__BOOLEAN_POINTER dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER +/* NONE:POINTER */ +#define dbus_glib_marshal_ck_session_VOID__POINTER g_cclosure_marshal_VOID__POINTER +#define dbus_glib_marshal_ck_session_NONE__POINTER dbus_glib_marshal_ck_session_VOID__POINTER /* BOOLEAN:POINTER,POINTER */ extern void dbus_glib_marshal_ck_session_BOOLEAN__POINTER_POINTER (GClosure *closure, @@ -146,9 +106,49 @@ dbus_glib_marshal_ck_session_BOOLEAN__POINTER_POINTER (GClosure *closure, g_value_set_boolean (return_value, v_return); } -/* NONE:POINTER */ -#define dbus_glib_marshal_ck_session_VOID__POINTER g_cclosure_marshal_VOID__POINTER -#define dbus_glib_marshal_ck_session_NONE__POINTER dbus_glib_marshal_ck_session_VOID__POINTER +/* NONE:BOOLEAN,POINTER */ +extern void dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +void +dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__BOOLEAN_POINTER) (gpointer data1, + gboolean arg_1, + gpointer arg_2, + gpointer data2); + register GMarshalFunc_VOID__BOOLEAN_POINTER callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_boolean (param_values + 1), + g_marshal_value_peek_pointer (param_values + 2), + data2); +} +#define dbus_glib_marshal_ck_session_NONE__BOOLEAN_POINTER dbus_glib_marshal_ck_session_VOID__BOOLEAN_POINTER G_END_DECLS @@ -177,12 +177,11 @@ static const DBusGMethodInfo dbus_glib_ck_session_methods[] = { { (GCallback) ck_session_set_idle_hint, dbus_glib_marshal_ck_session_NONE__BOOLEAN_POINTER, 1180 }, }; -const DBusGObjectInfo dbus_glib_ck_session_object_info = { - 0, +const DBusGObjectInfo dbus_glib_ck_session_object_info = { 1, dbus_glib_ck_session_methods, 19, "org.freedesktop.ConsoleKit.Session\0GetId\0S\0ssid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Session\0GetSeatId\0S\0sid\0O\0F\0N\0o\0\0org.freedesktop.ConsoleKit.Session\0GetSessionType\0S\0type\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Session\0GetUser\0S\0uid\0O\0F\0N\0u\0\0org.freedesktop.ConsoleKit.Session\0GetUnixUser\0S\0uid\0O\0F\0N\0u\0\0org.freedesktop.ConsoleKit.Session\0GetX11Display\0S\0display\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Session\0GetX11DisplayDevice\0S\0x11_display_device\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Session\0GetDisplayDevice\0S\0display_device\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Session\0GetRemoteHostName\0S\0remote_host_name\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Session\0GetLoginSessionId\0S\0login_session_id\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Session\0IsActive\0S\0active\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Session\0IsLocal\0S\0local\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Session\0GetCreationTime\0S\0iso8601_datetime\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Session\0Activate\0A\0\0org.freedesktop.ConsoleKit.Session\0Lock\0A\0\0org.freedesktop.ConsoleKit.Session\0Unlock\0A\0\0org.freedesktop.ConsoleKit.Session\0GetIdleHint\0S\0idle_hint\0O\0F\0N\0b\0\0org.freedesktop.ConsoleKit.Session\0GetIdleSinceHint\0S\0iso8601_datetime\0O\0F\0N\0s\0\0org.freedesktop.ConsoleKit.Session\0SetIdleHint\0A\0idle_hint\0I\0b\0\0\0", "org.freedesktop.ConsoleKit.Session\0ActiveChanged\0org.freedesktop.ConsoleKit.Session\0IdleHintChanged\0org.freedesktop.ConsoleKit.Session\0Lock\0org.freedesktop.ConsoleKit.Session\0Unlock\0\0", -"org.freedesktop.ConsoleKit.Session\0unix-user\0org.freedesktop.ConsoleKit.Session\0user\0org.freedesktop.ConsoleKit.Session\0session-type\0org.freedesktop.ConsoleKit.Session\0remote-host-name\0org.freedesktop.ConsoleKit.Session\0display-device\0org.freedesktop.ConsoleKit.Session\0x11-display\0org.freedesktop.ConsoleKit.Session\0x11-display-device\0org.freedesktop.ConsoleKit.Session\0active\0org.freedesktop.ConsoleKit.Session\0is-local\0org.freedesktop.ConsoleKit.Session\0idle-hint\0\0" +"org.freedesktop.ConsoleKit.Session\0unix-user\0unix-user\0readwrite\0org.freedesktop.ConsoleKit.Session\0user\0user\0readwrite\0org.freedesktop.ConsoleKit.Session\0session-type\0session-type\0readwrite\0org.freedesktop.ConsoleKit.Session\0remote-host-name\0remote-host-name\0readwrite\0org.freedesktop.ConsoleKit.Session\0display-device\0display-device\0readwrite\0org.freedesktop.ConsoleKit.Session\0x11-display\0x11-display\0readwrite\0org.freedesktop.ConsoleKit.Session\0x11-display-device\0x11-display-device\0readwrite\0org.freedesktop.ConsoleKit.Session\0active\0active\0readwrite\0org.freedesktop.ConsoleKit.Session\0is-local\0is-local\0readwrite\0org.freedesktop.ConsoleKit.Session\0idle-hint\0idle-hint\0readwrite\0\0" }; diff --git a/src/ck-sysdeps-gnu.c b/src/ck-sysdeps-gnu.c new file mode 100644 index 0000000..254f7ef --- /dev/null +++ b/src/ck-sysdeps-gnu.c @@ -0,0 +1,402 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2009 Pino Toscano <pino@kde.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#include "config.h" + +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include <string.h> +#include <errno.h> + +#include <hurd.h> +#include <dirent.h> +#include <ps.h> +#include <ttyent.h> + +#ifdef HAVE_PATHS_H +#include <paths.h> +#endif /* HAVE_PATHS_H */ + +#include "ck-sysdeps.h" + +struct _CkProcessStat +{ + struct proc_stat *ps; /* the statistics of a process */ +}; + +static struct ps_context *pc = NULL; + +static gboolean +get_proc_stat_from_pid (pid_t pid, + ps_flags_t flags, + struct proc_stat **res_ps) +{ + error_t err; + struct proc_stat *ps; + + g_assert (pid >= 0); + g_assert (res_ps != NULL); + + if (pc == NULL) { + err = ps_context_create (getproc (), &pc); + if (err) { + return FALSE; + } + } + + err = _proc_stat_create (pid, pc, &ps); + if (err) { + return FALSE; + } + + err = proc_stat_set_flags (ps, PSTAT_PID | flags); + if (err) { + return FALSE; + } + + *res_ps = ps; + return TRUE; +} + + +pid_t +ck_process_stat_get_ppid (CkProcessStat *stat) +{ + g_return_val_if_fail (stat != NULL, -1); + + return proc_stat_pid (stat->ps); +} + +char * +ck_process_stat_get_cmd (CkProcessStat *stat) +{ + g_return_val_if_fail (stat != NULL, NULL); + + return g_strdup (proc_stat_args (stat->ps)); +} + +char * +ck_process_stat_get_tty (CkProcessStat *stat) +{ + struct ps_tty *tty; + + g_return_val_if_fail (stat != NULL, NULL); + + tty = proc_stat_tty (stat->ps); + + return tty ? g_strdup (ps_tty_name (tty)) : NULL; +} + +gboolean +ck_process_stat_new_for_unix_pid (pid_t pid, + CkProcessStat **stat, + GError **error) +{ + gboolean res; + struct proc_stat *ps; + CkProcessStat *proc; + + g_return_val_if_fail (pid > 1, FALSE); + + if (stat == NULL) { + return FALSE; + } + + *stat = NULL; + + res = get_proc_stat_from_pid (pid, PSTAT_ARGS | PSTAT_TTY, &ps); + if (!res) { + return FALSE; + } + + proc = g_new0 (CkProcessStat, 1); + proc->ps = ps; + *stat = proc; + + return TRUE; +} + +void +ck_process_stat_free (CkProcessStat *stat) +{ + _proc_stat_free (stat->ps); + + g_free (stat); +} + +GHashTable * +ck_unix_pid_get_env_hash (pid_t pid) +{ + struct proc_stat *ps; + char *env_p; + size_t env_index; + size_t env_l; + gboolean res; + GHashTable *hash; + + g_return_val_if_fail (pid > 1, NULL); + + res = get_proc_stat_from_pid (pid, PSTAT_ENV, &ps); + if (!res) { + return NULL; + } + + hash = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + g_free); + + env_index = 0; + env_l = 0; + env_p = proc_stat_env (ps); + while (env_index < proc_stat_env_len (ps)) { + env_l = strlen (env_p); + env_index += env_l + 1; + if (env_l) { + char **vals; + vals = g_strsplit (env_p, "=", 2); + if (vals != NULL) { + g_hash_table_insert (hash, + g_strdup (vals[0]), + g_strdup (vals[1])); + g_strfreev (vals); + } + } + env_p = env_p + env_l + 1; + } + + _proc_stat_free (ps); + + return hash; +} + +char * +ck_unix_pid_get_env (pid_t pid, + const char *var) +{ + struct proc_stat *ps; + char *env_p; + size_t env_index; + size_t env_l; + char *prefix; + int prefix_len; + char *val; + gboolean res; + + g_return_val_if_fail (pid > 1, NULL); + + val = NULL; + + res = get_proc_stat_from_pid (pid, PSTAT_ENV, &ps); + if (!res) { + return NULL; + } + + prefix = g_strdup_printf ("%s=", var); + prefix_len = strlen (prefix); + + env_index = 0; + env_l = 0; + env_p = proc_stat_env (ps); + while (env_index < proc_stat_env_len (ps)) { + env_l = strlen (env_p); + env_index += env_l + 1; + if (env_l && g_str_has_prefix (env_p, prefix)) { + val = g_strdup (env_p + prefix_len); + break; + } + env_p = env_p + env_l + 1; + } + + g_free (prefix); + + _proc_stat_free (ps); + + return val; +} + +uid_t +ck_unix_pid_get_uid (pid_t pid) +{ + struct proc_stat *ps; + gboolean res; + uid_t uid; + + g_return_val_if_fail (pid > 1, 0); + + res = get_proc_stat_from_pid (pid, PSTAT_OWNER_UID, &ps); + if (!res) { + return 0; + } + + uid = proc_stat_owner_uid (ps); + + _proc_stat_free (ps); + + return uid; +} + +pid_t +ck_unix_pid_get_ppid (pid_t pid) +{ + struct proc_stat *ps; + gboolean res; + pid_t ppid; + + g_return_val_if_fail (pid > 1, 0); + + res = get_proc_stat_from_pid (pid, PSTAT_PROC_INFO, &ps); + if (!res) { + return 0; + } + + ppid = proc_stat_proc_info (ps)->ppid; + + _proc_stat_free (ps); + + return ppid; +} + +gboolean +ck_unix_pid_get_login_session_id (pid_t pid, + char **idp) +{ + g_return_val_if_fail (pid > 1, FALSE); + + return FALSE; +} + +gboolean +ck_get_max_num_consoles (guint *num) +{ + int max_consoles; + int res; + gboolean ret; + struct ttyent *t; + + ret = FALSE; + max_consoles = 0; + + res = setttyent (); + if (res == 0) { + goto done; + } + + while ((t = getttyent ()) != NULL) { + if (t->ty_status & TTY_ON && strncmp (t->ty_name, "tty", 3) == 0) + max_consoles++; + } + + /* Increment one more so that all consoles are properly counted + * this is arguable a bug in vt_add_watches(). + */ + max_consoles++; + + ret = TRUE; + + endttyent (); + +done: + if (num != NULL) { + *num = max_consoles; + } + + return ret; +} + +gboolean +ck_supports_activatable_consoles (void) +{ + return TRUE; +} + +char * +ck_get_console_device_for_num (guint num) +{ + char *device; + + device = g_strdup_printf (_PATH_TTY "%u", num); + + return device; +} + +gboolean +ck_get_console_num_from_device (const char *device, + guint *num) +{ + guint n; + gboolean ret; + + n = 0; + ret = FALSE; + + if (device == NULL) { + return FALSE; + } + + if (sscanf (device, _PATH_TTY "%u", &n) == 1) { + ret = TRUE; + } + + if (num != NULL) { + *num = n; + } + + return ret; +} + +gboolean +ck_get_active_console_num (int console_fd, + guint *num) +{ + gboolean ret; + int res; + long cur_active; + char buf[30]; + guint active; + + g_assert (console_fd != -1); + + active = 0; + ret = FALSE; + + res = readlink ("/dev/cons/vcs", buf, sizeof (buf)); + if (res > 0) { + /* the resolved path is like "/dev/vcs/$number", so skip + the non-number part at the start */ + const char *p = buf; + while ((*p) && ((*p < '0') || (*p > '9'))) { + ++p; + } + if (*p) { + cur_active = strtol (p, NULL, 10); + g_debug ("Current VT: tty%ld", cur_active); + active = cur_active; + ret = TRUE; + } + } + + if (num != NULL) { + *num = active; + } + + return ret; +} |