summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-09-20 11:41:44 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-09-20 11:41:44 -0700
commit574d4d4facb83ee5505a988f5dc5830602fc8048 (patch)
tree066da5a9aed77f145f5c942d2780df298a6a6b2d /file.c
parentf4bc0ca37b47fd731bf55bc6c4675a34092771da (diff)
parent6d16a15196857eb4fe2eb4ca3cf363f1221afe60 (diff)
downloadsubsurface-574d4d4facb83ee5505a988f5dc5830602fc8048.tar.gz
Merge branch 'time-function'
Merge the 64-bit timestamp_t time function branch. This makes subsurface not only safe against the 2038-year problem, but also avoids the use of thread-unsafe gmtime() etc. We still use the system time_t for initializing the calendar widget for adding a new dive, but that's cosmetic rather than anything fundamental. * time-function: FIND_TRIP: don't cast a timestamp to a pointer dive-time widget: fix incorrect use of timestamp_t Fix the incorrect data type for DIVE_DATE accesses Use a 64-bit 'timestamp_t' for all timestamps, rather than 'time_t'
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index ca39c8dd6..943be6f09 100644
--- a/file.c
+++ b/file.c
@@ -99,7 +99,7 @@ static int try_to_open_suunto(const char *filename, struct memblock *mem, GError
return success;
}
-static time_t parse_date(const char *date)
+static timestamp_t parse_date(const char *date)
{
int hour, min, sec;
struct tm tm;
@@ -171,7 +171,7 @@ static int try_to_open_csv(const char *filename, struct memblock *mem, enum csv_
char *p = mem->buffer;
char *header[8];
int i, time;
- time_t date;
+ timestamp_t date;
struct dive *dive;
for (i = 0; i < 8; i++) {