blob: 9bbf580e464501fd39b9810241598d30dc93914f [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001Create a compatable macro if rpmatch() is not provided by the C library.
2
3This uses an existing configure check.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004
5This is needed for uclibc since it does not have the above function
6implemented.
7
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05008Upstream-Status: Submitted [RPM5 maintainer]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050012Updated to rpm 5.4.15+.
13
14Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
15
16Index: rpm/system.h
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017===================================================================
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050018--- rpm.orig/system.h
19+++ rpm/system.h
20@@ -358,6 +358,14 @@ extern int _tolower(int) __THROW /*@*/;
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 #include <libgen.h>
22 #endif
23
24+#ifndef HAVE_RPMATCH
25+#define rpmatch(line) \
26+ ( (line == NULL)? -1 : \
27+ (*line == 'y' || *line == 'Y')? 1 : \
28+ (*line == 'n' || *line == 'N')? 0 : \
29+ -1 )
30+#endif
31+
32 /* -- Retrofit glibc __progname */
33 #if defined __GLIBC__ && __GLIBC__ >= 2
34 #if __GLIBC_MINOR__ >= 1