From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kai-Uwe Rommel" To: cygwin@sourceware.cygnus.com Subject: B20.1: small change for dlltool to enhance portability Date: Sun, 07 Mar 1999 09:23:00 -0000 Message-id: X-SW-Source: 1999-03/msg00172.html 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 * * rommel@ars.de ( http://www.ars.de ) Muenchen, Germany * * rommel@leo.org ( http://www.leo.org/pub/comp/os/os2 maintenance) */ (See attached file: dlltool.dif) From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kai-Uwe Rommel" To: cygwin@sourceware.cygnus.com Subject: B20.1: small change for dlltool to enhance portability Date: Wed, 31 Mar 1999 19:45:00 -0000 Message-ID: X-SW-Source: 1999-03n/msg00172.html Content-type: multipart/mixed; boundary="----------=_1583532708-65105-17" Message-ID: <19990331194500.UnvZcq2UcJaTMbK3tzJIY850QlY3pGvY72n1jYYyIfU@z> This is a multi-part message in MIME format... ------------=_1583532708-65105-17 Content-length: 2080 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 * * rommel@ars.de ( http://www.ars.de ) Muenchen, Germany * * rommel@leo.org ( http://www.leo.org/pub/comp/os/os2 maintenance) */ (See attached file: dlltool.dif) ------------=_1583532708-65105-17 Content-Type: text/x-diff; charset=us-ascii; name="dlltool.dif" Content-Disposition: inline; filename="dlltool.dif" Content-Transfer-Encoding: base64 Content-Length: 3282 KioqIGRlZnBhcnNlLnl+CVR1ZSBPY3QgMjcgMDI6MDQ6MTAgMTk5OA0KLS0t IGRlZnBhcnNlLnkJU3VuIE1hciAw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