summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-03-24 10:47:54 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-25 08:52:55 +0100
commitec52e5e5a204862905b555cdc1f7393aede1f7d8 (patch)
tree199c6c7e91bd530fd582260d25aca599c09c97d8 /xmlsecurity
parent3b006a10b77db62274af2945a2a94df1efa7ab62 (diff)
Consolidate XMLSEC_NO_SIZE_T setting in xmlsecurity/xmlsec-wrapper.h
...so all xmlsec/*.h includes are bundled there now (except, for pragmatic reasons, the xmlsec/mscrypto/*.h ones that unconditionally include windows.h and only work on Windows). Change-Id: I33e642f4f6a2e40edd6950af7f209c8b76c6e5fe
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h46
-rw-r--r--xmlsecurity/source/xmlsec/biginteger.cxx8
-rw-r--r--xmlsecurity/source/xmlsec/errorcallback.cxx8
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx9
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx2
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx5
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx11
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx7
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx10
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx9
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx9
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.cxx7
15 files changed, 61 insertions, 80 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h b/xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h
new file mode 100644
index 000000000000..3289ccdb7938
--- /dev/null
+++ b/xmlsecurity/inc/xmlsecurity/xmlsec-wrapper.h
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_XMLSECURITY_XMLSEC_WRAPPER_H
+#define INCLUDED_XMLSECURITY_XMLSEC_WRAPPER_H
+
+#include "sal/config.h"
+
+#include "sal/types.h"
+
+// Cf. xmlsec's configure.in:
+#if SAL_TYPES_SIZEOFPOINTER != 4
+#define XMLSEC_NO_SIZE_T
+#endif
+
+#include "xmlsec/base64.h"
+#include "xmlsec/bn.h"
+#include "xmlsec/crypto.h"
+#include "xmlsec/errors.h"
+#include "xmlsec/io.h"
+#include "xmlsec/keysmngr.h"
+#include "xmlsec/strings.h"
+#include "xmlsec/xmldsig.h"
+#include "xmlsec/xmlenc.h"
+#include "xmlsec/xmlsec.h"
+#include "xmlsec/xmltree.h"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/biginteger.cxx b/xmlsecurity/source/xmlsec/biginteger.cxx
index 20ea493a9b0a..652e130f845d 100644
--- a/xmlsecurity/source/xmlsec/biginteger.cxx
+++ b/xmlsecurity/source/xmlsec/biginteger.cxx
@@ -20,13 +20,7 @@
#include <xmlsecurity/biginteger.hxx>
-#include <sal/types.h>
-//For reasons that escape me, this is what xmlsec does when size_t is not 4
-#if SAL_TYPES_SIZEOFPOINTER != 4
-# define XMLSEC_NO_SIZE_T
-#endif
-#include <xmlsec/xmlsec.h>
-#include <xmlsec/bn.h>
+#include "xmlsecurity/xmlsec-wrapper.h"
#include <com/sun/star/uno/Sequence.hxx>
using namespace ::com::sun::star::uno ;
diff --git a/xmlsecurity/source/xmlsec/errorcallback.cxx b/xmlsecurity/source/xmlsec/errorcallback.cxx
index ec8436faa113..b2dcf6a6df12 100644
--- a/xmlsecurity/source/xmlsec/errorcallback.cxx
+++ b/xmlsecurity/source/xmlsec/errorcallback.cxx
@@ -23,13 +23,7 @@
*/
#include "errorcallback.hxx"
-#include <sal/types.h>
-//For reasons that escape me, this is what xmlsec does when size_t is not 4
-#if SAL_TYPES_SIZEOFPOINTER != 4
-# define XMLSEC_NO_SIZE_T
-#endif
-#include "xmlsec/xmlsec.h"
-#include "xmlsec/errors.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
using namespace ::com::sun::star::xml::crypto;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 1420b025d885..c1b2194efc4d 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -35,16 +35,11 @@
#include "x509certificate_mscryptimpl.hxx"
#include <comphelper/servicehelper.hxx>
-#include <xmlsec/xmlsec.h>
-#include <xmlsec/keysmngr.h>
-#include <xmlsec/crypto.h>
-#include <xmlsec/base64.h>
+#include "xmlsecurity/xmlsec-wrapper.h"
+#include "xmlsec/mscrypto/akmngr.h"
#include <xmlsecurity/biginteger.hxx>
-#include "xmlsec/keysmngr.h"
-#include "xmlsec/mscrypto/akmngr.h"
-
#include <rtl/locale.h>
#include <osl/nlsupport.h>
#include <osl/process.h>
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
index bc2ab88e5453..e721b36c176b 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
@@ -46,7 +46,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <list>
-#include "xmlsec/xmlsec.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
#include "sal/types.h"
diff --git a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
index 5dc73528fc8e..9f69255fe98f 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
@@ -22,7 +22,7 @@
#include "securityenvironment_mscryptimpl.hxx"
-#include "xmlsec/strings.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
#include "xmlsec/mscrypto/app.h"
namespace cssu = com::sun::star::uno;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
index 7757f162f637..2addf5505c63 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
@@ -29,10 +29,7 @@
#include "securityenvironment_mscryptimpl.hxx"
#include "errorcallback.hxx"
-#include "xmlsec/xmlsec.h"
-#include "xmlsec/xmltree.h"
-#include "xmlsec/xmlenc.h"
-#include "xmlsec/crypto.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
#ifdef UNX
#define stricmp strcasecmp
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
index 02f02c07207a..1aa241ad9a1a 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
@@ -23,9 +23,7 @@
#include "xmlsecuritycontext_mscryptimpl.hxx"
#include "xmlstreamio.hxx"
-#include "xmlsec/xmlsec.h"
-#include "xmlsec/keysmngr.h"
-#include "xmlsec/crypto.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
#include "xmlsec/mscrypto/akmngr.h"
using namespace ::com::sun::star::uno ;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index d18ee4e9a347..73a17612ea7d 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -27,9 +27,7 @@
#include "securityenvironment_mscryptimpl.hxx"
#include "xmlstreamio.hxx"
#include "errorcallback.hxx"
-#include "xmlsec/xmlsec.h"
-#include "xmlsec/xmldsig.h"
-#include "xmlsec/crypto.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ;
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index f3eacea08c16..8201fadbd0c5 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -29,16 +29,7 @@
#include <comphelper/servicehelper.hxx>
#include "../diagnose.hxx"
-#include <sal/types.h>
-//For reasons that escape me, this is what xmlsec does when size_t is not 4
-#if SAL_TYPES_SIZEOFPOINTER != 4
-# define XMLSEC_NO_SIZE_T
-#endif
-#include <xmlsec/xmlsec.h>
-#include <xmlsec/keysmngr.h>
-#include <xmlsec/crypto.h>
-#include <xmlsec/base64.h>
-#include <xmlsec/strings.h>
+#include "xmlsecurity/xmlsec-wrapper.h"
#include <rtl/ustrbuf.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
index 75fa7fc4292a..c8c0be10b4eb 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
@@ -44,12 +44,7 @@
#include "certdb.h"
#include "list"
-#include <sal/types.h>
-//For reasons that escape me, this is what xmlsec does when size_t is not 4
-#if SAL_TYPES_SIZEOFPOINTER != 4
-# define XMLSEC_NO_SIZE_T
-#endif
-#include "xmlsec/xmlsec.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
class SecurityEnvironment_NssImpl : public ::cppu::WeakImplHelper4<
::com::sun::star::xml::crypto::XSecurityEnvironment ,
diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
index 85dfb93190cf..6e04c9decc31 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
@@ -28,15 +28,7 @@
#include "securityenvironment_nssimpl.hxx"
#include "errorcallback.hxx"
-#include <sal/types.h>
-//For reasons that escape me, this is what xmlsec does when size_t is not 4
-#if SAL_TYPES_SIZEOFPOINTER != 4
-# define XMLSEC_NO_SIZE_T
-#endif
-#include "xmlsec/xmlsec.h"
-#include "xmlsec/xmltree.h"
-#include "xmlsec/xmlenc.h"
-#include "xmlsec/crypto.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ;
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index 60fe6b0289e8..a53955db733e 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -24,14 +24,7 @@
#include "xmlsecuritycontext_nssimpl.hxx"
#include "xmlstreamio.hxx"
-#include <sal/types.h>
-//For reasons that escape me, this is what xmlsec does when size_t is not 4
-#if SAL_TYPES_SIZEOFPOINTER != 4
-# define XMLSEC_NO_SIZE_T
-#endif
-#include "xmlsec/xmlsec.h"
-#include "xmlsec/keysmngr.h"
-#include "xmlsec/crypto.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ;
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 32e7548af46d..97fdb27454c5 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -31,14 +31,7 @@
#include "xmlstreamio.hxx"
#include "errorcallback.hxx"
-#include <sal/types.h>
-//For reasons that escape me, this is what xmlsec does when size_t is not 4
-#if SAL_TYPES_SIZEOFPOINTER != 4
-# define XMLSEC_NO_SIZE_T
-#endif
-#include "xmlsec/xmlsec.h"
-#include "xmlsec/xmldsig.h"
-#include "xmlsec/crypto.h"
+#include "xmlsecurity/xmlsec-wrapper.h"
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ;
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index 08237c40f31c..43a8d6ace97f 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -26,12 +26,7 @@
#include "rtl/uri.hxx"
#include <libxml/uri.h>
-#include <sal/types.h>
-//For reasons that escape me, this is what xmlsec does when size_t is not 4
-#if SAL_TYPES_SIZEOFPOINTER != 4
-# define XMLSEC_NO_SIZE_T
-#endif
-#include <xmlsec/io.h>
+#include "xmlsecurity/xmlsec-wrapper.h"
#define XMLSTREAMIO_INITIALIZED 0x01
#define XMLSTREAMIO_REGISTERED 0x02