Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win32: Do not define strcasecmp if defined #32

Merged
merged 1 commit into from
May 19, 2016

Conversation

jen20
Copy link

@jen20 jen20 commented May 19, 2016

It appears late builds of mingw-w64 already define strcasecmp and
strncasecmp appropriately, leading to errors of the form below when
cross compiling. This commit only redefines them if they have not
previously been defined.

In file included from
/vagrant/deps/libsigar/sigar/src/sigar_util.c:25:0:
/vagrant/deps/libsigar/sigar/include/sigar_private.h:120:0: warning:
"strcasecmp" redefined [enabled by default]
 #define strcasecmp stricmp
 ^
In file included from /usr/share/mingw-w64/include/io.h:10:0,
                 from /usr/share/mingw-w64/include/fcntl.h:8,
                 from /vagrant/deps/libsigar/sigar/src/sigar_util.c:21:
/usr/share/mingw-w64/include/string.h:106:0: note: this is the location
of the previous definition
 #define strcasecmp _stricmp
 ^
In file included from
/vagrant/deps/libsigar/sigar/src/sigar_util.c:25:0:
/vagrant/deps/libsigar/sigar/include/sigar_private.h:121:0: warning:
"strncasecmp" redefined [enabled by default]
 #define strncasecmp strnicmp
 ^
In file included from /usr/share/mingw-w64/include/io.h:10:0,
                 from /usr/share/mingw-w64/include/fcntl.h:8,
                 from /vagrant/deps/libsigar/sigar/src/sigar_util.c:21:
/usr/share/mingw-w64/include/string.h:105:0: note: this is the location
of the previous definition
 #define strncasecmp _strnicmp

It appears late builds of mingw-w64 already define strcasecmp and
strncasecmp appropriately, leading to errors of the form below when
cross compiling. This commit only redefines them if they have not
previously been defined.

In file included from
/vagrant/deps/libsigar/sigar/src/sigar_util.c:25:0:
/vagrant/deps/libsigar/sigar/include/sigar_private.h:120:0: warning:
"strcasecmp" redefined [enabled by default]
 #define strcasecmp stricmp
 ^
In file included from /usr/share/mingw-w64/include/io.h:10:0,
                 from /usr/share/mingw-w64/include/fcntl.h:8,
                 from /vagrant/deps/libsigar/sigar/src/sigar_util.c:21:
/usr/share/mingw-w64/include/string.h:106:0: note: this is the location
of the previous definition
 #define strcasecmp _stricmp
 ^
In file included from
/vagrant/deps/libsigar/sigar/src/sigar_util.c:25:0:
/vagrant/deps/libsigar/sigar/include/sigar_private.h:121:0: warning:
"strncasecmp" redefined [enabled by default]
 #define strncasecmp strnicmp
 ^
In file included from /usr/share/mingw-w64/include/io.h:10:0,
                 from /usr/share/mingw-w64/include/fcntl.h:8,
                 from /vagrant/deps/libsigar/sigar/src/sigar_util.c:21:
/usr/share/mingw-w64/include/string.h:105:0: note: this is the location
of the previous definition
 #define strncasecmp _strnicmp
@thirty8super thirty8super merged commit 730db52 into boundary:master May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants