]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hardlink: remove pcre2posix.h support
authorKarel Zak <kzak@redhat.com>
Wed, 14 Jul 2021 15:51:07 +0000 (17:51 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 14 Jul 2021 15:51:07 +0000 (17:51 +0200)
It's deprecated for years. Let's rely on old good libc regex.h for now.

Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
meson.build
misc-utils/Makemodule.am
misc-utils/hardlink.c

index 2d54d71c7a61a6448905bbcc53d9db49aa67d79c..60e63592bd6be0e7379386f0a0095ca7ff0307ea 100644 (file)
@@ -1461,14 +1461,6 @@ UL_REQUIRES_HAVE([setpriv], [linux_capability_h], [linux/capability.h header fil
 UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library])
 AM_CONDITIONAL([BUILD_SETPRIV], [test "x$build_setpriv" = xyes])
 
-PKG_CHECK_MODULES([PCRE2_POSIX], [libpcre2-posix],
-                 [have_pcre2_posix=yes],
-                 [have_pcre2_posix=no])
-AS_IF([test "x$have_pcre2_posix" = xyes ], [
-    AC_DEFINE([HAVE_PCRE2_POSIX], [1], [Define if libpcre2-posix is available])
-])
-AM_CONDITIONAL([HAVE_PCRE2_POSIX], [test "x$have_pcre2_posix" = xyes])
-
 AC_ARG_ENABLE([hardlink],
   AS_HELP_STRING([--disable-hardlink], [do not build hardlink]),
   [], [UL_DEFAULT_ENABLE([hardlink], [check])]
index b138af86bc44d15ef633eb6996d267436630fc89..cda4ce0c526119ccdd2282e523adee39187ba336 100644 (file)
@@ -267,11 +267,6 @@ lib_readline_static = dependency(
   static : true,
   required : need_static_libs ? get_option('readline') : disabler())
 
-lib_pcre = dependency(
-  'libpcre2-posix',
-  required : get_option('libpcre2-posix'))
-conf.set('HAVE_PCRE2_POSIX', lib_pcre.found() ? 1 : false)
-
 lib_user = dependency(
   'libuser',
   version : '>= 0.58',
@@ -2547,7 +2542,6 @@ exe = executable(
   hardlink_sources,
   include_directories : includes,
   link_with : [lib_common],
-  dependencies : [lib_pcre],
   install_dir : usrbin_exec_dir,
   install : true)
 if not is_disabler(exe)
index 9c93a8b93a96b5e2e95bbb560cfc9877dba3e119..070c2083521857c7be898420f0c532d2b6eddc77 100644 (file)
@@ -244,8 +244,4 @@ dist_noinst_DATA += misc-utils/hardlink.1.adoc
 hardlink_SOURCES = misc-utils/hardlink.c lib/monotonic.c
 hardlink_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS)
 hardlink_CFLAGS = $(AM_CFLAGS)
-if HAVE_PCRE2_POSIX
-hardlink_LDADD += $(PCRE2_POSIX_LIBS)
-hardlink_CFLAGS += $(PCRE2_POSIX_CFLAGS)
-endif
 endif
index 5d4f2e799bba834522233c323742bcdd1d0c10cd..4b0abcfe1cbfbe31fb2b6acb70e51c77ce5dde19 100644 (file)
 #include "monotonic.h"
 #include "optutils.h"
 
-/* Use libpcre2posix if it's available */
-#ifdef HAVE_PCRE2_POSIX
-# include <pcre2posix.h>
-# undef REG_NOSUB
-# define REG_NOSUB 0           /* we do want backreferences in PCRE mode */
-#else
-# include <regex.h>            /* regcomp(), regsearch() */
-#endif
+#include <regex.h>             /* regcomp(), regsearch() */
 
 #ifdef HAVE_SYS_XATTR_H
 # include <sys/xattr.h>                /* listxattr, getxattr */