mtd: add private rpmatch()
[fio.git] / oslib / libmtd_common.h
index 9768066b6a4449a562802ba972c6507eaf044494..3f9e1b8c1e5e912f6e314e1a2af778cb1ea6d225 100644 (file)
@@ -119,20 +119,11 @@ extern "C" {
        fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
 } while(0)
 
-#if defined(__UCLIBC__)
-/* uClibc versions before 0.9.34 don't have rpmatch() */
-#if __UCLIBC_MAJOR__ == 0 && \
-               (__UCLIBC_MINOR__ < 9 || \
-               (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 34))
-#undef rpmatch
-#define rpmatch __rpmatch
-static inline int __rpmatch(const char *resp)
+static inline int mtd_rpmatch(const char *resp)
 {
     return (resp[0] == 'y' || resp[0] == 'Y') ? 1 :
        (resp[0] == 'n' || resp[0] == 'N') ? 0 : -1;
 }
-#endif
-#endif
 
 /**
  * prompt the user for confirmation
@@ -154,7 +145,7 @@ static inline bool prompt(const char *msg, bool def)
                }
 
                if (strcmp("\n", line) != 0) {
-                       switch (rpmatch(line)) {
+                       switch (mtd_rpmatch(line)) {
                        case 0: ret = false; break;
                        case 1: ret = true; break;
                        case -1: