[Mono-dev] Mono on Windows/x64

Michael Jerris mike at jerris.com
Mon Apr 23 11:49:20 EDT 2007


Msvc (at least 2005), gcc, and sun studio at least all support __VA_ARGS__ for var args macros.  It is part of c99.  This should work without any ifdefs.  The code below (from an unrelated project) compiles fine on all of those compilers.  Are there any non-c99 compliant compilers in the targets needed (other than msvc 2005 of course, where at least this works fine?)

 

Mike

 

#define say_file(...) {\

            char tmp[80];\

            switch_status_t status;\

            snprintf(tmp, sizeof(tmp), __VA_ARGS__);\

            if ((status = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \

                  return status;\

            }\

            if (!switch_channel_ready(switch_core_session_get_channel(session))) {\

                  return SWITCH_STATUS_FALSE;\

            }}\

 

 

 

________________________________

From: Jonathan Chambers [mailto:joncham at gmail.com] 
Sent: Monday, April 23, 2007 11:29 AM
To: Miguel de Icaza
Cc: Michael Jerris; Kornél Pál; mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] Mono on Windows/x64

 

Hello,

On 4/23/07, Miguel de Icaza <miguel at novell.com > wrote:

Hello,

> I am not sure how soon any patches will make it into glib, but there
> is some effort. I initially thought eglib would be easier, but have
> since changed my mind ;-). A glib port will be
> used/appreciated/maintained by a wider community, and it has already
> been ported to build on Win32. eglib would need ported to win32, and
> not just win32, but msvc. This was not trivial when I tried, and I 
> doubt mono wants all the #ifdef's and changes necessary to get it
> working. Plus, glib is tested alot more than eglib.

We are going to drop glib and move to eglib in the future anyways.


Knowing this previously would have helped ;-). I have got conflicting advice in the past about whether glib or eglib would be the best approach.

	 

	In addition, eglib is such a small library that am curious as to what
	you think would require all that work to port eglib to Win64, it does
	not seem that difficult, and the code base is very small.


I'll look at the progress I made previously locally. I think the biggest issues were msvc issues like handling varargs differently than gcc (adding a decent number of #ifdefs), and lots of string conversions between Windows API (Unicode) and glib (utf-8). I'm willing to work on this again, with help from anyone else, if this is the future direction of mono. 

	 

	Miguel.



Thanks,
Jonathan 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070423/05e296bb/attachment.html 


More information about the Mono-devel-list mailing list