autoconf: split into subdirectories; redirect calls in debug builds
[m6w6/ext-psi] / m4 / posix / sys_time.m4
diff --git a/m4/posix/sys_time.m4 b/m4/posix/sys_time.m4
new file mode 100644 (file)
index 0000000..7dfecfd
--- /dev/null
@@ -0,0 +1,25 @@
+PSI_CHECK_SYS_TIME() {
+       PSI_CONFIG_POSIX(sys/time, 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@:>@)])
+}