14 #if DB_VERSION_MAJOR < 5
15 #error Citadel requires Berkeley DB v5 or newer. Please upgrade.
21 #if SIZEOF_SIZE_T == SIZEOF_INT
22 #define SIZE_T_FMT "%d"
24 #define SIZE_T_FMT "%ld"
27 #if SIZEOF_LOFF_T == SIZEOF_LONG
28 #define LOFF_T_FMT "%ld"
30 #define LOFF_T_FMT "%lld"
33 void cputbuf(const StrBuf *Buf);
36 void cprintf (const char *format, ...) __attribute__((__format__(__printf__,1,2)));
38 void cprintf (const char *format, ...);
41 void init_sysdep (void);
42 int ctdl_tcp_server(char *ip_addr, int port_number, int queue_len);
43 int ctdl_uds_server(char *sockpath, int queue_len);
44 void buffer_output(void);
45 void unbuffer_output(void);
46 void flush_output(void);
47 int client_write (const char *buf, int nbytes);
48 int client_read_to (char *buf, int bytes, int timeout);
49 int client_read (char *buf, int bytes);
50 int client_getln (char *buf, int maxbytes);
51 int CtdlClientGetLine(StrBuf *Target);
52 int client_read_blob(StrBuf *Target, int bytes, int timeout);
53 void client_set_inbound_buf(long N);
54 int client_read_random_blob(StrBuf *Target, int timeout);
55 void client_close(void);
56 void sysdep_master_cleanup (void);
57 void kill_session (int session_to_kill);
58 void start_daemon (int do_close_stdio);
59 void checkcrash(void);
60 int convert_login (char *NameToConvert);
61 void init_master_fdset(void);
62 void *worker_thread(void *);
64 extern volatile int exit_signal;
65 extern volatile int shutdown_and_halt;
66 extern volatile int running_as_daemon;
67 extern volatile int restart_server;
73 extern int SyslogFacility(char *name);
75 #endif /* SYSDEP_DECLS_H */