comparison src/time.c @ 27342:41a940219183 v8.2.4199

patch 8.2.4199: MS-Windows: Support for MSVC 2003 is not useful Commit: https://github.com/vim/vim/commit/c351dc1e0ca959084ba36bb350291334bf74b9f8 Author: K.Takata <kentkt@csc.jp> Date: Mon Jan 24 11:24:08 2022 +0000 patch 8.2.4199: MS-Windows: Support for MSVC 2003 is not useful Problem: MS-Windows: Support for MSVC 2003 is not useful. Solution: Remove the exceptions for MSVC 2003. (Ken Takata, closes https://github.com/vim/vim/issues/9616)
author Bram Moolenaar <Bram@vim.org>
date Mon, 24 Jan 2022 12:30:04 +0100
parents da5b8e1405c6
children 898f520e798b
comparison
equal deleted inserted replaced
27341:fd8ea6ceff93 27342:41a940219183
1020 n = (n << 8) + c; 1020 n = (n << 8) + c;
1021 } 1021 }
1022 return n; 1022 return n;
1023 } 1023 }
1024 1024
1025 #ifdef _MSC_VER
1026 # if (_MSC_VER <= 1200)
1027 // This line is required for VC6 without the service pack. Also see the
1028 // matching #pragma below.
1029 # pragma optimize("", off)
1030 # endif
1031 #endif
1032
1033 /* 1025 /*
1034 * Write time_T to file "fd" in 8 bytes. 1026 * Write time_T to file "fd" in 8 bytes.
1035 * Returns FAIL when the write failed. 1027 * Returns FAIL when the write failed.
1036 */ 1028 */
1037 int 1029 int
1066 if (i + 1 > (int)sizeof(time_T)) 1058 if (i + 1 > (int)sizeof(time_T))
1067 // ">>" doesn't work well when shifting more bits than avail 1059 // ">>" doesn't work well when shifting more bits than avail
1068 buf[bi++] = 0; 1060 buf[bi++] = 0;
1069 else 1061 else
1070 { 1062 {
1071 #if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4 1063 # if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4
1072 c = (int)(wtime >> (i * 8)); 1064 c = (int)(wtime >> (i * 8));
1073 #else 1065 # else
1074 c = (int)((long_u)wtime >> (i * 8)); 1066 c = (int)((long_u)wtime >> (i * 8));
1075 #endif 1067 # endif
1076 buf[bi++] = c; 1068 buf[bi++] = c;
1077 } 1069 }
1078 } 1070 }
1079 } 1071 }
1080
1081 #ifdef _MSC_VER
1082 # if (_MSC_VER <= 1200)
1083 # pragma optimize("", on)
1084 # endif
1085 #endif
1086 1072
1087 #endif 1073 #endif
1088 1074
1089 /* 1075 /*
1090 * Put timestamp "tt" in "buf[buflen]" in a nice format. 1076 * Put timestamp "tt" in "buf[buflen]" in a nice format.