0

What values ​​can take errno? At what minimum largest type variables can I store the value errno?

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

Posix requires errno to be equivalent to int:

http://pubs.opengroup.org/onlinepubs/000095399/functions/xsh_chap02_03.html

The symbol errno, defined by including the header, expands to a modifiable lvalue of type int. It is unspecified whether errno is a macro or an identifier declared with external linkage. If a macro definition is suppressed in order to access an actual object, or a program defines an identifier with the name errno, the behavior is undefined.

oakad
  • 6,945
  • 1
  • 22
  • 31