Skip to content

Commit

Permalink
Merge pull request #814 from tesonep/fix/issue-753
Browse files Browse the repository at this point in the history
Adding macro for win32.
  • Loading branch information
guillep authored Jun 28, 2024
2 parents 273ac6a + 268fdec commit 115f734
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/imageAccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
#include <unistd.h>
#endif

/*
* Windows does not provide this macro for testing
*
*/
#ifdef _WIN32
#ifndef _S_ISTYPE
#define _S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask))
#define S_ISREG(mode) _S_ISTYPE((mode), _S_IFREG)
#define S_ISDIR(mode) _S_ISTYPE((mode), _S_IFDIR)
#endif
#endif


/*
* The read and write function uses a 128kb chunk size.
* It is based in the analysis of how cp, cat and other tools access the disk
Expand Down

0 comments on commit 115f734

Please sign in to comment.