(Blackberry Playbook) Fix Blackberry Playbook build - strcasestr is
authortwinaphex <autechre1024@hotmail.com>
Mon, 27 May 2013 10:28:34 +0000 (12:28 +0200)
committernotaz <notasas@gmail.com>
Tue, 4 Jun 2013 20:35:45 +0000 (23:35 +0300)
not implemented

frontend/libretro.c

index 9be52f5..ec034c2 100644 (file)
@@ -591,6 +591,33 @@ static void extract_directory(char *buf, const char *path, size_t size)
    }
 }
 
+#ifdef __QNX__
+/* Blackberry QNX doesn't have strcasestr */
+
+/*
+ * Find the first occurrence of find in s, ignore case.
+ */
+char *
+strcasestr(const char *s, const char*find)
+{
+       char c, sc;
+       size_t len;
+
+       if ((c = *find++) != 0) {
+               c = tolower((unsigned char)c);
+               len = strlen(find);
+               do {
+                       do {
+                               if ((sc = *s++) == 0)
+                                       return (NULL);
+                       } while ((char)tolower((unsigned char)sc) != c);
+               } while (strncasecmp(s, find, len) != 0);
+               s--;
+       }
+       return ((char *)s);
+}
+#endif
+
 bool retro_load_game(const struct retro_game_info *info)
 {
        size_t i;