From: Craig Small Date: Mon, 21 Mar 2005 00:12:18 +0000 (+0000) Subject: define a rpmatch for uclibc and friends X-Git-Tag: v22.11~123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ceb34d6445ddbca8876a0aa09ce1db001288adf;p=psmisc define a rpmatch for uclibc and friends --- diff --git a/ChangeLog b/ChangeLog index 848487e..7c1a091 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Changes in 21.7 =============== * Upgraded SELinux code to new api, thanks to Chris PeBenito + * define rpmatch for libraries that dont have it Changes in 21.6 =============== diff --git a/configure.in b/configure.in index 4d41ebf..28eaec5 100644 --- a/configure.in +++ b/configure.in @@ -46,7 +46,7 @@ AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.14.1]) dnl Checks for library functions. -AC_CHECK_FUNCS([strdup strerror strtoul]) +AC_CHECK_FUNCS([strdup strerror strtoul rpmatch]) dnl Checks for Large File System AC_SYS_LARGEFILE diff --git a/src/i18n.h b/src/i18n.h index 736a487..a0b4439 100644 --- a/src/i18n.h +++ b/src/i18n.h @@ -17,3 +17,10 @@ #endif +#ifndef HAVE_RPMATCH +#define rpmatch(line) \ + ( (line == NULL)? -1 : \ + (*line == 'y' || *line == 'Y')? 1 : \ + (*line == 'n' || *line == 'N')? 0 : \ + -1 ) +#endif