Charles S. Wilson
Sun Nov 19 11:59:00 GMT 2000
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
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.
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org
More information about the Cygwin