equal
deleted
inserted
replaced
1590 // Get the correct buffer size if buf is too small |
1590 // Get the correct buffer size if buf is too small |
1591 if (ret < 0) { |
1591 if (ret < 0) { |
1592 return _vscprintf(fmt, args); |
1592 return _vscprintf(fmt, args); |
1593 } |
1593 } |
1594 return ret; |
1594 return ret; |
|
1595 } |
|
1596 |
|
1597 static inline time_t get_mtime(const char* filename) { |
|
1598 struct stat st; |
|
1599 int ret = os::stat(filename, &st); |
|
1600 assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno)); |
|
1601 return st.st_mtime; |
|
1602 } |
|
1603 |
|
1604 int os::compare_file_modified_times(const char* file1, const char* file2) { |
|
1605 time_t t1 = get_mtime(file1); |
|
1606 time_t t2 = get_mtime(file2); |
|
1607 return t1 - t2; |
1595 } |
1608 } |
1596 |
1609 |
1597 void os::print_os_info_brief(outputStream* st) { |
1610 void os::print_os_info_brief(outputStream* st) { |
1598 os::print_os_info(st); |
1611 os::print_os_info(st); |
1599 } |
1612 } |
4587 } |
4600 } |
4588 |
4601 |
4589 return 0; |
4602 return 0; |
4590 } |
4603 } |
4591 |
4604 |
|
4605 int os::fileno(FILE* fp) { |
|
4606 return _fileno(fp); |
|
4607 } |
4592 |
4608 |
4593 // This code is a copy of JDK's sysSync |
4609 // This code is a copy of JDK's sysSync |
4594 // from src/windows/hpi/src/sys_api_md.c |
4610 // from src/windows/hpi/src/sys_api_md.c |
4595 // except for the legacy workaround for a bug in Win 98 |
4611 // except for the legacy workaround for a bug in Win 98 |
4596 |
4612 |