Re: [AD] HEADER_HACK

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, 8 Jun 2001, Eric Botcazou wrote:

> I just modified the way the export definition file is generated. As all this
> business is Windows specific, I got rid of the SCAN_EXPORT fake target (and
> of the file alscanex.h) and instead added src/win/dllexp.c that serves as a
> support for the preprocessing stage. I think you can easily tweak it to fit
> your needs.

My needs were actually met by being able to redefine AL_FUNC and friends
and then cleaning up with sed and friends.

> How does it work ? With a script like fixdll.bat ?

I define AL_FUNC to output a MIDL entry and then do a bunch of
search/replace to fix things up some.

Mainly the search and replace is because, even though MIDL supports the
'typedef' keyword, it still requires that structs (and even simple
typedefs like 'fixed') have the struct keyword before them, so I have to
change

clear(BITMAP* bmp) to clear(struct BITMAP* bmp)


> Tell me exactly which functions, I'll fix them.

I already gave you enough clues to find them with grep ^_^

BTW, what does dllexp.c do about dll ordinals?  The old batch file just
renumbered all the functions each run, which is kinda pointless, because
ordinals are not supposed to change.  If you change them, you might as
well not even have them.  If you keep the ordinals the same, then you
don't have to recompile old programs if compatibility is not broken in
some other way (like requiring additional function calls or changing the
behavior of an existing function).

Does the new dllexp.c keep the ordinals the same?  It could do so by
keeping an existing allegro.exp file and checking for changes rather than
writing a completely new one.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/