Changeset 3281


Ignore:
Timestamp:
Jan 5, 2019, 1:57:11 AM (6 years ago)
Author:
bird
Message:

kmk/configure.ac: Detect st_atim.nsec too as we need this for our touch implementation.

Location:
trunk/src/kmk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/kmk/acinclude.m4

    r3140 r3281  
    131131 ]
    132132)
     133
     134dnl bird: Copy of above for atime
     135AC_DEFUN([AC_STRUCT_ST_ATIM_NSEC],
     136 [AC_CACHE_CHECK([for nanoseconds access time field of struct stat],
     137   ac_cv_struct_st_atim_nsec,
     138   [ac_save_CPPFLAGS="$CPPFLAGS"
     139    ac_cv_struct_st_atim_nsec=no
     140    # st_atim.tv_nsec -- the usual case
     141    # st_atim._tv_nsec -- Solaris 2.6, if
     142    #   (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
     143    #    && !defined __EXTENSIONS__)
     144    # st_atim.st__tim.tv_nsec -- UnixWare 2.1.2
     145    # st_atime_n -- AIX 5.2 and above
     146    # st_atimespec.tv_nsec -- Darwin (Mac OSX)
     147    for ac_val in st_atim.tv_nsec st_atim._tv_nsec st_atim.st__tim.tv_nsec st_atime_n st_atimespec.tv_nsec; do
     148      CPPFLAGS="$ac_save_CPPFLAGS -DST_ATIM_NSEC=$ac_val"
     149      AC_TRY_COMPILE([#include <sys/types.h>
     150#include <sys/stat.h>
     151        ], [struct stat s; s.ST_ATIM_NSEC;],
     152        [ac_cv_struct_st_atim_nsec=$ac_val; break])
     153    done
     154    CPPFLAGS="$ac_save_CPPFLAGS"
     155   ])
     156
     157  if test $ac_cv_struct_st_atim_nsec != no; then
     158    AC_DEFINE_UNQUOTED([ST_ATIM_NSEC], [$ac_cv_struct_st_atim_nsec],
     159        [Define if struct stat contains a nanoseconds field])
     160  fi
     161 ]
     162)
     163
  • TabularUnified trunk/src/kmk/configure.ac

    r3262 r3281  
    8787
    8888AC_STRUCT_ST_MTIM_NSEC
     89AC_STRUCT_ST_ATIM_NSEC
    8990AC_CACHE_CHECK([whether to use high resolution file timestamps],
    9091               [make_cv_file_timestamp_hi_res],
Note: See TracChangeset for help on using the changeset viewer.