[Mono-dev] msvc patch for eglib

Michael Jerris mike at jerris.com
Thu Sep 14 13:32:00 EDT 2006



> -----Original Message-----
> From: Miguel de Icaza [mailto:miguel at ximian.com]
> Sent: Thursday, September 14, 2006 11:58 AM
> To: Michael Jerris
> Cc: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-dev] msvc patch for eglib
> 
> Hello Michael,
> 
>     A few comments on the patch:
> 
> 	* The changes require ChangeLog entries that detail the changes

This is no where near merge-able, by the time I get to that, I
absolutely will do that 

> 
> 	* The coding style for some routines like gdate.c should follow
> 	  the coding conventions used in the rest of the code.

Is there an actual coding style document?  As for that code, it was just
pasted in to show what was missing.. for replacement functions like
that, would you like those in a separate file so it is easier to tweak
makefiles to just include them if it needs them?  


> 
> 	* Am not sure that the changes with varargs will continue to
> 	  work on Unix, could you test?


None of this code is tested yet, as I still do not have a completely
working build, still missing some functions.  Can someone verify the
correctly portable way to do varargs macros.  Microsofts docs say:
http://msdn2.microsoft.com/en-us/library/ms177415.aspx, which is what I
am using, I have done similar things on gcc and it has worked in the
past, gcc's docs seem to indicate the same:
http://www.delorie.com/gnu/docs/gcc/cpp_19.html.  Can anyone comment on
other compilers.  


> 
> 	* There are a lot of whitespace or newline changes in your
> 	  patch which make it impossible for me to determine what
> 	  changed, please fix that.

Sorry about that, please see other e-mail, it appears that I converted a
bunch of line endings to UNIX LF line endings unintentionally.  This is
probably required as it is the only thing everyone can use (MSVC won't
do MAC CR line endings, and MAC won't do windows line endings, everyone
like LF only).  I will update my patch to omit those changes

> 
> 	* vasprintf: please attach the license that the implementation
> 	  in freedts uses, if it is not MIT X11 we can not use it.

The header from the file in freetds (and a few other replacement
functions that may be interesting is:

/*
 * vasprintf(3)
 * 20020809 entropy at tappedin.com
 * public domain.  no warranty.  use at your own risk.  have a nice day.
 */
Is public domain acceptable, I know some places have issues with pd code
as it does not have an explicit grant of right to use\modify\distribute,
and pd is not recognized in some jurisdictions.  If this is an issue, I
can try to find another one, or contact the author to get him to
relicense with appropriate rights attached.



My intention of posting this was to let the group be aware of some of
the issues with msvc builds, and to get some direction on how to handle
some of the issues the most gracefully.  For example, I did explicit
ifdefs in the code for the header includes, is it better to do a
autotooled looking HAVE_BLAH ifdef for those?  What form do you want
replacement functions, separate files linked when needed, inline in
files in a separate file of all windows replacement functions, don't use
the replacement functions, but come up with an alternate implementation
for the function that uses them that would not need a replacement
function?  Is there any other direction that I can get about the
approach I should be taking, for example, I added eglib-config.h.win, is
this a good way to handle the generated header files?

Mike



More information about the Mono-devel-list mailing list