On 11/14/2013 07:08 PM, [email protected] wrote: > Hi! >> +AC_DEFUN([LTP_CHECK_SYSCALL_UTIMENSAT],[ >> + AC_MSG_CHECKING([for utimensat]) >> + AC_LINK_IFELSE([AC_LANG_SOURCE([ >> +#include <stdlib.h> >> +#include <sys/stat.h> >> +#include <fcntl.h> >> + >> +int main(void) { >> + long tv_nsec; >> + tv_nsec = UTIME_NOW; >> + tv_nsec = UTIME_OMIT; >> + >> + return utimensat(AT_FDCWD, (const char *) "/dev/null", NULL, 0); >> +}])],[has_utimensat="yes"]) > Why the cast to const char* and why cannot be the second parameter NULL > too (it's just linked not executed)? Yes, it can be NULL, it's just linked and not executed. I used (const char *) "/dev/null" for clarity.
Ok, I'll send an updated version with NULL. > >> + >> +if test "x$has_utimensat" == "xyes"; then >> + AC_DEFINE(HAVE_UTIMENSAT, 1, [Define to 1 if you have utimensat(2)]) >> + AC_MSG_RESULT(yes) >> +else >> + AC_MSG_RESULT(no) >> +fi >> +]) ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
