Differences between revisions 5 and 6
Revision 5 as of 2008-11-14 13:42:11
Size: 1496
Editor: anonymous
Comment: converted to 1.6 markup
Revision 6 as of 2022-04-05 01:10:45
Size: 0
Editor: mkoeppe
Comment: outdated
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
To build readline v.5.2

 1. download the MSVC project [[attachment:readline-32.zip]]
 1. unzip the project
 1. open the folder readline-32
 1. double-click readline-32.sln
 1. press f5
 1. the project will warn you that it could not open readline.dll
 1. readline.dll should be located at .../readline-32/Debug
The sources that I worked from are available at http://gnuwin32.sourceforge.net/packages/readline.htm named readline-src.zip

and the original sources at http://ftp.gnu.org/gnu/readline/ named readline-5.2.tar.gz

Issues: This code does not work:

 . #if defined (HAVE_STRING_H)
 # include <string.h> #else /* !HAVE_STRING_H */
 . # include <strings.h>
 . #endif /* !HAVE_STRING_H */
this code does:

 . #if defined (HAVE_STRING_H)
 # include <string.h> #endif
 . #if defined (HAVE_STRINGS_H)
 . # include <strings.h> #endif
I changed extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap;

to static KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap;

which may break vi mode...

I had to comment out some redecelerations in readline.h.

The biggest fix was that MSVC does not allow for code such as int a = 3; int b = a; in the global name space, in C (although it does in C++), which is (I believe) not C99 compliant. So, a large array in bind.c named boolean_varlist[] had to be initialized in a function and the function called in each place where the variable was used.

[[attachment:readline-5.2-msvc-2008.patch]]