Update UDP to mention the inttypes.h exception.

Of course this wouldn't have prevented me from making that mistake
myself - it's not as if I carefully re-read the design principles
appendix before writing each code change! - but it might help explain
to _someone_ at some point...
This commit is contained in:
Simon Tatham 2018-11-22 07:09:06 +00:00
Родитель fa8f1cd9a0
Коммит 6de69d001f
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -47,6 +47,14 @@ C99 features are available (in particular \cw{<stdint.h>},
\cw{<stdbool.h>} and \c{inline}), but you shouldn't use things that
are new in C11 (such as \cw{<uchar.h>} or \cw{_Generic}).
One small exception to that: for historical reasons, we still build in
one configuration which lacks \cw{<inttypes.h>}. So that file is
included centrally in \c{defs.h}, and has a set of workaround
definitions for the \cw{PRIx64}-type macros we use. If you need to use
another one of those macros, you need to add a workaround definition
in \c{defs.h}, and don't casually re-include \cw{<inttypes.h>}
anywhere else in the source file.
Here are a few portability assumptions that we \e{do} currently allow
(because we'd already have to thoroughly vet the existing code if they
ever needed to change, and it doesn't seem worth doing that unless we