Skip to content

Commit

Permalink
Merge pull request #105 from pks-t/pks-win32-stat-compat
Browse files Browse the repository at this point in the history
clar: simplify how we handle stat(3P) on Win32
  • Loading branch information
ethomson authored Oct 3, 2024
2 parents 67e689a + 02104ca commit f065214
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions clar.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

# ifndef stat
# define stat(path, st) _stat(path, st)
typedef struct _stat STAT_T;
# else
typedef struct stat STAT_T;
# endif
# ifndef mkdir
# define mkdir(path, mode) _mkdir(path)
Expand Down Expand Up @@ -62,12 +65,6 @@
# else
# define p_snprintf snprintf
# endif

# if defined(_MSC_VER) || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
typedef struct stat STAT_T;
# else
typedef struct _stat STAT_T;
# endif
#else
# include <sys/wait.h> /* waitpid(2) */
# include <unistd.h>
Expand Down

0 comments on commit f065214

Please sign in to comment.