[pango] Bug 591511 – hh-blob.c does not compile using mingw on windows



commit b4f10583ea84d02ed0278fc2cb2846aaf075864d
Author: Behdad Esfahbod <behdad behdad org>
Date:   Thu Aug 13 05:25:23 2009 -0400

    Bug 591511 â?? hh-blob.c does not compile using mingw on windows
    
    Check for sys/mman.h, not mprotect().

 configure.in             |    2 +-
 pango/opentype/hb-blob.c |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/configure.in b/configure.in
index 7ea8648..f3f242e 100644
--- a/configure.in
+++ b/configure.in
@@ -128,7 +128,7 @@ AC_LANG_RESTORE
 #
 
 AC_PROG_CXX
-AC_CHECK_FUNCS(mprotect)
+AC_CHECK_HEADERS(unistd.h sys/mman.h)
 
 # Make sure we don't link to libstdc++ (needs de-gcc-fication)
 CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
diff --git a/pango/opentype/hb-blob.c b/pango/opentype/hb-blob.c
index 178bc8e..2abd4ca 100644
--- a/pango/opentype/hb-blob.c
+++ b/pango/opentype/hb-blob.c
@@ -28,12 +28,12 @@
 
 #include "hb-blob.h"
 
-#ifdef HAVE_MPROTECT
+#ifdef HAVE_SYS_MMAN_H
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
 #include <sys/mman.h>
-#endif /* HAVE_MPROTECT */
+#endif /* HAVE_SYS_MMAN_H */
 
 struct _hb_blob_t {
   hb_reference_count_t ref_count;
@@ -244,7 +244,7 @@ hb_blob_try_writeable_inplace (hb_blob_t *blob)
 
   hb_mutex_lock (blob->lock);
 
-#ifdef HAVE_MPROTECT
+#ifdef HAVE_SYS_MMAN_H
   if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE) {
     unsigned int pagesize, mask, length;
     const char *addr;
@@ -286,7 +286,7 @@ hb_blob_try_writeable_inplace (hb_blob_t *blob)
 	     addr, addr+length, length);
 #endif
   }
-#else /* !HAVE_MPROTECT */
+#else /* !HAVE_SYS_MMAN_H */
 #warning "No way to make readonly memory writeable.  This is suboptimal."
 #endif
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]