diff options
author | Francesco Cosoleto | 2011-01-02 22:58:13 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-05 16:18:08 +0100 |
commit | e66ac5d344dd038adb664e237c4c2610020f3f62 (patch) | |
tree | 8782b8fb7a51accbf7e0a8d9c56c538637abddd6 /include | |
parent | fdisk: quit with a single CTRL-D, confirm if necessary (diff) | |
download | kernel-qcow2-util-linux-e66ac5d344dd038adb664e237c4c2610020f3f62.tar.gz kernel-qcow2-util-linux-e66ac5d344dd038adb664e237c4c2610020f3f62.tar.xz kernel-qcow2-util-linux-e66ac5d344dd038adb664e237c4c2610020f3f62.zip |
include: add fallback for rpmatch()
Simple replacement code with hardcoded y/n responses to allow
compilation on systems without rpmatch() such as Cygwin.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/rpmatch.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/rpmatch.h b/include/rpmatch.h new file mode 100644 index 000000000..d62634bd8 --- /dev/null +++ b/include/rpmatch.h @@ -0,0 +1,9 @@ +#ifndef UTIL_LINUX_RPMATCH_H +#define UTIL_LINUX_RPMATCH_H + +#ifndef HAVE_RPMATCH +#define rpmatch(r) \ + (*r == 'y' || *r == 'Y' ? 1 : *r == 'n' || *r == 'N' ? 0 : -1) +#endif + +#endif /* UTIL_LINUX_RPMATCH_H */ |