1dnl 2dnl Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved. 3dnl 4dnl This program is free software; you can redistribute it and/or 5dnl modify it under the terms of the GNU General Public License as 6dnl published by the Free Software Foundation; either version 2 of 7dnl the License, or (at your option) any later version. 8dnl 9dnl This program is distributed in the hope that it would be useful, 10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12dnl GNU General Public License for more details. 13dnl 14dnl You should have received a copy of the GNU General Public License 15dnl along with this program; if not, write the Free Software Foundation, 16dnl Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17dnl 18 19dnl 20dnl LTP_CHECK_SYSCALL_UTIMENSAT 21dnl ---------------------------- 22dnl 23AC_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 30int 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 38if 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) 41else 42 AC_MSG_RESULT(no) 43fi 44]) 45