~ubuntu-branches/ubuntu/trusty/patch/trusty-security

« back to all changes in this revision

Viewing changes to m4/nanosecond_stat.m4

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2009-12-02 10:25:26 UTC
  • mfrom: (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20091202102526-5luk0zsqhghu58l2
Tags: 2.6-2
* Update watch file.
* Section: vcs.
* Suggests: diffutils-doc instead of diff-doc, thanks Christoph Anton
  Mitterer for spotting. Closes: #558974.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AC_DEFUN([ag_CHECK_NANOSECOND_STAT],
2
 
  [AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
3
 
     [ac_cv_stat_nsec],
4
 
     [AC_TRY_COMPILE(
5
 
        [
6
 
          #include <sys/types.h>
7
 
          #include <sys/stat.h>
8
 
          #include <unistd.h>
9
 
          struct stat st;
10
 
        ],
11
 
        [ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec; ],
12
 
        [ac_cv_stat_nsec=yes],
13
 
        [ac_cv_stat_nsec=no])
14
 
     ])
15
 
   if test $ac_cv_stat_nsec = yes; then
16
 
     AC_DEFINE(HAVE_STAT_NSEC, 1, [Define to 1 if struct stat has nanosecond timestamps.])
17
 
   fi
18
 
 
19
 
   AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
20
 
     [ac_cv_stat_timeval],
21
 
     [AC_TRY_COMPILE(
22
 
        [
23
 
          #include <time.h>
24
 
          #include <sys/types.h>
25
 
          #include <sys/stat.h>
26
 
          #include <unistd.h>
27
 
          struct stat st;
28
 
        ],
29
 
        [ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec; ],
30
 
        [ac_cv_stat_timeval=yes],
31
 
        [ac_cv_stat_timeval=no])
32
 
     ])
33
 
   if test $ac_cv_stat_timeval = yes; then
34
 
     AC_DEFINE(HAVE_STAT_TIMEVAL, 1, [Define to 1 if struct stat comtains struct timeval's.])
35
 
   fi])