// vxworks-5.1.txt,v 1.2 1999/06/10 15:25:22 levine Exp

An anonymous contributor provided the following notes for using ACE
with VxWorks 5.1:

Hope this helps someone else. Note that I didn't run the tests on ACE so
I can't say that everything works.  What I ended up doing was writing a
few tests of my own to test out some of the features and get a feel for
what ACE could do so beware that maybe these aren't the
only things that one would have to change.

    1) Prerequisite -- make sure C++ run time support is working (like
       global/static constructor/destructor invocation)

    2) Used "$ACE_ROOT/include/makeinclude/platform_macros.GNU" for a guide
          to setup my environment variables.

            - ACE_ROOT, WIND_BASE, WIND_HOST_TYPE, CPU, and TOOLENV

    3) copied $ACE_ROOT/ace/config-vxworks5.x.h to $ACE_ROOT/ace/config.h

    4) copied $ACE_ROOT/include/makeinclude/platform_vxworks5.x_g++.GNU
       to  $ACE_ROOT/include/makeinclude/platform_macros.GNU

    5) had to modify ${ACE_ROOT}/include/makeinclude/platform_macros.GNU
       to add -DCPU=SPARClite, -msparclite to CCFLAGS and add
         $(ACE_ROOT) and /usr/local/lib/g++-include to INCLDIRS

        I think this was a "make" issue.

    6) had to modify $ACE_ROOT/ace/config.h
       to set/reset the following ACE configuration parameters:

        ACE_LACKS_POSIX_TIME, ACE_LACKS_SIGINFO_T, ACE_LACKS_IOSTREAM_TOTALLY,
        ACE_NEEDS_FTRUNCATE, ACE_LACKS_ACE_IOSTREAM

    7) added the following to $ACE_ROOT/ace/config.h:

#define ACE_SIZEOF_CHAR                 1
#define ACE_SIZEOF_SHORT                2
#define ACE_SIZEOF_INT                  4
#define ACE_SIZEOF_LONG                 4
#define ACE_SIZEOF_LONG_LONG            8
#define ACE_SIZEOF_FLOAT                4
#define ACE_SIZEOF_DOUBLE               8
#define ACE_SIZEOF_LONG_DOUBLE          16
#define ACE_SIZEOF_VOID_P               4

/*
 *  Since VxWorks does have clock_gettime() I really didn't want
 *  to set ACE_LACKS_CLOCK_GETTIME to get this define, so I made
 *  one of my own.
 */
typedef int clockid_t;

/*
 *  Prototypes for VxWorks functions that ACE uses.
 */
extern "C" char *sysBspRev(void);
extern "C" char *getcwd(char *, int);
extern "C" int  clock_gettime(clockid_t, struct timespec *);
extern "C" int  nanosleep(const struct timespec *, struct timespec *);

/*
 *  These because of some quirks with ACE_LACKS_IOSTREAMS_TOTALLY
 */
#define ACE_DEFAULT_LOG_STREAM  0

     8) I changed the last call argument in Log_Msg.cpp line 1095 from:

          this->msg_ostream ());

        to this:

          (FILE *) (this->msg_ostream ()));

     9) I used the 2.7.2.1 GNU compiler.
