Forwarded to the dirent.h maintainer.
Edward, from your other mails, I understand that you
are using Windows NT 4.0, which apparently lacks
the _set_errno() in its msvcrt??.dll. That explains
why this problem is not discovered before, not
many users are using Windows NT 4.0.
Regards,
Jan Nijtmans
---------- Forwarded message ----------
From: Edward Berner <[email protected]>
Date: 2013/1/27
Subject: [fossil-users] _set_errno and older MSVC
To: [email protected]
Hello,
It appears that _set_errno() was introduced in Visual C++ 2005. Here
is a patch for dirent.h to keep it from using _set_errno on older
Microsoft compilers.
Edward Berner
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Index: win/include/dirent.h
==================================================================
--- win/include/dirent.h
+++ win/include/dirent.h
@@ -866,18 +866,18 @@
/* Set errno variable */
static void
dirent_set_errno(
int error)
{
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER >= 1400
- /* Microsoft Visual Studio */
+ /* Microsoft Visual Studio 2005 and later */
_set_errno (error);
#else
- /* Non-Microsoft compiler */
+ /* Non-Microsoft compiler or older Microsoft compiler */
errno = error;
#endif
}
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users