This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dll, java, gcc, cygwin


Earnie Boyd <earnie_boyd@yahoo.com> writes:
> Please, group them together for ease of spliting the file, i.e.:
> 
> ThisFunc=ThisFunc@8
> ThatFunc=ThatFunc@8
> ThisFunc@8
> ThatFunc@8
> 

Earnie,

A good suggestion, but unfortunately that's going to be messy since all 
the exports are sorted, and I don't really want to add special logic just 
for this. Easiest way to split is to just re-create without the new
--add-stdcall-alias option (or use sed/perl/awk/what-not).

How about I add a special comment to each auto-added alias, such as
``added by --add-stdcall-alias'' that you can use to delete those lines?

There's always an easy way out -- use sed or perl. For example, to turn 
foo.def:

  EXPORTS
  	foo@1 @ 1;		add alias to this
	blah @ 2;		don't mess with this one

into foo2.def:

  EXPORTS
  	foo = foo@1 @ 1;	add alias to this
	blah @ 2;		don't mess with this one

I would use the following:
  
  $ < foo.def > foo2.def \
  sed -e 's,\([A-Za-z$:\-\_?][A-Za-z0-9/$:\-\_?]*\)\(@[0-9]*\),\1 = \1\2,'

But, since regexp seem to give people a stomach ache, I've added the
--add-stdcall-alias (and hopefully soon I'll upload a new version of
dllhelpers package that includes this dlltool and an enhanced dllwrap 
that adds a few useful features).

Note that the regexp above is almost the same as the one used in binutils
to recognize IDs, except for the missing '@' in \1.

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]