B20.1: small change for dlltool to enhance portability
Sun Mar 7 09:23:00 GMT 1999
I maintain several packages that are compiled with GNU gcc compilers
for the OS/2 and Win32 platforms. I use emx+gcc for OS/2 and CygWin
and MinGW32 for Win32. One example is the official RCS 5.7 release
for the PC that I maintain.
Some of these packages also contain DLLs (such as RCS, in which I
put the shared code into a rcslib.dll). With the current tools, I
can maintain a maximum of portability of the code between Win32
and OS/2 with only a different header file and Makefiles.
However, I need to use differen .DEF files for building DLLs
because I need to use additional statements in .DEF files for OS/2.
These are part of the Microsoft/IBM defined syntax of .DEF files
but are only meaningful for some linkers (on OS/2, mostly) and
are silently ignored by other linkers.
However, the GNU binary utilities do NOT silently ignore these
additional keywords which forces me to maintain different .DEF
files just because of one single line in them (I do not want
to use sed commands in Makefiles in order to keep build procedures
as simple as possible).
So what I did was adding support for these keywords to the
dlltool's scanner and parser grammars. Since they have no meaning
to CygWin and MinGW32, no other functionality has to be added.
The dlltool utility, with this patch, now silently ignores
the following additional keywords:
a) The DATA statement now can contain the attributes NONSHARED,
SINGLE and MULTIPLE.
b) The LIBRARY statement now can contain the attributes
INITINSTANCE, INITGLOBAL, TERMINSTANCE and TERMGLOBAL.
As I said above, they have no meaning and are silently ignored,
just for portability reasons.
I append the small context diff to this message as an attachment.
It is relative to the source code in the B20.1 source code package.
Please add it to future releases.
Kai Uwe Rommel
/* Kai Uwe Rommel ARS Computer & Consulting GmbH *
* email@example.com ( http://www.ars.de ) Muenchen, Germany *
* firstname.lastname@example.org ( http://www.leo.org/pub/comp/os/os2 maintenance) */
(See attached file: dlltool.dif)
More information about the Cygwin