summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorDavide Bertola <dade@dadeb.it>2014-02-13 10:05:37 +0100
committerDavide Bertola <dade@dadeb.it>2014-02-13 15:52:08 +0100
commitacdf22eeaa704e6fb155641aaa40c4ae8018290a (patch)
treeade9513e2c611ed93aee571efbce5485dcc9a603 /giscanner
parentaa14e97260f1b9e0750d2972f25ff124dde6617a (diff)
downloadgobject-introspection-acdf22eeaa704e6fb155641aaa40c4ae8018290a.tar.gz
Fix errors parsing OSX 10.9 headers
Un-defining __BLOCKS__ disables blocks in system headers (like stdlib.h). This avoids errors while compiling.
Diffstat (limited to 'giscanner')
-rwxr-xr-xgiscanner/scannermain.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 715084d4..98d56878 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()