[Libreoffice-commits] core.git: 7 commits - config_host/config_typesizes.h.in config_host/config_udkversion.h.in config_host/.gitignore config_host.mk.in config_host/udkversion.mk.in configure.ac odk/CustomTarget_include.mk odk/Module_odk.mk sal/CustomTarget_generated.mk sal/inc sal/Module_sal.mk sal/ZipPackage_sal_generated.mk solenv/gbuild solenv/inc

Michael Stahl mstahl at redhat.com
Wed Feb 27 08:13:05 PST 2013


 config_host.mk.in                  |   10 ----
 config_host/.gitignore             |    1 
 config_host/config_typesizes.h.in  |   19 +++++++++
 config_host/config_udkversion.h.in |   14 ++++++
 config_host/udkversion.mk.in       |    6 ++
 configure.ac                       |   78 +++++++++++++++++++++----------------
 odk/CustomTarget_include.mk        |   26 ------------
 odk/Module_odk.mk                  |    4 +
 sal/CustomTarget_generated.mk      |   68 --------------------------------
 sal/Module_sal.mk                  |    1 
 sal/ZipPackage_sal_generated.mk    |   10 ++--
 sal/inc/sal/types.h                |   18 --------
 solenv/gbuild/ZipPackage.mk        |   10 ++++
 solenv/inc/settings.mk             |    2 
 solenv/inc/udkversion.mk           |   24 -----------
 15 files changed, 106 insertions(+), 185 deletions(-)

New commits:
commit 94d7c1e4a1de95be0211eaea3c8733a6205384e9
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 27 16:00:00 2013 +0100

    remove solenv/inc/udkversion.mk
    
    Change-Id: I57280e4488c89c5289c5c51e5dbc43deb82c7483

diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index 097cb7f..26af726 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -54,7 +54,7 @@ WRONG_SOURCEVERSION
 # $(UPD)minor.mk could be empty as it's contents were already included from minor.mk
 .INCLUDE : $(SOLARVERSION)/$(INPATH)/inc/$(UPD)minor.mk
 
-.INCLUDE : udkversion.mk
+.INCLUDE : $(BUILDDIR)/config_host/udkversion.mk
 
 # --- reset defined Environments --------------------
 ASM=
diff --git a/solenv/inc/udkversion.mk b/solenv/inc/udkversion.mk
deleted file mode 100644
index 76d14a9..0000000
--- a/solenv/inc/udkversion.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# 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 .
-#
-
-# major 
-UDK_MAJOR=3
-# minor 
-UDK_MINOR=2
-# micro 
-UDK_MICRO=7
commit e0beed468396d5f518b6468667775708c04da692
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 27 15:54:55 2013 +0100

    remove odk/CustomTarget_include.mk and package udkversion.mk in sal
    
    Change-Id: Iab7335bc440484a6c01700ae36d1e004f8e96be7

diff --git a/odk/CustomTarget_include.mk b/odk/CustomTarget_include.mk
deleted file mode 100644
index 8f5cd97..0000000
--- a/odk/CustomTarget_include.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/include))
-
-include $(SRCDIR)/solenv/inc/udkversion.mk
-
-odkcommon_ZIPLIST += include/udkversion.mk
-$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/include,include/udkversion.mk))
-$(odk_WORKDIR)/include/udkversion.mk:
-	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
-	cp $(BUILDDIR)/config_host/udkversion.mk $@
-
-# vim: set noet sw=4 ts=4:
diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk
index f93a6c6..be1ec1e 100644
--- a/odk/Module_odk.mk
+++ b/odk/Module_odk.mk
@@ -9,6 +9,9 @@
 
 $(eval $(call gb_Module_Module,odk))
 
+# needed in several makefiles here
+include $(BUILDDIR)/config_host/udkversion.mk
+
 $(eval $(call gb_Module_add_targets,odk,\
 	CustomTarget_odkcommon \
 	$(if $(filter WNT,$(OS)),CustomTarget_cli) \
@@ -19,7 +22,6 @@ $(eval $(call gb_Module_add_targets,odk,\
 	CustomTarget_settings \
 	CustomTarget_autodoc \
 	CustomTarget_idl \
-	CustomTarget_include \
 	Executable_unoapploader \
 	Zip_odkexamples \
 ))
diff --git a/sal/ZipPackage_sal_generated.mk b/sal/ZipPackage_sal_generated.mk
index af36a10..b52d335 100644
--- a/sal/ZipPackage_sal_generated.mk
+++ b/sal/ZipPackage_sal_generated.mk
@@ -27,6 +27,8 @@
 
 $(eval $(call gb_ZipPackage_ZipPackage,sal_generated,$(BUILDDIR)/config_host))
 
+$(eval $(call gb_ZipPackage_add_file,sal_generated,inc/udkversion.mk,include/udkversion.mk,udkversion.mk))
+
 $(eval $(call gb_ZipPackage_add_file,sal_generated,inc/sal/udkversion.h,include/sal/udkversion.h,config_udkversion.h))
 
 $(eval $(call gb_ZipPackage_add_file,sal_generated,inc/sal/typesizes.h,include/sal/typesizes.h,config_typesizes.h))
commit f413decfefcd57d487a979aaacf3583efc9eb9c5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 27 15:48:07 2013 +0100

    move generation of udkversion.mk to configure
    
    Change-Id: Id2f047686e2ba3ac2d8242d9b47abad751679759

diff --git a/config_host/.gitignore b/config_host/.gitignore
index 9becb5b..e62c650 100644
--- a/config_host/.gitignore
+++ b/config_host/.gitignore
@@ -1 +1,2 @@
 config_*.h
+udkversion.mk
diff --git a/config_host/config_udkversion.h.in b/config_host/config_udkversion.h.in
index ff974e8..00f9bb8 100644
--- a/config_host/config_udkversion.h.in
+++ b/config_host/config_udkversion.h.in
@@ -1,4 +1,4 @@
-/* 
+/*
 
    UDK version.
 
diff --git a/config_host/udkversion.mk.in b/config_host/udkversion.mk.in
new file mode 100644
index 0000000..7bd445f
--- /dev/null
+++ b/config_host/udkversion.mk.in
@@ -0,0 +1,6 @@
+# UDK version number
+
+UDK_MAJOR=@UDK_MAJOR@
+UDK_MINOR=@UDK_MINOR@
+UDK_MICRO=@UDK_MICRO@
+
diff --git a/configure.ac b/configure.ac
index 0064e83..4d41a41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4181,6 +4181,9 @@ UDK_MAJOR=3
 UDK_MINOR=2
 UDK_MICRO=7
 
+AC_SUBST(UDK_MAJOR)
+AC_SUBST(UDK_MINOR)
+AC_SUBST(UDK_MICRO)
 AC_DEFINE_UNQUOTED(SAL_UDK_MAJOR,"$UDK_MAJOR")
 AC_DEFINE_UNQUOTED(SAL_UDK_MINOR,"$UDK_MINOR")
 AC_DEFINE_UNQUOTED(SAL_UDK_MICRO,"$UDK_MICRO")
@@ -11873,7 +11876,7 @@ if test -f config_host.mk; then
     config_md5=`$MD5SUM config_host.mk | sed "s/ .*//"`
 fi
 
-AC_CONFIG_FILES([config_host.mk Makefile lo.xcent solenv/inc/minor.mk instsetoo_native/util/openoffice.lst])
+AC_CONFIG_FILES([config_host.mk Makefile lo.xcent solenv/inc/minor.mk config_host/udkversion.mk instsetoo_native/util/openoffice.lst])
 AC_CONFIG_HEADERS([config_host/config_clang.h])
 AC_CONFIG_HEADERS([config_host/config_global.h])
 AC_CONFIG_HEADERS([config_host/config_graphite.h])
diff --git a/odk/CustomTarget_include.mk b/odk/CustomTarget_include.mk
index c8a12c3..8f5cd97 100644
--- a/odk/CustomTarget_include.mk
+++ b/odk/CustomTarget_include.mk
@@ -15,12 +15,6 @@ odkcommon_ZIPLIST += include/udkversion.mk
 $(eval $(call gb_CustomTarget_register_target,odk/odkcommon/include,include/udkversion.mk))
 $(odk_WORKDIR)/include/udkversion.mk:
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
-	echo "#UDK version number" > $@
-	echo "#major" >>$@
-	echo "UDK_MAJOR=$(UDK_MAJOR)" >> $@
-	echo "#minor" >>$@
-	echo "UDK_MINOR=$(UDK_MINOR)" >> $@
-	echo "#micro" >>$@
-	echo "UDK_MICRO=$(UDK_MICRO)" >> $@
+	cp $(BUILDDIR)/config_host/udkversion.mk $@
 
 # vim: set noet sw=4 ts=4:
commit 960e2ee691f99d516fc8e4fc10f13f2d29a41a8c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 27 15:20:27 2013 +0100

    sal: get rid of CustomTarget_generated.mk
    
    Change-Id: I2347f60ef922d32201beda47e59e0b345d07a3b1

diff --git a/sal/CustomTarget_generated.mk b/sal/CustomTarget_generated.mk
deleted file mode 100644
index 8b35da7..0000000
--- a/sal/CustomTarget_generated.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
-#
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2011 Matúš Kukan <matus.kukan at gmail.com> (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_CustomTarget_CustomTarget,sal/generated))
-
-sal_DIR := $(call gb_CustomTarget_get_workdir,sal/generated)
-
-$(call gb_CustomTarget_get_target,sal/generated) : \
-	$(sal_DIR)/sal/udkversion.h \
-	$(if $(filter-out $(COM),MSC),$(sal_DIR)/sal/typesizes.h)
-
-$(sal_DIR)/sal/typesizes.h :| $(sal_DIR)/sal/.dir
-	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
-	cp $(SRCDIR)/config_host/config_typesizes.h $@
-
-$(sal_DIR)/sal/udkversion.h :| $(sal_DIR)/sal/.dir
-	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
-	cp $(SRCDIR)/config_host/config_udkversion.h $@
-
-# vim: set noet sw=4 ts=4:
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk
index b683275..b5c84b1 100644
--- a/sal/Module_sal.mk
+++ b/sal/Module_sal.mk
@@ -29,7 +29,6 @@
 $(eval $(call gb_Module_Module,sal))
 
 $(eval $(call gb_Module_add_targets,sal,\
-	CustomTarget_generated \
 	CustomTarget_sal_allheaders \
 	$(if $(filter DESKTOP,$(BUILD_TYPE)), \
 		Executable_cppunittester) \
diff --git a/sal/ZipPackage_sal_generated.mk b/sal/ZipPackage_sal_generated.mk
index 9d013e3..af36a10 100644
--- a/sal/ZipPackage_sal_generated.mk
+++ b/sal/ZipPackage_sal_generated.mk
@@ -25,10 +25,10 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
-$(eval $(call gb_ZipPackage_ZipPackage,sal_generated,$(call gb_CustomTarget_get_workdir,sal/generated)))
+$(eval $(call gb_ZipPackage_ZipPackage,sal_generated,$(BUILDDIR)/config_host))
 
-$(eval $(call gb_ZipPackage_add_files,sal_generated,inc/sal,include/sal,sal/udkversion.h))
+$(eval $(call gb_ZipPackage_add_file,sal_generated,inc/sal/udkversion.h,include/sal/udkversion.h,config_udkversion.h))
 
-$(eval $(call gb_ZipPackage_add_files,sal_generated,inc/sal,include/sal,sal/typesizes.h))
+$(eval $(call gb_ZipPackage_add_file,sal_generated,inc/sal/typesizes.h,include/sal/typesizes.h,config_typesizes.h))
 
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/ZipPackage.mk b/solenv/gbuild/ZipPackage.mk
index 79c14d5..f6daeaa 100644
--- a/solenv/gbuild/ZipPackage.mk
+++ b/solenv/gbuild/ZipPackage.mk
@@ -37,4 +37,14 @@ $(foreach file,$(4),$(call gb_Zip_add_file,$(1),$(3)/$(notdir $(file)),$(gb_Pack
 
 endef
 
+# $(1) package
+# $(2) file in package
+# $(3) file in zip
+# $(4) file source
+define gb_ZipPackage_add_file
+$(call gb_Package_add_file,$(1),$(2),$(4))
+$(call gb_Zip_add_file,$(1),$(3),$(gb_Package_SOURCEDIR_$(1))/$(4))
+
+endef
+
 # vim: set noet sw=4 ts=4:
commit fdd44e2d6ccb7db99185e76b1ed367b9cd24a090
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 27 15:06:11 2013 +0100

    move generation of sal/udkversion.h to configure
    
    Change-Id: I401dc6b3dcea933d1f186a8618e7c86ccd21430e

diff --git a/config_host/config_udkversion.h.in b/config_host/config_udkversion.h.in
new file mode 100644
index 0000000..ff974e8
--- /dev/null
+++ b/config_host/config_udkversion.h.in
@@ -0,0 +1,14 @@
+/* 
+
+   UDK version.
+
+*/
+
+#ifndef CONFIG_UDKVERSION_H
+#define CONFIG_UDKVERSION_H
+
+#undef SAL_UDK_MAJOR
+#undef SAL_UDK_MINOR
+#undef SAL_UDK_MICRO
+
+#endif
diff --git a/configure.ac b/configure.ac
index 1b5e662..0064e83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4177,6 +4177,14 @@ dnl ===================================================================
 dnl Our version is defined by the AC_INIT() at the top of this script.
 dnl ===================================================================
 
+UDK_MAJOR=3
+UDK_MINOR=2
+UDK_MICRO=7
+
+AC_DEFINE_UNQUOTED(SAL_UDK_MAJOR,"$UDK_MAJOR")
+AC_DEFINE_UNQUOTED(SAL_UDK_MINOR,"$UDK_MINOR")
+AC_DEFINE_UNQUOTED(SAL_UDK_MICRO,"$UDK_MICRO")
+
 set `echo AC_PACKAGE_VERSION | sed "s/\./ /g"`
 
 LIBO_VERSION_MAJOR=$1
@@ -11871,6 +11879,7 @@ AC_CONFIG_HEADERS([config_host/config_global.h])
 AC_CONFIG_HEADERS([config_host/config_graphite.h])
 AC_CONFIG_HEADERS([config_host/config_telepathy.h])
 AC_CONFIG_HEADERS([config_host/config_typesizes.h])
+AC_CONFIG_HEADERS([config_host/config_udkversion.h])
 AC_CONFIG_HEADERS([config_host/config_vclplug.h])
 AC_CONFIG_HEADERS([config_host/config_version.h])
 AC_OUTPUT
diff --git a/sal/CustomTarget_generated.mk b/sal/CustomTarget_generated.mk
index 1828b63..8b35da7 100644
--- a/sal/CustomTarget_generated.mk
+++ b/sal/CustomTarget_generated.mk
@@ -37,17 +37,8 @@ $(sal_DIR)/sal/typesizes.h :| $(sal_DIR)/sal/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
 	cp $(SRCDIR)/config_host/config_typesizes.h $@
 
-include $(SRCDIR)/solenv/inc/udkversion.mk
-
 $(sal_DIR)/sal/udkversion.h :| $(sal_DIR)/sal/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
-	echo '#ifndef _SAL_UDKVERSION_H_'           >  $@
-	echo '#define _SAL_UDKVERSION_H_'           >> $@
-	echo ''                                     >> $@
-	echo '#define SAL_UDK_MAJOR "$(UDK_MAJOR)"' >> $@
-	echo '#define SAL_UDK_MINOR "$(UDK_MINOR)"' >> $@
-	echo '#define SAL_UDK_MICRO "$(UDK_MICRO)"' >> $@
-	echo ''                                     >> $@
-	echo '#endif'                               >> $@
+	cp $(SRCDIR)/config_host/config_udkversion.h $@
 
 # vim: set noet sw=4 ts=4:
commit 166a79df88853847528d558ea98656ad358f4645
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 27 14:46:03 2013 +0100

    sal: use typesizes.h in MSVC build too
    
    The types.h header defined the alignments to be 1 for MSVC, while
    configure set them to 2/4/8.  It appears the alignment are only used in
    very few implementation details, so nothing should break by changing the
    values.
    
    Change-Id: I56ce85e0607159f0a4f653dd03480533b0adba07

diff --git a/sal/ZipPackage_sal_generated.mk b/sal/ZipPackage_sal_generated.mk
index dd9af97..9d013e3 100644
--- a/sal/ZipPackage_sal_generated.mk
+++ b/sal/ZipPackage_sal_generated.mk
@@ -29,8 +29,6 @@ $(eval $(call gb_ZipPackage_ZipPackage,sal_generated,$(call gb_CustomTarget_get_
 
 $(eval $(call gb_ZipPackage_add_files,sal_generated,inc/sal,include/sal,sal/udkversion.h))
 
-ifneq ($(COM),MSC)
 $(eval $(call gb_ZipPackage_add_files,sal_generated,inc/sal,include/sal,sal/typesizes.h))
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 117de03..fa72798 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -27,23 +27,7 @@
 #include <config_global.h>
 #endif
 
-#if defined UNX
-  #include <sal/typesizes.h>
-#elif defined(WNT)
-  /* FIXME: autogeneration of type sizes on Win32/Win64? */
-  #define SAL_TYPES_ALIGNMENT2      1
-  #define SAL_TYPES_ALIGNMENT4      1
-  #define SAL_TYPES_ALIGNMENT8      1
-  #define SAL_TYPES_SIZEOFSHORT     2
-  #define SAL_TYPES_SIZEOFINT       4
-  #define SAL_TYPES_SIZEOFLONG      4
-  #define SAL_TYPES_SIZEOFLONGLONG  8
-  #ifdef _WIN64
-    #define SAL_TYPES_SIZEOFPOINTER 8
-  #else
-    #define SAL_TYPES_SIZEOFPOINTER 4
-  #endif
-#endif
+#include <sal/typesizes.h>
 
 #ifdef __cplusplus
 extern "C" {
commit 8b8cd431c5c3ee03974299337ecdd25e0593210a
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 27 14:41:59 2013 +0100

    move generation of sal/typesizes.h to configure
    
    Change-Id: I22d28044bde624b7cfd8537c5c1e2906cb5303fc

diff --git a/config_host.mk.in b/config_host.mk.in
index 5c48021..32aaea7 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -14,10 +14,6 @@ export BUILDDIR=@BUILDDIR@
 
 export ABOUT_BACKGROUND_SVG=@ABOUT_BACKGROUND_SVG@
 @x_AFLAGS@ export AFLAGS=@AFLAGS@
-export ALIGNOF_DOUBLE=@ALIGNOF_DOUBLE@
-export ALIGNOF_INT=@ALIGNOF_INT@
-export ALIGNOF_LONG=@ALIGNOF_LONG@
-export ALIGNOF_SHORT=@ALIGNOF_SHORT@
 export ALLOC=@ALLOC@
 export ALL_LANGS=@ALL_LANGS@
 export ANCIENT_BISON=@ANCIENT_BISON@
@@ -491,12 +487,6 @@ export SAL_ENABLE_FILE_LOCKING=1
 export SCPDEFS=@SCPDEFS@
 export SERVLETAPI_JAR=@SERVLETAPI_JAR@
 export SHOWINCLUDES_PREFIX=@SHOWINCLUDES_PREFIX@
-export SIZEOF_DOUBLE=@SIZEOF_DOUBLE@
-export SIZEOF_INT=@SIZEOF_INT@
-export SIZEOF_LONG=@SIZEOF_LONG@
-export SIZEOF_LONGLONG=@SIZEOF_LONGLONG@
-export SIZEOF_POINTER=@SIZEOF_POINTER@
-export SIZEOF_SHORT=@SIZEOF_SHORT@
 export SOLARENV=@SRC_ROOT@/solenv
 export SOLARINC=@SOLARINC@
 export SOLARINC_FOR_BUILD=@SOLARINC_FOR_BUILD@
diff --git a/config_host/config_typesizes.h.in b/config_host/config_typesizes.h.in
new file mode 100644
index 0000000..cc0fcf8
--- /dev/null
+++ b/config_host/config_typesizes.h.in
@@ -0,0 +1,19 @@
+/*
+
+   Alignments and sizes of types.
+
+*/
+
+#ifndef CONFIG_TYPESIZES_H
+#define CONFIG_TYPESIZES_H
+
+#undef SAL_TYPES_ALIGNMENT2
+#undef SAL_TYPES_ALIGNMENT4
+#undef SAL_TYPES_ALIGNMENT8
+#undef SAL_TYPES_SIZEOFSHORT
+#undef SAL_TYPES_SIZEOFINT
+#undef SAL_TYPES_SIZEOFLONG
+#undef SAL_TYPES_SIZEOFLONGLONG
+#undef SAL_TYPES_SIZEOFPOINTER
+
+#endif
diff --git a/configure.ac b/configure.ac
index d58bea7..1b5e662 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5097,12 +5097,11 @@ if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
     AC_CHECK_SIZEOF(double)
     AC_CHECK_SIZEOF(void*)
 
-    SIZEOF_SHORT=$ac_cv_sizeof_short
-    SIZEOF_INT=$ac_cv_sizeof_int
-    SIZEOF_LONG=$ac_cv_sizeof_long
-    SIZEOF_LONGLONG=$ac_cv_sizeof_long_long
-    SIZEOF_DOUBLE=$ac_cv_sizeof_double
-    SIZEOF_POINTER=$ac_cv_sizeof_voidp
+    SAL_TYPES_SIZEOFSHORT=$ac_cv_sizeof_short
+    SAL_TYPES_SIZEOFINT=$ac_cv_sizeof_int
+    SAL_TYPES_SIZEOFLONG=$ac_cv_sizeof_long
+    SAL_TYPES_SIZEOFLONGLONG=$ac_cv_sizeof_long_long
+    SAL_TYPES_SIZEOFPOINTER=$ac_cv_sizeof_voidp
 
     dnl Allow build without AC_CHECK_ALIGNOF, grrr
     m4_pattern_allow([AC_CHECK_ALIGNOF])
@@ -5144,10 +5143,15 @@ if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
             esac
         ])
 
-    ALIGNOF_SHORT=$ac_cv_alignof_short
-    ALIGNOF_INT=$ac_cv_alignof_int
-    ALIGNOF_LONG=$ac_cv_alignof_long
-    ALIGNOF_DOUBLE=$ac_cv_alignof_double
+    SAL_TYPES_ALIGNMENT2=$ac_cv_alignof_short
+    SAL_TYPES_ALIGNMENT4=$ac_cv_alignof_int
+    if test $ac_cv_alignof_long -eq 8; then
+        SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_long
+    elif test $ac_cv_alignof_double -eq 8; then
+        SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_double
+    else
+        AC_MSG_ERROR([Cannot find alignment of 8 byte types.])
+    fi
 
     AC_C_BIGENDIAN
     WORDS_BIGENDIAN=$ac_cv_c_bigendian
@@ -5162,35 +5166,32 @@ if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
     fi
 else
     # Hardcode for MSVC
-    SIZEOF_SHORT=2
-    SIZEOF_INT=4
-    SIZEOF_LONG=4
-    SIZEOF_LONGLONG=8
+    SAL_TYPES_SIZEOFSHORT=2
+    SAL_TYPES_SIZEOFINT=4
+    SAL_TYPES_SIZEOFLONG=4
+    SAL_TYPES_SIZEOFLONGLONG=8
     if test "$BITNESS_OVERRIDE" = ""; then
-        SIZEOF_POINTER=4
+        SAL_TYPES_SIZEOFPOINTER=4
     else
-        SIZEOF_POINTER=8
+        SAL_TYPES_SIZEOFPOINTER=8
     fi
-    ALIGNOF_SHORT=2
-    ALIGNOF_INT=4
-    ALIGNOF_LONG=4
-    ALIGNOF_DOUBLE=8
+    SAL_TYPES_ALIGNMENT2=2
+    SAL_TYPES_ALIGNMENT4=4
+    SAL_TYPES_ALIGNMENT8=8
     WORDS_BIGENDIAN=no
     LFS_CFLAGS=''
 fi
 AC_SUBST(WORDS_BIGENDIAN)
 AC_SUBST(LFS_CFLAGS)
 
-AC_SUBST(SIZEOF_SHORT)
-AC_SUBST(SIZEOF_INT)
-AC_SUBST(SIZEOF_LONG)
-AC_SUBST(SIZEOF_LONGLONG)
-AC_SUBST(SIZEOF_DOUBLE)
-AC_SUBST(SIZEOF_POINTER)
-AC_SUBST(ALIGNOF_SHORT)
-AC_SUBST(ALIGNOF_INT)
-AC_SUBST(ALIGNOF_LONG)
-AC_SUBST(ALIGNOF_DOUBLE)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFSHORT,$SAL_TYPES_SIZEOFSHORT)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFINT,$SAL_TYPES_SIZEOFINT)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONG,$SAL_TYPES_SIZEOFLONG)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONGLONG,$SAL_TYPES_SIZEOFLONGLONG)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFPOINTER,$SAL_TYPES_SIZEOFPOINTER)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT2,$SAL_TYPES_ALIGNMENT2)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT4,$SAL_TYPES_ALIGNMENT4)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT8,$SAL_TYPES_ALIGNMENT8)
 
 dnl ===================================================================
 dnl Check if valgrind headers are available
@@ -9985,7 +9986,7 @@ AC_SUBST(RHINO_JAR)
 supports_multilib=
 case "$host_cpu" in
 x86_64 | powerpc64 | s390x)
-    if test "$SIZEOF_LONG" = "8"; then
+    if test "$SAL_TYPES_SIZEOFLONG" = "8"; then
         supports_multilib="yes"
     fi
     ;;
@@ -11869,6 +11870,7 @@ AC_CONFIG_HEADERS([config_host/config_clang.h])
 AC_CONFIG_HEADERS([config_host/config_global.h])
 AC_CONFIG_HEADERS([config_host/config_graphite.h])
 AC_CONFIG_HEADERS([config_host/config_telepathy.h])
+AC_CONFIG_HEADERS([config_host/config_typesizes.h])
 AC_CONFIG_HEADERS([config_host/config_vclplug.h])
 AC_CONFIG_HEADERS([config_host/config_version.h])
 AC_OUTPUT
diff --git a/sal/CustomTarget_generated.mk b/sal/CustomTarget_generated.mk
index f5c07c3..1828b63 100644
--- a/sal/CustomTarget_generated.mk
+++ b/sal/CustomTarget_generated.mk
@@ -35,22 +35,7 @@ $(call gb_CustomTarget_get_target,sal/generated) : \
 
 $(sal_DIR)/sal/typesizes.h :| $(sal_DIR)/sal/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
-	echo '/* This file is autogenerated from configure script data */' > $@
-	echo >> $@
-	echo "#define SAL_TYPES_ALIGNMENT2	$(ALIGNOF_SHORT)" >> $@
-	echo "#define SAL_TYPES_ALIGNMENT4	$(ALIGNOF_INT)" >> $@
-ifeq ($(SIZEOF_LONG),8)
-	echo "#define SAL_TYPES_ALIGNMENT8	$(ALIGNOF_LONG)" >> $@
-else ifeq ($(SIZEOF_DOUBLE),8)
-	echo "#define SAL_TYPES_ALIGNMENT8	$(ALIGNOF_DOUBLE)" >> $@
-else
-	echo "#error alignment of some 8-byte type unknown" >> $@
-endif
-	echo "#define SAL_TYPES_SIZEOFSHORT	$(SIZEOF_SHORT)" >> $@
-	echo "#define SAL_TYPES_SIZEOFINT	$(SIZEOF_INT)" >> $@
-	echo "#define SAL_TYPES_SIZEOFLONG	$(SIZEOF_LONG)" >> $@
-	echo "#define SAL_TYPES_SIZEOFLONGLONG	$(SIZEOF_LONGLONG)" >> $@
-	echo "#define SAL_TYPES_SIZEOFPOINTER	$(SIZEOF_POINTER)" >> $@
+	cp $(SRCDIR)/config_host/config_typesizes.h $@
 
 include $(SRCDIR)/solenv/inc/udkversion.mk
 


More information about the Libreoffice-commits mailing list