From a149df05b68182c1e4cb95230c539a97ae900d25 Mon Sep 17 00:00:00 2001 From: garbled Date: Tue, 15 Mar 2005 02:05:49 +0000 Subject: Add a patch allowing compilation of bash on AIX 4.3.3. Tested not to impact NetBSD/i386 build. Should also not impact aix5 builds. --- shells/bash/distinfo | 3 ++- shells/bash/patches/patch-af | 53 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 shells/bash/patches/patch-af (limited to 'shells') diff --git a/shells/bash/distinfo b/shells/bash/distinfo index aeffe3c8a3c..d4ac0c87c04 100644 --- a/shells/bash/distinfo +++ b/shells/bash/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.4 2005/02/27 23:06:50 wiz Exp $ +$NetBSD: distinfo,v 1.5 2005/03/15 02:05:49 garbled Exp $ SHA1 (bash-3.0.tar.gz) = 3acf1ff4910d4bc863620c7533cbf4858370017b RMD160 (bash-3.0.tar.gz) = abe76200003a9dc441ce34650a439cd968f643d4 @@ -56,3 +56,4 @@ SHA1 (patch-ab) = c08789555515fd4afb621cb564397ad6f1ec4dea SHA1 (patch-ac) = 012300f9e4427f2e15c8b96bc59a674f17d93cbd SHA1 (patch-ad) = 520fec46aa5df6f41418ce253cef6448dc36cadb SHA1 (patch-ae) = 7bacb7ac6835eb64014c744aa48eeecf48960fd8 +SHA1 (patch-af) = 8ce9e6adbda879bd32e3854913df2f6f84e4d9f7 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 -- cgit v1.2.3