diff options
Diffstat (limited to 'winsup/cygwin/smallprint.cc')
-rw-r--r-- | winsup/cygwin/smallprint.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/smallprint.cc b/winsup/cygwin/smallprint.cc index bdf50288b..9208947e2 100644 --- a/winsup/cygwin/smallprint.cc +++ b/winsup/cygwin/smallprint.cc @@ -13,6 +13,7 @@ details. */ #include <stdarg.h> #include <stdlib.h> #include <ctype.h> +#include <limits.h> #define LLMASK (0xffffffffffffffffULL) #define LMASK (0xffffffff) @@ -63,7 +64,7 @@ __rn (char *dst, int base, int dosign, long long val, int len, int pad, unsigned extern "C" int __small_vsprintf (char *dst, const char *fmt, va_list ap) { - char tmp[CYG_MAX_PATH + 1]; + char tmp[PATH_MAX]; char *orig = dst; const char *s; PWCHAR w; @@ -168,7 +169,7 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap) dst = rnargLL (dst, 16, 0, len, pad); break; case 'P': - if (!GetModuleFileName (NULL, tmp, CYG_MAX_PATH)) + if (!GetModuleFileName (NULL, tmp, PATH_MAX)) s = "cygwin program"; else s = tmp; |