This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin 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: errno.cc (_sys_nerr) patch


Ping.

Earnie Boyd wrote:
This patch leaves newlib/libc/include/sys/errno.h file as is. The importance of this patch is that currently _sys_nerr is marked as imported because ``extern __declspec(dllexport)'' is converted to __declspec(dllimport).

Earnie.


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


2003.05.01 Earnie Boyd <earnie@users.sf.net>

	* errno.cc: Remove macro definition kludges for _sys_nerr and sys_nerr.
	(_sys_nerr): Remove extern, const and NO_COPY modifiers to remove a
	section type conflict and to allow the variable to really be marked as
	exported instead of marked as imported.

Index: errno.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/errno.cc,v
retrieving revision 1.33
diff -u -3 -p -r1.33 errno.cc
--- errno.cc 27 Apr 2003 03:14:02 -0000 1.33
+++ errno.cc 1 May 2003 18:05:48 -0000
@@ -8,16 +8,12 @@ This software is a copyrighted work lice
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#define _sys_nerr FOO_sys_nerr
-#define sys_nerr FOOsys_nerr
#include "winsup.h"
#define _REENT_ONLY
#include <stdio.h>
#include <errno.h>
#include "cygerrno.h"
#include "thread.h"
-#undef _sys_nerr
-#undef sys_nerr
/* Table to map Windows error codes to Errno values. */
/* FIXME: Doing things this way is a little slow. It's trivial to change
@@ -295,7 +291,7 @@ const NO_COPY char __declspec(dllexport)
/* EOVERFLOW 139 */ "Value too large for defined data type"
};
-extern const int NO_COPY __declspec(dllexport) _sys_nerr = sizeof (_sys_errlist) / sizeof (_sys_errlist[0]);
+int __declspec(dllexport) _sys_nerr = sizeof (_sys_errlist) / sizeof (_sys_errlist[0]);
};
/* FIXME: Why is strerror() a long switch and not just:


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