Previous: , Up: Portability guidelines   [Contents][Index]


1.5.4 Other portability assumptions made by Gnulib

The GNU coding standards allow one departure from strict C: Gnulib code can assume that standard internal types like size_t are no wider than long. POSIX requires implementations to support at least one programming environment where this is true, and such environments are recommended for Gnulib-using applications. When it is easy to port to non-POSIX platforms like MinGW where these types are wider than long, new Gnulib code should do so, e.g., by using ptrdiff_t instead of long. However, it is not always that easy, and no effort has been made to check that all Gnulib modules work on MinGW-like environments.

Gnulib code makes the following additional assumptions:

The above assumptions are not required by the C or POSIX standards but hold on all practical porting targets that we’re familiar with. If you have a porting target where these assumptions are not true, we’d appreciate hearing of any fixes. We need fixes that do not increase runtime overhead on standard hosts and that are relatively easy to maintain.


Previous: , Up: Portability guidelines   [Contents][Index]