~ubuntu-branches/ubuntu/hardy/apache2/hardy-proposed

« back to all changes in this revision

Viewing changes to srclib/apr/file_io/unix/filestat.c

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Fritsch
  • Date: 2008-01-17 20:27:56 UTC
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20080117202756-hv38rjknhwa2ilwi
Tags: upstream-2.2.8
ImportĀ upstreamĀ versionĀ 2.2.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    finfo->device = info->st_dev;
82
82
    finfo->nlink = info->st_nlink;
83
83
    apr_time_ansi_put(&finfo->atime, info->st_atime);
 
84
#ifdef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
 
85
    finfo->atime += info->st_atim.tv_nsec / APR_TIME_C(1000);
 
86
#elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC)
 
87
    finfo->atime += info->st_atimensec / APR_TIME_C(1000);
 
88
#elif defined(HAVE_STRUCT_STAT_ST_ATIME_N)
 
89
    finfo->ctime += info->st_atime_n / APR_TIME_C(1000);
 
90
#endif
 
91
 
84
92
    apr_time_ansi_put(&finfo->mtime, info->st_mtime);
 
93
#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
 
94
    finfo->mtime += info->st_mtim.tv_nsec / APR_TIME_C(1000);
 
95
#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
 
96
    finfo->mtime += info->st_mtimensec / APR_TIME_C(1000);
 
97
#elif defined(HAVE_STRUCT_STAT_ST_MTIME_N)
 
98
    finfo->ctime += info->st_mtime_n / APR_TIME_C(1000);
 
99
#endif
 
100
 
85
101
    apr_time_ansi_put(&finfo->ctime, info->st_ctime);
86
 
    /* ### needs to be revisited  
87
 
     * if (wanted & APR_FINFO_CSIZE) {
88
 
     *   finfo->csize = info->st_blocks * 512;
89
 
     *   finfo->valid |= APR_FINFO_CSIZE;
90
 
     * }
91
 
     */
 
102
#ifdef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC
 
103
    finfo->ctime += info->st_ctim.tv_nsec / APR_TIME_C(1000);
 
104
#elif defined(HAVE_STRUCT_STAT_ST_CTIMENSEC)
 
105
    finfo->ctime += info->st_ctimensec / APR_TIME_C(1000);
 
106
#elif defined(HAVE_STRUCT_STAT_ST_CTIME_N)
 
107
    finfo->ctime += info->st_ctime_n / APR_TIME_C(1000);
 
108
#endif
 
109
 
 
110
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
 
111
#ifdef DEV_BSIZE
 
112
    finfo->csize = (apr_off_t)info->st_blocks * (apr_off_t)DEV_BSIZE;
 
113
#else
 
114
    finfo->csize = (apr_off_t)info->st_blocks * (apr_off_t)512;
 
115
#endif
 
116
    finfo->valid |= APR_FINFO_CSIZE;
 
117
#endif
92
118
}
93
119
 
94
120
apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,