More C99-style comments.
[citadel.git] / citadel / server / sysdep_decls.h
1
2 #ifndef SYSDEP_DECLS_H
3 #define SYSDEP_DECLS_H
4
5 #include <stdarg.h>
6 #include "sysdep.h"
7
8 #ifdef HAVE_PTHREAD_H
9 #include <pthread.h>
10 #endif
11
12 #include "server.h"
13 #include "database.h"
14
15 #if SIZEOF_SIZE_T == SIZEOF_INT 
16 #define SIZE_T_FMT "%d"
17 #else
18 #define SIZE_T_FMT "%ld"
19 #endif
20
21 #if SIZEOF_LOFF_T == SIZEOF_LONG 
22 #define LOFF_T_FMT "%ld"
23 #else
24 #define LOFF_T_FMT "%lld"
25 #endif
26
27 void cputbuf(const StrBuf *Buf);
28
29 #ifdef __GNUC__
30 void cprintf (const char *format, ...) __attribute__((__format__(__printf__,1,2)));
31 #else
32 void cprintf (const char *format, ...);
33 #endif
34
35 void init_sysdep (void);
36 int ctdl_tcp_server(char *ip_addr, int port_number, int queue_len);
37 int ctdl_uds_server(char *sockpath, int queue_len);
38 void buffer_output(void);
39 void unbuffer_output(void);
40 void flush_output(void);
41 int client_write (const char *buf, int nbytes);
42 int client_read_to (char *buf, int bytes, int timeout);
43 int client_read (char *buf, int bytes);
44 int client_getln (char *buf, int maxbytes);
45 int CtdlClientGetLine(StrBuf *Target);
46 int client_read_blob(StrBuf *Target, int bytes, int timeout);
47 void client_set_inbound_buf(long N);
48 int client_read_random_blob(StrBuf *Target, int timeout);
49 void client_close(void);
50 void kill_session (int session_to_kill);
51 int convert_login (char *NameToConvert);
52 void init_master_fdset(void);
53 void *worker_thread(void *);
54
55 extern volatile int exit_signal;
56 extern volatile int shutdown_and_halt;
57 extern volatile int running_as_daemon;
58 extern volatile int restart_server;
59
60 extern int verbosity;
61 extern int rescan[];
62
63 extern int SyslogFacility(char *name);
64
65 #endif