allow amalgamation of files, at least symbols don't clash anymore.

more related to amalgamation later.



SVN revision: 42312
This commit is contained in:
Gustavo Sverzut Barbieri 2009-09-07 04:23:05 +00:00
parent a4bd77905d
commit 8318f4c1f2
11 changed files with 103 additions and 16 deletions

View File

@ -183,7 +183,15 @@ struct _Eina_Accessor_Array
};
static int _eina_array_log_dom = -1;
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_array_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_array_log_dom, __VA_ARGS__)
static void eina_array_iterator_free(Eina_Iterator_Array *it) EINA_ARG_NONNULL(1);

View File

@ -91,10 +91,17 @@ struct _Eina_Benchmark
Eina_Inlist *runs;
};
static int _log_dom = -1;
static int _eina_benchmark_log_dom = -1;
#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_benchmark_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_benchmark_log_dom, __VA_ARGS__)
/**
* @endcond
@ -149,8 +156,8 @@ static int _log_dom = -1;
Eina_Bool
eina_benchmark_init(void)
{
_log_dom = eina_log_domain_register("eina_benchmark", EINA_LOG_COLOR_DEFAULT);
if (_log_dom < 0)
_eina_benchmark_log_dom = eina_log_domain_register("eina_benchmark", EINA_LOG_COLOR_DEFAULT);
if (_eina_benchmark_log_dom < 0)
{
EINA_LOG_ERR("Could not register log domain: eina_benchmark");
return EINA_FALSE;
@ -173,8 +180,8 @@ eina_benchmark_init(void)
Eina_Bool
eina_benchmark_shutdown(void)
{
eina_log_domain_unregister(_log_dom);
_log_dom = -1;
eina_log_domain_unregister(_eina_benchmark_log_dom);
_eina_benchmark_log_dom = -1;
return EINA_TRUE;
}

View File

@ -46,7 +46,14 @@ static const char look_up_table[] = {'0', '1', '2', '3', '4',
'a', 'b', 'c', 'd', 'e', 'f'};
static int _eina_convert_log_dom = -1;
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_convert_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_convert_log_dom, __VA_ARGS__)
#define HEXA_TO_INT(Hexa) (Hexa >= 'a') ? Hexa - 'a' + 10 : Hexa - '0'

View File

@ -163,7 +163,14 @@ static Eina_Mempool *_eina_list_mp = NULL;
static Eina_Mempool *_eina_list_accounting_mp = NULL;
static int _eina_list_log_dom = -1;
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_list_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_list_log_dom, __VA_ARGS__)
static inline Eina_List_Accounting*

View File

@ -54,7 +54,14 @@ struct _Eina_Magic_String
static int _eina_magic_string_log_dom = -1;
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_magic_string_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_magic_string_log_dom, __VA_ARGS__)
static Eina_Magic_String *_eina_magic_strings = NULL;

View File

@ -49,7 +49,15 @@
static int _eina_main_count = 0;
static int _eina_log_dom = -1;
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_log_dom, __VA_ARGS__)

View File

@ -197,7 +197,14 @@ struct _Eina_Matrixsparse_Iterator_Complete
static int _eina_matrixsparse_log_dom = -1;
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_matrixsparse_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_matrixsparse_log_dom, __VA_ARGS__)
static Eina_Mempool *_eina_matrixsparse_cell_mp = NULL;

View File

@ -46,10 +46,17 @@
static Eina_Hash *_backends;
static Eina_Array *_modules;
static int _log_dom = -1;
static int _eina_mempool_log_dom = -1;
#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_mempool_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_mempool_log_dom, __VA_ARGS__)
static Eina_Mempool *
@ -151,8 +158,8 @@ eina_mempool_init(void)
{
char *path;
_log_dom = eina_log_domain_register("eina_mempool", EINA_LOG_COLOR_DEFAULT);
if (_log_dom < 0)
_eina_mempool_log_dom = eina_log_domain_register("eina_mempool", EINA_LOG_COLOR_DEFAULT);
if (_eina_mempool_log_dom < 0)
{
EINA_LOG_ERR("Could not register log domain: eina_mempool");
return 0;
@ -203,8 +210,8 @@ eina_mempool_init(void)
return EINA_TRUE;
mempool_init_error:
eina_log_domain_unregister(_log_dom);
_log_dom = -1;
eina_log_domain_unregister(_eina_mempool_log_dom);
_eina_mempool_log_dom = -1;
return EINA_FALSE;
}
@ -236,8 +243,8 @@ eina_mempool_shutdown(void)
if (_backends)
eina_hash_free(_backends);
eina_log_domain_unregister(_log_dom);
_log_dom = -1;
eina_log_domain_unregister(_eina_mempool_log_dom);
_eina_mempool_log_dom = -1;
return EINA_TRUE;
}

View File

@ -71,8 +71,19 @@ void *alloca (size_t);
*/
static int EINA_MODULE_LOG_DOM = -1;
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(EINA_MODULE_LOG_DOM, __VA_ARGS__)
#ifdef WRN
#undef WRN
#endif
#define WRN(...) EINA_LOG_DOM_WARN(EINA_MODULE_LOG_DOM, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(EINA_MODULE_LOG_DOM, __VA_ARGS__)
#if defined(_WIN32) || defined(__CYGWIN__)

View File

@ -93,7 +93,14 @@ static Eina_Trash *_eina_rectangles = NULL;
static unsigned int _eina_rectangles_count = 0;
static int _eina_rectangle_log_dom = -1;
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_rectangle_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_rectangle_log_dom, __VA_ARGS__)
static int

View File

@ -155,8 +155,19 @@ struct _Eina_Stringshare_Head
static Eina_Stringshare *share = NULL;
static int _eina_stringshare_log_dom = -1;
#ifdef CRITICAL
#undef CRITICAL
#endif
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_eina_stringshare_log_dom, __VA_ARGS__)
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eina_stringshare_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eina_stringshare_log_dom, __VA_ARGS__)
static const unsigned char _eina_stringshare_single[512] = {