I am : SunOS 5.6 Generic sun4c sparc SUNW,Sun_4_40
C compiler : /opt/SUNWspro/bin/cc
And now, the problem:
main()
{
struct stat bufstat;
if(bufstat.st_mtime != (time_t)0 )
;
The code above is quite edible for compiler.Quote:}
But at runtime 'st_mtime' field isn't recognised. Instead, 'st_mtim' play
the role of 'st_mtime'.
'st_mtim' in turn, isn't passed by the compiler.
Thus, parsing of bufstat (the more, after fstat() calls) cannot be
trusted.
/usr/include/sys/stat.h defines struct stat as follows (fields of interest
are presented):
#if defined(_KERNEL)
struct stat {
...
timestruc_t st_atime;
timestruc_t st_mtime;
timestruc_t st_ctime;
...
#else /* !defined(_KERNEL) */Quote:}
struct stat {
...
timestruc_t st_atim;
timestruc_t st_mtim;
timestruc_t st_ctim;
...
#endifQuote:}
Any ideas?
Alex,