Prevent a relocation error with the "program_name" symbol in libstdbuf.so
when used with the stdbuf utility on SPARC.
See:
for more details.
This problem has been fixed upstream:
--- src/system.h.orig 2016-01-24 12:37:11.150301128 -0800
+++ src/system.h 2016-01-24 12:38:39.880106964 -0800
@@ -607,11 +607,16 @@
node, node == program ? " invocation" : "");
}
-static inline void
-emit_try_help (void)
-{
- fprintf (stderr, _("Try '%s --help' for more information.\n"), program_name);
-}
+/* A macro rather than an inline function, as it references
+ the global program_name, which causes run time linking issues
+ in libstdbuf.so where unused functions are not removed by the linker. */
+#define emit_try_help() \
+ do \
+ { \
+ fprintf (stderr, _("Try '%s --help' for more information.\n"), \
+ program_name); \
+ } \
+ while (0)
#include "inttostr.h"