pkgsrc/shells/bash3/patches/patch-af
wiz 50759e6166 Initial import of bash3 -- latest version of bash-3 branch.
Since two people already asked for it, here's the package, but
maintainer is set to pkgsrc-users.

Bash is an sh-compatible shell that incorporates useful features from
the Korn shell (ksh) and C shell (csh). It is intended to conform to
the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard.

It offers functional improvements over sh for both programming and
interactive use; these include command line editing, unlimited size
command history, job control, shell functions and aliases, indexed
arrays of unlimited size, and integer arithmetic in any base from two
to sixty-four. In addition, most sh scripts can be run by Bash without
modification.

This package contains the outdated version 3 of bash.
2009-02-24 15:47:43 +00:00

54 lines
1.2 KiB
Text

$NetBSD: patch-af,v 1.1.1.1 2009/02/24 15:47:43 wiz Exp $
--- builtins/printf.def.orig 2007-09-18 15:24:09.000000000 +0000
+++ builtins/printf.def
@@ -74,6 +74,11 @@ $END
# undef PRIdMAX
#endif
+#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"
@@ -81,6 +86,13 @@ $END
# 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;
@@ -466,7 +478,11 @@ printf_builtin (list)
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
@@ -493,7 +509,11 @@ printf_builtin (list)
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