DIGImend / hidrd

HID report descriptor I/O library and conversion tool
GNU General Public License v2.0
167 stars 29 forks source link

missing obstack.h #21

Open ShaharHD opened 5 years ago

ShaharHD commented 5 years ago

Trying to build on Mac (10.14.4) and keep getting short on obstack.h

I've modified the makefile to include one (from another mac ports) - but I'm now failing on this error:

Making all in util
  CC       obstack.lo
obstack.c:301:5: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
    __INT_TO_PTR ((__PTR_TO_INT (new_chunk->contents) + h->alignment_mask)

I can try and disable the warning, but is it safe?

lechium commented 4 years ago

same issue +1

spbnick commented 4 years ago

Never had access to a Mac, so can't reproduce, but if somebody gives me that obstack.c, I can try to figure out if it's safe. Otherwise, I would say using obstack in hidrd is an overkill and I would welcome a patch getting rid of it.

lechium commented 4 years ago

i grabbed on from cctools so im not even sure if its an appropriate copy to try to use. im not familiar with what obstack does in the first place so a patch for this would be out of my depth personally! i also cant even get it to build with the obstack so thats my latest obstacle.

obstack-cctools.zip

ShaharHD commented 4 years ago

@lechium @spbnick got it working!

Another update with the files @lechium sent, the fix was fairly simple to make it finish the build. I'll create a Fork and a PR later today for you to review

The issue is now that it is looking for __obstack_begin which means I need to get the obstack as a static library into the code.

Working on it, will fork and create a PR

ShaharHD commented 4 years ago

@lechium @spbnick Created PR #24

ShaharHD commented 4 years ago

PR #24 updated with removing obstack all together