[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - unotools/source

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Jan 6 05:45:36 PST 2016


 unotools/source/ucbhelper/tempfile.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 33e4baf956d50861d8329474ed5176082f83c03e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Jan 6 09:56:43 2016 +0100

    let us try to use the pid as well on windows
    
    I'm a bit worried that some of our random test failures are related to
    trying to reuse the same temp file in different tests.
    
    Change-Id: I0ca4ace088a96530e6a62d01f979fefe63822b22
    Reviewed-on: https://gerrit.libreoffice.org/21090
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-on: https://gerrit.libreoffice.org/21144
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 53be962..60a95dc 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -38,6 +38,8 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+#elif defined( WNT )
+#include <process.h>
 #endif
 
 using namespace osl;
@@ -298,6 +300,10 @@ OUString CreateTempName_Impl( const OUString* pParent, bool bKeep, bool bDir = t
     static const OUString aPidString = OUString::number(pid);
     aEyeCatcher += aPidString;
 #endif
+#elif defined(WNT)
+    static const int pid = _getpid();
+    static const OUString aPidString = OUString::number(pid);
+    aEyeCatcher += aPidString;
 #endif
     UniqueTokens t;
     return lcl_createName(aEyeCatcher, t, nullptr, pParent, bDir, bKeep, false);


More information about the Libreoffice-commits mailing list