summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-01-06 09:56:43 +0100
committerMichael Stahl <mstahl@redhat.com>2016-01-06 13:45:16 +0000
commit33e4baf956d50861d8329474ed5176082f83c03e (patch)
treec4eb3339de7d4ecae938358c19aef2b7260c9c74 /unotools
parente39803815715d7b4fdfa7e1d4b3ebb07c16ca17e (diff)
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@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-on: https://gerrit.libreoffice.org/21144 Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 53be9620b97f..60a95dc71d93 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);