fixed visual c++ 6.0 build issues

This commit is contained in:
Jeff Hill
2002-09-19 22:11:47 +00:00
parent ef5b5013a5
commit 17e5a0b98d
5 changed files with 51 additions and 29 deletions

View File

@@ -20,33 +20,51 @@ for details about TIMEZONE.</p>
<h2>GNU make version</h2>
<p>GNU make version 3.78.1 or later is required for builds. The README.html
file specifies version 3.70 but this version does not support the call function.
file specifies version 3.70 but this version does not support the call
function.</p>
<h2>Borland build</h2>
<p>The borland-x86 build of base fails in src/ca because the Borland compiler v5.5
does not support C++ placement delete. A fix is to add the following code after the
#include lines in ca/netIO.h and ca/syncGroup.h. </p>
<p>The borland-x86 build of base fails in src/ca because the Borland compiler
v5.5 does not support C++ placement delete. A fix is to add the following
code after the #include lines in ca/netIO.h and ca/syncGroup.h.</p>
<blockquote>
// does the local compiler support placement delete <br>
#if defined (_MSC_VER) <br>
# if _MSC_VER >= 1200 <br>
# define NETIO_PLACEMENT_DELETE <br>
# endif <br>
#elif defined ( __HP_aCC ) <br>
# if _HP_aCC > 033300 <br>
# define NETIO_PLACEMENT_DELETE <br>
# endif <br>
#elif defined ( __BORLANDC__ ) <br>
# if __BORLANDC__ > 0x550 <br>
# define NETIO_PLACEMENT_DELETE <br>
# endif <br>
#else <br>
# define NETIO_PLACEMENT_DELETE <br>
#endif <br>
<code>// does the local compiler support placement delete</code><br />
<code>#if defined (_MSC_VER)</code><br />
<code># if _MSC_VER &gt;= 1200</code><br />
<code># define NETIO_PLACEMENT_DELETE</code><br />
<code># endif</code><br />
<code>#elif defined ( __HP_aCC )</code><br />
<code># if _HP_aCC &gt; 033300</code><br />
<code># define NETIO_PLACEMENT_DELETE</code><br />
<code># endif</code><br />
<code>#elif defined ( __BORLANDC__ )</code><br />
<code># if __BORLANDC__ &gt; 0x550</code><br />
<code># define NETIO_PLACEMENT_DELETE</code><br />
<code># endif</code><br />
<code>#else</code><br />
<code># define NETIO_PLACEMENT_DELETE</code><br />
<code>#endif</code><br />
</blockquote>
<h2>Visual C++ 6.0 Build</h2>
<p>The order of certain Microsoft header file includes must be rearranged as
follows in base/src/osi/os/win32/osdMutex.c and possibly also
base/src/libCom/osi/os/win32/osdEvent.c. This problem does not exist with
Visual C++ 7.0 (visual C++ .net).</p>
<p><code>// visual c++ 6.0 appears to be sensitive to the</code></p>
<p><code>// order of the following four lines</code></p>
<p><code>#define VC_EXTRALEAN</code></p>
<p><code>#define _WIN32_WINNT 0x400</code> </p>
<p><code>#include &lt;windows.h&gt;</code></p>
<p><code>#include &lt;winsock2.h&gt;</code></p>
</body>
</html>

View File

@@ -70,9 +70,8 @@ nciu::nciu ( cac & cacIn, netiiu & iiuIn, cacChannelNotify & chanIn,
this->nameLength = static_cast <unsigned short> ( nameLengthTmp );
char * pTmpNameStr = new char [ this->nameLength ];
strcpy ( pTmpNameStr, pNameIn );
this->pNameStr = pTmpNameStr;
this->pNameStr = new char [ this->nameLength ];
strcpy ( this->pNameStr, pNameIn );
}
nciu::~nciu ()

View File

@@ -101,7 +101,7 @@ public:
private:
caAccessRights accessRightState;
cac & cacCtx;
const char * pNameStr;
char * pNameStr;
netiiu * piiu;
ca_uint32_t sid; // server id
unsigned count;

View File

@@ -20,9 +20,11 @@
#include <limits.h>
// visual c++ 6.0 appears to be sensitive to the
// order of the following
#define VC_EXTRALEAN
/* including less than this causes conflicts with winsock2.h :-( */
#define _WIN32_WINNT 0x400
#define _WIN32_WINNT 0x400 // currently not needed
#include <windows.h>
#include <winsock2.h>
#define epicsExportSharedSymbols

View File

@@ -18,12 +18,16 @@
*
*/
#include <stdio.h>
#include <limits.h>
// visual c++ 6.0 appears to be sensitive to the
// order of the following
#define VC_EXTRALEAN
/* including less than this causes conflicts with winsock2.h :-( */
#define _WIN32_WINNT 0x400
#include <windows.h>
#include <winsock2.h>
#define epicsExportSharedSymbols
@@ -308,4 +312,3 @@ epicsShareFunc void epicsShareAPI epicsMutexShow ( epicsMutexId pSem, unsigned l
}
}