Back to index

citadel  8.12
sysdep_decls.h
Go to the documentation of this file.
00001 
00002 #ifndef SYSDEP_DECLS_H
00003 #define SYSDEP_DECLS_H
00004 
00005 #include <stdarg.h>
00006 #include "sysdep.h"
00007 
00008 #ifdef HAVE_PTHREAD_H
00009 #include <pthread.h>
00010 #endif
00011 
00012 #ifdef HAVE_DB_H
00013 #include <db.h>
00014 #elif defined(HAVE_DB4_DB_H)
00015 #include <db4/db.h>
00016 #else
00017 #error Neither <db.h> nor <db4/db.h> was found by configure. Install db4-devel.
00018 #endif
00019 
00020 
00021 #if DB_VERSION_MAJOR < 4 || DB_VERSION_MINOR < 1
00022 #error Citadel requires Berkeley DB v4.1 or newer.  Please upgrade.
00023 #endif
00024 
00025 #include "server.h"
00026 #include "database.h"
00027 
00028 #if SIZEOF_SIZE_T == SIZEOF_INT 
00029 #define SIZE_T_FMT "%d"
00030 #else
00031 #define SIZE_T_FMT "%ld"
00032 #endif
00033 
00034 void cputbuf(const StrBuf *Buf);
00035 
00036 #ifdef __GNUC__
00037 void cprintf (const char *format, ...) __attribute__((__format__(__printf__,1,2)));
00038 #else
00039 void cprintf (const char *format, ...);
00040 #endif
00041 
00042 void init_sysdep (void);
00043 int ctdl_tcp_server(char *ip_addr, int port_number, int queue_len, char *errormessage);
00044 int ctdl_uds_server(char *sockpath, int queue_len, char *errormessage);
00045 void buffer_output(void);
00046 void unbuffer_output(void);
00047 void flush_output(void);
00048 int client_write (const char *buf, int nbytes);
00049 int client_read_to (char *buf, int bytes, int timeout);
00050 int client_read (char *buf, int bytes);
00051 int client_getln (char *buf, int maxbytes);
00052 int CtdlClientGetLine(StrBuf *Target);
00053 int client_read_blob(StrBuf *Target, int bytes, int timeout);
00054 void client_set_inbound_buf(long N);
00055 int client_read_random_blob(StrBuf *Target, int timeout);
00056 void client_close(void);
00057 void sysdep_master_cleanup (void);
00058 void kill_session (int session_to_kill);
00059 void start_daemon (int do_close_stdio);
00060 void checkcrash(void);
00061 void cmd_nset (char *cmdbuf);
00062 int convert_login (char *NameToConvert);
00063 void init_master_fdset(void);
00064 void *worker_thread(void *);
00065 
00066 extern volatile int exit_signal;
00067 extern volatile int shutdown_and_halt;
00068 extern volatile int running_as_daemon;
00069 extern volatile int restart_server;
00070 
00071 extern int verbosity;
00072 extern int rescan[];
00073 
00074 
00075 extern int SyslogFacility(char *name);
00076 
00077 #endif /* SYSDEP_DECLS_H */