aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-12-09 14:46:14 +0000
committerRon Yorston <rmy@pobox.com>2018-12-09 14:47:42 +0000
commit6691b2e8d230e1c85d1a31a752f9f5b6933edbb0 (patch)
treef9e1c83e5adf9c48c758a18f68ec172983e03c86 /win32
parent4a5a8422feab7d38f60d2576e32916f9cf711d29 (diff)
downloadbusybox-w32-6691b2e8d230e1c85d1a31a752f9f5b6933edbb0.tar.gz
busybox-w32-6691b2e8d230e1c85d1a31a752f9f5b6933edbb0.tar.bz2
busybox-w32-6691b2e8d230e1c85d1a31a752f9f5b6933edbb0.zip
win32: add a case-insensitive version of is_suffixed_with()
Diffstat (limited to 'win32')
-rw-r--r--win32/mingw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/win32/mingw.c b/win32/mingw.c
index 10169266d..162fae45b 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -332,8 +332,7 @@ static int has_exec_format(const char *name)
332 unsigned char buf[1024]; 332 unsigned char buf[1024];
333 333
334 /* special case: skip DLLs, there are thousands of them! */ 334 /* special case: skip DLLs, there are thousands of them! */
335 n = strlen(name); 335 if (is_suffixed_with_case(name, ".dll"))
336 if (n > 4 && !strcasecmp(name+n-4, ".dll"))
337 return 0; 336 return 0;
338 337
339 n = open_read_close(name, buf, sizeof(buf)); 338 n = open_read_close(name, buf, sizeof(buf));