From 7d06701bfaad445e48832ba4fd189ffc36e34387 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 5 May 2015 12:50:24 +0000 Subject: - add stat_at - make case_diff* work as a function is more cases - make sig_number case-insensitive - make child signal unblocking work in child_spawn* --- src/libstddjb/case_diffb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/libstddjb/case_diffb.c') diff --git a/src/libstddjb/case_diffb.c b/src/libstddjb/case_diffb.c index 1931c0f..f267756 100644 --- a/src/libstddjb/case_diffb.c +++ b/src/libstddjb/case_diffb.c @@ -1,7 +1,11 @@ /* ISC license. */ +#include #include +#ifdef SKALIBS_FLAG_REPLACE_LIBC + + int case_diffb (char const *s, unsigned int len, char const *t) { register unsigned char x = 0, y = 0 ; @@ -16,3 +20,14 @@ int case_diffb (char const *s, unsigned int len, char const *t) } return (int)(x - y) ; } + +else + +#include + +int case_diffb (char const *s, unsigned int len, char const *t) +{ + return strncasecmp(s, t, len) ; +} + +#endif -- cgit v1.2.3