summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_utility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/kmp_utility.cpp')
-rw-r--r--openmp/runtime/src/kmp_utility.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_utility.cpp b/openmp/runtime/src/kmp_utility.cpp
index 06090e624c7..dc4c714f8d8 100644
--- a/openmp/runtime/src/kmp_utility.cpp
+++ b/openmp/runtime/src/kmp_utility.cpp
@@ -375,7 +375,11 @@ void __kmp_expand_file_name(char *result, size_t rlen, char *pattern) {
case 'I':
case 'i': {
pid_t id = getpid();
+#if KMP_ARCH_X86_64 && defined(__MINGW32__)
+ snp_result = KMP_SNPRINTF(pos, end - pos + 1, "%0*lld", width, id);
+#else
snp_result = KMP_SNPRINTF(pos, end - pos + 1, "%0*d", width, id);
+#endif
if (snp_result >= 0 && snp_result <= end - pos) {
while (*pos)
++pos;
OpenPOWER on IntegriCloud