Hi,

I created a readline-5.2 WIN32 port, based on the readline-5.0 port 
http://gnuwin32.sourceforge.net/packages/readline.htm.

I actually applied the patch for readline-5.0 on readline-5.2 sources 
and made some manual fixing where the patch didn't succeed.

I also added the rl_free() function. I sent a mail with the patch to the 
readline maintainer Chet Ramey:

---------
Rationale:

It is always recommended to free the memory by the same module that 
allocated it. This fact becomes more evident when the module is 
dynamically linked: the main program and the shared library may use 
different memory allocation libraries, which might be problematic if the 
memory is allocated by the shared library and deallocated by the main 
program.

I  came across this problem when dynamically linking readline.dll, 
generated by mingw gcc compiler, from the main program compiled with 
Visual Studio .NET: the memory allocation is done by msvcrt.dll called 
from readline.dll, while the deallocation is done by msvcr80.dll (or the 
statically linked equivalent) called from the main program, which seems 
to be incompatible.

I attached the patch which adds the rl_free() function to readline 
library and changes free() to rl_free() in examples directory. The 
documentation in doc directory should be updated accordingly.
---------

The packages are available at:
http://gpsim.sourceforge.net/gpsimWin32/packages/readline-5.2-20061112-src.zip
http://gpsim.sourceforge.net/gpsimWin32/packages/readline-5.2-20061112-lib.zip
http://gpsim.sourceforge.net/gpsimWin32/packages/readline-5.2-20061112-bin.zip

The package is currently used by the gpsimWin32 project 
http://gpsim.sourceforge.net/gpsimWin32/gpsimWin32.html and SDCDB 
debugger ,  part of the SDCC project http://sdcc.sourceforge.net/.

In the lib packages there are libraries for mingw gcc and MSVC 8.0. The 
mingw libs are built using the cygwin "gcc -mno-cygwin". Just remove 
-mno-cygwin if you are using mingw gcc.

I think it would be nice to have the readline-5.2 package as a part of 
GnuWin32 suite.

If you think that something should be changed /added in the packages, 
please let me know.

Borut Razem


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to