in_tail: use stricmp() to compare two paths
Windows API is designed to be case insensitive. This means that the
following two paths refer to the same file:
C:\Users\Alice\README.TXT
C:\Users\Alice\readme.txt
This patch reflect this design and fixes flb_tail_file_name_cmp() to
use strnicmp() (= strcasecmp() in POSIX) to compare two file paths.
static inline int flb_tail_file_name_cmp(char *name,
struct flb_tail_file *file)
{
-#ifdef __linux__
+#if defined(__linux__)
return strcmp(name, file->name);
+#elif defined(FLB_SYSTEM_WINDOWS)
+ return _stricmp(name, file->real_name);
#else
return strcmp(name, file->real_name);
#endif
