| 1148 | #endif /* PC_LOCKING */ |
| 1149 | |
| 1150 | RESTORE_WARNING_UNREACHABLE_CODE |
| 1151 | |
| 1152 | /* |
| 1153 | file_newer returns TRUE if the file at a_path is newer then the file |
| 1154 | at b_path. If a_path does not exist, it returns FALSE. If b_path |
| 1155 | does not exist, it returns TRUE. |
| 1156 | */ |
| 1157 | boolean |
| 1158 | file_newer(const char *a_path, const char *b_path) |
| 1159 | { |
| 1160 | struct stat a_sb = { 0 }; |
| 1161 | struct stat b_sb = { 0 }; |
| 1162 | double timediff; |
| 1163 | |
| 1164 | if (stat(a_path, &a_sb)) |
| 1165 | return FALSE; |
| 1166 | |
| 1167 | if (stat(b_path, &b_sb)) |
| 1168 | return TRUE; |
| 1169 | timediff = difftime(a_sb.st_mtime, b_sb.st_mtime); |
| 1170 | |
| 1171 | if(timediff > 0) |
| 1172 | return TRUE; |
| 1173 | return FALSE; |
| 1174 | } |
| 1175 | |
| 1176 | #ifdef WIN32CON |
| 1177 | /* |
no test coverage detected