Skip to content

Commit

Permalink
VS build: fix warning C4996: The POSIX name for this item is deprecat…
Browse files Browse the repository at this point in the history
…ed. Instead, use the ISO C and C++ conformant name.
  • Loading branch information
zdenop committed Nov 8, 2018
1 parent cdfb768 commit eb104f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ccstruct/pdblock.cpp
Expand Up @@ -201,7 +201,7 @@ void PDBLK::plot( //draw outline
#if !defined(_WIN32) || defined(__MINGW32__)
snprintf(temp_buff, sizeof(temp_buff), "%" PRId32, serial);
#else
ultoa (serial, temp_buff, 10);
_ultoa(serial, temp_buff, 10);
#endif
window->Text(startpt.x (), startpt.y (), temp_buff);

Expand Down
2 changes: 1 addition & 1 deletion src/ccstruct/polyblk.cpp
Expand Up @@ -253,7 +253,7 @@ void POLY_BLOCK::plot(ScrollView* window, int32_t num) {
#if !defined(_WIN32) || defined(__MINGW32__)
snprintf(temp_buff, sizeof(temp_buff), "%" PRId32, num);
#else
ltoa (num, temp_buff, 10);
_ltoa(num, temp_buff, 10);
#endif
window->Text(v.data ()->x (), v.data ()->y (), temp_buff);
}
Expand Down
6 changes: 5 additions & 1 deletion src/ccutil/fileio.cpp
Expand Up @@ -86,7 +86,11 @@ std::string File::JoinPath(const std::string& prefix, const std::string& suffix)
}

bool File::Delete(const char* pathname) {
const int status = unlink(pathname);
#if !defined(_WIN32) || defined(__MINGW32__)
const int status = unlink(pathname)
#else
const int status = _unlink(pathname);
#endif
if (status != 0) {
tprintf("ERROR: Unable to delete file %s\n", pathname);
return false;
Expand Down

0 comments on commit eb104f9

Please sign in to comment.