lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Tim,

On 6 May 2013 01:06, Tim Channon <tc@gpsl.net> wrote:
> On 05/05/2013 12:34, Matthew Wild wrote:
>> On 5 May 2013 10:57, Tim Channon <tc@gpsl.net> wrote:
>>> Expat is not usable. (not portable)
>>
>> Hmm, to what platform(s) is expat not portable?

> Silence is what I expected, ie. no one knows of an alternative.

Funny definition of silence you have :)

> I needed to ask. Go to plan B.

There may be other plans available that someone here knows of, but you
don't seem willing to reveal much information about your problem,
which makes it hard to help.

Here follows my best shot though...

> If I wanted to discuss expat this is not the place.
> expat in effect has dependencies on toolchains not available here, just
> how it is.

I would hesitate to say that expat has any such dependencies. It seems
to use autotools or something by default. However I managed to compile
it just fine here with:

  gcc -shared -D HAVE_MEMMOVE -I lib lib/*.c -o expat.so

Of course depending on your system and desired configuration you may
need to play around a little. If you are looking for portability, I
don't think I could recommend expat more for its combination of
simplicity, performance, compliance and portability (though there are
other parsers that excel more in fewer of these areas).

Ok, and here's another something for you... a pure-Lua implementation
of LuaExpat. It's MIT/X11 licensed (same as Prosody). It is *not*
well-tested (we don't use it for anything at the moment), probably
missing small features, and performance won't be as good as native
expat. However if you are just in need of something quick and dirty,
here you go:

    http://hg.prosody.im/trunk/raw-file/tip/fallbacks/lxp.lua

If you use it and fix any issues, patches are welcome (email to
developers@prosody.im is probably best).

Hope this helps!
Matthew