Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libhash.c - failed to build on MSYS2 #102

Open
ghost opened this issue Jun 4, 2023 · 1 comment
Open

libhash.c - failed to build on MSYS2 #102

ghost opened this issue Jun 4, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 4, 2023

After all of these issues resolved: #99 #100 #101, libposix.a now built as expected.

Only for us to stuck with libhash.c.

UCRT64 GCC:

$ ninja -j1
[1/70] Building C object gear-lib/libposix/CMakeFiles/posix.dir/libposix.c.obj
[2/70] Linking C static library build\lib\libposix.a
[3/70] Building C object gear-lib/libstrex/CMakeFiles/strex.dir/libstrex.c.obj
[4/70] Building C object gear-lib/libstrex/CMakeFiles/strex.dir/test_libstrex.c.obj
[5/70] Linking C static library build\lib\libstrex.a
[6/70] Building C object gear-lib/libdict/CMakeFiles/dict.dir/libdict.c.obj
[7/70] Building C object gear-lib/libdict/CMakeFiles/dict.dir/test_libdict.c.obj
[8/70] Linking C static library build\lib\libdict.a
[9/70] Building C object gear-lib/libhash/CMakeFiles/hash.dir/libhash.c.obj
FAILED: gear-lib/libhash/CMakeFiles/hash.dir/libhash.c.obj
C:\msys64\ucrt64\bin\cc.exe  -IC:/msys64/home/Administrator/gear-lib/gear-lib/libhash/. -IC:/msys64/home/Administrator/gear-lib/gear-lib/libposix  -MD -MT gear-lib/libhash/CMakeFiles/hash.dir/libhash.c.obj -MF gear-lib\libhash\CMakeFiles\hash.dir\libhash.c.obj.d -o gear-lib/libhash/CMakeFiles/hash.dir/libhash.c.obj -c C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c
In file included from C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/libposix4win.h:42,
                 from C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/libposix.h:45,
                 from C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:23:
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c: In function 'hash_lookup':
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:31: error: invalid initializer
  746 |         ({ ptr_type ____ptr = (ptr); \
      |                               ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: note: in expansion of macro 'hlist_for_each_entry_safe'
  150 |     hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:20: error: used struct type value where scalar is required
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                    ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: note: in expansion of macro 'hlist_for_each_entry_safe'
  150 |     hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:42: error: cannot convert to a pointer type
  150 |     hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |                                          ^~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:42: note: in definition of macro 'container_of'
   59 | #define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
      |                                          ^~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:22: note: in expansion of macro 'hlist_entry'
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                      ^~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: note: in expansion of macro 'hlist_for_each_entry_safe'
  150 |     hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:31: error: invalid initializer
  746 |         ({ ptr_type ____ptr = (ptr); \
      |                               ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: note: in expansion of macro 'hlist_for_each_entry_safe'
  150 |     hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:20: error: used struct type value where scalar is required
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                    ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: note: in expansion of macro 'hlist_for_each_entry_safe'
  150 |     hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:42: error: cannot convert to a pointer type
  150 |     hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |                                          ^~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:42: note: in definition of macro 'container_of'
   59 | #define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
      |                                          ^~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:22: note: in expansion of macro 'hlist_entry'
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                      ^~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: note: in expansion of macro 'hlist_for_each_entry_safe'
  150 |     hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c: In function 'hash_destroy':
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:31: error: invalid initializer
  746 |         ({ ptr_type ____ptr = (ptr); \
      |                               ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  194 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:20: error: used struct type value where scalar is required
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                    ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  194 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:46: error: cannot convert to a pointer type
  194 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
      |                                              ^~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:42: note: in definition of macro 'container_of'
   59 | #define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
      |                                          ^~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:22: note: in expansion of macro 'hlist_entry'
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                      ^~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  194 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:31: error: invalid initializer
  746 |         ({ ptr_type ____ptr = (ptr); \
      |                               ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  194 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:20: error: used struct type value where scalar is required
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                    ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  194 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:46: error: cannot convert to a pointer type
  194 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
      |                                              ^~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:42: note: in definition of macro 'container_of'
   59 | #define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
      |                                          ^~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:22: note: in expansion of macro 'hlist_entry'
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                      ^~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  194 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c: In function 'hash_get_all_cnt':
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:31: error: invalid initializer
  746 |         ({ ptr_type ____ptr = (ptr); \
      |                               ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  317 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:20: error: used struct type value where scalar is required
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                    ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  317 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:46: error: cannot convert to a pointer type
  317 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |                                              ^~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:42: note: in definition of macro 'container_of'
   59 | #define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
      |                                          ^~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:22: note: in expansion of macro 'hlist_entry'
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                      ^~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  317 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:31: error: invalid initializer
  746 |         ({ ptr_type ____ptr = (ptr); \
      |                               ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  317 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:20: error: used struct type value where scalar is required
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                    ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  317 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:46: error: cannot convert to a pointer type
  317 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |                                              ^~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:42: note: in definition of macro 'container_of'
   59 | #define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
      |                                          ^~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:22: note: in expansion of macro 'hlist_entry'
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                      ^~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  317 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c: In function 'hash_dump_all':
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:31: error: invalid initializer
  746 |         ({ ptr_type ____ptr = (ptr); \
      |                               ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  338 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:20: error: used struct type value where scalar is required
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                    ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  338 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:46: error: cannot convert to a pointer type
  338 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |                                              ^~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:42: note: in definition of macro 'container_of'
   59 | #define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
      |                                          ^~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:22: note: in expansion of macro 'hlist_entry'
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                      ^~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:20: note: in expansion of macro 'hlist_entry_safe'
  788 |         for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  338 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:31: error: invalid initializer
  746 |         ({ ptr_type ____ptr = (ptr); \
      |                               ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  338 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:20: error: used struct type value where scalar is required
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                    ^
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  338 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:46: error: cannot convert to a pointer type
  338 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |                                              ^~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:42: note: in definition of macro 'container_of'
   59 | #define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
      |                                          ^~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:22: note: in expansion of macro 'hlist_entry'
  747 |            ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
      |                      ^~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:20: note: in expansion of macro 'hlist_entry_safe'
  790 |              pos = hlist_entry_safe(n, n_type, pos_type, member))
      |                    ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:9: note: in expansion of macro 'hlist_for_each_entry_safe'
  338 |         hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

CLANG64:

$ ninja -j1
[1/70] Building C object gear-lib/libposix/CMakeFiles/posix.dir/libposix.c.obj
[2/70] Linking C static library build\lib\libposix.a
[3/70] Building C object gear-lib/libstrex/CMakeFiles/strex.dir/libstrex.c.obj
[4/70] Building C object gear-lib/libstrex/CMakeFiles/strex.dir/test_libstrex.c.obj
[5/70] Linking C static library build\lib\libstrex.a
[6/70] Building C object gear-lib/libdict/CMakeFiles/dict.dir/libdict.c.obj
[7/70] Building C object gear-lib/libdict/CMakeFiles/dict.dir/test_libdict.c.obj
[8/70] Linking C static library build\lib\libdict.a
[9/70] Building C object gear-lib/libhash/CMakeFiles/hash.dir/libhash.c.obj
FAILED: gear-lib/libhash/CMakeFiles/hash.dir/libhash.c.obj
C:\msys64\clang64\bin\cc.exe  -IC:/msys64/home/Administrator/gear-lib/gear-lib/libhash/. -IC:/msys64/home/Administrator/gear-lib/gear-lib/libposix  -MD -MT gear-lib/libhash/CMakeFiles/hash.dir/libhash.c.obj -MF gear-lib\libhash\CMakeFiles\hash.dir\libhash.c.obj.d -o gear-lib/libhash/CMakeFiles/hash.dir/libhash.c.obj -c C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: error: initializing 'struct hlist_node' with an expression of incompatible type 'struct hlist_node *'; dereference with *
    hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:13: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:14: note: expanded from macro 'hlist_entry_safe'
        ({ ptr_type ____ptr = (ptr); \
                    ^         ~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: error: operand of type 'struct hlist_node' where arithmetic or pointer type is required
    hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:13: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:27: note: expanded from macro 'hlist_entry_safe'
           ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
                                 ^~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:736:53: note: expanded from macro 'hlist_entry'
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
                                                    ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:58: note: expanded from macro 'container_of'
#define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
                                                         ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: error: assigning to 'struct hash_item *' from incompatible type 'void'
    hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:11: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: error: initializing 'struct hlist_node' with an expression of incompatible type 'struct hlist_node *'; dereference with *
    hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:13: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:14: note: expanded from macro 'hlist_entry_safe'
        ({ ptr_type ____ptr = (ptr); \
                    ^         ~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: error: operand of type 'struct hlist_node' where arithmetic or pointer type is required
    hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:13: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:27: note: expanded from macro 'hlist_entry_safe'
           ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
                                 ^~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:736:53: note: expanded from macro 'hlist_entry'
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
                                                    ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:58: note: expanded from macro 'container_of'
#define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
                                                         ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:150:5: error: assigning to 'struct hash_item *' from incompatible type 'void'
    hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:11: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: error: initializing 'struct hlist_node' with an expression of incompatible type 'struct hlist_node *'; dereference with *
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:13: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:14: note: expanded from macro 'hlist_entry_safe'
        ({ ptr_type ____ptr = (ptr); \
                    ^         ~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: error: operand of type 'struct hlist_node' where arithmetic or pointer type is required
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:13: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:27: note: expanded from macro 'hlist_entry_safe'
           ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
                                 ^~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:736:53: note: expanded from macro 'hlist_entry'
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
                                                    ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:58: note: expanded from macro 'container_of'
#define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
                                                         ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: error: assigning to 'struct hash_item *' from incompatible type 'void'
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:11: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: error: initializing 'struct hlist_node' with an expression of incompatible type 'struct hlist_node *'; dereference with *
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:13: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:14: note: expanded from macro 'hlist_entry_safe'
        ({ ptr_type ____ptr = (ptr); \
                    ^         ~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: error: operand of type 'struct hlist_node' where arithmetic or pointer type is required
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:13: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:27: note: expanded from macro 'hlist_entry_safe'
           ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
                                 ^~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:736:53: note: expanded from macro 'hlist_entry'
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
                                                    ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:58: note: expanded from macro 'container_of'
#define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
                                                         ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:194:9: error: assigning to 'struct hash_item *' from incompatible type 'void'
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, &list[i], item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:11: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: error: initializing 'struct hlist_node' with an expression of incompatible type 'struct hlist_node *'; dereference with *
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:13: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:14: note: expanded from macro 'hlist_entry_safe'
        ({ ptr_type ____ptr = (ptr); \
                    ^         ~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: error: operand of type 'struct hlist_node' where arithmetic or pointer type is required
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:13: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:27: note: expanded from macro 'hlist_entry_safe'
           ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
                                 ^~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:736:53: note: expanded from macro 'hlist_entry'
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
                                                    ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:58: note: expanded from macro 'container_of'
#define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
                                                         ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: error: assigning to 'struct hash_item *' from incompatible type 'void'
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:11: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: error: initializing 'struct hlist_node' with an expression of incompatible type 'struct hlist_node *'; dereference with *
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:13: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:14: note: expanded from macro 'hlist_entry_safe'
        ({ ptr_type ____ptr = (ptr); \
                    ^         ~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: error: operand of type 'struct hlist_node' where arithmetic or pointer type is required
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:13: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:747:27: note: expanded from macro 'hlist_entry_safe'
           ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
                                 ^~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:736:53: note: expanded from macro 'hlist_entry'
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
                                                    ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:59:58: note: expanded from macro 'container_of'
#define container_of(ptr, type, member) (type *)((char *)ptr - offsetof(type, member))
                                                         ^~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:317:9: error: assigning to 'struct hash_item *' from incompatible type 'void'
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:790:11: note: expanded from macro 'hlist_for_each_entry_safe'
             pos = hlist_entry_safe(n, n_type, pos_type, member))
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libhash/libhash.c:338:9: error: initializing 'struct hlist_node' with an expression of incompatible type 'struct hlist_node *'; dereference with *
        hlist_for_each_entry_safe(hi, struct hash_item, next, struct hlist_node, list, item) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:788:13: note: expanded from macro 'hlist_for_each_entry_safe'
        for (pos = hlist_entry_safe((head)->first, struct hlist_node, pos_type, member);\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/gear-lib/gear-lib/libposix/kernel_list_win32.h:746:14: note: expanded from macro 'hlist_entry_safe'
        ({ ptr_type ____ptr = (ptr); \
                    ^         ~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.

I have the impression that we are not yet done with this annoying libposix yet. Too much of hassle, I will use TBOX instead. Goodbye.

@gozfree
Copy link
Owner

gozfree commented Jul 23, 2023

the compile error is about macro of list_head on linux porting to windows.
after msys2 change makefile to linux-like, the error will not occur.
and the window version list_head already verified ok on MSVC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant