Skip to content

Commit

Permalink
[emscripten] Use long instead of int for ssize_t (#880)
Browse files Browse the repository at this point in the history
This was recently changed in emscripten. It seems that ssize_t can be used directly now, so defining it is only necessary for MSVC.
  • Loading branch information
binji authored Jul 25, 2018
1 parent 847d112 commit fc02537
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,9 @@ if (WIN32)
check_symbol_exists(ENABLE_VIRTUAL_TERMINAL_PROCESSING "windows.h" HAVE_WIN32_VT100)
endif ()

if (EMSCRIPTEN)
set(SIZEOF_SSIZE_T 4)
set(SIZEOF_SIZE_T 4)
else ()
include(CheckTypeSize)
check_type_size(ssize_t SSIZE_T)
check_type_size(size_t SIZEOF_SIZE_T)
endif ()
include(CheckTypeSize)
check_type_size(ssize_t SSIZE_T)
check_type_size(size_t SIZEOF_SIZE_T)

configure_file(
${WABT_SOURCE_DIR}/src/config.h.in
Expand Down
2 changes: 1 addition & 1 deletion src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ int wabt_vsnprintf(char* str, size_t size, const char* format, va_list ap);
#endif

#if !HAVE_SSIZE_T
typedef int ssize_t;
typedef long ssize_t;
#endif

#if !HAVE_STRCASECMP
Expand Down

0 comments on commit fc02537

Please sign in to comment.