Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3A1830D5.DB9CB92B@ece.gatech.edu> Date: Sun, 19 Nov 2000 14:58:13 -0500 From: "Charles S. Wilson" X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: dickey AT herndon4 DOT his DOT com CC: ehud AT unix DOT simonwiesel DOT co DOT il, cygwin AT sources DOT redhat DOT com, bug-ncurses AT gnu DOT org Subject: Re: ncurses/terminfo problems References: <200011191705 DOT TAA03135 AT linux.> <3A181881 DOT E0E04CD7 AT ece DOT gatech DOT edu> <20001119132857 DOT A7328 AT home DOT his DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thomas Dickey wrote: > > On Sun, Nov 19, 2000 at 01:14:25PM -0500, Charles S. Wilson wrote: > > There is no official cygwin ncurses. I uploaded a test version a few > > there may be no "official" cygwin ncurses, but the webpage says it's on the > cdrom (probably 4.2), which is enough for most people to assume that. Sorry -- should have been more specific. The applications available on the Cygwin CDRom are not generally part of the downloadable "net release". I was speaking specifically about the packages available with the net release (cygwin v. 1.1.x, not 1.0==CDROM). > The current version of ncurses is 5.2 (20001021) > There's an faq at > http://dickey.his.com/ncurses/ncurses.faq.html Yes, that is the version I "ported" to cygwin about 10 days ago. Actually, "port" is a strong word -- it already builds OOB as a static lib. However, there are a LOT of modifications necessary to enable it to build as a dll. One patch is about 400k and can probably coexist with all other ports (that is, I think it's suitable to apply to your official sources and won't break other platforms.) Basically, it munges all header files and source files so that functions and variables are declared using a macro: extern NCURSES_EXPORT(type, funcname) (args....) extern NCURSES_EXPORT_VAR(type) varname These macros evaluate to "type funcname" on most platforms; on cygwin they evaluate to the appropriate __declspec() modifier depending on whether NCURSES_DLL, NCURSES_STATIC, or neither is defined. See, when building a dll, functions and variables must be defined as "extern type __declspec(dllexport) function()"; when linking to a dll, header files must declare them as "extern type __declspec(dllimport) function()"; when building or linking to a static lib, they should be declared as "extern type function()" just like other platforms. The one drawback is that it requires an additional header file (ncurses_dll.h) which does this magic, and is included by ncurses.h, termcap.h, and various other files. (Because of the dependency structure of the various header files and the order in which they include each other, the "magic" has to be added to multiple files, not just to one. So, it made sense to create a new header file and include it from multiple places) ------- The second patch is about 12k and is a true hack. *That* patch is part of the first step in my process of dll-izing a package. Basically, with the first patch, cygwiners can still build and use static libs; also, other platforms should be unaffected. The second patch is applied *after* running configure, and munges the configure-generated Makefiles to actually *build* a dll. Yes, it would be better to fix up libtool/autoconf/automake/Makefile.am/Makefile.in etc. I'll get to that -- this is just a first step. ------- If you are interested in absorbing the *first* patch for ncurses-5.3, I'll gladly submit it and get the paperwork for FSF copyright assignment filled out...and I'll verify that it doesn't break anything on Linux (Solaris, HPUX) if you like. --Chuck -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com