[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master a156040: [builds/unix, builds/vms] Standardize `mmap`
From: |
Werner Lemberg |
Subject: |
[freetype2] master a156040: [builds/unix, builds/vms] Standardize `mmap` failure. |
Date: |
Tue, 5 Oct 2021 14:24:06 -0400 (EDT) |
branch: master
commit a15604060010069bd16268306c0c1a1be144b771
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/unix, builds/vms] Standardize `mmap` failure.
* builds/unix/ftsystem.c (FT_Stream_Open): Check for MAP_FAILED.
* builds/vms/ftsystem.c (FT_Stream_Open): Ditto.
This should cover https://savannah.nongnu.org/patch/?5909 as well.
---
builds/unix/ftsystem.c | 3 +--
builds/vms/ftsystem.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c
index 7fc9941..81ed928 100644
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -313,8 +313,7 @@
file,
0 );
- /* on some RTOS, mmap might return 0 */
- if ( (long)stream->base != -1 && stream->base != NULL )
+ if ( stream->base != MAP_FAILED )
stream->close = ft_close_stream_by_munmap;
else
{
diff --git a/builds/vms/ftsystem.c b/builds/vms/ftsystem.c
index 7e56873..31b0870 100644
--- a/builds/vms/ftsystem.c
+++ b/builds/vms/ftsystem.c
@@ -246,7 +246,7 @@
file,
0 );
- if ( (long)stream->base == -1 )
+ if ( stream->base == MAP_FAILED )
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master a156040: [builds/unix, builds/vms] Standardize `mmap` failure.,
Werner Lemberg <=