libgeotiff icon indicating copy to clipboard operation
libgeotiff copied to clipboard

Feature request: Use stdbool.h or C23 predefined constants

Open schwehr opened this issue 11 months ago • 2 comments

It would be nice if we could remove some of the custom defines in cpl_serv.h. First up might be FALSE/TRUE:

https://github.com/OSGeo/libgeotiff/blob/5d5a36d858b01ed74efa786b7f76533a8ab6e997/libgeotiff/cpl_serv.h#L73-L79

Can we assume at least C99 for libgeotiff?

  • <C23 - stdbool.h - https://en.cppreference.com/w/c/types
  • C23 - https://en.cppreference.com/w/c/language/bool_constant

I think we can also remove NULL:

#ifndef NULL
#define NULL 0
#endif

schwehr avatar Jan 27 '25 16:01 schwehr

Can we assume at least C99 for libgeotiff?

yes, pretty reasonable. If you want to tackle that, you're welcome

rouault avatar Jan 27 '25 16:01 rouault

It might be a while before I get to it, but I'm definitely up for doing it.

schwehr avatar Jan 27 '25 16:01 schwehr