The source archive already has the cygwin-specific patch readline-4.2-X.patch applied. To remove and revert to a 'clean' readline-4.2 mv /CYGWIN-PATCHES/readline-4.2-X.patch /.. cd patch -p1 -R < ../readline-4.2-X.patch ------------------ Requirements: gcc-2.95.2-5 or later this was released in November 2000. The readline makefile uses new gcc switches and features introduced at that time) binutils-20001029-2 or later this was released in November 2000. The readline makefile uses new ld switches and features introduced in that binutils release) Direct Dependencies: none Canonical homepage: http://www.gnu.org/software/readline/readline.html Canonical download: ftp://ftp.gnu.org/pub/gnu/readline/ ------------------ To link this library with your projects: #1) include readline.h (and/or history.h, if you only want the history stuff) #2) to link with the static library, use '-static' on the link line and use '-DREADLINE_STATIC' when compiling your .c into a .o #3) to link with the dll compile and link as usual; no special flags or -Ddefines are necessary To build the library for cygwin: First, insure that gcc finds the termcap.h file from the ncurses distribution first, before the one from the termcap distribution. You can do this by adding 'CFLAGS=-I/usr/include/ncurses' to your configure line. This is because readline uses termcap functions, but will link to the ncurses library (which provides emulated versions of these termcap functions). If you've got the wrong termcap.h header, the link will fail. Also, make sure that configure can't find libtermcap. It has builtin preference for it, and will ignore '--with-curses' if it finds libtermcap. mv /usr/lib/libtermcap.a /usr/lib/libtermcap.a.orig unpack readline-4.2-X-src.tar.gz cd readline-4.2 CFLAGS="-I/usr/include/ncurses" ./configure --prefix=/usr --with-curses make make shared make examples make test make install # prefix=/tmp/usr make install-shared # prefix=/tmp/usr make install-examples # prefix=/tmp/usr If you like, strip the dll's: strip /usr/bin/cygreadline5.dll strip /usr/bin/cyghistory5.dll Don't forget to restore /usr/lib/libtermcap.a ------------------ Files included in the binary distro LIBS: /bin/cygreadline5.dll /bin/cyghistory5.dll /lib/libhistory.a /lib/libhistory.dll.a /lib/libreadline.a /lib/libreadline.dll.a INCLUDES: /include/readline/chardefs.h /include/readline/history.h /include/readline/keymaps.h /include/readline/readline.h /include/readline/readline_dll.h /include/readline/rlconf.h /include/readline/rlstdc.h /include/readline/tilde.h PROGS: /bin/fileman.exe /bin/rl.exe /bin/rltest.exe /bin/rlversion.exe /bin/fileman-stat.exe /bin/rl-stat.exe /bin/rltest-stat.exe /bin/rlversion-stat.exe DOCS: /doc/CHANGELOG /doc/CHANGES /doc/COPYING /doc/README /doc/USAGE /doc/Cygwin/readline-4.1.README /info/history.info /info/readline.info /info/rluserman.info /man/man3/readline.3 ------------------ Port Notes: As of readline-4.2, the API changed; some functions were changed to have the rl_ prefix. If your program won't link, try editing your source code as follows: completion_matches --> rl_completion_matches crlf --> rl_crlf ding --> rl_ding filename_completion_function --> rl_filename_completion_function free_undo_list --> rl_free_undo_list maybe_replace_line --> rl_maybe_replace_line maybe_save_line --> rl_maybe_save_line maybe_unsave_line --> rl_maybe_unsave_line username_completion_function --> rl_username_completion_function There were also a number of new functions added in readline-4.2, but that doesn't affect backwards compatibility. Since the function names for some functions were changed, the dll from readline-4.2 is NOT backwards compatible with older executables. Therefore, the DLL version number was bumped from the arbitrary "4" to the equally arbitrary "5". -- 4.1: The dll's are named according to this pattern: "cygreadline4.dll" NOT "libreadline.dll". This helps to avoid dll naming conflicts between cygwin dll's and dll's from other platforms (native, pw, etc). The dll's are VERSIONED. (i.e. "cygreadline5.dll" NOT "cygreadline.dll") Again, this helps distinguish the dll's from later, possibly incompatible releases. As long as newer releases are still API/ABI compatible, they will retain the same version number shown here (4). I had to export the xmalloc, xrealloc, and xfree functions from the dll, even though they were originally marked as private to the library. Without exporting those functions, the 'fileman' program won't build. Hopefully this won't cause any namespace clashes with other programs... Cygwin port maintained by: Charles Wilson cwilson@ece.gatech.edu