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 ptrdiff_t and 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:

Some system platforms violate these assumptions and are therefore not Gnulib porting targets. See Unsupported Platforms.

Previous: C99 features avoided by Gnulib, Up: Portability guidelines   [Contents][Index]