00001
00002 #include <glib.h>
00003 #include <gmodule.h>
00004 #include <string.h>
00005 #include <glib/gprintf.h>
00006 #include <sys/stat.h>
00007
00008 #include "config.h"
00009
00010 #include <libxml/xmlmemory.h>
00011 #include <libxml/parser.h>
00012
00013 #include <errno.h>
00014 extern int errno;
00015
00016 #define osync_assert(x) do { \
00017 if (!(x)) { \
00018 fprintf(stderr, "%s:%i:E:%s: Assertion \"" #x "\" failed\n", __FILE__, __LINE__, __FUNCTION__); \
00019 abort(); \
00020 } } while (0)
00021
00022 #define osync_assert_msg(x, msg) do { \
00023 if (!(x)) { \
00024 fprintf(stderr, "%s:%i:E:%s: %s\n", __FILE__, __LINE__, __FUNCTION__, msg); \
00025 abort(); \
00026 } } while (0)
00027
00028 #define segfault_me char **blablabla = NULL; *blablabla = "test";
00029
00030 #define osync_return_if_fail(condition) do { \
00031 if (!(condition)) { \
00032 osync_debug ("ASSERT", 0, "%i: Assertion failed: \"%s\" in %s:%i:%s", getpid (), #condition, __FILE__, __LINE__, __FUNCTION__); \
00033 return; \
00034 } } while (0)
00035
00036 #define osync_return_val_if_fail(condition, val) do { \
00037 if (!(condition)) { \
00038 return (val); \
00039 } } while (0)
00040
00041 typedef struct OSyncDB OSyncDB;
00042
00043 #include "opensync_support.h"
00044 #include "opensync_user_internals.h"
00045 #include "opensync_change_internals.h"
00046 #include "opensync_env_internals.h"
00047 #include "opensync_error_internals.h"
00048 #include "opensync_db_internals.h"
00049 #include "opensync_format_internals.h"
00050 #include "opensync_member_internals.h"
00051 #include "opensync_group_internals.h"
00052 #include "opensync_plugin_internals.h"
00053 #include "opensync_filter_internals.h"
00054 #include "opensync_context_internals.h"
00055 #include "opensync_hashtable_internals.h"
00056 #include "opensync_message_internals.h"
00057 #include "opensync_queue_internals.h"
00058 #include "opensync_xml.h"