I've made some changes to the CVS already and I'll see if I can comment on the below.


changes to the source:

    1. dx/src/exec/dxmods (import_ss.c)  isnum conflicts
        with definition in ctypes.h, fix all instances:

         static Type isnum(char *p, int *d, float *f);

Already handled by renaming the function.


    2. dx/src/exec/dpexec loader.c using default DXunloadObj
        but need to add char *envvar to end of arg list:

        Error DXUnloadObjFile(char *fname, char *envvar)
     ***   This will have to be changed to enable loadable modules. ***

Need to get and compile the dl* functionality from http://www.darwinfo.com/. Then nothing needs to be re-written.


     3. Added "darwin"  arch type to acinclude.m4:
            ....
            elif test $unameS = "Darwin" ; then
              ac_cv_dx_arch=darwin

          also chose BSD-like options at bottom of file.
          Don't know if they are correct yet, but it's a start:

              if test $ARCH = "darwin" ; then
                DX_RTL_CFLAGS="-D_GNU_SOURCE -Ddarwin"
                DX_RTL_LDFLAGS="--shared "
                DX_RTL_DXENTRY="-eDXEntry"
        fi

Already fixed -- a little differently.


     4.  needed to touch /usr/include/malloc.h to fool config into
          thinking malloc.h is there. It's apparently built into the
          system, so  no .h is actually needed.

Didn't have this problem that I know of.


     5. dx/src/exec/dxmods/_compoper1.c

       #ifdef darwin
       #define trunc(x) ((float)((int)(x)))
        #endif

Added


     6. touch /usr/include/stream.h (another built-in?)

7. (XFree86 fix) comment out XWMGeometry(...) in /usr/X11R6/include/X11/Xutil.h

        #if 0   /* REG! */

        extern int XWMGeometry(
        #if NeedFunctionPrototypes
            Display*            /* display */,
            int                 /* screen_number */,
            _Xconst char*       /* user_geometry */,
            _Xconst char*       /* default_geometry */,
            unsigned int        /* border_width */,
            XSizeHints*         /* hints */,
            int*                /* x_return */,
            int*                /* y_return */,
            int*                /* width_return */,
            int*                /* height_return */,
            int*                /* gravity_return */
        #endif
        );

        #endif

Didn't have problems with 6,7, or 8.


  8.  (Logan-specific OpenMotif fix, see Readme.darwin in that distro)
        Add -lwcs -llanginfo to the makefiles:

          LIBS = -ldpstk -ldps -lz -lm -lSM -lICE -lXm -lwcs -llanginfo
                       -lXp -L/usr/X11R6/lib -lGL -lm -lXext -lXt -lX11
                       -lSM -lICE -L/usr/X11R6/lib -lpthread
        in
               dxui makefile
               prompter makefile
               builder makefile
               tutor makefile
               etc.

         9. dxuilib/PacketIF.C:

#if !defined(linux) && !defined(cygwin) && !defined(freebsd) && !defined(darwin)
          extern int errno;
           #endif

       10. in startup/StartupWindow.C

#if defined(ibm6000) || defined(hp700) || defined(alphax) || defined(sun4) || defined(linux) || defined(cygwin) || defined(freebsd) || defined(darwin)
        #define USE_WAIT3 1
        #endif

11.  In  dxworker.in

        case Darwin:
        set exarch=darwin
        set uiarch=darwin

        set remote=/usr/bin/rsh

         breaksw

        #
        # check system version
        #
        switch ( $uiarch )

        ... stuff omitted ...

          case darwin:
        breaksw

Fixes in for 9, 10, 11, and 12


12. dx/src/uipp/base/UIConfig.h

#if defined(sgi)
# define EXECVE_2ND_TYPE char **
#elif defined(hp700) || defined(aviion) || defined(ibm6000) || defined(solaris)
|| defined(alphax) || defined(linux) || defined(freebsd) || defined(darwin)
# define EXECVE_2ND_TYPE char * const*
#else
# define EXECVE_2ND_TYPE const char **
#endif

#if defined(sun4) || defined(sgi)
# define EXECVE_3RD_TYPE char **
#elif defined(hp700) || defined(aviion) || defined(ibm6000) || defined(solaris)
|| defined(alphax) || defined(linux) || defined(freebsd) || defined(darwin)
# define EXECVE_3RD_TYPE char * const*
#else
# define EXECVE_3RD_TYPE const char **
#endif

I will try and get the following added.

********** now for /src/exec/dxlib/memory.c  ***********

Here are the parts I am more confident of:

1. necessary includes:

#if darwin
#include <mach-o/ldsyms.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#endif

2. must hide "extern int end;" statements from darwin
    (see man get_end) ... just need to rearrange a few
    #ifdefs appropriately.

3. calculate physmem

#if darwin

        int mib[2], pmem;
        size_t len;

        mib[0] = CTL_HW;
        mib[1] = HW_PHYSMEM;
        len = sizeof(pmem);
        sysctl(mib, 2, &pmem, &len, NULL, 0);

        physmem = (uint)((double)pmem/(1024.0*1024.0));

#endif


Richard


--
.............................................................................
David L. Thompson                          The University of Montana
mailto:[EMAIL PROTECTED]                 Computer Science Department
http://www.cs.umt.edu/u/dthompsn           Missoula, MT  59812
                                           Work Phone : (406)257-8530

Reply via email to