OpenSync  0.22
opensync_internals.h
1 
2 #include <glib.h>
3 #include <gmodule.h>
4 #include <string.h>
5 #include <glib/gprintf.h>
6 #include <sys/stat.h>
7 
8 #include "config.h"
9 
10 #include <libxml/xmlmemory.h>
11 #include <libxml/parser.h>
12 
13 #include <errno.h>
14 extern int errno;
15 
16 #define osync_assert(x) do { \
17  if (!(x)) { \
18  fprintf(stderr, "%s:%i:E:%s: Assertion \"" #x "\" failed\n", __FILE__, __LINE__, __FUNCTION__); \
19  abort(); \
20  } } while (0)
21 
22 #define osync_assert_msg(x, msg) do { \
23  if (!(x)) { \
24  fprintf(stderr, "%s:%i:E:%s: %s\n", __FILE__, __LINE__, __FUNCTION__, msg); \
25  abort(); \
26  } } while (0)
27 
28 #define segfault_me char **blablabla = NULL; *blablabla = "test";
29 
30 #define osync_return_if_fail(condition) do { \
31  if (!(condition)) { \
32  osync_debug ("ASSERT", 0, "%i: Assertion failed: \"%s\" in %s:%i:%s", getpid (), #condition, __FILE__, __LINE__, __FUNCTION__); \
33  return; \
34  } } while (0)
35 
36 #define osync_return_val_if_fail(condition, val) do { \
37  if (!(condition)) { \
38  return (val); \
39  } } while (0)
40 
41 typedef struct OSyncDB OSyncDB;
42 
43 #include "opensync_support.h"
44 #include "opensync_user_internals.h"
45 #include "opensync_change_internals.h"
46 #include "opensync_env_internals.h"
47 #include "opensync_error_internals.h"
48 #include "opensync_db_internals.h"
49 #include "opensync_format_internals.h"
50 #include "opensync_member_internals.h"
51 #include "opensync_group_internals.h"
52 #include "opensync_plugin_internals.h"
53 #include "opensync_filter_internals.h"
54 #include "opensync_context_internals.h"
55 #include "opensync_hashtable_internals.h"
56 #include "opensync_message_internals.h"
57 #include "opensync_queue_internals.h"
58 #include "opensync_xml.h"