Skip to content

Commit

Permalink
-Fix: remove some warnings when cross compiling for mingw32
Browse files Browse the repository at this point in the history
  • Loading branch information
miniupnp committed Nov 7, 2017
1 parent 96eb70b commit 41e1692
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/opendune.c
Expand Up @@ -1203,8 +1203,11 @@ int main(int argc, char **argv)
char filter_text[64];
#if defined(_WIN32)
#if defined(__MINGW32__) && defined(__STRICT_ANSI__)
#if 0 /* NOTE : disabled because it generates warnings when cross compiling
* for MinGW32 under linux */
int __cdecl __MINGW_NOTHROW _fileno (FILE*);
#endif
#endif
FILE *err = fopen("error.log", "w");
FILE *out = fopen("output.log", "w");

Expand Down
3 changes: 3 additions & 0 deletions src/os/endian.h
Expand Up @@ -7,6 +7,9 @@
#if !defined(__LITTLE_ENDIAN)
#define __LITTLE_ENDIAN 1234
#endif /* __LITTLE_ENDIAN */
#if !defined(__BIG_ENDIAN)
#define __BIG_ENDIAN 4321
#endif /* __BIG_ENDIAN */
#define __BYTE_ORDER __LITTLE_ENDIAN
#elif defined(__APPLE__) || defined(__FreeBSD__)
#include <machine/endian.h>
Expand Down
3 changes: 3 additions & 0 deletions src/os/strings.h
Expand Up @@ -74,9 +74,12 @@
#include <stdarg.h>

#if defined(__MINGW32__) && defined(__STRICT_ANSI__)
#if 0 /* NOTE : disabled because it generates warnings when cross compiling
* for MinGW32 under linux */
int __cdecl __MINGW_NOTHROW strcasecmp (const char *, const char *);
int __cdecl __MINGW_NOTHROW strncasecmp (const char *, const char *, size_t);
char* __cdecl __MINGW_NOTHROW strdup (const char*) __MINGW_ATTRIB_MALLOC;
#endif
#endif /* __MINGW32__ && __STRICT_ANSI__ */

#if !defined(__MINGW32__) && defined(__GNUC__) && !defined(snprintf)
Expand Down

0 comments on commit 41e1692

Please sign in to comment.