summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-12 13:27:51 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-12 13:27:51 +0000
commit24528fc273258b3e6278c9e3fdd4ce80206735ab (patch)
tree352fbc7a771d68e6e7af5f76bf5b0593e89b88ad /src/include
parent09c9957582acb207a6c1518c94df6335c3a1d5d8 (diff)
downloadskalibs-24528fc273258b3e6278c9e3fdd4ce80206735ab.tar.xz
New sysdeps for st.st_atim etc., timespec_cmp
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/skalibs/djbtime.h3
-rw-r--r--src/include/skalibs/stat.h31
2 files changed, 34 insertions, 0 deletions
diff --git a/src/include/skalibs/djbtime.h b/src/include/skalibs/djbtime.h
index 980f3b2..386d435 100644
--- a/src/include/skalibs/djbtime.h
+++ b/src/include/skalibs/djbtime.h
@@ -10,6 +10,9 @@
#include <skalibs/tai.h>
+extern int timespec_cmp (struct timespec const *, struct timespec const *) ;
+
+
/* UTC <--> TAI conversions */
/* sysclock can be either TAI-10 or UTC */
diff --git a/src/include/skalibs/stat.h b/src/include/skalibs/stat.h
new file mode 100644
index 0000000..de85cce
--- /dev/null
+++ b/src/include/skalibs/stat.h
@@ -0,0 +1,31 @@
+/* ISC license. */
+
+#ifndef SKALIBS_STAT_H
+#define SKALIBS_STAT_H
+
+#include <skalibs/sysdeps.h>
+
+#ifdef SKALIBS_HASSTATIM
+
+#define ST_ATIM st_atim
+#define ST_MTIM st_mtim
+#define ST_CTIM st_ctim
+
+#else
+
+#ifdef SKALIBS_HASSTATIMESPEC
+
+#define ST_ATIM st_atimespec
+#define ST_MTIM st_mtimespec
+#define ST_CTIM st_ctimespec
+
+#else
+
+#define ST_ATIM st_how_the_fuck_do_you_even_get_atime_on_this_OS
+#define ST_MTIM st_how_the_fuck_do_you_even_get_mtime_on_this_OS
+#define ST_CTIM st_how_the_fuck_do_you_even_get_ctime_on_this_OS
+
+#endif
+#endif
+
+#endif