Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Dec 2004 11:34:11 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        peadar.edwards@gmail.com
Cc:        arch@freebsd.org
Subject:   Re: Header files with enums instead of defines?
Message-ID:  <20041222.113411.76074974.imp@bsdimp.com>
In-Reply-To: <34cb7c8404122205002bd7de18@mail.gmail.com>
References:  <20041222090855.GO79646@cirb503493.alcatel.com.au> <20041222103844.GI801@straylight.m.ringlet.net> <34cb7c8404122205002bd7de18@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041222.113411.76074974.imp>