[svn-commits] rmeyerriecks: linux/trunk r9097 - /linux/trunk/include/dahdi/kernel.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 6 15:10:30 CDT 2010


Author: rmeyerriecks
Date: Fri Aug  6 15:10:23 2010
New Revision: 9097

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9097
Log:
dahdi: Backport strcasecmp for kernels < 2.6.22

strcasecmp was brought into the kernel at v2.6.22

Modified:
    linux/trunk/include/dahdi/kernel.h

Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=9097&r1=9096&r2=9097
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Fri Aug  6 15:10:23 2010
@@ -1198,10 +1198,22 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
 
 /* Some distributions backported fatal_signal_pending so we'll use a macro to
- * override the inline functino definition. */
+ * override the inline function definition. */
 #define fatal_signal_pending(p) \
 	(signal_pending((p)) && sigismember(&(p)->pending.signal, SIGKILL))
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+#include <linux/ctype.h>
+static inline int strcasecmp(const char *s1, const char *s2)
+{
+	int c1, c2;
+
+	do {
+		c1 = tolower(*s1++);
+		c2 = tolower(*s2++);
+	} while (c1 == c2 && c1 != 0);
+	return c1 - c2;
+}
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
 static inline void list_replace(struct list_head *old, struct list_head *new)
 {
@@ -1233,6 +1245,7 @@
 #endif /* 2.6.12 */
 #endif /* 2.6.14 */
 #endif /* 2.6.18 */
+#endif /* 2.6.22 */
 #endif /* 2.6.25 */
 #endif /* 2.6.26 */
 #endif /* 2.6.31 */




More information about the svn-commits mailing list