Added wchar.h to fix build on some platforms with new wcs* functions
authorSam Lantinga <slouken@libsdl.org>
Sun, 13 Aug 2017 22:26:44 -0700
changeset 112803a62ecf87af9
parent 11279 b9b53f45bec6
child 11281 42b62c737891
Added wchar.h to fix build on some platforms with new wcs* functions
CMakeLists.txt
configure
configure.in
include/SDL_config.h.cmake
include/SDL_config.h.in
include/SDL_stdinc.h
     1.1 --- a/CMakeLists.txt	Sun Aug 13 21:55:42 2017 -0700
     1.2 +++ b/CMakeLists.txt	Sun Aug 13 22:26:44 2017 -0700
     1.3 @@ -615,7 +615,7 @@
     1.4  if(LIBC)
     1.5    if(WINDOWS AND NOT MINGW)
     1.6      set(HAVE_LIBC TRUE)
     1.7 -    foreach(_HEADER stdio.h string.h ctype.h math.h)
     1.8 +    foreach(_HEADER stdio.h string.h wchar.h ctype.h math.h)
     1.9        string(TOUPPER "HAVE_${_HEADER}" _UPPER)
    1.10        string(REPLACE "." "_" _HAVE_H ${_UPPER})
    1.11        set(${_HAVE_H} 1)
    1.12 @@ -642,7 +642,7 @@
    1.13      check_include_file(sys/types.h HAVE_SYS_TYPES_H)
    1.14      foreach(_HEADER
    1.15              stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h
    1.16 -            strings.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h)
    1.17 +            strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h)
    1.18        string(TOUPPER "HAVE_${_HEADER}" _UPPER)
    1.19        string(REPLACE "." "_" _HAVE_H ${_UPPER})
    1.20        check_include_file("${_HEADER}" ${_HAVE_H})
     2.1 --- a/configure	Sun Aug 13 21:55:42 2017 -0700
     2.2 +++ b/configure	Sun Aug 13 22:26:44 2017 -0700
     2.3 @@ -16167,7 +16167,7 @@
     2.4  
     2.5  fi
     2.6  
     2.7 -    for ac_header in sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h
     2.8 +    for ac_header in sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h
     2.9  do :
    2.10    as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
    2.11  ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
     3.1 --- a/configure.in	Sun Aug 13 21:55:42 2017 -0700
     3.2 +++ b/configure.in	Sun Aug 13 22:26:44 2017 -0700
     3.3 @@ -234,7 +234,7 @@
     3.4  
     3.5      dnl Check for C library headers
     3.6      AC_HEADER_STDC
     3.7 -    AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h)
     3.8 +    AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h)
     3.9  
    3.10      dnl Check for typedefs, structures, etc.
    3.11      AC_TYPE_SIZE_T
     4.1 --- a/include/SDL_config.h.cmake	Sun Aug 13 21:55:42 2017 -0700
     4.2 +++ b/include/SDL_config.h.cmake	Sun Aug 13 22:26:44 2017 -0700
     4.3 @@ -73,6 +73,7 @@
     4.4  #cmakedefine HAVE_MEMORY_H 1
     4.5  #cmakedefine HAVE_STRING_H 1
     4.6  #cmakedefine HAVE_STRINGS_H 1
     4.7 +#cmakedefine HAVE_WCHAR_H 1
     4.8  #cmakedefine HAVE_INTTYPES_H 1
     4.9  #cmakedefine HAVE_STDINT_H 1
    4.10  #cmakedefine HAVE_CTYPE_H 1
     5.1 --- a/include/SDL_config.h.in	Sun Aug 13 21:55:42 2017 -0700
     5.2 +++ b/include/SDL_config.h.in	Sun Aug 13 22:26:44 2017 -0700
     5.3 @@ -73,6 +73,7 @@
     5.4  #undef HAVE_MEMORY_H
     5.5  #undef HAVE_STRING_H
     5.6  #undef HAVE_STRINGS_H
     5.7 +#undef HAVE_WCHAR_H
     5.8  #undef HAVE_INTTYPES_H
     5.9  #undef HAVE_STDINT_H
    5.10  #undef HAVE_CTYPE_H
     6.1 --- a/include/SDL_stdinc.h	Sun Aug 13 21:55:42 2017 -0700
     6.2 +++ b/include/SDL_stdinc.h	Sun Aug 13 22:26:44 2017 -0700
     6.3 @@ -62,6 +62,9 @@
     6.4  #ifdef HAVE_STRINGS_H
     6.5  # include <strings.h>
     6.6  #endif
     6.7 +#ifdef HAVE_WCHAR_H
     6.8 +# include <wchar.h>
     6.9 +#endif
    6.10  #if defined(HAVE_INTTYPES_H)
    6.11  # include <inttypes.h>
    6.12  #elif defined(HAVE_STDINT_H)