fixed issues discovered by the Borland compiler
This commit is contained in:
@@ -87,14 +87,13 @@ epicsShareFunc osiSpawnDetachedProcessReturn epicsShareAPI osiSpawnDetachedProce
|
||||
);
|
||||
|
||||
if ( W32status ) {
|
||||
char *pFmtArgs[] = {
|
||||
"Failed to start executable -",
|
||||
(char *) pBaseExecutableName,
|
||||
errStrMsgBuf,
|
||||
"Changes may be required in your \"path\" environment variable.",
|
||||
"PATH = ",
|
||||
getenv ("path")};
|
||||
|
||||
char *pFmtArgs[6];
|
||||
pFmtArgs[0] = "Failed to start executable -";
|
||||
pFmtArgs[1] = (char *) pBaseExecutableName;
|
||||
pFmtArgs[2] = errStrMsgBuf;
|
||||
pFmtArgs[3] = "Changes may be required in your \"path\" environment variable.";
|
||||
pFmtArgs[4] = "PATH = ";
|
||||
pFmtArgs[5] = getenv ("path");
|
||||
if ( pFmtArgs[5] == NULL ) {
|
||||
pFmtArgs[5] = "<empty string>";
|
||||
}
|
||||
|
||||
@@ -109,8 +109,13 @@ epicsShareFunc void epicsShareAPI threadInit (void)
|
||||
return;
|
||||
}
|
||||
|
||||
#if 1
|
||||
/* not arch neutral, but at least supported by w95 and borland */
|
||||
if ( InterlockedExchange ( (LPLONG) &win32ThreadGlobalMutex, (LONG) win32ThreadGlobalMutexTmp ) ) {
|
||||
#else
|
||||
/* not supported on W95, but the alternative requires assuming that pointer and integer are the same */
|
||||
if (InterlockedCompareExchange ( (PVOID *) &win32ThreadGlobalMutex, (PVOID) win32ThreadGlobalMutexTmp, (PVOID)0 ) != 0) {
|
||||
#endif
|
||||
CloseHandle (win32ThreadGlobalMutexTmp);
|
||||
/* wait for init to complete */
|
||||
status = WaitForSingleObject (win32ThreadGlobalMutex, INFINITE);
|
||||
@@ -278,7 +283,7 @@ epicsShareFunc unsigned int epicsShareAPI threadGetStackSize (threadStackSizeCla
|
||||
/*
|
||||
* epicsWin32ThreadEntry()
|
||||
*/
|
||||
static int WINAPI epicsWin32ThreadEntry (LPVOID lpParameter)
|
||||
static unsigned WINAPI epicsWin32ThreadEntry (LPVOID lpParameter)
|
||||
{
|
||||
win32ThreadParam *pParm = (win32ThreadParam *) lpParameter;
|
||||
BOOL stat;
|
||||
@@ -294,7 +299,7 @@ static int WINAPI epicsWin32ThreadEntry (LPVOID lpParameter)
|
||||
*/
|
||||
free ( pParm );
|
||||
|
||||
return ( stat ); /* this indirectly closes the thread handle */
|
||||
return ( (unsigned) stat ); /* this indirectly closes the thread handle */
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -123,8 +123,14 @@ static void osdTimeInit ()
|
||||
return;
|
||||
}
|
||||
|
||||
#if 1
|
||||
/* not arch neutral, but at least supported by w95 and borland */
|
||||
if ( InterlockedExchange ( (LPLONG) &osdTimeMutex, (LONG) osdTimeMutexTmp ) ) {
|
||||
#else
|
||||
|
||||
/* not supported on W95, but the alternative requires assuming that pointer and integer are the same */
|
||||
if (InterlockedCompareExchange ( (PVOID *) &osdTimeMutex, (PVOID) osdTimeMutexTmp, (PVOID)0 ) != 0) {
|
||||
#endif
|
||||
CloseHandle (osdTimeMutexTmp);
|
||||
/* wait for init to complete */
|
||||
status = WaitForSingleObject (osdTimeMutex, INFINITE);
|
||||
|
||||
Reference in New Issue
Block a user