buildbot failure in ASF Buildbot on openoffice-fbsd-nightly
The Buildbot has detected a failed build on builder openoffice-fbsd-nightly while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-fbsd-nightly/builds/308 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-fbsd2_64bit Build Reason: The Nightly scheduler named 'openoffice-fbsd-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: BUILD FAILED: failed configure bootstrap Sincerely, -The Buildbot
buildbot failure in ASF Buildbot on aoo-win7
The Buildbot has detected a failed build on builder aoo-win7 while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/aoo-win7/builds/349 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-win7 Build Reason: The Nightly scheduler named 'aoo-win7-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: BUILD FAILED: failed build.pl --all Sincerely, -The Buildbot
buildbot failure in ASF Buildbot on openoffice-linux32-nightly
The Buildbot has detected a failed build on builder openoffice-linux32-nightly while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-linux32-nightly/builds/341 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm2_ubuntu_32bit Build Reason: The Nightly scheduler named 'openoffice-linux32-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: BUILD FAILED: failed Sincerely, -The Buildbot
svn commit: r1669465 - in /openoffice/trunk/main: set_soenv.in solenv/gbuild/platform/freebsd.mk solenv/inc/unxfbsd.mk
Author: pfg Date: Thu Mar 26 22:31:35 2015 New Revision: 1669465 URL: http://svn.apache.org/r1669465 Log: FreeBSD build structure changes Part of Code Review:https://reviews.freebsd.org/D2108 Author: Don Lewis (truckman at FreeBSD) Modified: openoffice/trunk/main/set_soenv.in openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk openoffice/trunk/main/solenv/inc/unxfbsd.mk Modified: openoffice/trunk/main/set_soenv.in URL: http://svn.apache.org/viewvc/openoffice/trunk/main/set_soenv.in?rev=1669465&r1=1669464&r2=1669465&view=diff == --- openoffice/trunk/main/set_soenv.in (original) +++ openoffice/trunk/main/set_soenv.in Thu Mar 26 22:31:35 2015 @@ -359,7 +359,7 @@ elsif ( $platform =~ m/kfreebsd/ ) elsif ( $platform =~ m/freebsd/ ) { $BIG_SVX= "TRUE"; $COM= "GCC"; - $COMPATH= '@COMPATH@'; + $COMPATH= '@COMPATH@' . '/bin'; $CVER = "C300"; $GUI= "UNX"; $GUIBASE= "unx"; @@ -2617,26 +2617,37 @@ sub GetCorrectPath my @originalPairs = @_; my @pairs = @originalPairs; my @Path = split /$ps/, $oldPath; + my @buildPath; + my @sysPath; + my $elem; + + for $elem (@Path) { + if ($elem eq '.' || $elem =~ m'^$SOLARENV/' || + $elem =~ m'/solenv/') { + push @buildPath, $elem; + } else { + push @sysPath, $elem; + } + } while (@pairs) { my $path = shift @pairs; my $cmd = shift @pairs; my $to_append = 1; - my $elem; if (! -x "$path/$cmd") { AddWarning ("Missing executable $path/$cmd\n"); } - for $elem (@Path) { + for $elem (@sysPath) { if ($elem eq $path) { # print "Hit duplicate path in path; break\n"; $to_append = 0; last; } - if (-f "$elem/$cmd") { + if (-f "$elem/$cmd" && ! -l "$elem/$cmd") { # print "Element already in path ...\n"; - unshift @Path, $path; + unshift @sysPath, $path; $to_append = 0; last; } else { @@ -2644,7 +2655,7 @@ sub GetCorrectPath } } if ($to_append) { - push @Path, $path; + push @sysPath, $path; } } @@ -2654,14 +2665,14 @@ sub GetCorrectPath my $cmd = shift @pairs; my $realpath; - $realpath = PathLookup ($cmd, @Path); + $realpath = PathLookup ($cmd, @sysPath); if (!($realpath eq $path)) { AddWarning ("Path conflict for executables " . "$path/$cmd against $realpath"); } } - return join $ps, CleanupPath (@Path); + return join $ps, @buildPath, CleanupPath (@sysPath); } # Modified: openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk?rev=1669465&r1=1669464&r2=1669465&view=diff == --- openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk (original) +++ openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk Thu Mar 26 22:31:35 2015 @@ -96,6 +96,7 @@ gb_CXXFLAGS := \ -fvisibility-inlines-hidden \ -fvisibility=hidden \ -pipe \ + -DHAVE_STL_INCLUDE_PATH \ ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE) gb_CFLAGS_WERROR := -Werror @@ -110,7 +111,6 @@ endif gb_LinkTarget_EXCEPTIONFLAGS := \ -DEXCEPTIONS_ON \ -fexceptions \ - -fno-enforce-eh-specs \ gb_LinkTarget_NOEXCEPTIONFLAGS := \ -DEXCEPTIONS_OFF \ @@ -121,6 +121,7 @@ gb_LinkTarget_LDFLAGS += \ -Wl,-z,combreloc \ -Wl,-z,defs \ $(subst -L../lib , ,$(SOLARLIB)) \ + ${FBSD_LDFLAGS} \ \ ifeq ($(HAVE_LD_HASH_STYLE),TRUE) Modified: openoffice/trunk/main/solenv/inc/unxfbsd.mk URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/unxfbsd.mk?rev=1669465&r1=1669464&r2=1669465&view=diff == --- openoffice/trunk/main/solenv/inc/unxfbsd.mk (original) +++ openoffice/trunk/main/solenv/inc/unxfbsd.mk Thu Mar 26 22:31:35 2015 @@ -27,7 +27,7 @@ ASM= AFLAGS= SOLAR_JAVA*= -PICSWITCH*:=-fpic +PICSWITCH*:=-fPIC JAVAFLAGSDEBUG=-g # Include arch specific makefile. @@ -49,7 +49,7 @@ JAVAFLAGSDEBUG=-g #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" # _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTR
svn commit: r1669463 - /openoffice/trunk/main/sal/inc/rtl/string.hxx
Author: pfg Date: Thu Mar 26 22:21:14 2015 New Revision: 1669463 URL: http://svn.apache.org/r1669463 Log: Move operator to the public section. This solves visibility issues with modern gcc. Author: Don Lewis (truckman at FreeBSD) Modified: openoffice/trunk/main/sal/inc/rtl/string.hxx Modified: openoffice/trunk/main/sal/inc/rtl/string.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/inc/rtl/string.hxx?rev=1669463&r1=1669462&r2=1669463&view=diff == --- openoffice/trunk/main/sal/inc/rtl/string.hxx (original) +++ openoffice/trunk/main/sal/inc/rtl/string.hxx Thu Mar 26 22:21:14 2015 @@ -234,8 +234,9 @@ private: @return a pointer to a (not necessarily null-terminated) byte string representing the characters of this string object. */ -operator const sal_Char *() const SAL_THROW(()) { return pData->buffer; } + public: +operator const sal_Char *() const SAL_THROW(()) { return pData->buffer; } /** Returns a reference to a character of this string. */ sal_Char& operator[]( int n ) { return pData->buffer[n]; } /** Returns a const reference to a character of this string. */
svn commit: r1669462 - /openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx
Author: pfg Date: Thu Mar 26 22:16:10 2015 New Revision: 1669462 URL: http://svn.apache.org/r1669462 Log: Small fix for BSD. Part of Code Review: https://reviews.freebsd.org/D2055 Author: Don Lewis (truckman at FreeBSD) Modified: openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx Modified: openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx?rev=1669462&r1=1669461&r2=1669462&view=diff == --- openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx (original) +++ openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx Thu Mar 26 22:16:10 2015 @@ -40,6 +40,7 @@ #include #include #include +#include namespace /* private */ { //
svn commit: r1669459 - in /openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64: cpp2uno.cxx except.cxx share.hxx uno2cpp.cxx
Author: pfg Date: Thu Mar 26 22:08:17 2015 New Revision: 1669459 URL: http://svn.apache.org/r1669459 Log: Huge update to the FreeBSD port (amd64 part). Starting with FreeBSD 10, the FreeBSD project has moved from using gcc/libstdc++ to using a complete C++ stack based on clang/llvm libc++ and libcxxrt. This new stack has better standards compliance and has huge similarities with MacOSX but it brought subtle low level problems for our outdated bridges code. Don Lewis has done a brave effort to update this code and has done extensive testing within FreeBSD port. Support for older versions of gcc has been dropped. Code Review: https://reviews.freebsd.org/D2108 https://reviews.freebsd.org/D2055 Author: Don Lewis (truckman at FreeBSD) Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx?rev=1669459&r1=1669458&r2=1669459&view=diff == --- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx (original) +++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx Thu Mar 26 22:08:17 2015 @@ -24,9 +24,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#include -#include -#include +#include +#include +#include +#include #include #include Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx?rev=1669459&r1=1669458&r2=1669459&view=diff == --- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx (original) +++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx Thu Mar 26 22:08:17 2015 @@ -24,9 +24,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) +#include #include -#endif +#include #include #include @@ -182,7 +182,12 @@ type_info * RTTI::getRTTI( typelib_Compo char const * rttiName = symName.getStr() +4; #if OSL_DEBUG_LEVEL > 1 fprintf( stderr,"generated rtti for %s\n", rttiName ); +#ifndef __GLIBCXX__ /* #i124421# */ +const OString aCUnoName = OUStringToOString( unoName, RTL_TEXTENCODING_UTF8); +OSL_TRACE( "TypeInfo for \"%s\" not found and cannot be generated.\n", aCUnoName.getStr()); +#endif /* __GLIBCXX__ */ #endif +#ifdef __GLIBCXX__ /* #i124421# */ if (pTypeDescr->pBaseTypeDescription) { // ensure availability of base @@ -196,7 +201,10 @@ type_info * RTTI::getRTTI( typelib_Compo // this class has no base class rtti = new __class_type_info( strdup( rttiName ) ); } - +#else /* __GLIBCXX__ */ +rtti = NULL; +#endif /* __GLIBCXX__ */ + pair< t_rtti_map::iterator, bool > insertion( m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) ); OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" ); Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx?rev=1669459&r1=1669458&r2=1669459&view=diff == --- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx (original) +++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx Thu Mar 26 22:08:17 2015 @@ -23,10 +23,6 @@ #include "uno/mapping.h" -#include -#include -#include - namespace CPPU_CURRENT_NAMESPACE { @@ -34,6 +30,7 @@ void dummy_can_throw_anything( char cons // - following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h +#ifdef __GLIBCXX__ struct _Unwind_Exception { unsigned exception_class __attribute__((__mode__(__DI__))); @@ -62,18 +59,21 @@ struct __cxa_exception _Unwind_Exception unwindHeader; }; +#endif /* __GLIBCXX__ */ extern "C" void *__cxa_allocate_exception( std::size_t thrown_size ) throw(); extern "C" void __cxa_throw ( void *thrown_exception, std::type_info *ti
svn commit: r1669457 - in /openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel: cpp2uno.cxx except.cxx share.hxx uno2cpp.cxx
Author: pfg Date: Thu Mar 26 22:07:21 2015 New Revision: 1669457 URL: http://svn.apache.org/r1669457 Log: Huge update to the FreeBSD port (i386 part). Starting with FreeBSD 10, the FreeBSD project has moved from using gcc/libstdc++ to using a complete C++ stack based on clang/llvm libc++ and libcxxrt. This new stack has better standards compliance and has huge similarities with MacOSX but it brought subtle low level problems for our outdated bridges code. Don Lewis has done a brave effort to update this code and has done extensive testing within FreeBSD port. Support for older versions of gcc has been dropped. Code Review: https://reviews.freebsd.org/D2108 https://reviews.freebsd.org/D2055 Author: Don Lewis (truckman at FreeBSD) Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx?rev=1669457&r1=1669456&r2=1669457&view=diff == --- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx (original) +++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx Thu Mar 26 22:07:21 2015 @@ -24,6 +24,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" +#include +#include +#include +#include + #include #include "com/sun/star/uno/RuntimeException.hpp" #include Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx?rev=1669457&r1=1669456&r2=1669457&view=diff == --- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx (original) +++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx Thu Mar 26 22:07:21 2015 @@ -24,9 +24,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) +#include #include -#endif +#include #include #include @@ -182,7 +182,12 @@ type_info * RTTI::getRTTI( typelib_Compo char const * rttiName = symName.getStr() +4; #if OSL_DEBUG_LEVEL > 1 fprintf( stderr,"generated rtti for %s\n", rttiName ); +#ifndef __GLIBCXX__ /* #i124421# */ +const OString aCUnoName = OUStringToOString( unoName, RTL_TEXTENCODING_UTF8); +OSL_TRACE( "TypeInfo for \"%s\" not found and cannot be generated.\n", aCUnoName.getStr()); +#endif /* __GLIBCXX__ */ #endif +#ifdef __GLIBCXX__ /* #i124421# */ if (pTypeDescr->pBaseTypeDescription) { // ensure availability of base @@ -196,6 +201,9 @@ type_info * RTTI::getRTTI( typelib_Compo // this class has no base class rtti = new __class_type_info( strdup( rttiName ) ); } +#else /* __GLIBCXX__ */ +rtti = NULL; +#endif /* __GLIBCXX__ */ pair< t_rtti_map::iterator, bool > insertion( m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) ); Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx?rev=1669457&r1=1669456&r2=1669457&view=diff == --- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx (original) +++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx Thu Mar 26 22:07:21 2015 @@ -23,10 +23,6 @@ #include "uno/mapping.h" -#include -#include -#include - namespace CPPU_CURRENT_NAMESPACE { @@ -34,6 +30,7 @@ void dummy_can_throw_anything( char cons // - following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h +#ifdef __GLIBCXX__ struct _Unwind_Exception { unsigned exception_class __attribute__((__mode__(__DI__))); @@ -62,18 +59,21 @@ struct __cxa_exception _Unwind_Exception unwindHeader; }; +#endif /* __GLIBCXX__ */ extern "C" void *__cxa_allocate_exception( std::size_t thrown_size ) throw(); extern "C" void __cxa_throw ( void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); +#ifdef __GLIBCXX__ struct __cxa_eh_globals { __cx
svn commit: r1669456 - in /openoffice/trunk/main/sal: inc/rtl/math.h inc/rtl/math.hxx rtl/source/math.cxx util/sal.map
Author: pfg Date: Thu Mar 26 22:06:29 2015 New Revision: 1669456 URL: http://svn.apache.org/r1669456 Log: Bring to SAL a wrapper implementation of the powr() IEEE 754 math function. This function was originally brought in r1444110 and is useful for OOXML compatibility. At this time it is not being used to fix the original issue it was meant to address but it is convenient for future use. It also reduces the differences from FreeBSD's port which will be receiving updates. Modified: openoffice/trunk/main/sal/inc/rtl/math.h openoffice/trunk/main/sal/inc/rtl/math.hxx openoffice/trunk/main/sal/rtl/source/math.cxx openoffice/trunk/main/sal/util/sal.map Modified: openoffice/trunk/main/sal/inc/rtl/math.h URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/inc/rtl/math.h?rev=1669456&r1=1669455&r2=1669456&view=diff == --- openoffice/trunk/main/sal/inc/rtl/math.h (original) +++ openoffice/trunk/main/sal/inc/rtl/math.h Thu Mar 26 22:06:29 2015 @@ -396,6 +396,21 @@ double SAL_CALL rtl_math_round(double fV */ double SAL_CALL rtl_math_pow10Exp(double fValue, int nExp) SAL_THROW_EXTERN_C(); +/** Similar to pow() with stricter exception handling for indeterminate values. + +powr is specified in the IEEE 754 - 2008 Floating Point Standard. + +@param fValue +The value to be raised. + +@param fExp +The exponent. + +@return +powr(fValue, fExp) + */ +double SAL_CALL rtl_math_powr(double fValue, double fExp) SAL_THROW_EXTERN_C(); + /** Rounds value to 15 significant decimal digits. @param fValue Modified: openoffice/trunk/main/sal/inc/rtl/math.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/inc/rtl/math.hxx?rev=1669456&r1=1669455&r2=1669456&view=diff == --- openoffice/trunk/main/sal/inc/rtl/math.hxx (original) +++ openoffice/trunk/main/sal/inc/rtl/math.hxx Thu Mar 26 22:06:29 2015 @@ -186,6 +186,13 @@ inline double pow10Exp(double fValue, in return rtl_math_pow10Exp(fValue, nExp); } +/** A wrapper around rtl_math_powr. + */ +inline double powr(double fValue, double fExp) +{ +return rtl_math_powr(fValue, fExp); +} + /** A wrapper around rtl_math_approxValue. */ inline double approxValue(double fValue) Modified: openoffice/trunk/main/sal/rtl/source/math.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/rtl/source/math.cxx?rev=1669456&r1=1669455&r2=1669456&view=diff == --- openoffice/trunk/main/sal/rtl/source/math.cxx (original) +++ openoffice/trunk/main/sal/rtl/source/math.cxx Thu Mar 26 22:06:29 2015 @@ -1113,6 +1113,19 @@ double SAL_CALL rtl_math_expm1( double f return (fe-1.0) * fValue / log(fe); } +double SAL_CALL rtl_math_powr( double fValue, double fExp ) SAL_THROW_EXTERN_C() +{ +if ((fValue == 0.0 && fExp == 0.0) || + (rtl::math::isInf( fExp ) && !rtl::math::isSignBitSet( fExp )) || + (rtl::math::isInf( fValue ) && !rtl::math::isSignBitSet( fValue ))) +{ +double fResult; +::rtl::math::setNan( &fResult ); +return fResult; +} +return pow(fValue, fExp); +} + double SAL_CALL rtl_math_log1p( double fValue ) SAL_THROW_EXTERN_C() { Modified: openoffice/trunk/main/sal/util/sal.map URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/util/sal.map?rev=1669456&r1=1669455&r2=1669456&view=diff == --- openoffice/trunk/main/sal/util/sal.map (original) +++ openoffice/trunk/main/sal/util/sal.map Thu Mar 26 22:06:29 2015 @@ -629,6 +629,8 @@ UDK_3.12 { # AOO 3.5 global: osl_loadAsciiModule; osl_loadAsciiModuleRelative; + +rtl_math_powr; } UDK_3.11; PRIVATE_1.0 {
svn commit: r1669455 - /openoffice/trunk/main/sc/source/core/tool/interpr1.cxx
Author: pfg Date: Thu Mar 26 22:05:42 2015 New Revision: 1669455 URL: http://svn.apache.org/r1669455 Log: Re-implement Calc's RAND() function using a variant of KISS PRNG. George Marsaglia's KISS algorithm is a rather simple implementation of a random number generator but it has interesting properties with respect ot the traditional Mersenne Twister. I used the 2011 32 bit Multiply-with-carry variant, with an undetermined period which is known to be not less than 10^4000; it is known to pass all the statistical tests. The Apache OpenOffice implementation uses an aggressive seeding scheme based on the internal rtl_random functions, rendering the function basically unpredictable. As a side effect it is also not possible to specify a seed for repeatability. No claims are made concerning crypto-safeness. The specific adaption for Apache OpenOffice is: Copyright 2015 Pedro Giffuni All rights reserved. Huge thanks to Steve Kargl for pointing me to the algorithm and the late George Marsaglia for creating it in the first place. Modified: openoffice/trunk/main/sc/source/core/tool/interpr1.cxx Modified: openoffice/trunk/main/sc/source/core/tool/interpr1.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/core/tool/interpr1.cxx?rev=1669455&r1=1669454&r2=1669455&view=diff == --- openoffice/trunk/main/sc/source/core/tool/interpr1.cxx (original) +++ openoffice/trunk/main/sc/source/core/tool/interpr1.cxx Thu Mar 26 22:05:42 2015 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include "interpre.hxx" @@ -71,9 +72,6 @@ #include "doubleref.hxx" #include "queryparam.hxx" -#include -#include - #include #include #include @@ -1545,17 +1543,47 @@ void ScInterpreter::ScPi() PushDouble(F_PI); } +#defineSCRANDOMQ_SIZE 4194304 +static sal_uInt32 nScRandomQ[SCRANDOMQ_SIZE], nScCarry = 0; -void ScInterpreter::ScRandom() +// Multiply with Carry +sal_uInt32 +b32MWC(void) { -RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "bst", "ScInterpreter::ScRandom" ); +sal_uInt32 t, x; +static int j = (SCRANDOMQ_SIZE - 1); -boost::random::mt19937 ScGen(static_cast(std::time(0))); -static boost::uniform_01 ScZeroOne(ScGen); - -PushDouble(ScZeroOne()); +j = (j + 1) & (SCRANDOMQ_SIZE - 1); +x = nScRandomQ[j]; +t = (x << 28) + nScCarry; +nScCarry = (x >> 4) - (t < x); +return (nScRandomQ[j] = t - x); } +// Congruential +#defineCNG ( cng = 69069 * cng + 13579 ) +// Xorshift +#defineXS ( xs ^= (xs << 13), xs ^= (xs >> 17), xs ^= (xs << 5) ) + +#defineKISS (b32MWC() + CNG + XS) + +void ScInterpreter::ScRandom() +{ +RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "pfg", "ScInterpreter::ScRandom" ); + +static rtlRandomPool aPool = rtl_random_createPool(); +static sal_Bool SqSeeded = sal_False; +static sal_uInt32 i, x, cng, xs = 362436069; + +// Seeding for the PRNG +if (SqSeeded == sal_False) { +rtl_random_getBytes(aPool, &cng, sizeof(cng)); +rtl_random_getBytes(aPool, &nScRandomQ, +sizeof(nScRandomQ[0]) * SCRANDOMQ_SIZE); +SqSeeded = sal_True; +} +PushDouble(static_cast(KISS) / SAL_MAX_UINT32); +} void ScInterpreter::ScTrue() {
buildbot success in ASF Buildbot on openoffice-linux64-nightly
The Buildbot has detected a passing build on builder openoffice-linux64-nightly while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-linux64-nightly/builds/321 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: tethys_ubuntu Build Reason: The Nightly scheduler named 'openoffice-linux64-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: Build succeeded! Sincerely, -The Buildbot
buildbot success in ASF Buildbot on openoffice-linux32-nightly
The Buildbot has detected a passing build on builder openoffice-linux32-nightly while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-linux32-nightly/builds/340 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm2_ubuntu_32bit Build Reason: The Nightly scheduler named 'openoffice-linux32-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: Build succeeded! Sincerely, -The Buildbot