Skip to content

Commit

Permalink
Fixed a POSIX deprecation warning in dparser.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaveaux committed Oct 25, 2023
1 parent 95c6c0a commit 2b7dc7c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions 3rd-party/dparser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ add_definitions(
)

if(MSVC)
add_definitions(
-Dstrtoll=_strtoi64
-Dstrncasecmp=_strnicmp
)
# MSVC complains about deprecated POSIX names, so this replaces those by other deprecated functions.
add_compile_definitions(
strtoll=_strtoi64
strnicmp=_strnicmp
strncasecmp=_strnicmp
)
endif(MSVC)

if(MSVC AND MSVC_VERSION LESS 1900)
add_definitions(
-Dsnprintf=_snprintf
)
add_compile_definitions(
snprintf=_snprintf
)
endif(MSVC AND MSVC_VERSION LESS 1900)

add_executable(make_dparser
Expand Down

0 comments on commit 2b7dc7c

Please sign in to comment.