From 840f19a55cf2e66cffaf296d5cccf72cb143e76f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 13 Jun 2006 14:24:04 +0000 Subject: oops, got the POSIX macro switched around, works now svn path=/trunk/externals/hcs/; revision=5215 --- stat.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'stat.c') diff --git a/stat.c b/stat.c index 06d9d15..8d51443 100644 --- a/stat.c +++ b/stat.c @@ -38,7 +38,7 @@ #include #include -static char *version = "$Revision: 1.2 $"; +static char *version = "$Revision: 1.3 $"; t_int stat_instance_count; @@ -194,6 +194,13 @@ static void stat_output(t_stat* x) add_float_to_output(x, (t_float) stat_buffer.st_blksize); /* 86400 seconds == 24 hours == 1 day */ #ifdef _POSIX_C_SOURCE + add_float_to_output(x, (t_float) (stat_buffer.st_atime / 86400)); + add_float_to_output(x, (t_float) (stat_buffer.st_atime % 86400)); + add_float_to_output(x, (t_float) (stat_buffer.st_mtime / 86400)); + add_float_to_output(x, (t_float) (stat_buffer.st_mtime % 86400)); + add_float_to_output(x, (t_float) (stat_buffer.st_ctime / 86400)); + add_float_to_output(x, (t_float) (stat_buffer.st_ctime % 86400)); +#else add_float_to_output(x, (t_float) (stat_buffer.st_atimespec.tv_sec / 86400)); add_float_to_output(x, @@ -206,13 +213,6 @@ static void stat_output(t_stat* x) (t_float) (stat_buffer.st_ctimespec.tv_sec / 86400)); add_float_to_output(x, (t_float) (stat_buffer.st_ctimespec.tv_sec % 86400)); -#else - add_float_to_output(x, (t_float) (stat_buffer.st_atime / 86400)); - add_float_to_output(x, (t_float) (stat_buffer.st_atime % 86400)); - add_float_to_output(x, (t_float) (stat_buffer.st_mtime / 86400)); - add_float_to_output(x, (t_float) (stat_buffer.st_mtime % 86400)); - add_float_to_output(x, (t_float) (stat_buffer.st_ctime / 86400)); - add_float_to_output(x, (t_float) (stat_buffer.st_ctime % 86400)); #endif /* _POSIX_C_SOURCE */ outlet_anything(x->x_data_outlet,x->x_filename, x->output_count,x->output); -- cgit v1.2.1