mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2026-02-16 06:49:29 +01:00
Fix Windows builds (Issue #18)
This commit is contained in:
@@ -1885,7 +1885,7 @@ pdfioFileCreateFontObjFromFile(
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0)
|
||||
if ((fd = open(filename, O_RDONLY | O_BINARY, 0)) < 0)
|
||||
{
|
||||
_pdfioFileError(pdf, "Unable to open font file '%s': %s", filename, strerror(errno));
|
||||
return (NULL);
|
||||
@@ -2021,7 +2021,7 @@ pdfioFileCreateICCObjFromFile(
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0)
|
||||
if ((fd = open(filename, O_RDONLY | O_BINARY, 0)) < 0)
|
||||
{
|
||||
_pdfioFileError(pdf, "Unable to open ICC profile '%s': %s", filename, strerror(errno));
|
||||
return (NULL);
|
||||
@@ -2180,7 +2180,7 @@ pdfioFileCreateImageObjFromFile(
|
||||
return (NULL);
|
||||
|
||||
// Try opening the file...
|
||||
if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0)
|
||||
if ((fd = open(filename, O_RDONLY | O_BINARY, 0)) < 0)
|
||||
{
|
||||
_pdfioFileError(pdf, "Unable to open image file '%s': %s", filename, strerror(errno));
|
||||
return (NULL);
|
||||
|
||||
@@ -1166,7 +1166,7 @@ pdfioFileOpen(
|
||||
pdf->permissions = PDFIO_PERMISSION_ALL;
|
||||
|
||||
// Open the file...
|
||||
if ((pdf->fd = open(filename, O_RDONLY | O_BINARY)) < 0)
|
||||
if ((pdf->fd = open(filename, O_RDONLY | O_BINARY, 0)) < 0)
|
||||
{
|
||||
_pdfioFileError(pdf, "Unable to open file - %s", strerror(errno));
|
||||
free(pdf->filename);
|
||||
|
||||
Reference in New Issue
Block a user