9 #define inline __inline
10 #define __inline__ __inline
11 #define __attribute__(x)
12 #define strncasecmp _strnicmp
13 #define ftruncate _chsize
15 static __inline
int strcasecmp (const char *s1
, const char *s2
)
17 int size1
= strlen(s1
);
18 int sisz2
= strlen(s2
);
19 return _strnicmp(s1
, s2
, sisz2
> size1
? sisz2
: size1
);
24 /* Use mingw_lstat() instead of lstat()/stat() and mingw_fstat() instead
25 * of fstat(). We add the declaration of these functions here, suppressing
26 * the corresponding declarations in mingw.h, so that we can use the
27 * appropriate structure type (and function) names from the msvc headers.
30 int mingw_lstat(const char *file_name
, struct stat
*buf
);
31 int mingw_fstat(int fd
, struct stat
*buf
);
32 #define fstat mingw_fstat
33 #define lstat mingw_lstat
34 #define _stat64(x,y) mingw_lstat(x,y)
35 #define ALREADY_DECLARED_STAT_FUNCS
37 #include "compat/mingw.h"
39 #undef ALREADY_DECLARED_STAT_FUNCS