Re: [Libreoffice-commits] core.git: XMLSEC_NO_SIZE_T is /not/ used with MSVC

2016-03-01 Thread Stephan Bergmann

On 03/01/2016 09:47 AM, Stephan Bergmann wrote:

On 03/01/2016 03:40 AM, Ashod Nakashian wrote:

Perhaps if you shed some light on what you are addressing I might be
able to come with a solution?


What is required is that no xmlsec/* ever get included from outside of
xmlsecurity/xmlsec-wrapper.h (because the latter controls a macro that
the former #if on).  That means that no xmlsec/* may show up in a
precompiled_*.hxx.  Whether or not xmlsecurity/xmlsec-wrapper.h shows up
in a precompiled_*.hxx is irrelevant for correctness, so whichever is
easier to implement in update_pch should be fine.  (I just arbitrarily
did include it in my manual modifications of
xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx to approximate what was
there before.)


Solution got merged as  
"Exclude xmlsec headers from precompiled headers" now.  Thanks!

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: XMLSEC_NO_SIZE_T is /not/ used with MSVC

2016-03-01 Thread Stephan Bergmann

On 03/01/2016 03:40 AM, Ashod Nakashian wrote:

On 02/29/2016 05:42 PM, Ashod Nakashian wrote:

On 02/29/2016 11:44 AM, Stephan Bergmann wrote:

Ashod, can you get that fixed?  I assume that it would be a common
issue that such wrapper include files need special treatment in
update_pch (and an indicator that automatic generation of such
precompiled_*.hxx just doesn't work), but don't find anything related
in that script.

Sure.

If the diff of precompiled_xsec_xmlsec.hxx is the desired result, then
the fix is very simple. update_pch has provision to exclude any header
that we deem problematic. We only need to add 'xmlsec/*' as exclusion
and it will never get added to the pch file on subsequent runs.


Unfortunately, this doesn't work under Linux. The wrapper header is
resulting in errors when it's included (which is why I had excluded it).
I know pch is less important under Linux, but it does improve build
times there too.

So the choice is between fixing the issue you address with your patch
(which I'm not sure I understand) or maintaining pch support on Linux.
It seems both would not be possible without modifying the wrapper header.

Perhaps if you shed some light on what you are addressing I might be
able to come with a solution?


What is required is that no xmlsec/* ever get included from outside of 
xmlsecurity/xmlsec-wrapper.h (because the latter controls a macro that 
the former #if on).  That means that no xmlsec/* may show up in a 
precompiled_*.hxx.  Whether or not xmlsecurity/xmlsec-wrapper.h shows up 
in a precompiled_*.hxx is irrelevant for correctness, so whichever is 
easier to implement in update_pch should be fine.  (I just arbitrarily 
did include it in my manual modifications of 
xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx to approximate what was 
there before.)

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: XMLSEC_NO_SIZE_T is /not/ used with MSVC

2016-02-29 Thread Ashod Nakashian



On 02/29/2016 05:42 PM, Ashod Nakashian wrote:



On 02/29/2016 11:44 AM, Stephan Bergmann wrote:
Ashod, can you get that fixed?  I assume that it would be a common 
issue that such wrapper include files need special treatment in 
update_pch (and an indicator that automatic generation of such 
precompiled_*.hxx just doesn't work), but don't find anything related 
in that script.

Sure.

If the diff of precompiled_xsec_xmlsec.hxx is the desired result, then 
the fix is very simple. update_pch has provision to exclude any header 
that we deem problematic. We only need to add 'xmlsec/*' as exclusion 
and it will never get added to the pch file on subsequent runs.


Unfortunately, this doesn't work under Linux. The wrapper header is 
resulting in errors when it's included (which is why I had excluded it). 
I know pch is less important under Linux, but it does improve build 
times there too.


So the choice is between fixing the issue you address with your patch 
(which I'm not sure I understand) or maintaining pch support on Linux. 
It seems both would not be possible without modifying the wrapper header.


Perhaps if you shed some light on what you are addressing I might be 
able to come with a solution?


Thanks,
-Ash


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: XMLSEC_NO_SIZE_T is /not/ used with MSVC

2016-02-29 Thread Ashod Nakashian



On 02/29/2016 11:44 AM, Stephan Bergmann wrote:
Ashod, can you get that fixed?  I assume that it would be a common 
issue that such wrapper include files need special treatment in 
update_pch (and an indicator that automatic generation of such 
precompiled_*.hxx just doesn't work), but don't find anything related 
in that script.

Sure.

If the diff of precompiled_xsec_xmlsec.hxx is the desired result, then 
the fix is very simple. update_pch has provision to exclude any header 
that we deem problematic. We only need to add 'xmlsec/*' as exclusion 
and it will never get added to the pch file on subsequent runs.


We can also force the inclusion of any header (if required by some 
source/header). But I will not force-include 
xmlsecurity/xmlsec-wrapper.h, unless that's what you want (just let me 
know). (Although I suspect it will get added by the script in most cases 
anyway.)


I'll submit a patch of update_pch with updated pch files for xmlsecurity 
on gerrit.


Thanks.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: XMLSEC_NO_SIZE_T is /not/ used with MSVC

2016-02-29 Thread Stephan Bergmann

On 02/29/2016 05:41 PM, Stephan Bergmann wrote:

  xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx |   11 +--
  xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h|4 ++--
  2 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 68b6cbd75ee18de0ed40aae28785962714d8e3e4
Author: Stephan Bergmann 
Date:   Mon Feb 29 17:35:30 2016 +0100

 XMLSEC_NO_SIZE_T is /not/ used with MSVC

 ...where external/libxmlsec/ExternalProject_xmlsec.mk uses 
win32/configure.js
 instead of configure.  But that inconsistency generally got hidden on 
Windows by
 xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx including the raw xmlsec 
include
 files instead of xmlsecurity/xmlsec-wrapper.h, so only gets noticed when 
using
 --disable-pch (as is needed when building with clang-cl).

 TODO: Don't know how to fix bin/update_pch so that 
precompiled_xsec_xmlsec.hxx
 doesn't get broken again on the next update.


Ashod, can you get that fixed?  I assume that it would be a common issue 
that such wrapper include files need special treatment in update_pch 
(and an indicator that automatic generation of such precompiled_*.hxx 
just doesn't work), but don't find anything related in that script.



 Change-Id: If385066a1e0f949d943aab7e9a5e969fbf0d0794

diff --git a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx 
b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
index 0de79b1..acdec5a 100644
--- a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
+++ b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
@@ -115,17 +115,8 @@
  #include 
  #include 
  #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
  #include 
+#include 

  // Cleanup windows header macro pollution.
  #if defined(_WIN32) && defined(WINAPI)
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h 
b/xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h
index 14f1d38..9d20ced 100644
--- a/xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h
+++ b/xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h
@@ -24,8 +24,8 @@

  #include 

-// Cf. xmlsec's configure.in:
-#if SAL_TYPES_SIZEOFPOINTER != 4
+// Cf. xmlsec's configure.in (but which isn't used for MSVC):
+#if !defined _MSC_VER && SAL_TYPES_SIZEOFPOINTER != 4
  #define XMLSEC_NO_SIZE_T
  #endif



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice