MAMAJNI: Changes to mamaconnectionjni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamadatetimejni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamadqpublishermanagerjni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamaftmemberjni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamacjni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamajniutils.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamamsgjni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamaqueuejni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamasourcejni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
MAMAJNI: Changes to mamasubscriptionjni.c fixing issues with compiling JNI with Clang due to void returns from non-void function.

Signed off by: Philip Preston <philippreston@mac.com>
COMMON: Fix issue with memsetting static const variable.

Currently the gIPAddress in common/linux/network.c is declared
as static const.  This is causing a run time error when compiled
with Clang not seen on GCC - reproducible with mamalistenc.  The
error seen is a "Bus Error: 10" on Darwin and "Segmentation Fault"
on Linux.  Extract from back trace as follows:

Program received signal SIGSEGV, Segmentation fault.
lookupIPAddress () at common/c_cpp/src/c/network.c:166
166         memset( (void *)gIPAddress, 0, 16 );
(gdb) bt
    subscMsgType=<error reading variable: Unhandled dwarf expression opcode 0x0>, msg=<optimized out>, issueSymbol=<optimized out>)
        at mama/c_cpp/src/c/msgutils.c:286
        ...

The issue is that with Clang is placing gIPAddress in read-only memory,
and we get memory issues when we call memset on that location.  The
change is to remove the const qualifier.

Tested again with mamalistenc and behaving correctly and using debugger
- can see the IP address getting populated correctly:

        gIPAddress      char [16]       "10.211.55.2"

Signed off by Philip Preston <philippreston@mac.com>
COMMON: Portability fixes for Common queue size and MUTEX code

Changes that improves OS portability, and will allow further
commits to support MAC OS X. The changes are for existing
operating systems and do not affect existing functionality.

There are two main changes:

1. PTHREAD_MUTEX_RECURSIVE_NP

Currently when setting pthread recursive type we use the “NP”
type which is “Non Portable”. This is not available on all
operating systems. The change is to hide the pthread type
behind a macros (WTHREAD_MUTEX_RECURSIVE), which will be set
in port.h for each operating system. The rest of the code base
will use this macros for initialising the thread.

2. Queue Size

Currently the Max queue size for common is set in queue.h, where
a macros checks for the presence of SEM_VALUE_MAX. If not available
its set to a hard coded value. This makes sense to move to port.h
as whether it uses SEM_VALUE_MAX or hard coded value is operating
system dependant. It will also allow setting of queue sizes when
SEM_VALUE_MAX is not an appropriate size

Tested on:

* Mac OS X 10.9
* Ubuntu 12.04 x86_64
* Windows Server 2008

All unit tests passing.

Signed-off-by: Phil Preston <philippreston@mac.com>
MAMDA: Implement WTHREAD_MUTEX_RECURSIVE in MAMDA.

Change PTHREAD_MUTEX_RECURSIVE_NP to WTHREAD_MUTEX_RECURSIVE in
line with changes in COMMON

Signed-off-by: Phil Preston <philippreston@mac.com>
COMMON: Adding support for MAC OSX

Added port.h specific for the Darwin kernel.
Added Semaphore implementation using dispatch semaphores, as the
POSIX implementation on MAC OS X isn't fully implementated and
does not support unamed counting semaphores.

Tested on:

* Mac OS X 10.9
* Ubuntu 12.04 x86_64
* Windows Server 2008

Signed-off-by: Phil Preston <philippreston@mac.com>
SCONS: Update SCons build environment to build on Mac OS X.

Changes include:

- Addition of Darwin tool
- Updated to Clang Tools
- Update of JNI tools to Support Oracle and Apple Java releases (< Java 1.7)
- Scons command line parameter for selecting OSX version (10.8 and 10.9)
- Selecting of Darwin tool in SConstruct and site_init
- Update library dependancies through common, mama and mamda code base

Tested on:

* Mac OS X 10.9
* Ubuntu 12.04 x86_64
* Windows Server 2008

Signed-off-by: Phil Preston <philippreston@mac.com>
MAMDA: Remove unnamed typedef from bookpulisher example.

Fixing a simple compiler warning with the bookpublisher application,
where the order struct is preceeded by an unnecessary typedef.

When built with clang and our compiler flags, this actually triggers
an error:

mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp:119:1: error:
    typedef requires a name [-Werror,-Wmissing-decl    arations]
    typedef struct order

Removing the typedef resolves the problem.

Signed-off by: Damian Maguire <dmaguire@nyx.com>
MSVC: Several modifications to make the MSVC Experience better

Several project paths were standardized on, and some issues with building
on different versions of visual studio are now also fixed.

Signed-off-by: Frank Quinn <fquinn@nyx.com>
MSVC: Removed rogue source file in OpenMamaMultiSubscriberCS

Mama symbol list subscriber somehow got into the project with the
last set of changes. This removes it.

Signed-off-by: Frank Quinn <fquinn@nyx.com>
MSVC: Fixed issue with qpid bridge not compiling as C++

This worked in 2005 but doesn't survive the import into 2010. This
fix should help persuade 2010 to use the C++ compiler for the qpid
bridge which the underlying proton libraries require.

Signed-off-by: Frank Quinn <fquinn@nyx.com>
MSVC: Modified library names which don't import to 2010 correctly

Libraries were delimited using semi-colons in 2005 which worked fine,
but in import to MSVC 2010, it disliked these and cowardly refused to
interpret them.

Frank Quinn <fquinn@nyx.com>