[gobject-introspection] Fix errors parsing OSX 10.9 headers



commit acdf22eeaa704e6fb155641aaa40c4ae8018290a
Author: Davide Bertola <dade dadeb it>
Date:   Thu Feb 13 10:05:37 2014 +0100

    Fix errors parsing OSX 10.9 headers
    
    Un-defining __BLOCKS__ disables blocks in system
    headers (like stdlib.h).
    This avoids errors while compiling.

 giscanner/scannermain.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 715084d..98d5687 100755
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -27,6 +27,7 @@ import shutil
 import subprocess
 import sys
 import tempfile
+import platform
 
 from giscanner import message
 from giscanner.annotationparser import GtkDocCommentBlockParser
@@ -383,6 +384,9 @@ def create_source_scanner(options, args):
     else:
         filenames = extract_filenames(args)
 
+    if platform.system() == 'Darwin':
+        options.cpp_undefines.append('__BLOCKS__')
+
     # Run the preprocessor, tokenize and construct simple
     # objects representing the raw C symbols
     ss = SourceScanner()


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