[Top][All Lists]

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

__UINT_LEAST8_MAX__ and HP-UX 11.23/IA

From: Albert Chin
Subject: __UINT_LEAST8_MAX__ and HP-UX 11.23/IA
Date: Wed, 20 Jan 2021 12:25:09 -0600
User-agent: NeoMutt/20171215

In data/skeletons/c.m4 from bison-3.7.4, we have:
  #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
  typedef __UINT_LEAST8_TYPE__ yytype_uint8;
  #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
         && UINT_LEAST8_MAX <= INT_MAX)
  typedef uint_least8_t yytype_uint8;
  #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
  typedef unsigned char yytype_uint8;
  typedef short yytype_uint8;

Unfortunately, on HP-UX 11.23/IA, UINT_LEAST8_MAX evaluates to
((unsigned char)(255)) causing a problem with:
  #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
         && UINT_LEAST8_MAX <= INT_MAX)

While building sudo-1.9.5p1 which uses bison-3.7.2, we get errors
  "gram.c", line 510: error #2018: expected a ")"
           && UINT_LEAST8_MAX <= INT_MAX)

  "gram.c", line 510: error #2059: function call is not allowed in a constant
           && UINT_LEAST8_MAX <= INT_MAX)

So, what's the best way to solve this?

albert chin (china@thewrittenword.com)

reply via email to

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