hardlink: remove pcre2posix.h support

It's deprecated for years. Let's rely on old good libc regex.h for now.

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-07-14 17:51:07 +02:00
parent b8d99a618b
commit be199d34f2
4 changed files with 1 additions and 26 deletions

View 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])]

View 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)

View 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

View File

@ -44,14 +44,7 @@
#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 */