From e802cf14e30a4f8ca86d8c7e5cb6f3196684099e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 10 Feb 2018 07:01:59 -0800 Subject: [PATCH] Add note about errno to the documentation --- doc/index.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/index.rst b/doc/index.rst index ce9b7bf9..a00828b0 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -143,6 +143,12 @@ its numeric value being written to the stream (i.e. 1070 instead of letter 'ю' which is represented by ``L'\x42e'`` if we use Unicode) which is rarely what is needed. +Note that fmt does not use the value of the ``errno`` global to communicate +errors to the user, but it may call system functions which set ``errno``. Since +fmt does not attempt to preserve the value of ``errno``, users should not make +any assumptions about it and always set it to ``0`` before making any system +calls that convey error information via ``errno``. + .. _portability: Portability