Dear all,
While the tests seem to go rather well but are not finished yet (and it will take quite some time), I have decided to make available anyhow the result of my activity.
The sources (and Visual Studio 2012 project files) are available at:
http://www.spazioit.com/software/naviserver-4.99.4-Win64.zip
There are two categories of changes:
1. The ones required to have the system compiled by Visual Studio 2012 using as target Windows 64. They are identified by the #ifdef _WIN64 clause.
2. A set of necessary cosmetics/make up changes to the overall code base to make it more compliant with nowadays C STDs, and therefore more “acceptable” to nowadays C compilers, they are:
a. I have made explicit all type conversions (with explicit casts)
b. I have modified all functions defined in K&R C STD, changing them into ANSI C STD
c. I have removed from the code base all reserved words, e.g.: new, delete, bool …
These change make the entire codebase less “old-style” and more maintainable in the future.
Hope it helps,
Maurizio
Any comment?
========
These changes make the entire codebase less “old-style” and more maintainable in the future.
Hope it helps,
Maurizio
To facilitate the discussion, I put in here some examples of the changes I made:
2.a.
From
mapPtr = ns_malloc(sizeof(Map));
To
mapPtr = (Map *) ns_malloc(sizeof(Map));
2.b.
From
int
TclX_WrongArgs (interp, commandNameObj, string)
Tcl_Interp * interp;
Tcl_Obj * commandNameObj;
char * string;
{
To
int
TclX_WrongArgs (Tcl_Interp * interp, Tcl_Obj * commandNameObj, char * string)
{
2.c
From
if (new) {
To
if (mm_new) {
All these changes have been applied everywhere.