diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-06-13 14:24:04 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-06-13 14:24:04 +0000 |
commit | 840f19a55cf2e66cffaf296d5cccf72cb143e76f (patch) | |
tree | 6e9229fb4ca5999b82d1663faa031699b5269994 | |
parent | cef844f0015cec463d43b754da2b3a238d0e4e17 (diff) |
oops, got the POSIX macro switched around, works now
svn path=/trunk/externals/hcs/; revision=5215
-rw-r--r-- | stat.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -38,7 +38,7 @@ #include <sys/stat.h> #include <sys/errno.h> -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); |