From f040cc41c228c38c5811def9555493c1ad5f960b Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 24 Jun 2024 09:03:46 -0400 Subject: [PATCH] Add #define guard to allow MingW to build PDFio; note that MingW is NOT a supported toolchain for PDFio (Issue #66) --- CHANGES.md | 2 ++ pdfio-private.h | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 279c08a..1fce4fe 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,8 @@ v1.3.0 (Month DD, YYYY) - Added `pdfioFileGetCatalog` API for accessing the root/catalog object of a PDF file (Issue #67) - Updated number support to avoid locale issues (Issue #61) +- Updated the PDFio private header to allow compilation with MingW; note that + MingW is NOT a supported toolchain for PDFio (Issue #66) - Optimized string pool code. diff --git a/pdfio-private.h b/pdfio-private.h index 1a3efa2..d03b54f 100644 --- a/pdfio-private.h +++ b/pdfio-private.h @@ -38,9 +38,11 @@ # define unlink _unlink # define vsnprintf _vsnprintf # define write _write -# define F_OK 00 // POSIX parameters/flags -# define W_OK 02 -# define R_OK 04 +# ifndef F_OK +# define F_OK 00 // POSIX parameters/flags +# define W_OK 02 +# define R_OK 04 +# endif // !F_OK # define O_RDONLY _O_RDONLY // Map standard POSIX open flags # define O_WRONLY _O_WRONLY # define O_CREAT _O_CREAT