Skip to content

Commit

Permalink
changed size_t to time_t in fscache
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro-Salerno committed Oct 18, 2024
1 parent 5a11bd4 commit db64893
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
7 changes: 4 additions & 3 deletions include/fscache.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#pragma once

#include <stdio.h>
#include <time.h>

// These functions compare the "last modified" value of two files
// Return values:
Expand All @@ -32,6 +33,6 @@
// The idea behind using zero as error is that, in any case,
// if the two files were changed at the same time, when checking
// for caching, it is safer to rebuild the file
size_t fscache_cmp_ff(FILE *f1, FILE *f2);
size_t fscache_cmp_pp(const char *p1, const char *p2);
size_t fscache_cmp_fp(FILE *f1, const char *f2);
time_t fscache_cmp_ff(FILE *f1, FILE *f2);
time_t fscache_cmp_pp(const char *p1, const char *p2);
time_t fscache_cmp_fp(FILE *f1, const char *f2);
6 changes: 3 additions & 3 deletions src/darwin/fscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@

#include "fscache.h"

size_t fscache_cmp_ff(FILE *f1, FILE *f2) {
time_t fscache_cmp_ff(FILE *f1, FILE *f2) {
return 0; // temporary
}

size_t fscache_cmp_pp(const char *p1, const char *p2) {
time_t fscache_cmp_pp(const char *p1, const char *p2) {
return 0; // temporary
}

size_t fscache_cmp_fp(FILE *f1, const char *f2) {
time_t fscache_cmp_fp(FILE *f1, const char *f2) {
return 0; // temporary
}
6 changes: 3 additions & 3 deletions src/linux/fscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "fscache.h"

size_t fscache_cmp_ff(FILE *f1, FILE *f2) {
time_t fscache_cmp_ff(FILE *f1, FILE *f2) {
struct stat f1_stat;
struct stat f2_stat;

Expand All @@ -42,7 +42,7 @@ size_t fscache_cmp_ff(FILE *f1, FILE *f2) {
return f1_stat.st_mtime - f2_stat.st_mtime;
}

size_t fscache_cmp_pp(const char *p1, const char *p2) {
time_t fscache_cmp_pp(const char *p1, const char *p2) {
struct stat f1_stat;
struct stat f2_stat;

Expand All @@ -56,7 +56,7 @@ size_t fscache_cmp_pp(const char *p1, const char *p2) {
return f1_stat.st_mtime - f2_stat.st_mtime;
}

size_t fscache_cmp_fp(FILE *f1, const char *f2) {
time_t fscache_cmp_fp(FILE *f1, const char *f2) {
struct stat f1_stat;
struct stat f2_stat;

Expand Down
6 changes: 3 additions & 3 deletions src/windows/fscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

#include "fscache.h"

size_t fscache_cmp_ff(FILE *f1, FILE *f2) {
time_t fscache_cmp_ff(FILE *f1, FILE *f2) {
return 0; // temporary
}

size_t fscache_cmp_pp(const char *p1, const char *p2) {
time_t fscache_cmp_pp(const char *p1, const char *p2) {
return 0; // temporary
}

size_t fscache_cmp_fp(FILE *f1, const char *f2) {
time_t fscache_cmp_fp(FILE *f1, const char *f2) {
return 0; // temporary
}

0 comments on commit db64893

Please sign in to comment.