-----Original Message----- From: Alvaro Lopez Ortega [mailto:[EMAIL PROTECTED] Sent: Friday, November 18, 2005 09.53 PM To: Dave Puchyr Cc: cherokee@lists.alobbs.com Subject: Re: [Cherokee] diffs to compile cherokee with a c++ compiler (was: calling a c++ handler)
Dave Puchyr wrote: > I was able to build embedded versions of 0.5.0b1 with the c++ > compilers and configurations detailed below. What is the point of this? I mean, by don't you build Cherokee with a C compiler and your handler with C++. As far as you get a dynamic library with the needed symbols, it should work. Calling c++ from c is not easy; check out http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html for a quick explanation. > The diffs to make the builds work are also below. The diffs aren't > ready for prime time but do produce working servers, albeit > minimally tested. I have been applying some of those change for an hour or some. Some of them are non-senses for me: castings over previous castings, castings to its type, etc. I just discovered Cherokee's existence about two weeks ago and the mega patch is for (my) experimentation, that's what I meant by "it's not ready for prime time". I changed as little as possible just to make it compile. Really, the only changes I made of value are to Makefile.MingW and read_config_embedded.c if, in fact, my changes to the c file are correct. > The bulk of the diffs deal with replacing the variable/data members > names "new", "template", "true", and "false", which are all reserved > words in c++, and explicitly casting pointers. Are "false" and "true" a problem for the C++ compiler? Could we add a conditional define to typedef cherokee_boolean_t to the C++ bool? They are a problem when defined as user types since they are of the standard c++ type "bool". Also, I thought I came across some code that was assigning a value potentially other than 0 or 1 to a cherokee_boolean_t, which is why I didn't use the standard c++ type in the patch. > Alo, I'll send you the diffs as an attachment. Sweet! Thanks Dave I wish I could be of more help, but I'm just not familiar enough with the Cherokee code. PS: I'm committing some of your changes now. -- Greetings, alo. http://www.alobbs.com _______________________________________________ Cherokee mailing list Cherokee@lists.alobbs.com http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee