2006-11-18 02:41:20 +03:00
# define HAVE_UNIXSOCKET 1
# include "replace.h"
# include "talloc.h"
# include "tdb.h"
2006-11-28 12:48:34 +03:00
# include "idtree.h"
2006-11-18 02:41:20 +03:00
# include "ctdb.h"
2007-04-17 19:59:39 +04:00
# include "lib/util/debug.h"
2006-11-18 02:41:20 +03:00
typedef bool BOOL ;
# define True 1
# define False 0
2007-04-17 16:13:06 +04:00
extern int LogLevel ;
2007-01-26 18:45:51 +03:00
2007-04-17 19:59:39 +04:00
# define DEBUG(lvl, x) if ((lvl) <= LogLevel) (do_debug x)
2006-11-18 02:41:20 +03:00
# define _PUBLIC_
# define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
2007-04-04 09:02:49 +04:00
# ifndef discard_const
# define discard_const(ptr) ((void *)((intptr_t)(ptr)))
# endif
2006-11-18 02:41:20 +03:00
struct timeval timeval_zero ( void ) ;
bool timeval_is_zero ( const struct timeval * tv ) ;
struct timeval timeval_current ( void ) ;
struct timeval timeval_set ( uint32_t secs , uint32_t usecs ) ;
int timeval_compare ( const struct timeval * tv1 , const struct timeval * tv2 ) ;
struct timeval timeval_until ( const struct timeval * tv1 ,
const struct timeval * tv2 ) ;
_PUBLIC_ struct timeval timeval_current_ofs ( uint32_t secs , uint32_t usecs ) ;
2007-04-16 10:01:37 +04:00
double timeval_elapsed ( struct timeval * tv ) ;
2006-11-18 02:41:20 +03:00
char * * file_lines_load ( const char * fname , int * numlines , TALLOC_CTX * mem_ctx ) ;
2007-07-10 12:13:47 +04:00
char * hex_encode_talloc ( TALLOC_CTX * mem_ctx , const unsigned char * buff_in , size_t len ) ;
2007-05-02 01:32:04 +04:00
_PUBLIC_ const char * * str_list_add ( const char * * list , const char * s ) ;
_PUBLIC_ int set_blocking ( int fd , BOOL set ) ;
2007-04-22 11:24:27 +04:00