Latest gcc doesn't like variables named 'true'.

This commit is contained in:
Andrew Johnson
2008-09-03 22:30:18 +00:00
parent 0bddd7dc8c
commit 8b88489b90
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -837,7 +837,7 @@ struct client *create_tcp_client ( SOCKET sock )
{
int status;
struct client *client;
int true = TRUE;
int intTrue = TRUE;
osiSocklen_t addrSize;
unsigned priorityOfEvents;
@@ -852,7 +852,7 @@ struct client *create_tcp_client ( SOCKET sock )
* faster. I take care of queue up as load increases.
*/
status = setsockopt ( sock, IPPROTO_TCP, TCP_NODELAY,
(char *) &true, sizeof (true) );
(char *) &intTrue, sizeof (intTrue) );
if (status < 0) {
errlogPrintf ( "CAS: TCP_NODELAY option set failed\n" );
destroy_client ( client );
@@ -864,7 +864,7 @@ struct client *create_tcp_client ( SOCKET sock )
* this task will find out and exit
*/
status = setsockopt ( sock, SOL_SOCKET, SO_KEEPALIVE,
(char *) &true, sizeof (true) );
(char *) &intTrue, sizeof (intTrue) );
if ( status < 0 ) {
errlogPrintf ( "CAS: SO_KEEPALIVE option set failed\n" );
destroy_client ( client );
+2 -2
View File
@@ -68,7 +68,7 @@ void rsrv_online_notify_task(void *pParm)
caHdr msg;
int status;
SOCKET sock;
int true = TRUE;
int intTrue = TRUE;
unsigned short port;
ca_uint32_t beaconCounter = 0;
char * pStr;
@@ -109,7 +109,7 @@ void rsrv_online_notify_task(void *pParm)
}
status = setsockopt (sock, SOL_SOCKET, SO_BROADCAST,
(char *)&true, sizeof(true));
(char *)&intTrue, sizeof(intTrue));
if (status<0) {
errlogPrintf ("CAS: online socket set up error\n");
epicsThreadSuspendSelf ();