autoconf
[Top][All Lists]
Advanced

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

configure problem on HP-UX 11


From: scott douglass
Subject: configure problem on HP-UX 11
Date: Mon, 24 Jun 2002 16:11:05 +0100

Hello,

HP/UX /opt/ansic/bin/cc version B.11.11.04 can't compile this legal fragment 
which is fairly common in GNU sources typically from .../gettext.c:

typedef unsigned nls_uint32;

static inline nls_uint32
SWAP (i)
     nls_uint32 i;
{
  return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
}

line 4: error 1000: Unexpected symbol: "SWAP"

There are at least two workarounds:
        remove 'inline'
        don't use the typedef

I was wondering if it was appropriate to change the AC_C_INLINE test code in 
c.m4 from

#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
$ac_kw int foo () {return 0; }
#endif

to

#ifndef __cplusplus
typedef unsigned nls_uint32;
static $ac_kw nls_uint32 static_foo () {return 0; }
$ac_kw nls_uint32 foo () {return 0; }
#endif

so that this version of the HP/UX will fail the configure test and avoid the 
problem.

Thanks.




reply via email to

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