[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35650: [PATCH] Improving HP-UX support

From: Osipov, Michael
Subject: bug#35650: [PATCH] Improving HP-UX support
Date: Tue, 14 May 2019 13:22:53 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Am 2019-05-10 um 11:49 schrieb Pádraig Brady:
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
+#ifndef __GNUC__
+#define __attribute(x) /* empty */

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

  # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
--- 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])

This would need to be conditional,
again if stdbuf does actually work on hpux.

How try that out? I have it in place and we'll know it in an instant:
$ ldd $(which stdbuf)

        libc.so.1 =>    /usr/lib/hpux32/libc.so.1
        libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
$ ldd /opt/ports/coreutils/libexec/coreutils/libstdbuf.so




reply via email to

[Prev in Thread] Current Thread [Next in Thread]