This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libc/include/sys/errno.h


Unfortunately, the variable is not historically declared const.  If you look at
glibc, djgpp, and BSD, you will see that is declared as newlib does.  Therefore,
the declaration should be left as-is.

-- Jeff J.

Earnie Boyd wrote:
ping.

Adding cygwin-developers so that it can be discussed there if necessary.

Earnie

Earnie Boyd wrote:

Any reason that this change shouldn't happen?

CGF, if this is accepted I can clean up the ugly hack in winsup/cygwin/errno.cc.

Earnie.


------------------------------------------------------------------------


2003-04-18 Earnie Boyd <earnie at users dot sf dot net>

* include/sys/errno.h (_sys_nerr): Add _CONST modifier due to the fact
that Cygwin uses it that way.
(sys_nerr): Add const modifier.


Index: errno.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/errno.h,v
retrieving revision 1.11
diff -u -3 -p -r1.11 errno.h
--- errno.h 24 Sep 2002 14:10:12 -0000 1.11
+++ errno.h 18 Apr 2003 13:18:56 -0000
@@ -18,10 +18,10 @@ extern int *__errno _PARAMS ((void));
/* Please don't use these variables directly.
Use strerror instead. */
extern __IMPORT _CONST char * _CONST _sys_errlist[];
-extern __IMPORT int _sys_nerr;
+extern __IMPORT _CONST int _sys_nerr;
#ifdef __CYGWIN__
extern __IMPORT const char * const sys_errlist[];
-extern __IMPORT int sys_nerr;
+extern __IMPORT const int sys_nerr;
#endif
#define __errno_r(ptr) ((ptr)->_errno)





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]