URL:
<http://savannah.gnu.org/bugs/?19391>
Summary: assertion failure on aix in xargs.c line 447
Project: findutils
Submitted by: haubi
Submitted on: Friday 03/23/2007 at 15:01
Category: xargs
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.3.2
Fixed Release: None
_______________________________________________________
Details:
When running xargs on aix, this assertion in xargs.x#447 fails:
446 #if defined(ARG_MAX)
447 assert(bc_ctl.arg_max <= (ARG_MAX-2048));
448 #endif
As ARG_MAX can be modified (it is an aix kernel parameter), there is no
meaning to have ARG_MAX defined as preprocessor constant.
In aix5.3 headers, there's a comment:
/* The following values will be undefined if the system supports a value
that
is equal or greater than the stated minimum AND the supported value
is
indeterminate (e.g. dependent on memory space).
On AIX, this includes ARG_MAX and CHILD_MAX. (But if _ALL_SOURCE is
used, these are defined with their default values).
*/
Note the last sentence in parents.
So there come a few ways around that to my mind:
1) in xargs.c: ignore ARG_MAX on aix
2) in config.h.in: put "#if 0 ... #endif" around _ALL_SOURCE
3) in configure.in: do not use 'AC_AIX', which defines _ALL_SOURCE
But for 2) and 3), one out of _XOPEN_SOURCE, _POSIX_SOURCE or _ANSI_C_SOURCE
needs to be defined to prevent /usr/include/standars.h from defining
_ALL_SOURCE.
So as the easiest (best?) way I'd suggest 1):
xargs/xargs.c:
-#if defined(ARG_MAX)
+#if defined(ARG_MAX) && !defined(_AIX)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?19391>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils