did a minimal amount of ANSIfication without changing anything that would
[citadel.git] / citadel / sysdep_decls.h
1 /* $Id$ */
2
3 #include <pthread.h>
4 #include "sysdep.h"
5 #include "server.h"
6
7 #ifdef __GNUC__
8 void lprintf (int loglevel, const char *format, ...) __attribute__((__format__(__printf__,2,3)));
9 void cprintf (const char *format, ...) __attribute__((__format__(__printf__,1,2)));
10 #else
11 void lprintf (int loglevel, const char *format, ...);
12 void cprintf (const char *format, ...);
13 #endif
14
15 void init_sysdep (void);
16 void begin_critical_section (int which_one);
17 void end_critical_section (int which_one);
18 int ig_tcp_server (int port_number, int queue_len);
19 int ig_uds_server(char *sockpath, int queue_len);
20 INLINE struct CitContext *MyContext (void);
21 struct CitContext *CreateNewContext (void);
22 void InitMyContext (struct CitContext *con);
23 void buffer_output(void);
24 void unbuffer_output(void);
25 void client_write (char *buf, int nbytes);
26 int client_read_to (char *buf, int bytes, int timeout);
27 int client_read (char *buf, int bytes);
28 int client_gets (char *buf);
29 void sysdep_master_cleanup (void);
30 void kill_session (int session_to_kill);
31 void *sd_context_loop (struct CitContext *con);
32 void start_daemon (int do_close_stdio);
33 void cmd_nset (char *cmdbuf);
34 int convert_login (char *NameToConvert);
35 void *worker_thread (void *arg);
36 void become_session(struct CitContext *which_con);
37 void CtdlRedirectOutput(FILE *fp, int sock);
38 void InitializeMasterCC(void);
39 void init_master_fdset(void);
40 void create_worker(void);
41
42 extern int num_sessions;
43 extern volatile int time_to_die;
44 extern int verbosity;
45 extern int rescan[];
46 extern pthread_t initial_thread;
47
48 extern struct worker_node {
49         pthread_t tid;
50         struct worker_node *next;
51 } *worker_list;