diff options
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r-- | lldb/scripts/Python/prepare_binding_Python.py | 4 | ||||
-rw-r--r-- | lldb/scripts/Python/python-typemaps.swig | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lldb/scripts/Python/prepare_binding_Python.py b/lldb/scripts/Python/prepare_binding_Python.py index 1996841baf1..28fc3e5bc7f 100644 --- a/lldb/scripts/Python/prepare_binding_Python.py +++ b/lldb/scripts/Python/prepare_binding_Python.py @@ -16,7 +16,7 @@ import re import shutil import subprocess import sys - +import platform class SwigSettings(object): """Provides a single object to represent swig files and settings.""" @@ -205,6 +205,8 @@ def do_swig_rebuild(options, dependency_file, config_build_dir, settings): "-I\"%s\"" % os.path.normcase("./."), "-D__STDC_LIMIT_MACROS", "-D__STDC_CONSTANT_MACROS"] + if options.target_platform == "Darwin": + command.append("-D__APPLE__") if options.generate_dependency_file: command.append("-MMD -MF \"%s\"" % temp_dep_file_path) command.extend([ diff --git a/lldb/scripts/Python/python-typemaps.swig b/lldb/scripts/Python/python-typemaps.swig index 82e33e1bc60..1b2afc2c7a6 100644 --- a/lldb/scripts/Python/python-typemaps.swig +++ b/lldb/scripts/Python/python-typemaps.swig @@ -534,7 +534,7 @@ %typemap(out) FILE * { char mode[4] = {0}; -#ifdef __MACOSX__ +#ifdef __APPLE__ int i = 0; short flags = $1->_flags; |