summaryrefslogtreecommitdiff
path: root/os-patches/vxworks-5.1.txt
blob: dbf657bf85469264e1cb58dfd7198b12d987c52b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// $Id$

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.