mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
reset errno even on systems using glibc
apparently it is not just BSD and musl libc that do not reset errno (not anymore) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
2c959dc7f3
commit
0655cbc3ed
1 changed files with 3 additions and 9 deletions
|
@ -54,15 +54,9 @@
|
|||
var = cmd; \
|
||||
} while (var == -1 && errno == EINTR)
|
||||
|
||||
// BSD and musl libc implementations do not reset errno and there is no
|
||||
// reliable way to check if some functions (e.g. strtoll()) errored or returned
|
||||
// a valid value if they do not reset errno
|
||||
#ifdef __GLIBC__
|
||||
# define Q_RESET_ERRNO
|
||||
#else
|
||||
# define Q_RESET_ERRNO errno = 0;
|
||||
#endif
|
||||
|
||||
// there is no reliable way to check if some functions (e.g. strtoll()) errored
|
||||
// or returned a valid value if errno is not reset
|
||||
#define Q_RESET_ERRNO errno = 0;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue