Header files with enums instead of defines?

M. Warner Losh imp at bsdimp.com
Wed Dec 22 10:37:12 PST 2004


In order to gain the benefits of the enums, errno would need to be an
enum errno_t or some such.  This breaks C++ code that sets errno = 0,
since you can't assign integers to errno values.

So even if you retained EBOGUS or whatever, this wouldn't work with
C++.  errno has to be an int to work there.

Warner


More information about the freebsd-arch mailing list