when i use 'nmake -f Makefile.win32', compiler told me 'driver_alloc, driver_realloc, driver_free(in expat_erl.c, line 44)' is not constant. who can tell me how to solve this problem. thanks!
To access the most up-to-date ejabberd documentation, please visit docs.ejabberd.im »
when i use 'nmake -f Makefile.win32', compiler told me 'driver_alloc, driver_realloc, driver_free(in expat_erl.c, line 44)' is not constant. who can tell me how to solve this problem. thanks!
maybe the easiest way to solve it
beanbaby:
Have you deal with it?
i met the same problem. i'm a java programmer and don't know what the info meaning for.
so, i just edit [expat_erl.c, line 44] to:
static XML_Memory_Handling_Suite ms = {1024, 1024, 1024}; //picking 1024 just at my pleasure, don't ask me why
you could try it out.
good luck!
shit!
it will cause erl crashed when you run ejabberd
line44, modifed to static
line44, modifed to
static XML_Memory_Handling_Suite ms ;//= {driver_alloc, driver_realloc, driver_free};
and function expat_erl_start, modified like:
static ErlDrvData expat_erl_start(ErlDrvPort port, char *buff)
{
expat_data* d = (expat_data*)driver_alloc(sizeof(expat_data));
d->port = port;
ms.malloc_fcn = driver_alloc; //fill_ms
ms.realloc_fcn = driver_realloc;
ms.free_fcn = driver_free;
d->parser = XML_ParserCreate_MM("UTF-8", &ms, "\n");
....
Thanks for the fix. I've
Thanks for the fix. I've modified it a litte, and included it in git:
https://git.process-one.net/ejabberd/mainline/commit/aff99097e7bc818aa79...