From f9c97de46b9914c86366ddcb3474a36e654cbd42 Mon Sep 17 00:00:00 2001 From: Mihai Todor Date: Mon, 27 Nov 2017 11:25:13 +0000 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