koreader/koreader-misc — pull request #6 by NiLuJe (2014-07-10 21:56:04+00:00)
Title: gcc-lua & gcc-lua-cdecl update

This should be considered more as a "Request For Comments" than a PR, so here goes:

During my adventures with the [Kindle screen refresh](/NiLuJe/koreader-base/tree/mxcb_wait_for), I had to update the mxcfb_kindle header, and delved into the cdecl stuff to regen the appropriate stuff.

I ended up with a value for a constant (an ioctl cmd) that looked a bit weird, so I tried updating gcc-lua & gcc-lua-cdecl, to see if it would help.

At first, it seemed like it [did](/NiLuJe/koreader-base/commit/e0c7f9e6be003317c3d45dcb785b2eea8dc0cdbb). But then again, I hit another overflow weirdness with [another header](/NiLuJe/koreader-base/commit/e16ad5686531961ca4df4ec74647a96a4a1f3c56).

Long story short: I'm neither very good at C, nor at Lua, so I'm a bit at a loss here. What I mangled here seems to work, and at least the updated stuff assures compatibility with newer GCC versions.

There's an header switch in the cdecl files (see my mxc_wait_for branch linked to earlier), but I realize that I could have fixed that by simply adding a compatibility header with the same name as before, whose single job would be to include the new ones, so it's not as annoying as I initially thought.