Fossil SCM

Patch by Edward Berner: _set_errno and older MSVC Resolves problem on Windows NT 4.0

jan.nijtmans 2013-01-27 19:54 trunk
Commit b9f0c78aaada9bb6a09e0b00ce1dc0714c01d67b
1 file changed +3 -3
--- win/include/dirent.h
+++ win/include/dirent.h
@@ -866,18 +866,18 @@
866866
/* Set errno variable */
867867
static void
868868
dirent_set_errno(
869869
int error)
870870
{
871
-#if defined(_MSC_VER)
871
+#if defined(_MSC_VER) && _MSC_VER >= 1400
872872
873
- /* Microsoft Visual Studio */
873
+ /* Microsoft Visual Studio 2005 and later */
874874
_set_errno (error);
875875
876876
#else
877877
878
- /* Non-Microsoft compiler */
878
+ /* Non-Microsoft compiler or older Microsoft compiler */
879879
errno = error;
880880
881881
#endif
882882
}
883883
884884
--- win/include/dirent.h
+++ win/include/dirent.h
@@ -866,18 +866,18 @@
866 /* Set errno variable */
867 static void
868 dirent_set_errno(
869 int error)
870 {
871 #if defined(_MSC_VER)
872
873 /* Microsoft Visual Studio */
874 _set_errno (error);
875
876 #else
877
878 /* Non-Microsoft compiler */
879 errno = error;
880
881 #endif
882 }
883
884
--- win/include/dirent.h
+++ win/include/dirent.h
@@ -866,18 +866,18 @@
866 /* Set errno variable */
867 static void
868 dirent_set_errno(
869 int error)
870 {
871 #if defined(_MSC_VER) && _MSC_VER >= 1400
872
873 /* Microsoft Visual Studio 2005 and later */
874 _set_errno (error);
875
876 #else
877
878 /* Non-Microsoft compiler or older Microsoft compiler */
879 errno = error;
880
881 #endif
882 }
883
884

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button