Changeset 212 in Main for trunk/Server/strptime.c
- Timestamp:
- Oct 3, 2024, 2:44:55 AM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/strptime.c
r182 r212 36 36 //__RCSID("$NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $"); 37 37 38 #if defined(__MINGW32__) 38 #if defined(__MINGW32__) || defined(_MSC_VER) 39 39 40 40 #include <ctype.h> … … 292 292 case 'D': /* The date as "%y/%m/%d". */ 293 293 { 294 int year; 294 295 new_fmt = HERE_D_FMT; 295 296 LEGAL_ALT(0); 296 297 state |= S_MON | S_MDAY | S_YEAR; 297 const intyear = split_year ? tm->tm_year : 0;298 year = split_year ? tm->tm_year : 0; 298 299 299 300 bp = (const unsigned char *)strptime((const char *)bp, … … 399 400 400 401 #ifndef TIME_MAX 402 #ifdef _MSC_VER 403 #define TIME_MAX INT32_MAX 404 #else 401 405 #define TIME_MAX INT64_MAX 406 #endif 402 407 #endif 403 408 case 's': /* seconds since the epoch */ 404 409 { 405 410 time_t sse = 0; 411 #ifdef _MSC_VER 412 uint32_t rulim = TIME_MAX; 413 #else 406 414 uint64_t rulim = TIME_MAX; 415 #endif 407 416 408 417 if (*bp < '0' || *bp > '9') { … … 417 426 } while ((sse * 10 <= TIME_MAX) && 418 427 rulim && *bp >= '0' && *bp <= '9'); 419 428 #ifdef _MSC_VER 429 if (sse < 0 || (uint32_t)sse > TIME_MAX) { 430 #else 420 431 if (sse < 0 || (uint64_t)sse > TIME_MAX) { 432 #endif 421 433 bp = NULL; 422 434 continue; 423 435 } 424 436 #ifdef _WIN32 437 #ifdef _MSC_VER 438 if (1) 439 #else 425 440 if (localtime_s(tm, &sse) == 0) 441 #endif 426 442 #else 427 443 if (localtime_r(&sse, tm))
Note:
See TracChangeset
for help on using the changeset viewer.