Fixed redefinition warnings on Linux:
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 17 Jun 2018 09:04:01 +0300
changeset 5848fee51506499
parent 583 5fa46fcf9499
child 585 170d7d32e4a8
Fixed redefinition warnings on Linux:

IMG_svg.c:52:1: warning: "strchr" redefined
In file included from /usr/include/string.h:637,
from /opt/SDL2/include/SDL2/SDL_stdinc.h:60,
from /opt/SDL2/include/SDL2/SDL_main.h:25,
from /opt/SDL2/include/SDL2/SDL.h:32,
from SDL_image.h:27,
from IMG_svg.c:26:
/usr/include/bits/string2.h:396:1: warning: this is the location of the previous definition
IMG_svg.c:53:1: warning: "strcmp" redefined
/usr/include/bits/string2.h:800:1: warning: this is the location of the previous definition
IMG_svg.c:54:1: warning: "strncmp" redefined
/usr/include/bits/string2.h:920:1: warning: this is the location of the previous definition
IMG_svg.c
     1.1 --- a/IMG_svg.c	Tue Jun 12 21:51:47 2018 +0300
     1.2 +++ b/IMG_svg.c	Sun Jun 17 09:04:01 2018 +0300
     1.3 @@ -49,8 +49,11 @@
     1.4  #define sqrt    SDL_sqrt
     1.5  #define sqrtf   SDL_sqrtf
     1.6  #define sscanf  SDL_sscanf
     1.7 +#undef strchr
     1.8  #define strchr  SDL_strchr
     1.9 +#undef strcmp
    1.10  #define strcmp  SDL_strcmp
    1.11 +#undef strncmp
    1.12  #define strncmp SDL_strncmp
    1.13  #undef strncpy
    1.14  #define strncpy SDL_strlcpy