flush
[m6w6/ext-psi] / m4 / sys_time.m4
diff --git a/m4/sys_time.m4 b/m4/sys_time.m4
new file mode 100644 (file)
index 0000000..861fa41
--- /dev/null
@@ -0,0 +1,26 @@
+AC_DEFUN(PSI_CHECK_SYS_TIME, [
+       AC_CHECK_HEADERS(sys/time.h)
+
+       PSI_CONST(ITIMER_REAL, int)
+       PSI_CONST(ITIMER_VIRTUAL, int)
+       PSI_CONST(ITIMER_PROF, int)
+
+       PSI_STRUCT(struct timeval, [
+               time_t tv_sec,
+               suseconds_t tv_usec]
+       )
+       PSI_STRUCT(struct itimerval, [
+               struct timeval it_interval,
+               struct timeval it_value]
+       )
+       PSI_STRUCT(struct timezone, [
+               int tz_minuteswest,
+               int tz_dsttime]
+       )
+
+       PSI_DECL(int getitimer, [(int which, struct itimerval *value)])
+       PSI_DECL(int setitimer, [(int which struct itimerval *value, struct itimerval *ovalue)])
+       PSI_DECL(int gettimeofday, [(struct timeval *tp, struct timezone *tz)])
+       PSI_DECL(int utimes, [(char *path, struct timeval times@<:@2@:>@)])
+       PSI_DECL(int utimensat, [(int fd, char *path, struct timespec times@<:@2@:>@)])
+])