00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00040
00041 #ifndef _SYNCML_INTERNALS_H
00042 #define _SYNCML_INTERNALS_H
00043
00044 #include <glib.h>
00045
00046
00047 #include <string.h>
00048 #include <glib/gprintf.h>
00049 #include <sys/stat.h>
00050 #include <stdint.h>
00051 #include <stddef.h>
00052 #include <stdlib.h>
00053
00054 #include "config.h"
00055
00056 #include <errno.h>
00057 extern int errno;
00058
00059 #if defined(sun) && defined(__SVR4)
00060 #define __FUNCTION__ __func__
00061 #endif
00062
00063 #define smlAssert(x) if (!(x)) { fprintf(stderr, "%s:%i:E:%s: Assertion \"" #x "\" failed\n", __FILE__, __LINE__, __FUNCTION__); abort();}
00064 #define smlAssertMsg(x, msg) if (!(x)) { fprintf(stderr, "%s:%i:E:%s: %s\n", __FILE__, __LINE__, __FUNCTION__, msg); abort();}
00065 #define segfault_me char **blablabla = NULL; *blablabla = "test";
00066
00067 #define return_if_fail(condition) do { \
00068 if (!(condition)) { \
00069 return; \
00070 } } while (0)
00071
00072 #define return_val_if_fail(condition, val) do { \
00073 if (!(condition)) { \
00074 return (val); \
00075 } } while (0)
00076
00077 #include "sml_support.h"
00078 #include "sml_parse.h"
00079
00080 #endif
00081