diff options
author | Ashod Nakashian <ashodnakashian@yahoo.com> | 2015-11-18 07:49:58 -0500 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-12-04 11:26:22 +0000 |
commit | a027ed9573858f3ec6361577ff541d7f2495bd32 (patch) | |
tree | 2cb6864e2b27f22af72d3d491e40e8f21d23699a /bin/update_pch | |
parent | 9e2973dbb90b5d9ce004cbf333f5000e4d50dc18 (diff) |
Wingdi RGB macro handling improved
Improved the isolation of windows headers.
Specifically, RGB macro is better handled now.
Change-Id: I0eeea16d0de9da3455810c80b0715f7b54ae8c3f
Reviewed-on: https://gerrit.libreoffice.org/20039
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'bin/update_pch')
-rwxr-xr-x | bin/update_pch | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/bin/update_pch b/bin/update_pch index fa2294d4cd57..47c2d15a4644 100755 --- a/bin/update_pch +++ b/bin/update_pch @@ -107,7 +107,7 @@ DEFAULTS = \ 'svx.svx' : ( 3, EXCLUDE, EXCLUDE, INCLUDE), # 20.7 'svx.svxcore' : ( 7, EXCLUDE, INCLUDE, EXCLUDE), # 37.0 'sw.msword' : ( 4, EXCLUDE, INCLUDE, INCLUDE), # 22.4 - 'sw.sw' : (11, EXCLUDE, EXCLUDE, INCLUDE), # 212.3 + 'sw.sw' : ( 7, EXCLUDE, EXCLUDE, INCLUDE), # 129.6 'sw.swui' : ( 3, EXCLUDE, INCLUDE, INCLUDE), # 26.1 'sw.vbaswobj' : ( 4, EXCLUDE, INCLUDE, INCLUDE), # 13.1 'tools.tl' : ( 5, EXCLUDE, EXCLUDE, EXCLUDE), # 4.2 @@ -117,7 +117,7 @@ DEFAULTS = \ 'vbahelper.msforms' : ( 3, EXCLUDE, INCLUDE, INCLUDE), # 5.2 'vbahelper.vbahelper' : ( 3, EXCLUDE, EXCLUDE, INCLUDE), # 7.0 'vcl.vcl' : ( 6, EXCLUDE, INCLUDE, INCLUDE), # 35.7 - 'writerfilter.writerfilter' : ( 3, EXCLUDE, EXCLUDE, INCLUDE), # 15.8 + 'writerfilter.writerfilter' : ( 5, EXCLUDE, EXCLUDE, EXCLUDE), # 19.7/27.3 'xmloff.xo' : ( 7, EXCLUDE, INCLUDE, INCLUDE), # 22.1 'xmloff.xof' : ( 1, EXCLUDE, EXCLUDE, INCLUDE), # 4.4 'xmlscript.xmlscript' : ( 4, EXCLUDE, EXCLUDE, INCLUDE), # 3.6 @@ -393,10 +393,6 @@ def filter_ignore(line, module): ignore_list += [ 'tbunosearchcontrollers.hxx', # Anonymous namespace ] - if module == 'sw': - ignore_list += [ - 'com/sun/star/ucb/NameClash.hpp', # conflicts with ERROR from Windows.h - ] if module == 'vcl': ignore_list += [ 'accmgr.hxx', # redefines ImplAccelList @@ -748,8 +744,8 @@ def generate(includes, libname, filename, module): if module == 'svx' and libname == 'svx': svx_define = """ #ifdef WNT -#define UNICODE -#define _UNICODE +# define UNICODE +# define _UNICODE #endif """ f.write(svx_define) @@ -759,12 +755,14 @@ def generate(includes, libname, filename, module): for i in includes: f.write(i + '\n') - # ado needs to guard against macro polution - if module == 'connectivity' and libname == 'ado': + # Some libraries pull windows headers that aren't self contained. + if (module == 'connectivity' and libname == 'ado') or \ + (module == 'xmlsecurity' and libname == 'xsec_xmlsec'): ado_define = """ -// Prevent windows header macro pollution. -#undef OPTIONAL -#undef DELETE +// Cleanup windows header macro pollution. +#ifdef WNT +# include <postwin.h> +#endif """ f.write(ado_define) @@ -835,8 +833,7 @@ def main(): header = make_pch_filename(root, module, libname) if not os.path.exists(os.path.join(root, module)): - raise Exception('Error: module [' + str(module) + - '] not found. Not running from the root of LO repository?') + raise Exception('Error: module [{}] not found.'.format(module)) key = '{}.{}'.format(module, libname) if key in DEFAULTS: |