Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package acpid for openSUSE:Factory checked 
in at 2022-11-16 15:43:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/acpid (Old)
 and      /work/SRC/openSUSE:Factory/.acpid.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "acpid"

Wed Nov 16 15:43:06 2022 rev:87 rq:1035855 version:2.0.34

Changes:
--------
--- /work/SRC/openSUSE:Factory/acpid/acpid.changes      2021-10-19 
23:04:22.941288070 +0200
+++ /work/SRC/openSUSE:Factory/.acpid.new.1597/acpid.changes    2022-11-16 
15:43:12.987799785 +0100
@@ -1,0 +2,11 @@
+Tue Nov 15 14:01:40 UTC 2022 - Dominique Leuenberger <[email protected]>
+
+- Update to version 2.0.34:
+  - Add MSG_CMSG_CLOEXEC for systems that are missing it.
+  - Fix a bug with input layer event table not working on 32-bit
+    builds with 64-bit time types.
+  - Use binary search to find input layer events in the table.
+  - Use AC_PROG_CC instead of the obsolete AC_PROG_CC_STDC.
+  - Add support for more input layer events.
+
+-------------------------------------------------------------------

Old:
----
  acpid-2.0.33.tar.xz

New:
----
  acpid-2.0.34.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ acpid.spec ++++++
--- /var/tmp/diff_new_pack.u7aHDR/_old  2022-11-16 15:43:13.551801829 +0100
+++ /var/tmp/diff_new_pack.u7aHDR/_new  2022-11-16 15:43:13.555801844 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package acpid
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           acpid
-Version:        2.0.33
+Version:        2.0.34
 Release:        0
 Summary:        Daemon to execute actions on ACPI events
 License:        GPL-2.0-or-later

++++++ acpid-2.0.33.tar.xz -> acpid-2.0.34.tar.xz ++++++
++++ 13371 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/Changelog new/acpid-2.0.34/Changelog
--- old/acpid-2.0.33/Changelog  2021-09-16 02:50:10.238407369 +0200
+++ new/acpid-2.0.34/Changelog  2022-09-16 03:16:23.197278816 +0200
@@ -1,3 +1,19 @@
+* 2.0.34  2022-09-15  Ted Felix <[email protected]>
+  - 2.0.34 release
+    (configure.ac)  (Ted Felix)
+  - Add MSG_CMSG_CLOEXEC for systems that are missing it.
+    (libnetlink.h libnetlink.c kacpimon/libnetlink.h
+    kacpimon/libnetlink.c)
+    (Fabrice Fontaine <[email protected]>)
+  - Fix a bug with input layer event table not working on 32-bit builds
+    with 64-bit time types.  (input_layer.c)  (Ted Felix)
+  - Use binary search to find input layer events in the table.
+    (input_layer.c)  (Ted Felix)
+  - Use AC_PROG_CC instead of the obsolete AC_PROG_CC_STDC.
+    (configure.ac)  (Ted Felix)
+  - Add support for more input layer events.  (input_layer.c)
+    (Ted Felix)
+
 * 2.0.33  2021-09-15  Ted Felix <[email protected]>
   - 2.0.33 release
     (configure.ac)  (Ted Felix)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/README new/acpid-2.0.34/README
--- old/acpid-2.0.33/README     2015-08-16 22:18:22.376604670 +0200
+++ new/acpid-2.0.34/README     2022-08-15 16:55:19.830849709 +0200
@@ -17,9 +17,10 @@
 acpid.  You'll want to kill it before installing the new version.  While
 "sudo killall acpid" might work, it is likely that you'll need to work with
 init (e.g. upstart, systemd, ...) on your particular setup to stop acpid 
-completely.  For example, with systemd, the proper incantation is usually:
+completely.  For example, with systemd, the proper incantation is usually
+something like:
 
-  $ sudo systemctl stop acpid acpid.socket
+  $ sudo systemctl stop acpid.service acpid.socket acpid.path
 
 acpid version 2.0.15 introduced autoconf.  To build versions >= 2.0.15:
 
@@ -40,11 +41,13 @@
 
 CONTACT
 
-Any comments or patches for this branch should be sent to Ted Felix:
-http://www.tedfelix.com  ( ted -at- tedfelix -dot- com )
+Any comments or patches for this branch should be sent to Ted Felix
+<[email protected]>.
 
-You can also fork the git repo on sourceforge and submit changes that way:
-http://sourceforge.net/u/tedfelix/acpid2/
+You can also fork the git repo on sourceforge or github and submit changes 
that way:
+
+  https://sourceforge.net/projects/acpid2/
+  https://github.com/tedfelix/acpid2
 
 --------------------------------------------------------------------
 OLD README
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/build-aux/compile new/acpid-2.0.34/build-aux/compile
--- old/acpid-2.0.33/build-aux/compile  2021-09-16 03:05:49.924549417 +0200
+++ new/acpid-2.0.34/build-aux/compile  2022-09-16 03:24:29.232491571 +0200
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # Written by Tom Tromey <[email protected]>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@
          MINGW*)
            file_conv=mingw
            ;;
-         CYGWIN*)
+         CYGWIN* | MSYS*)
            file_conv=cygwin
            ;;
          *)
@@ -67,7 +67,7 @@
        mingw/*)
          file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
          ;;
-       cygwin/*)
+       cygwin/* | msys/*)
          file=`cygpath -m "$file" || echo "$file"`
          ;;
        wine/*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/build-aux/missing new/acpid-2.0.34/build-aux/missing
--- old/acpid-2.0.33/build-aux/missing  2021-09-16 03:05:49.945549457 +0200
+++ new/acpid-2.0.34/build-aux/missing  2022-09-16 03:24:29.260491597 +0200
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <[email protected]>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/config.h new/acpid-2.0.34/config.h
--- old/acpid-2.0.33/config.h   2021-09-16 03:06:04.880577933 +0200
+++ new/acpid-2.0.34/config.h   2022-09-16 03:24:42.849504034 +0200
@@ -43,12 +43,12 @@
 /* Define to 1 if you have the <malloc.h> header file. */
 #define HAVE_MALLOC_H 1
 
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
 /* Define to 1 if you have the `memset' function. */
 #define HAVE_MEMSET 1
 
+/* Define to 1 if you have the <minix/config.h> header file. */
+/* #undef HAVE_MINIX_CONFIG_H */
+
 /* Define to 1 if you have the <netinet/in.h> header file. */
 #define HAVE_NETINET_IN_H 1
 
@@ -70,6 +70,9 @@
 /* Define to 1 if you have the <stdint.h> header file. */
 #define HAVE_STDINT_H 1
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #define HAVE_STDLIB_H 1
 
@@ -118,6 +121,9 @@
 /* Define to 1 if you have the <vfork.h> header file. */
 /* #undef HAVE_VFORK_H */
 
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
 /* Define to 1 if `fork' works. */
 #define HAVE_WORKING_FORK 1
 
@@ -134,7 +140,7 @@
 #define PACKAGE_NAME "acpid"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "acpid 2.0.33"
+#define PACKAGE_STRING "acpid 2.0.34"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "acpid"
@@ -143,40 +149,103 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "2.0.33"
+#define PACKAGE_VERSION "2.0.34"
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #define STDC_HEADERS 1
 
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # define _ALL_SOURCE 1
 #endif
+/* Enable general extensions on macOS.  */
+#ifndef _DARWIN_C_SOURCE
+# define _DARWIN_C_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # define _GNU_SOURCE 1
 #endif
-/* Enable threading extensions on Solaris.  */
+/* Enable X/Open compliant socket functions that do not require linking
+   with -lxnet on HP-UX 11.11.  */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# define _HPUX_ALT_XOPEN_SOCKET_API 1
+#endif
+/* Identify the host operating system as Minix.
+   This macro does not affect the system headers' behavior.
+   A future release of Autoconf may stop defining this macro.  */
+#ifndef _MINIX
+/* # undef _MINIX */
+#endif
+/* Enable general extensions on NetBSD.
+   Enable NetBSD compatibility extensions on Minix.  */
+#ifndef _NETBSD_SOURCE
+# define _NETBSD_SOURCE 1
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+   Oddly enough, this does nothing on OpenBSD.  */
+#ifndef _OPENBSD_SOURCE
+# define _OPENBSD_SOURCE 1
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_SOURCE
+/* # undef _POSIX_SOURCE */
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_1_SOURCE
+/* # undef _POSIX_1_SOURCE */
+#endif
+/* Enable POSIX-compatible threading on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # define _POSIX_PTHREAD_SEMANTICS 1
 #endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014.  */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014.  */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015.  */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010.  */
+#ifndef __STDC_WANT_LIB_EXT2__
+# define __STDC_WANT_LIB_EXT2__ 1
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009.  */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
+#endif
 /* Enable extensions on HP NonStop.  */
 #ifndef _TANDEM_SOURCE
 # define _TANDEM_SOURCE 1
 #endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__ 1
+/* Enable X/Open extensions.  Define to 500 only if necessary
+   to make mbstate_t available.  */
+#ifndef _XOPEN_SOURCE
+/* # undef _XOPEN_SOURCE */
 #endif
 
 
 /* Version number of package */
-#define VERSION "2.0.33"
-
-/* Enable large inode numbers on Mac OS X 10.5.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
+#define VERSION "2.0.34"
 
 /* Number of bits in a file offset, on hosts where this is settable. */
 /* #undef _FILE_OFFSET_BITS */
@@ -184,20 +253,10 @@
 /* Define for large files, on AIX-style hosts. */
 /* #undef _LARGE_FILES */
 
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
-
 /* Define to `int' if <sys/types.h> does not define. */
 /* #undef mode_t */
 
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
 /* #undef pid_t */
 
 /* Define to `unsigned int' if <sys/types.h> does not define. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/config.h.in new/acpid-2.0.34/config.h.in
--- old/acpid-2.0.33/config.h.in        2021-09-16 03:05:49.017547685 +0200
+++ new/acpid-2.0.34/config.h.in        2022-09-16 03:24:28.500490908 +0200
@@ -42,12 +42,12 @@
 /* Define to 1 if you have the <malloc.h> header file. */
 #undef HAVE_MALLOC_H
 
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
 /* Define to 1 if you have the `memset' function. */
 #undef HAVE_MEMSET
 
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
+
 /* Define to 1 if you have the <netinet/in.h> header file. */
 #undef HAVE_NETINET_IN_H
 
@@ -69,6 +69,9 @@
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
@@ -117,6 +120,9 @@
 /* Define to 1 if you have the <vfork.h> header file. */
 #undef HAVE_VFORK_H
 
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
 /* Define to 1 if `fork' works. */
 #undef HAVE_WORKING_FORK
 
@@ -144,59 +150,112 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
+/* Enable general extensions on macOS.  */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
-/* Enable threading extensions on Solaris.  */
+/* Enable X/Open compliant socket functions that do not require linking
+   with -lxnet on HP-UX 11.11.  */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+   This macro does not affect the system headers' behavior.
+   A future release of Autoconf may stop defining this macro.  */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+   Enable NetBSD compatibility extensions on Minix.  */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+   Oddly enough, this does nothing on OpenBSD.  */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014.  */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014.  */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015.  */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010.  */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009.  */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
 /* Enable extensions on HP NonStop.  */
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
 #endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+/* Enable X/Open extensions.  Define to 500 only if necessary
+   to make mbstate_t available.  */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
 #endif
 
 
 /* Version number of package */
 #undef VERSION
 
-/* Enable large inode numbers on Mac OS X 10.5.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
 /* Define for large files, on AIX-style hosts. */
 #undef _LARGE_FILES
 
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
 /* Define to `int' if <sys/types.h> does not define. */
 #undef mode_t
 
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
 #undef pid_t
 
 /* Define to `unsigned int' if <sys/types.h> does not define. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/configure.ac new/acpid-2.0.34/configure.ac
--- old/acpid-2.0.33/configure.ac       2019-08-16 04:33:29.031496973 +0200
+++ new/acpid-2.0.34/configure.ac       2022-08-15 16:38:03.122942190 +0200
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.60])
-AC_INIT([acpid], [2.0.33])
+AC_INIT([acpid], [2.0.34])
 AC_CONFIG_SRCDIR([connection_list.h])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([build-aux])
@@ -11,7 +11,7 @@
 AM_MAINTAINER_MODE
 # Checks for programs.
 AC_PROG_AWK
-AC_PROG_CC_STDC
+AC_PROG_CC
 AM_PROG_CC_C_O
 AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/input_layer.c new/acpid-2.0.34/input_layer.c
--- old/acpid-2.0.33/input_layer.c      2019-07-31 14:22:15.967758729 +0200
+++ new/acpid-2.0.34/input_layer.c      2022-08-15 16:38:03.122942190 +0200
@@ -7,7 +7,7 @@
  *  Inspired by (and in some cases blatantly lifted from) Vojtech Pavlik's
  *  evtest.c.
  *
- *  Copyright (C) 2008-2009, Ted Felix (www.tedfelix.com)
+ *  Copyright (C) 2008-2022, Ted Felix (www.tedfelix.com)
  *
  *  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
@@ -23,7 +23,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- *  (tabs at 4)
+ *  (tabs at 4, tabs not spaces)
  */
 
 /* system */
@@ -49,7 +49,9 @@
 #define DIM(a)  (sizeof(a) / sizeof(a[0]))
 
 struct evtab_entry {
-       struct input_event event;
+       unsigned type;
+       unsigned code;
+       int value;
        const char *str;
 };
 
@@ -69,69 +71,62 @@
 
        /*** COMMON EVENTS ***/
 
-       {{{0,0}, EV_KEY, KEY_POWER, 1}, "button/power PBTN 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_SUSPEND, 1}, 
-               "button/suspend SUSP 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_SLEEP, 1}, "button/sleep SBTN 00000080 00000000"},
-       {{{0,0}, EV_SW, SW_LID, 1}, "button/lid LID close"},
-       {{{0,0}, EV_SW, SW_LID, 0}, "button/lid LID open"},
-       {{{0,0}, EV_SW, SW_TABLET_MODE, 0}, "video/tabletmode TBLT 0000008A 
00000000"},
-       {{{0,0}, EV_SW, SW_TABLET_MODE, 1}, "video/tabletmode TBLT 0000008A 
00000001"},
+       { EV_KEY, KEY_POWER, 1, "button/power PBTN 00000080 00000000" },
+       { EV_KEY, KEY_SUSPEND, 1, "button/suspend SUSP 00000080 00000000" },
+       { EV_KEY, KEY_SLEEP, 1, "button/sleep SBTN 00000080 00000000" },
+       { EV_SW, SW_LID, 1, "button/lid LID close"},
+       { EV_SW, SW_LID, 0, "button/lid LID open"},
+       { EV_SW, SW_TABLET_MODE, 0, "video/tabletmode TBLT 0000008A 00000000" },
+       { EV_SW, SW_TABLET_MODE, 1, "video/tabletmode TBLT 0000008A 00000001" },
 
 
        /*** VIDEO ***/
 
-       {{{0,0}, EV_KEY, KEY_ZOOM, 1}, "button/zoom ZOOM 00000080 00000000"},
+       { EV_KEY, KEY_ZOOM, 1, "button/zoom ZOOM 00000080 00000000" },
        /* typical events file has "video.* 00000087" */
-       {{{0,0}, EV_KEY, KEY_BRIGHTNESSDOWN, 1},
-               "video/brightnessdown BRTDN 00000087 00000000"},
+       { EV_KEY, KEY_BRIGHTNESSDOWN, 1,
+                       "video/brightnessdown BRTDN 00000087 00000000" },
        /* typical events file has "video.* 00000086" */
-       {{{0,0}, EV_KEY, KEY_BRIGHTNESSUP, 1},
-               "video/brightnessup BRTUP 00000086 00000000"},
+       { EV_KEY, KEY_BRIGHTNESSUP, 1,
+                       "video/brightnessup BRTUP 00000086 00000000"},
        /* additional events divined from the kernel's video.c */
-       {{{0,0}, EV_KEY, KEY_VIDEO_NEXT, 1},
-               "video/next NEXT 00000083 00000000"},
-       {{{0,0}, EV_KEY, KEY_VIDEO_PREV, 1},
-               "video/prev PREV 00000084 00000000"},
-       {{{0,0}, EV_KEY, KEY_BRIGHTNESS_CYCLE, 1},
-               "video/brightnesscycle BCYC 00000085 00000000"},
-       {{{0,0}, EV_KEY, KEY_BRIGHTNESS_ZERO, 1},
-               "video/brightnesszero BZRO 00000088 00000000"},
-       {{{0,0}, EV_KEY, KEY_DISPLAY_OFF, 1},
-                       "video/displayoff DOFF 00000089 00000000"},
+       { EV_KEY, KEY_VIDEO_NEXT, 1, "video/next NEXT 00000083 00000000" },
+       { EV_KEY, KEY_VIDEO_PREV, 1, "video/prev PREV 00000084 00000000" },
+       { EV_KEY, KEY_BRIGHTNESS_CYCLE, 1,
+                       "video/brightnesscycle BCYC 00000085 00000000"},
+       { EV_KEY, KEY_BRIGHTNESS_ZERO, 1,
+                       "video/brightnesszero BZRO 00000088 00000000"},
+       { EV_KEY, KEY_DISPLAY_OFF, 1,
+                       "video/displayoff DOFF 00000089 00000000" },
        /* procfs on Thinkpad 600X reports "video VID0 00000080 00000000" */
        /* typical events file has "video.* 00000080" */
-       {{{0,0}, EV_KEY, KEY_SWITCHVIDEOMODE, 1},
-               "video/switchmode VMOD 00000080 00000000"},
+       { EV_KEY, KEY_SWITCHVIDEOMODE, 1,
+                       "video/switchmode VMOD 00000080 00000000"},
 
 
        /*** AUDIO ***/
 
-       {{{0,0}, EV_KEY, KEY_VOLUMEDOWN, 1},
-               "button/volumedown VOLDN 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_VOLUMEDOWN, 2},
-               "button/volumedown VOLDN 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_VOLUMEUP, 1},
-               "button/volumeup VOLUP 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_VOLUMEUP, 2},
-               "button/volumeup VOLUP 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_MUTE, 1},
-               "button/mute MUTE 00000080 00000000"},
+       { EV_KEY, KEY_VOLUMEDOWN, 1, "button/volumedown VOLDN 00000080 
00000000" },
+       { EV_KEY, KEY_VOLUMEDOWN, 2, "button/volumedown VOLDN 00000080 
00000000" },
+       { EV_KEY, KEY_VOLUMEUP, 1, "button/volumeup VOLUP 00000080 00000000" },
+       { EV_KEY, KEY_VOLUMEUP, 2, "button/volumeup VOLUP 00000080 00000000" },
+       { EV_KEY, KEY_MUTE, 1, "button/mute MUTE 00000080 00000000" },
 /* Kernel 3.1 or later required for KEY_MICMUTE */
 #ifdef KEY_MICMUTE
-       {{{0,0}, EV_KEY, KEY_MICMUTE, 1},
-               "button/micmute MICMUTE 00000080 00000000"},
+       { EV_KEY, KEY_MICMUTE, 1, "button/micmute MICMUTE 00000080 00000000" },
 #endif
        /* cd play/pause buttons */
-       {{{0,0}, EV_KEY, KEY_NEXTSONG, 1},
-               "cd/next CDNEXT 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_PREVIOUSSONG, 1},
-               "cd/prev CDPREV 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_PLAYPAUSE, 1},
-               "cd/play CDPLAY 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_STOPCD, 1},
-               "cd/stop CDSTOP 00000080 00000000"},
-
+       { EV_KEY, KEY_NEXTSONG, 1, "cd/next CDNEXT 00000080 00000000" },
+       { EV_KEY, KEY_PREVIOUSSONG, 1, "cd/prev CDPREV 00000080 00000000" },
+       { EV_KEY, KEY_PLAYPAUSE, 1, "cd/play CDPLAY 00000080 00000000" },
+       { EV_KEY, KEY_PLAYCD, 1, "cd/play2 CDPLAY2 00000080 00000000" },
+       { EV_KEY, KEY_PAUSECD, 1, "cd/pause CDPAUSE 00000080 00000000" },
+       { EV_KEY, KEY_STOPCD, 1, "cd/stop CDSTOP 00000080 00000000" },
+       { EV_KEY, KEY_EJECTCD, 1, "cd/eject CDEJECT 00000080 00000000" },
+       { EV_KEY, KEY_EJECTCLOSECD, 1,
+                       "cd/ejectclose CDEJECTCLOSE 00000080 00000000" },
+       { EV_KEY, KEY_FASTFORWARD, 1, "button/ff FF 00000080 00000000" },
+       { EV_KEY, KEY_REWIND, 1, "button/rew REW 00000080 00000000" },
 
        /*** JACKS ***/
 
@@ -140,28 +135,18 @@
  #ifndef SW_LINEIN_INSERT
   #define SW_LINEIN_INSERT 0x0d
  #endif
-       {{{0,0}, EV_SW, SW_HEADPHONE_INSERT, 0},
-               "jack/headphone HEADPHONE unplug"},
-       {{{0,0}, EV_SW, SW_HEADPHONE_INSERT, 1},
-               "jack/headphone HEADPHONE plug"},
-       {{{0,0}, EV_SW, SW_MICROPHONE_INSERT, 0},
-               "jack/microphone MICROPHONE unplug"},
-       {{{0,0}, EV_SW, SW_MICROPHONE_INSERT, 1},
-               "jack/microphone MICROPHONE plug"},
-       {{{0,0}, EV_SW, SW_LINEOUT_INSERT, 0},
-               "jack/lineout LINEOUT unplug"},
-       {{{0,0}, EV_SW, SW_LINEOUT_INSERT, 1},
-               "jack/lineout LINEOUT plug"},
+       { EV_SW, SW_HEADPHONE_INSERT, 0, "jack/headphone HEADPHONE unplug" },
+       { EV_SW, SW_HEADPHONE_INSERT, 1, "jack/headphone HEADPHONE plug" },
+       { EV_SW, SW_MICROPHONE_INSERT, 0, "jack/microphone MICROPHONE unplug" },
+       { EV_SW, SW_MICROPHONE_INSERT, 1, "jack/microphone MICROPHONE plug" },
+       { EV_SW, SW_LINEOUT_INSERT, 0, "jack/lineout LINEOUT unplug" },
+       { EV_SW, SW_LINEOUT_INSERT, 1, "jack/lineout LINEOUT plug" },
 #ifdef SW_VIDEOOUT_INSERT
-       {{{0,0}, EV_SW, SW_VIDEOOUT_INSERT, 0},
-               "jack/videoout VIDEOOUT unplug"},
-       {{{0,0}, EV_SW, SW_VIDEOOUT_INSERT, 1},
-               "jack/videoout VIDEOOUT plug"},
+       { EV_SW, SW_VIDEOOUT_INSERT, 0, "jack/videoout VIDEOOUT unplug" },
+       { EV_SW, SW_VIDEOOUT_INSERT, 1, "jack/videoout VIDEOOUT plug" },
 #endif
-       {{{0,0}, EV_SW, SW_LINEIN_INSERT, 0},
-               "jack/linein LINEIN unplug"},
-       {{{0,0}, EV_SW, SW_LINEIN_INSERT, 1},
-               "jack/linein LINEIN plug"},
+       { EV_SW, SW_LINEIN_INSERT, 0, "jack/linein LINEIN unplug" },
+       { EV_SW, SW_LINEIN_INSERT, 1, "jack/linein LINEIN plug" },
 #else
  #warning SW_HEADPHONE_INSERT not found in input_layer.h. Support for 
plug/unplug events will be disabled. Please upgrade your kernel headers to 
Linux-3.2 or newer.
 #endif
@@ -170,33 +155,40 @@
        /*** MISCELLANEOUS ***/
 
        /* blue access IBM button on Thinkpad T42p*/
-       {{{0,0}, EV_KEY, KEY_PROG1, 1}, "button/prog1 PROG1 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_VENDOR, 1}, "button/vendor VNDR 00000080 
00000000"},
+       { EV_KEY, KEY_PROG1, 1, "button/prog1 PROG1 00000080 00000000" },
+       { EV_KEY, KEY_VENDOR, 1, "button/vendor VNDR 00000080 00000000" },
        /* Fn-F2 produces KEY_BATTERY on Thinkpad T42p */
-       {{{0,0}, EV_KEY, KEY_BATTERY, 1},
-               "button/battery BAT 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_SCREENLOCK, 1},
-               "button/screenlock SCRNLCK 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_COFFEE, 1}, "button/coffee CFEE 00000080 
00000000"},
-       {{{0,0}, EV_KEY, KEY_WLAN, 1}, "button/wlan WLAN 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_FN_F1, 1}, "button/fnf1 FNF1 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_FN_F2, 1}, "button/fnf2 FNF2 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_FN_F6, 1}, "button/fnf6 FNF6 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_FN_F9, 1}, "button/fnf9 FNF9 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_FN_F10, 1}, "button/fnf10 FF10 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_FN_F11, 1}, "button/fnf11 FF11 00000080 00000000"},
+       { EV_KEY, KEY_BATTERY, 1, "button/battery BAT 00000080 00000000" },
+       { EV_KEY, KEY_SCREENLOCK, 1,
+                       "button/screenlock SCRNLCK 00000080 00000000" },
+       { EV_KEY, KEY_COFFEE, 1, "button/coffee CFEE 00000080 00000000" },
+       { EV_KEY, KEY_WLAN, 1, "button/wlan WLAN 00000080 00000000" },
+       { EV_KEY, KEY_FN_F1, 1, "button/fnf1 FNF1 00000080 00000000" },
+       { EV_KEY, KEY_FN_F2, 1, "button/fnf2 FNF2 00000080 00000000" },
+       { EV_KEY, KEY_FN_F6, 1, "button/fnf6 FNF6 00000080 00000000" },
+       { EV_KEY, KEY_FN_F9, 1, "button/fnf9 FNF9 00000080 00000000" },
+       { EV_KEY, KEY_FN_F10, 1, "button/fnf10 FF10 00000080 00000000" },
+       { EV_KEY, KEY_FN_F11, 1, "button/fnf11 FF11 00000080 00000000" },
        /* F20 is sometimes used for micmute */
-       {{{0,0}, EV_KEY, KEY_F20, 1}, "button/f20 F20 00000080 00000000"},
+       { EV_KEY, KEY_F20, 1, "button/f20 F20 00000080 00000000" },
        /* Fn-F9 produces KEY_F24 on Thinkpad T42p */
-       {{{0,0}, EV_KEY, KEY_F24, 1}, "button/f24 F24 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_KBDILLUMTOGGLE, 1},
-               "button/kbdillumtoggle KBILLUM 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_KBDILLUMUP, 1},
-               "button/kbdillumup KBILLUMUP 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_KBDILLUMDOWN, 1},
-               "button/kbdillumdown KBILLUMDOWN 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_COPY, 1}, "button/copy COPY 00000080 00000000"},
-       {{{0,0}, EV_KEY, KEY_RESTART, 1}, "button/restart RSTR 00000080 
00000000"},
+       { EV_KEY, KEY_F24, 1, "button/f24 F24 00000080 00000000" },
+       { EV_KEY, KEY_KBDILLUMTOGGLE, 1,
+                       "button/kbdillumtoggle KBILLUM 00000080 00000000" },
+       { EV_KEY, KEY_KBDILLUMUP, 1,
+                       "button/kbdillumup KBILLUMUP 00000080 00000000" },
+       { EV_KEY, KEY_KBDILLUMDOWN, 1,
+                       "button/kbdillumdown KBILLUMDOWN 00000080 00000000" },
+       { EV_KEY, KEY_COPY, 1, "button/copy COPY 00000080 00000000" },
+       { EV_KEY, KEY_RESTART, 1, "button/restart RSTR 00000080 00000000" },
+       { EV_KEY, KEY_KPENTER, 1, "button/kpenter KPENTER 00000080 00000000" },
+       { EV_KEY, KEY_UP, 1, "button/up UP 00000080 00000000" },
+       { EV_KEY, KEY_LEFT, 1, "button/left LEFT 00000080 00000000" },
+       { EV_KEY, KEY_RIGHT, 1, "button/right RIGHT 00000080 00000000" },
+       { EV_KEY, KEY_DOWN, 1, "button/down DOWN 00000080 00000000" },
+       { EV_KEY, KEY_MENU, 1, "button/menu MENU 00000080 00000000" },
+       { EV_KEY, KEY_BACK, 1, "button/back BACK 00000080 00000000" },
+       { EV_KEY, KEY_HOMEPAGE, 1, "button/homepage HOMEPAGE 00000080 00000000" 
},
 
 #if 0
        /* These "EV_MSC, 4, x" events cause trouble.  They are triggered */
@@ -205,20 +197,74 @@
        /* Apparently there is no KEY_FN_BS, etc..., defined in input.h. */
 
        /* EV_MSC, MSC_SCAN, KEY_MINUS  This is triggered by the minus key. */
-       {{{0,0}, EV_MSC, 4, 12}, "button/fnbs FNBS 00000080 00000000"},
+       { EV_MSC, 4, 12, "button/fnbs FNBS 00000080 00000000" },
 
        /* EV_MSC, MSC_SCAN, KEY_EQUAL  Triggered by the equals key. */
-       {{{0,0}, EV_MSC, 4, 13}, "button/fnins FNINS 00000080 00000000"},
+       { EV_MSC, 4, 13, "button/fnins FNINS 00000080 00000000" },
 
        /* EV_MSC, MSC_SCAN, KEY_BACKSPACE   Triggered by the backspace key. */
-       {{{0,0}, EV_MSC, 4, 14}, "button/fndel FNDEL 00000080 00000000"},
+       { EV_MSC, 4, 14, "button/fndel FNDEL 00000080 00000000" },
 
        /* EV_MSC, MSC_SCAN, KEY_E   Triggered by the 'E' key. */
-       {{{0,0}, EV_MSC, 4, 18}, "button/fnpgdown FNPGDOWN 00000080 00000000"},
+       { EV_MSC, 4, 18, "button/fnpgdown FNPGDOWN 00000080 00000000" },
 #endif
 
 };
 
+/*-----------------------------------------------------------------*/
+/* Compare all three key fields. */
+static int event_compare_3(const void *lhs, const void *rhs)
+{
+       const struct evtab_entry *levent = lhs;
+       const struct evtab_entry *revent = rhs;
+       int diff = 0;
+
+       diff = levent->type - revent->type;
+       if (diff != 0)
+               return diff;
+
+       diff = levent->code - revent->code;
+       if (diff != 0)
+               return diff;
+
+       return levent->value - revent->value;
+}
+
+/*-----------------------------------------------------------------*/
+/* Just compare type and code.  For need_event(). */
+static int event_compare_2(const void *lhs, const void *rhs)
+{
+       const struct evtab_entry *levent = lhs;
+       const struct evtab_entry *revent = rhs;
+       int diff = 0;
+
+       diff = levent->type - revent->type;
+       if (diff != 0)
+               return diff;
+
+       return levent->code - revent->code;
+}
+
+/*----------------------------------------------------------------------*/
+
+static void dump_events(void)
+{
+       int i;
+
+       acpid_log(LOG_DEBUG, "Dumping event table...");
+
+       for (i = 0; i < DIM(evtab); ++i)
+       {
+               acpid_log(LOG_DEBUG,
+                       "  Event Table:  Type: %u  Code: %u  Value: %d  Str: 
%s",
+                       evtab[i].type,
+                       evtab[i].code,
+                       evtab[i].value,
+                       evtab[i].str);
+       }
+}
+
+/*----------------------------------------------------------------------*/
 /* special support for the MUTE key, as the key toggles we want to
  * consider repeated keys but don't report them all the time. We just
  * ensure that the number of key presses (MOD 2) is correct.
@@ -249,23 +295,25 @@
 static const char *
 event_string(struct input_event event)
 {
-       unsigned i;
-       
-       /* for each entry in the event table */
-       /* ??? Is there a faster way?  This is triggered every time the user
-        *     presses a key.  Maybe a simple hash algorithm?  Or a simple check
-        *     for very common keys (alphanumeric) and bail before this?  */
-       for (i = 0; i < DIM(evtab); ++i)
-       {
-               /* if this is a matching event, return its string */
-               if (event.type == evtab[i].event.type  &&
-                       event.code == evtab[i].event.code  &&
-                       event.value == evtab[i].event.value) {
-                       return evtab[i].str;
-               }
-       }
-       
-       return NULL;
+       struct evtab_entry search_event;
+       struct evtab_entry *found_event;
+
+       search_event.type = event.type;
+       search_event.code = event.code;
+       search_event.value = event.value;
+
+       /* Use binary search since the table is getting fairly large. */
+       found_event = bsearch(
+               &search_event,
+               evtab,
+               DIM(evtab),
+               sizeof(struct evtab_entry),
+               event_compare_3);
+
+       if (!found_event)
+               return NULL;
+
+       return found_event->str;
 }
 
 /*-----------------------------------------------------------------*/
@@ -273,18 +321,24 @@
 static int 
 need_event(int type, int code)
 {
-       unsigned i;
+       struct evtab_entry search_event;
+       struct evtab_entry *found_event;
 
-       /* for each entry in the event table */
-       for (i = 0; i < DIM(evtab); ++i) {
-               /* if we found a matching event */
-               if (type == evtab[i].event.type  &&
-                       code == evtab[i].event.code) {
-                       return 1;
-               }
-       }
+       search_event.type = type;
+       search_event.code = code;
 
-       return 0;
+       /* Use binary search since the table is getting fairly large. */
+       found_event = bsearch(
+               &search_event,
+               evtab,
+               DIM(evtab),
+               sizeof(struct evtab_entry),
+               event_compare_2);
+
+       if (!found_event)
+               return 0;
+
+       return 1;
 }
 
 /*-----------------------------------------------------------------*/
@@ -332,6 +386,18 @@
                return;
        }
 
+       if (debug_level >= 2) {
+               /* Logging in the style of kacpimon. */
+               if (event.type == EV_SYN) {
+                       acpid_log(LOG_DEBUG, "Input Layer:  Sync");
+               } else {
+                       /* format and display the event struct in decimal */
+                       acpid_log(LOG_DEBUG, "Input Layer:  "
+                               "Type: %hu  Code: %hu  Value: %d",
+                               event.type, event.code, event.value);
+               }
+       }
+
        c = find_connection(fd);
        
        /* if we're getting scancodes, we probably have a keyboard */
@@ -382,22 +448,38 @@
 }
 
 #define BITS_PER_LONG (sizeof(long) * 8)
+/* longs needed for x bits.  More of a BITS_TO_LONGS(bits). */
 #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
 #define OFF(x)  ((x)%BITS_PER_LONG)
 #define LONG(x) ((x)/BITS_PER_LONG)
 #define test_bit(bit, array)   ((array[LONG(bit)] >> OFF(bit)) & 1)
 
-/*--------------------------------------------------------------------*/
-/* returns non-zero if the file descriptor supports one of the events */
-/* supported by event_string().  */
+/*--------------------------------------------------------------------
+ * Returns non-zero if the file descriptor supports one of the events
+ * supported by event_string().
+ *
+ * ??? Performance: This uses a lot of CPU.  Why not generate an event
+ *     bitmap from evtab, then compare the two using AND (&) long by
+ *     long and return 1 if any are non-zero?  That should reduce CPU
+ *     usage to 1/32 or possibly MUCH less.  This would also get rid
+ *     of need_event() and event_compare_2().
+ */
 static int 
 has_event(int fd)
 {
        int type, code;
+       /*
+        * Event bitmap.  Use test_bit(code, bit[type]) to read.
+        * Need a set_bit() to write.
+        * ??? Memory: We could save memory here by having only two rows.
+        *     One for the type bitmap and one for the code bitmap we are
+        *     currently checking.
+        */
        unsigned long bit[EV_MAX][NBITS(KEY_MAX)];
 
        memset(bit, 0, sizeof(bit));
-       /* get the event type bitmap */
+       /* Get the event bitmap for type == 0 (EV_SYN). */
+       /* This is a special row that indicates which types are supported. */
        ioctl(fd, EVIOCGBIT(0, sizeof(bit[0])), bit[0]);
 
        /* for each event type */
@@ -406,7 +488,7 @@
                if (test_bit(type, bit[0])) {
                        /* skip sync */
                        if (type == EV_SYN) continue;
-                       /* get the event code mask */
+                       /* get the event bitmap for this type */
                        ioctl(fd, EVIOCGBIT(type, sizeof(bit[type])), 
bit[type]);
                        /* for each event code */
                        for (code = 0; code < KEY_MAX; code++) {
@@ -483,6 +565,13 @@
        unsigned i;
        int success = 0;
 
+       /* Sort the event table. */
+       qsort(evtab, DIM(evtab), sizeof(struct evtab_entry),
+          event_compare_3);
+
+       if (debug_level >= 3)
+               dump_events();
+
        /* get all the matching event filenames */
        glob(ACPID_INPUTLAYERFILES, 0, NULL, &globbuf);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/kacpimon/libnetlink.c new/acpid-2.0.34/kacpimon/libnetlink.c
--- old/acpid-2.0.33/kacpimon/libnetlink.c      2015-12-16 16:37:04.068422602 
+0100
+++ new/acpid-2.0.34/kacpimon/libnetlink.c      2021-09-20 03:32:49.077869766 
+0200
@@ -17,7 +17,14 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <net/if_arp.h>
+
 #include <sys/socket.h>
+
+/* Missing from some socket.h. */
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC 0x40000000
+#endif
+
 #include <netinet/in.h>
 #include <string.h>
 #include <errno.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/libnetlink.c new/acpid-2.0.34/libnetlink.c
--- old/acpid-2.0.33/libnetlink.c       2015-12-16 16:35:50.134947687 +0100
+++ new/acpid-2.0.34/libnetlink.c       2021-09-20 03:31:56.196781952 +0200
@@ -17,7 +17,14 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <net/if_arp.h>
+
 #include <sys/socket.h>
+
+/* Missing from some socket.h. */
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC 0x40000000
+#endif
+
 #include <netinet/in.h>
 #include <string.h>
 #include <errno.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/acpid-2.0.33/netlink.c new/acpid-2.0.34/netlink.c
--- old/acpid-2.0.33/netlink.c  2015-07-29 00:32:35.453948235 +0200
+++ new/acpid-2.0.34/netlink.c  2021-09-20 03:32:03.418793923 +0200
@@ -33,6 +33,13 @@
 #include <string.h>
 #include <errno.h>
 
+#include <sys/socket.h>
+
+/* Missing from some socket.h. */
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC 0x40000000
+#endif
+
 /* local */
 #include "acpid.h"
 #include "log.h"

Reply via email to