Skip to content

Commit

Permalink
Fix Build for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhandte committed Mar 9, 2021
1 parent 3dd0e9d commit b924955
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@

#define FNSPACE 30

#if !defined(_WIN32)
/* Default file permissions 0666 (modulated by umask) */
#define DEFAULT_FILE_PERMISSIONS (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#else
#define DEFAULT_FILE_PERMISSIONS (0)
#endif

/*-*************************************
* Macros
Expand Down
1 change: 1 addition & 0 deletions programs/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern "C" {
****************************************/
#if defined(_MSC_VER)
# define _CRT_SECURE_NO_WARNINGS /* Disable Visual Studio warning messages for fopen, strncpy, strerror */
# define _CRT_NONSTDC_NO_WARNINGS /* Disable C4996 complaining about posix function names */
# if (_MSC_VER <= 1800) /* 1800 == Visual Studio 2013 */
# define _CRT_SECURE_NO_DEPRECATE /* VS2005 - must be declared before <io.h> and <windows.h> */
# define snprintf sprintf_s /* snprintf unsupported by Visual <= 2013 */
Expand Down

0 comments on commit b924955

Please sign in to comment.