about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 014cb2fa2..f07d8cc31 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -275,9 +275,13 @@ zerrmsg(FILE *file, const char *fmt, va_list ap)
 #endif
     char *errmsg;
 
-    if ((unset(SHINSTDIN) || locallevel) && lineno)
+    if ((unset(SHINSTDIN) || locallevel) && lineno) {
+#if defined(ZLONG_IS_LONG_LONG) && defined(PRINTF_HAS_LLD)
+	fprintf(file, "%lld: ", lineno);
+#else
 	fprintf(file, "%ld: ", (long)lineno);
-    else
+#endif
+    } else
 	fputc((unsigned char)' ', file);
 
     while (*fmt)