Browse Source

* Oops, forgot to add this

svn: 2120
Bryan Drewery 21 năm trước cách đây
mục cha
commit
b2548d3b5b
1 tập tin đã thay đổi với 22 bổ sung0 xóa
  1. 22 0
      autotools/includes/stat.m4

+ 22 - 0
autotools/includes/stat.m4

@@ -0,0 +1,22 @@
+dnl  EGG_FUNC_TIMESPEC()
+dnl
+AC_DEFUN([EGG_FUNC_TIMESPEC], [
+AC_CHECK_TYPE([struct timespec], [AC_DEFINE(HAVE_TIMESPEC)], , [#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>])
+
+if test X"$ac_cv_type_struct_timespec" != X"no"; then
+ AC_CHECK_MEMBER([struct stat.st_mtim], AC_DEFINE(HAVE_ST_MTIM), [AC_CHECK_MEMBER([struct stat.st_mtimespec], AC_DEFINE([HAVE_ST_MTIMESPEC]))])
+ AC_MSG_CHECKING([for two-parameter timespecsub])
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/time.h>], [struct timespec ts1, ts2;
+ts1.tv_sec = 1; ts1.tv_nsec = 0; ts2.tv_sec = 0; ts2.tv_nsec = 0;
+#ifndef timespecsub
+#error missing timespecsub
+#endif
+timespecsub(&ts1, &ts2);],
+        [AC_DEFINE(HAVE_TIMESPECSUB2)
+        AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])
+fi
+dnl
+])