lichray / nvi2

A multibyte fork of the nvi editor for BSD
Other
144 stars 34 forks source link

Add missing stdint.h header for uintptr_t #125

Closed konyahin closed 1 year ago

konyahin commented 1 year ago

Hello. After the last commit I can't anymore build nvi2 on OpenBSD, because I meet the error: error: use of undeclared identifier 'uintptr_t'.

In this PR, I added a header with declaration for uintptr_t.

lichray commented 1 year ago

Can I see the full error message? Some background:

  1. Headers like mem.h are exclusively included by https://github.com/lichray/nvi2/blob/main/common/common.h. Those headers are not self-contained.
  2. I expect sys/types.h to be included in individual translation units and define int types such as size_t. OpenBSD may be slightly different, or maybe some files forgot this inclusion.
konyahin commented 1 year ago

Yes, of course. There are a full ninja and, just in case, cmake logs.

cmake.log ninja.log

lichray commented 1 year ago

I see, OpenBSD's sys/types.h does not define uintptr_t, and Linux's does not define __uintptr_t. I think I don't have a better choice. Can you revert 4f514bf and include stdint.h in common.h? Thanks.

konyahin commented 1 year ago

OK, I reworked my pr.