[Libreoffice-commits] core.git: 2 commits - external/libgltf unotools/source
Tor Lillqvist
tml at collabora.com
Tue May 6 08:57:05 PDT 2014
external/libgltf/UnpackedTarball_libgltf.mk | 1 +
external/libgltf/patches/extern-C.patch | 10 ++++++++++
unotools/source/ucbhelper/tempfile.cxx | 12 ++++++------
3 files changed, 17 insertions(+), 6 deletions(-)
New commits:
commit 8c51ef52e26766949a4eae57b8e3054f242da7f6
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue May 6 18:44:03 2014 +0300
Don't use extern "C" for a function which return C++ types
Fix error: 'gltf_get_model_center_pos' has C-linkage specified, but returns
user-defined type 'glm::vec3' (aka 'tvec3<mediump_float>') which is
incompatible with C.
I don't really understand the reason for the extern "C" use in
libgltf.h. After all, the header clearly is intended to be included from C++
code (after all, the use of 'extern "C"' is unconditional and it is not valid
in C), and the implementation of the functions is in C++. Also, we build
libgltf as a static library, so it can't be the case that we would need to
look up its symbols dynamically (when unmangled names would be better). But
maybe I am missing something.
Change-Id: I19f025610301f8c535178a83f4ab2e58455bad57
diff --git a/external/libgltf/UnpackedTarball_libgltf.mk b/external/libgltf/UnpackedTarball_libgltf.mk
index 7b4c519..bd2ee0b 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/get_bitmap_new_syntax.patch \
external/libgltf/patches/remove_extra_include.patch \
external/libgltf/patches/fmod_error_handling.patch \
+ external/libgltf/patches/extern-C.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/patches/extern-C.patch b/external/libgltf/patches/extern-C.patch
new file mode 100644
index 0000000..fd34f8a
--- /dev/null
+++ b/external/libgltf/patches/extern-C.patch
@@ -0,0 +1,10 @@
+--- libgltf/inc/libgltf.h
++++ libgltf/inc/libgltf.h
+@@ -48,7 +48,6 @@
+ void gltf_get_camera_pos(glm::vec3 *pos,glm::vec3 *view,glm::vec3 *up);
+
+ /*get model center position information*/
+-extern "C"
+ glm::vec3 gltf_get_model_center_pos();
+ /*get camera position information*/
+ extern "C"
commit e1bc856e628e4a72bd90498d12b94f1d57f6d75d
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue May 6 18:19:31 2014 +0300
Fix indentation
Change-Id: If94971484109fb63d2e20af77d023e6552a02ba8
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 5591c31..2eb12fd 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -91,12 +91,12 @@ bool ensuredir( const OUString& rUnqPath )
// returns ENOSYS in any case !!
osl::Directory aDirectory( aPath );
#ifdef UNX
-/* RW permission for the user only! */
- mode_t old_mode = umask(077);
+ /* RW permission for the user only! */
+ mode_t old_mode = umask(077);
#endif
osl::FileBase::RC nError = aDirectory.open();
#ifdef UNX
-umask(old_mode);
+ umask(old_mode);
#endif
aDirectory.close();
if( nError == osl::File::E_None )
@@ -299,12 +299,12 @@ void lcl_createName(TempFile_Impl& _rImpl,const OUString& rLeadingChars, bool _b
{
File aFile( aTmp );
#ifdef UNX
-/* RW permission for the user only! */
- mode_t old_mode = umask(077);
+ /* RW permission for the user only! */
+ mode_t old_mode = umask(077);
#endif
FileBase::RC err = aFile.open(osl_File_OpenFlag_Create);
#ifdef UNX
-umask(old_mode);
+ umask(old_mode);
#endif
if ( err == FileBase::E_None || err == FileBase::E_NOLCK )
{
More information about the Libreoffice-commits
mailing list