summaryrefslogtreecommitdiff
path: root/shells/bash/patches/patch-af
diff options
context:
space:
mode:
Diffstat (limited to 'shells/bash/patches/patch-af')
-rw-r--r--shells/bash/patches/patch-af53
1 files changed, 53 insertions, 0 deletions
diff --git a/shells/bash/patches/patch-af b/shells/bash/patches/patch-af
new file mode 100644
index 00000000000..42210f4b5cc
--- /dev/null
+++ b/shells/bash/patches/patch-af
@@ -0,0 +1,53 @@
+$NetBSD: patch-af,v 1.1 2005/03/15 02:05:49 garbled Exp $
+--- builtins/printf.def.orig 2003-12-19 16:04:06.000000000 -0700
++++ builtins/printf.def 2005-03-14 18:56:57.000000000 -0700
+@@ -62,6 +62,11 @@
+ #include "bashgetopt.h"
+ #include "common.h"
+
++#if defined (_AIX) && !defined (_AIX51)
++ /* AIX defines do not work. Undefine them. */
++# undef PRIdMAX
++# undef PRIuMAX
++#endif
+ #if !defined (PRIdMAX)
+ # if HAVE_LONG_LONG
+ # define PRIdMAX "lld"
+@@ -69,6 +74,13 @@
+ # define PRIdMAX "ld"
+ # endif
+ #endif
++#if !defined (PRIuMAX) && defined (_AIX)
++# if HAVE_LONG_LONG
++# define PRIuMAX "llu"
++# else
++# define PRIuMAX "lu"
++# endif
++#endif
+
+ #if !defined (errno)
+ extern int errno;
+@@ -344,7 +356,11 @@
+ p = pp = getintmax ();
+ if (p != pp)
+ {
++#if defined (_AIX) && !defined (_AIX51)
++ f = mklong (start, PRIdMAX, sizeof (intmax_t) - 2);
++#else
+ f = mklong (start, PRIdMAX, sizeof (PRIdMAX) - 2);
++#endif
+ PF (f, pp);
+ }
+ else
+@@ -371,7 +387,11 @@
+ p = pp = getuintmax ();
+ if (p != pp)
+ {
++#if defined (_AIX) && !defined (_AIX51)
++ f = mklong (start, PRIuMAX, sizeof (uintmax_t) - 2);
++#else
+ f = mklong (start, PRIdMAX, sizeof (PRIdMAX) - 2);
++#endif
+ PF (f, pp);
+ }
+ else