hotspot/src/os/solaris/vm/os_solaris.cpp
changeset 37465 1d5551f466ee
parent 37442 942637261b21
child 38173 73d05e56ec86
equal deleted inserted replaced
37464:5373bbadb433 37465:1d5551f466ee
  1823     errno = ENAMETOOLONG;
  1823     errno = ENAMETOOLONG;
  1824     return -1;
  1824     return -1;
  1825   }
  1825   }
  1826   os::native_path(strcpy(pathbuf, path));
  1826   os::native_path(strcpy(pathbuf, path));
  1827   return ::stat(pathbuf, sbuf);
  1827   return ::stat(pathbuf, sbuf);
       
  1828 }
       
  1829 
       
  1830 static inline time_t get_mtime(const char* filename) {
       
  1831   struct stat st;
       
  1832   int ret = os::stat(filename, &st);
       
  1833   assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno));
       
  1834   return st.st_mtime;
       
  1835 }
       
  1836 
       
  1837 int os::compare_file_modified_times(const char* file1, const char* file2) {
       
  1838   time_t t1 = get_mtime(file1);
       
  1839   time_t t2 = get_mtime(file2);
       
  1840   return t1 - t2;
  1828 }
  1841 }
  1829 
  1842 
  1830 static bool _print_ascii_file(const char* filename, outputStream* st) {
  1843 static bool _print_ascii_file(const char* filename, outputStream* st) {
  1831   int fd = ::open(filename, O_RDONLY);
  1844   int fd = ::open(filename, O_RDONLY);
  1832   if (fd == -1) {
  1845   if (fd == -1) {