BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)
Дата
Msg-id 18026-d5bb69f79cd16203@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18026
Logged by:          Marcel Hofstetter
Email address:      hofstetter@jomasoft.ch
PostgreSQL version: 16beta2
Operating system:   Solaris 11.4 SPARC
Description:

...
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement
-Werror=vla -Wendif-labels -Wmissing-format-attribute
-Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Wno-format-truncation -Wno-stringop-truncation -O2
-D_POSIX_PTHREAD_SEMANTICS -pthread -D_REENTRANT -D_THREAD_SAFE -fPIC -I.
-I../../../src/include  -D_POSIX_PTHREAD_SEMANTICS  -I../../../src/port
-I../../../src/port -DSO_MAJOR_VERSION=5  -c -o fe-auth.o fe-auth.c
In file included from ../../../src/include/postgres_fe.h:25,
                 from fe-auth.c:23:
fe-auth.c: In function 'check_expected_areq':
fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this
function)
  807 |         StaticAssertDecl((sizeof(conn->allowed_auth_methods) *
CHAR_BIT) > AUTH_REQ_MAX,
      |
^~~~~~~~
../../../src/include/c.h:914:24: note: in definition of macro
'StaticAssertDecl'
  914 |         _Static_assert(condition, errmessage)
      |                        ^~~~~~~~~
fe-auth.c:43:1: note: 'CHAR_BIT' is defined in header '<limits.h>'; did you
forget to '#include <limits.h>'?
   42 | #include "fe-auth.h"
  +++ |+#include <limits.h>
   43 | #include "fe-auth-sasl.h"
In file included from ../../../src/include/postgres_fe.h:25,
                 from fe-auth.c:23:
fe-auth.c:807:64: note: each undeclared identifier is reported only once for
each function it appears in
  807 |         StaticAssertDecl((sizeof(conn->allowed_auth_methods) *
CHAR_BIT) > AUTH_REQ_MAX,
      |
^~~~~~~~
../../../src/include/c.h:914:24: note: in definition of macro
'StaticAssertDecl'
  914 |         _Static_assert(condition, errmessage)
      |                        ^~~~~~~~~
fe-auth.c:807:26: error: expression in static assertion is not an integer
  807 |         StaticAssertDecl((sizeof(conn->allowed_auth_methods) *
CHAR_BIT) > AUTH_REQ_MAX,
      |                          ^
../../../src/include/c.h:914:24: note: in definition of macro
'StaticAssertDecl'
  914 |         _Static_assert(condition, errmessage)
      |                        ^~~~~~~~~
gmake[3]: *** [<builtin>: fe-auth.o] Error 1


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Query returns error "there is no parameter $1" but server logs that there are two parameters supplied
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)