Hopefully fix Windows build issues.

This commit is contained in:
Michael R Sweet 2025-04-18 17:07:53 -04:00
parent b278e33aac
commit 1393cd6c04
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244
3 changed files with 4 additions and 3 deletions

View File

@ -10,7 +10,7 @@
#ifndef PDFIO_PRIVATE_H #ifndef PDFIO_PRIVATE_H
# define PDFIO_PRIVATE_H # define PDFIO_PRIVATE_H
# ifdef _WIN32 # ifdef _WIN32
# define _CRT_SECURE_NO_WARNINGS // Disable bogus VS warnings/errors... # define _CRT_SECURE_NO_WARNINGS 1 // Disable bogus VS warnings/errors...
# endif // _WIN32 # endif // _WIN32
# include "pdfio.h" # include "pdfio.h"
# include <stdarg.h> # include <stdarg.h>

1
test.h
View File

@ -33,6 +33,7 @@
# include <stdbool.h> # include <stdbool.h>
# include <string.h> # include <string.h>
# if _WIN32 # if _WIN32
# include <io.h>
# define isatty(f) _isatty(f) # define isatty(f) _isatty(f)
# else # else
# include <unistd.h> # include <unistd.h>

View File

@ -1,7 +1,7 @@
// //
// Test program for PDFio. // Test program for PDFio.
// //
// Copyright © 2021-2024 by Michael R Sweet. // Copyright © 2021-2025 by Michael R Sweet.
// //
// Licensed under Apache License v2.0. See the file "LICENSE" for more // Licensed under Apache License v2.0. See the file "LICENSE" for more
// information. // information.
@ -13,9 +13,9 @@
// ./testpdfio [--verbose] FILENAME [OBJECT-NUMBER] [FILENAME [OBJECT-NUMBER]] ... // ./testpdfio [--verbose] FILENAME [OBJECT-NUMBER] [FILENAME [OBJECT-NUMBER]] ...
// //
#include "test.h"
#include "pdfio-private.h" #include "pdfio-private.h"
#include "pdfio-content.h" #include "pdfio-content.h"
#include "test.h"
#include <math.h> #include <math.h>
#include <locale.h> #include <locale.h>
#ifndef M_PI #ifndef M_PI