about summary refs log tree commit diff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 11:59:43 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 11:59:43 +0000
commitc60ebd422171808ad58b936914055397bb205bef (patch)
tree7db3e5728d72ad209f8e22b9eb9f337e0b0c3e58 /src/include
parente28fe5908a91d8795ca9923d64eeed7d3e898434 (diff)
downloads6-c60ebd422171808ad58b936914055397bb205bef.tar.gz
s6-c60ebd422171808ad58b936914055397bb205bef.tar.xz
s6-c60ebd422171808ad58b936914055397bb205bef.zip
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/include')
-rw-r--r--src/include/s6/ftrigr.h19
-rw-r--r--src/include/s6/ftrigw.h8
-rw-r--r--src/include/s6/s6lock.h14
3 files changed, 20 insertions, 21 deletions
diff --git a/src/include/s6/ftrigr.h b/src/include/s6/ftrigr.h
index 9124f4d..db91ca9 100644
--- a/src/include/s6/ftrigr.h
+++ b/src/include/s6/ftrigr.h
@@ -3,9 +3,8 @@
 #ifndef FTRIGR_H
 #define FTRIGR_H
 
+#include <stdint.h>
 #include <skalibs/config.h>
-#include <skalibs/uint16.h>
-#include <skalibs/uint32.h>
 #include <skalibs/tai.h>
 #include <skalibs/genalloc.h>
 #include <skalibs/gensetdyn.h>
@@ -40,12 +39,12 @@ enum fr1state_e
 typedef struct ftrigr1_s ftrigr1_t, *ftrigr1_t_ref ;
 struct ftrigr1_s
 {
-  uint32 options ;
+  uint32_t options ;
   unsigned int count ;
   fr1state_t state ;
   char what ;
 } ;
-#define FTRIGR1_ZERO { 0, 0, FR1STATE_ERROR, 0 }
+#define FTRIGR1_ZERO { .options = 0, .count = 0, .state = FR1STATE_ERROR, .what = 0 }
 extern ftrigr1_t const ftrigr1_zero ;
 
 
@@ -55,7 +54,7 @@ typedef struct ftrigr_s ftrigr, ftrigr_t, *ftrigr_ref, *ftrigr_t_ref ;
 struct ftrigr_s
 {
   skaclient_t connection ;
-  genalloc list ; /* array of uint16 */
+  genalloc list ; /* array of uint16_t */
   gensetdyn data ; /* set of ftrigr1_t */
   skaclient_buffer_t buffers ;
 } ;
@@ -76,21 +75,21 @@ extern void ftrigr_end (ftrigr_t *) ;
 
 #define ftrigr_fd(a) skaclient_fd(&(a)->connection)
 extern int ftrigr_update (ftrigr_t *) ;
-extern int ftrigr_check (ftrigr_t *, uint16, char *) ;
+extern int ftrigr_check (ftrigr_t *, uint16_t, char *) ;
 
 
  /* Synchronous functions with timeouts */
 
 #define FTRIGR_REPEAT 0x0001
 
-extern uint16 ftrigr_subscribe (ftrigr_t *, char const *, char const *, uint32, tain_t const *, tain_t *) ;
+extern uint16_t ftrigr_subscribe (ftrigr_t *, char const *, char const *, uint32_t, tain_t const *, tain_t *) ;
 #define ftrigr_subscribe_g(a, path, re, options, deadline) ftrigr_subscribe(a, path, re, options, (deadline), &STAMP)
-extern int ftrigr_unsubscribe (ftrigr_t *, uint16, tain_t const *, tain_t *) ;
+extern int ftrigr_unsubscribe (ftrigr_t *, uint16_t, tain_t const *, tain_t *) ;
 #define ftrigr_unsubscribe_g(a, id, deadline) ftrigr_unsubscribe(a, id, (deadline), &STAMP)
 
-extern int ftrigr_wait_and (ftrigr_t *, uint16 const *, unsigned int, tain_t const *, tain_t *) ;
+extern int ftrigr_wait_and (ftrigr_t *, uint16_t const *, unsigned int, tain_t const *, tain_t *) ;
 #define ftrigr_wait_and_g(a, list, len, deadline) ftrigr_wait_and(a, list, len, (deadline), &STAMP)
-extern int ftrigr_wait_or  (ftrigr_t *, uint16 const *, unsigned int, tain_t const *, tain_t *, char *) ;
+extern int ftrigr_wait_or  (ftrigr_t *, uint16_t const *, unsigned int, tain_t const *, tain_t *, char *) ;
 #define ftrigr_wait_or_g(a, list, len, deadline, what) ftrigr_wait_or(a, list, len, deadline, &STAMP, what)
 
 #endif
diff --git a/src/include/s6/ftrigw.h b/src/include/s6/ftrigw.h
index 2ffc20b..ae11a76 100644
--- a/src/include/s6/ftrigw.h
+++ b/src/include/s6/ftrigw.h
@@ -3,14 +3,14 @@
 #ifndef FTRIGW_H
 #define FTRIGW_H
 
-#include <sys/types.h>
-#include <skalibs/bytestr.h>
+#include <sys/stat.h>
+#include <string.h>
 
-extern int ftrigw_fifodir_make (char const *, int, int) ;
+extern int ftrigw_fifodir_make (char const *, gid_t, int) ;
 extern int ftrigw_notify (char const *, char) ;
 extern int ftrigw_notifyb (char const *, char const *, size_t) ;
 extern int ftrigw_notifyb_nosig (char const *, char const *, size_t) ;
-#define ftrigw_notifys(f, s) ftrigw_notifyb(f, (s), str_len(s))
+#define ftrigw_notifys(f, s) ftrigw_notifyb(f, (s), strlen(s))
 extern int ftrigw_clean (char const *) ;
 
 #endif
diff --git a/src/include/s6/s6lock.h b/src/include/s6/s6lock.h
index 03fb7d3..90ad05c 100644
--- a/src/include/s6/s6lock.h
+++ b/src/include/s6/s6lock.h
@@ -3,8 +3,8 @@
 #ifndef S6LOCK_H
 #define S6LOCK_H
 
+#include <stdint.h>
 #include <errno.h>
-#include <skalibs/uint16.h>
 #include <skalibs/tai.h>
 #include <skalibs/genalloc.h>
 #include <skalibs/gensetdyn.h>
@@ -29,7 +29,7 @@ typedef struct s6lock_s s6lock_t, *s6lock_t_ref ;
 struct s6lock_s
 {
   skaclient_t connection ;
-  genalloc list ; /* array of uint16 */
+  genalloc list ; /* array of uint16_t */
   gensetdyn data ; /* set of char */
   skaclient_buffer_t buffers ;
 } ;
@@ -50,7 +50,7 @@ extern void s6lock_end (s6lock_t *) ;
 
 #define s6lock_fd(a) skaclient_fd(&(a)->connection)
 extern int s6lock_update (s6lock_t *) ;
-extern int s6lock_check (s6lock_t *, uint16) ;
+extern int s6lock_check (s6lock_t *, uint16_t) ;
 
 
  /* Synchronous functions */
@@ -58,18 +58,18 @@ extern int s6lock_check (s6lock_t *, uint16) ;
 #define S6LOCK_OPTIONS_SH 0x0000U
 #define S6LOCK_OPTIONS_EX 0x0001U
 
-extern int s6lock_acquire (s6lock_t *, uint16 *, char const *, uint32, tain_t const *, tain_t const *, tain_t *) ;
+extern int s6lock_acquire (s6lock_t *, uint16_t *, char const *, uint32_t, tain_t const *, tain_t const *, tain_t *) ;
 #define s6lock_acquire_g(a, id, path, options, limit, deadline) s6lock_acquire(a, id, path, options, limit, (deadline), &STAMP)
 #define s6lock_acquire_sh(a, id, path, limit, deadline, stamp) s6lock_aquire(a, id, path, S6LOCK_OPTIONS_SH, limit, deadline, stamp)
 #define s6lock_acquire_ex(a, id, path, limit, deadline, stamp) s6lock_aquire(a, id, path, S6LOCK_OPTIONS_EX, limit, deadline, stamp)
 #define s6lock_acquire_sh_g(a, id, path, limit, deadline) s6lock_acquire_sh(a, id, path, limit, (deadline), &STAMP)
 #define s6lock_acquire_ex_g(a, id, path, limit, deadline) s6lock_acquire_ex(a, id, path, limit, (deadline), &STAMP)
-extern int s6lock_release (s6lock_t *, uint16, tain_t const *, tain_t *) ;
+extern int s6lock_release (s6lock_t *, uint16_t, tain_t const *, tain_t *) ;
 #define s6lock_release_g(a, id, deadline) s6lock_release(a, id, (deadline), &STAMP)
 
-extern int s6lock_wait_and (s6lock_t *, uint16 const *, unsigned int, tain_t const *, tain_t *) ;
+extern int s6lock_wait_and (s6lock_t *, uint16_t const *, unsigned int, tain_t const *, tain_t *) ;
 #define s6lock_wait_and_g(a, list, len, deadline) s6lock_wait_and(a, list, len, (deadline), &STAMP)
-extern int s6lock_wait_or  (s6lock_t *, uint16 const *, unsigned int, tain_t const *, tain_t *) ;
+extern int s6lock_wait_or  (s6lock_t *, uint16_t const *, unsigned int, tain_t const *, tain_t *) ;
 #define s6lock_wait_or_g(a, list, len, deadline) s6lock_wait_or(a, list, len, (deadline), &STAMP)
 
 #endif