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