[Mono-list] mono on FreeBSD, take 2

Garrett Rooney rooneg@electricjellyfish.net
Thu, 16 Aug 2001 08:02:25 -0400


--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Aug 16, 2001 at 08:07:54AM +0200, Dietmar Maurer wrote:
> Garrett Rooney wrote:
> 
> > so i had some free time and decided to take another crack at mono on freebsd.
> >
> > note, this is with code a few days old, so if anything has changed lately,
> > this isn't taking that into account.
> >
> > i wrote implementations of the is(whatever) math functions for freebsd
> > (basically just took the linux versions and used isnan() instead of
> > fpclassify().  that got everything compiling fine.
> 
> please send the patches, so that we can include them.

oh, absolutely.  right now i've just got them stuck in interp.c, which is of
course wrong.  i imagine someone will want to stick them into some other file
in case they need to be used in other places.

> > it looks like monodis is working fine (at least its output for a test program
> > i wrote seems reasonable).  pedump seems to work, except it complains about
> > fields in the CLI header that should be 0 but aren't.  the interpreter itself
> > is dying in ves_exec_method() at the CEE_CALL case, right as it calls
> > mono_get_method().
> >
> > i haven't looked into this closer, as i wanted to verify that i'm actually
> > following the right procedure to run this thing.  i built the class libraries
> > on windows, and copied corlibx.dll to /usr/local/lib/corlib.dll, since
> > mono-int seems to want corlib.dll to be there.  then i just ran mono-int
> > test.exe where test.exe is a simple c# program i wrote and compiled on
> > windows.  how's this so far?
> 
> Great :-) I think you have to use the monolib2 target to make the corlib:
> 
> >make CSC=csc monolib2
> 
> This include some classes needed by the runtime. There are also some regression
> tests in mono/mono/tests. Everything beside exception.exe and struct.exe should

i'll try that next time i get some time.  thanks.

(the math stuff is attached.  enjoy.)

-- 
garrett rooney                     Unix was not designed to stop you from 
rooneg@electricjellyfish.net       doing stupid things, because that would  
http://electricjellyfish.net/      stop you from doing clever things.

--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="math_stuff.h"

#ifndef isunordered
#   define isunordered(u, v)                              \
    (__extension__                                        \
     ({ __typeof__(u) __u = (u); __typeof__(v) __v = (v); \
        isnan(__u) || isnan(__v); }))
#endif

#ifndef islessgreater
#   define islessgreater(x, u)                                    \
    (__extension__                                                \
     ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y);         \
        !isunordered (__x, __y) && (__x < __y) || (__y < __x); }))
#endif

#ifndef islessequal
#   define islessequal(x, y)                              \
    (__extension__                                        \
     ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
        !isunordered(__x, __y) && __x <= __y; })) 
#endif

#ifndef isless
#   define isless(x, y)                                   \
    (__extension__                                        \
     ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
        !isunordered(__x, __y) && __x < __y; })) 
#endif

#ifndef isgreater
#   define isgreater(x, y)                                \
    (__extension__                                        \
     ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
        !isunordered(__x, __y) && __x > __y; }))
#endif


--45Z9DzgjV8m4Oswq--