1 dnl 2 dnl Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved. 3 dnl 4 dnl This program is free software; you can redistribute it and/or 5 dnl modify it under the terms of the GNU General Public License as 6 dnl published by the Free Software Foundation; either version 2 of 7 dnl the License, or (at your option) any later version. 8 dnl 9 dnl This program is distributed in the hope that it would be useful, 10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 dnl GNU General Public License for more details. 13 dnl 14 dnl You should have received a copy of the GNU General Public License 15 dnl along with this program; if not, write the Free Software Foundation, 16 dnl Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 dnl 18 19 dnl 20 dnl LTP_CHECK_SYSCALL_UTIMENSAT 21 dnl ---------------------------- 22 dnl 23 AC_DEFUN([LTP_CHECK_SYSCALL_UTIMENSAT],[ 24 AC_MSG_CHECKING([for utimensat]) 25 AC_LINK_IFELSE([AC_LANG_SOURCE([ 26 #include <stdlib.h> 27 #include <sys/stat.h> 28 #include <fcntl.h> 29 30 int main(void) { 31 long tv_nsec; 32 tv_nsec = UTIME_NOW; 33 tv_nsec = UTIME_OMIT; 34 35 return utimensat(AT_FDCWD, NULL, NULL, 0); 36 }])],[has_utimensat="yes"]) 37 38 if test "x$has_utimensat" = "xyes"; then 39 AC_DEFINE(HAVE_UTIMENSAT, 1, [Define to 1 if you have utimensat(2)]) 40 AC_MSG_RESULT(yes) 41 else 42 AC_MSG_RESULT(no) 43 fi 44 ]) 45