On 09/05/19 03:50, Osipov, Michael wrote:
diff -ur src/system.h src/system.h
--- src/system.h 2019-01-05 11:36:22 +0000
+++ src/system.h 2019-05-08 15:19:29 +0000
@@ -422,6 +422,10 @@
# endif
#endif
+#ifndef __GNUC__
+#define __attribute(x) /* empty */
+#endif
The only use of __attribute is:
src/libstdbuf.c:/* Use __attribute to avoid elision of __attribute__ on
SUNPRO_C etc. */
src/libstdbuf.c:static void __attribute ((constructor))
So we should probably have special __hpux handling in that file
rather than doing the above.
This is all dependent on stdbuf actually working on your platform.
Possibly the most appropriate change would be to use __attribute
rather than __attribute__ in configure.ac
#ifndef ATTRIBUTE_NORETURN
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
#endif
--- configure.ac 2019-03-04 08:40:55 +0000
+++ configure.ac 2019-05-08 15:40:41 +0000
@@ -481,8 +481,8 @@
gl_WARN_ADD([-errwarn], [CFLAGS])
# Put this message here, after gl_WARN_ADD's chatter.
AC_MSG_CHECKING([whether this system supports stdbuf])
-CFLAGS="-fPIC $CFLAGS"
-LDFLAGS="-shared $LDFLAGS"
+CFLAGS="+z $CFLAGS"
+LDFLAGS="-b $LDFLAGS"
This would need to be conditional,
again if stdbuf does actually work on hpux.