Fossil SCM
Patch by Edward Berner: _set_errno and older MSVC Resolves problem on Windows NT 4.0
Commit
b9f0c78aaada9bb6a09e0b00ce1dc0714c01d67b
Parent
28c3674785a39d2…
1 file changed
+3
-3
+3
-3
| --- win/include/dirent.h | ||
| +++ win/include/dirent.h | ||
| @@ -866,18 +866,18 @@ | ||
| 866 | 866 | /* Set errno variable */ |
| 867 | 867 | static void |
| 868 | 868 | dirent_set_errno( |
| 869 | 869 | int error) |
| 870 | 870 | { |
| 871 | -#if defined(_MSC_VER) | |
| 871 | +#if defined(_MSC_VER) && _MSC_VER >= 1400 | |
| 872 | 872 | |
| 873 | - /* Microsoft Visual Studio */ | |
| 873 | + /* Microsoft Visual Studio 2005 and later */ | |
| 874 | 874 | _set_errno (error); |
| 875 | 875 | |
| 876 | 876 | #else |
| 877 | 877 | |
| 878 | - /* Non-Microsoft compiler */ | |
| 878 | + /* Non-Microsoft compiler or older Microsoft compiler */ | |
| 879 | 879 | errno = error; |
| 880 | 880 | |
| 881 | 881 | #endif |
| 882 | 882 | } |
| 883 | 883 | |
| 884 | 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) |
| 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 |