put away for mda correction of (#elif's)

This commit is contained in:
Janet B. Anderson
1993-07-26 14:27:36 +00:00
parent 9d44bf0a27
commit ad0a8632c7
11 changed files with 193 additions and 107 deletions
+40 -28
View File
@@ -122,13 +122,17 @@ static char *sccsId = "$Id$\t$Date$";
# include psldef.h
# include prcdef.h
# include descrip.h
#elif defined(UNIX)
#elif defined(vxWorks)
#else
# if defined(UNIX)
# else
# if defined(vxWorks)
# include <vxWorks.h>
# include <taskLib.h>
# include <task_params.h>
#else
# else
@@@@ dont compile @@@@
# endif
# endif
#endif
/*
@@ -353,7 +357,8 @@ ca_task_initialize
if (status != SS$_NORMAL)
lib$signal(status);
}
#elif defined(vxWorks)
#else
# if defined(vxWorks)
{
char name[15];
int status;
@@ -364,11 +369,11 @@ ca_task_initialize
FASTLOCKINIT(&client_lock);
FASTLOCKINIT(&event_lock);
#ifdef V5_vxWorks
# ifdef V5_vxWorks
io_done_sem = semBCreate(SEM_Q_PRIORITY, SEM_EMPTY);
#else
# else
io_done_sem = semCreate();
#endif
# endif
if(!io_done_sem){
abort();
}
@@ -391,9 +396,12 @@ ca_task_initialize
if (status != OK)
abort();
}
#elif defined(UNIX)
#else
# else
# if defined(UNIX)
# else
@@@@ dont compile in this case @@@@
# endif
# endif
#endif
}
@@ -1041,7 +1049,7 @@ int ca_build_and_connect
/* Save this channels name for retry if required */
strncpy(chix + 1, name_str, strcnt);
dllAdd(&iiu[BROADCAST_IIU].chidlist, chix);
dllAdd(&iiu[BROADCAST_IIU].chidlist, (DLLNODE *)chix);
/*
* set the conn tries back to zero so this channel's location
* can be found
@@ -1220,7 +1228,7 @@ ca_array_get
*
*
*/
ca_array_get_callback
int ca_array_get_callback
#ifdef __STDC__
(
chtype type,
@@ -1276,7 +1284,7 @@ ca_array_get_callback
monix->type = type;
monix->count = count;
dllAdd(&pend_read_list, monix);
dllAdd(&pend_read_list, (DLLNODE *)monix);
issue_get_callback(monix);
@@ -1356,7 +1364,7 @@ issue_get_callback(monix)
*
*
*/
ca_array_put
int ca_array_put
#ifdef __STDC__
(
chtype type,
@@ -1619,7 +1627,7 @@ void *astarg;
return ECA_ALLOCMEM;
pioe->io_done_arg = astarg;
pioe->io_done_sub = ast;
dllAdd(&ioeventlist,pioe);
dllAdd(&ioeventlist,(DLLNODE *)pioe);
UNLOCK;
}
@@ -1634,7 +1642,7 @@ void *astarg;
*
*
*/
ca_add_masked_array_event
int ca_add_masked_array_event
#ifdef __STDC__
(
chtype type,
@@ -1763,7 +1771,7 @@ unsigned mask;
/* It can be added to the list any place if it is remote */
/* Place in the channel list */
dllAdd(&chix->eventq, monix);
dllAdd(&chix->eventq, (DLLNODE *)monix);
ca_request_event(monix);
@@ -2083,7 +2091,7 @@ ca_clear_event
piiu->outstanding_ack_count++;
}
else{
dllDelete(&monix->chan->eventq, monix);
dllDelete(&monix->chan->eventq, (DLLNODE *)monix);
}
UNLOCK;
@@ -2172,7 +2180,7 @@ ca_clear_channel
*/
if(old_chan_state != cs_conn){
dllConcat(&free_event_list, &chix->eventq);
dllDelete(&piiu->chidlist, chix);
dllDelete(&piiu->chidlist, (DLLNODE *)chix);
if (chix->iocix != BROADCAST_IIU &&
!piiu->chidlist.count){
close_ioc(piiu);
@@ -2247,9 +2255,9 @@ ca_clear_channel
/* ca_flush_io() is called by this routine. */
/************************************************************************/
#ifdef __STDC__
ca_pend(ca_real timeout, int early)
int ca_pend(ca_real timeout, int early)
#else
ca_pend(timeout, early)
int ca_pend(timeout, early)
ca_real timeout;
int early;
#endif
@@ -2313,7 +2321,7 @@ int early;
beg_time = time(NULL);
while(TRUE){
# if defined(UNIX)
#if defined(UNIX)
{
struct timeval itimeout;
@@ -2323,16 +2331,18 @@ int early;
recv_msg_select(&itimeout);
UNLOCK;
}
# elif defined(vxWorks)
#ifdef V5_vxWorks
semTake(io_done_sem, LOCALTICKS);
#else
# if defined(vxWorks)
# ifdef V5_vxWorks
semTake(io_done_sem, LOCALTICKS);
# else
{
int dummy;
vrtxPend(&io_done_sem->count, LOCALTICKS, &dummy);
}
#endif
# elif defined(VMS)
# endif
# else
# if defined(VMS)
{
int status;
unsigned int systim[2]={-LOCALTICKS,~0};
@@ -2349,9 +2359,11 @@ int early;
if(status != SS$_NORMAL)
lib$signal(status);
}
# else
# else
@@@@ dont compile in this case @@@@
# endif
# endif
# endif
#endif
LOCK;
manage_conn(TRUE);
+3 -1
View File
@@ -20,9 +20,11 @@ static char *sccsId = "$Id$\t$Date$";
/* System includes */
#if defined(UNIX)
# include <stdio.h>
#elif defined(vxWorks)
#else
# if defined(vxWorks)
# include <vxWorks.h>
# include <taskLib.h>
# endif
#endif
#include <cadef.h>
+7 -3
View File
@@ -2,8 +2,10 @@ static char *sccsId = "@(#)ca_printf.c 1.2\t7/27/92";
#if defined(UNIX) || defined(VMS)
# include <stdio.h>
#elif defined(vxWorks)
#else
# if defined(vxWorks)
# include <vxWorks.h>
# endif
#endif
#include <varargs.h>
@@ -35,7 +37,8 @@ va_dcl
pformat,
args);
}
# elif defined(vxWorks)
# else
# if defined(vxWorks)
{
int logMsgArgs[6];
int i;
@@ -55,8 +58,9 @@ va_dcl
logMsgArgs[6]);
}
# else
# else
#### dont compile in this case ####
# endif
# endif
va_end(args);
+7 -3
View File
@@ -37,11 +37,15 @@ static char *sccsId = "$Id$\t$Date$";
#if defined(UNIX)
# include <stdio.h>
#elif defined(VMS)
#elif defined(vxWorks)
#include <vxWorks.h>
#else
# if defined(VMS)
# else
# if defined(vxWorks)
#include <vxWorks.h>
# else
@@@@ dont compile @@@@
# endif
# endif
#endif
#include <cadef.h>
+7 -3
View File
@@ -43,7 +43,8 @@ static char *sccsId = "$Id$\t$Date$";
# ifndef V5_vxWorks
# include <types.h>
# endif
#elif defined(VMS)
#else
# if defined(VMS)
# include <sys/types.h>
# include <sys/socket.h>
# if defined(UCX) /* GeG 09-DEC-1992 */
@@ -52,12 +53,15 @@ static char *sccsId = "$Id$\t$Date$";
# else
# include <sys/ioctl.h>
# endif
#elif defined(UNIX)
# else
# if defined(UNIX)
# include <sys/types.h>
# include <sys/socket.h>
# include <sys/ioctl.h>
#else
# else
@@@@ dont compile @@@@
# endif
# endif
#endif
#include <os_depen.h>
+8 -6
View File
@@ -88,20 +88,22 @@ static char *sccsId = "@(#)gsd_sync_subr.c 1.8\t11/5/92";
# include <stdio.h>
# include <sys/time.h>
# include <time.h>
#elif defined(vxWorks)
# define abort(A) taskSuspend(taskIdSelf())
#ifdef V5vxWorks
# include <Vxtypes.h>
#else
# if defined(vxWorks)
# define abort(A) taskSuspend(taskIdSelf())
# ifdef V5vxWorks
# include <Vxtypes.h>
# else
# include <types.h>
#endif
# endif
# if 0 /* needed ?? */
# include <stdioLib.h>
# include <sys/time.h>
# include <time.h>
# endif
#else
# else
@@@@ dont compile in this case @@@@
# endif
#endif
#include <cadef.h>
+26 -16
View File
@@ -69,6 +69,7 @@ static char *sccsId = "$Id$\t$Date$";
/* Allocate storage for global variables in this module */
#define CA_GLBLSOURCE
#if defined(VMS)
# include <iodef.h>
# include <stsdef.h>
@@ -79,21 +80,23 @@ static char *sccsId = "$Id$\t$Date$";
# include <sys/socket.h>
# include <netinet/in.h>
# include <netinet/tcp.h>
#if defined(UCX) /* GeG 09-DEC-1992 */
# if defined(UCX) /* GeG 09-DEC-1992 */
# include <sys/ucx$inetdef.h>
# include <ucx.h>
#else
# else
# include <vms/inetiodef.h>
# include <sys/ioctl.h>
#endif
#elif defined(UNIX)
# endif
#else
# if defined(UNIX)
# include <sys/types.h>
# include <sys/errno.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <netinet/tcp.h>
# include <sys/ioctl.h>
#elif defined(vxWorks)
# else
# if defined(vxWorks)
# include <vxWorks.h>
# ifdef V5_vxWorks
# include <systime.h>
@@ -107,8 +110,11 @@ static char *sccsId = "$Id$\t$Date$";
# include <tcp.h>
# include <ioctl.h>
# include <task_params.h>
# endif
# endif
#endif
#include <cadef.h>
#include <net_convert.h>
#include <iocmsg.h>
@@ -131,16 +137,16 @@ void vms_recv_msg_ast();
/*
* used to be that some TCP/IPs did not include this
*/
#ifndef NBBY
# define NBBY 8 /* number of bits per byte */
#endif
#ifdef JUNKYARD
typedef long fd_mask;
typedef struct fd_set {
fd_mask fds_bits[64];
} fd_set;
#ifndef NBBY
# define NBBY 8 /* number of bits per byte */
#endif
#ifndef NFDBITS
#define NFDBITS (sizeof(int) * NBBY) /* bits per mask */
#endif
@@ -520,7 +526,7 @@ struct ioc_in_use *piiu;
/* Set up recv thread for VMS */
# if defined(VMS)
#if defined(VMS)
{
/*
* request to be informed of future IO
@@ -543,7 +549,8 @@ struct ioc_in_use *piiu;
exit();
}
}
# elif defined(vxWorks)
#else
# if defined(vxWorks)
{
static void recv_task();
int pri;
@@ -573,7 +580,8 @@ struct ioc_in_use *piiu;
piiu->recv_tid = status;
}
# endif
# endif
#endif
return ECA_NORMAL;
}
@@ -668,12 +676,14 @@ void cac_send_msg()
* frees up push pull deadlock only
* if recv not already in progress
*/
# if defined(UNIX)
#if defined(UNIX)
if(post_msg_active==0){
recv_msg_select(&notimeout);
}
# elif defined(vxWorks)
# endif
#else
# if defined(vxWorks)
# endif
#endif
done = TRUE;
for(piiu=iiu; piiu<&iiu[nxtiiu]; piiu++){
@@ -865,7 +875,7 @@ void
recv_msg_select(ptimeout)
struct timeval *ptimeout;
{
long status;
int status;
register struct ioc_in_use *piiu;
struct timeval *ptmptimeout;
+29 -15
View File
@@ -59,24 +59,26 @@ static char *iocinfhSccsId = "$Id$\t$Date$";
#if defined(UNIX)
# include <sys/types.h>
# include <netinet/in.h>
#elif defined(VMS)
#else
# if defined(VMS)
# include <ssdef>
# include <sys/types.h>
# include <netinet/in.h>
#elif defined(vxWorks)
# else
# if defined(vxWorks)
# ifdef V5_vxWorks
# include <vxWorks.h>
# else
# include <types.h>
# endif
# include <in.h>
#else
# else
DONT_COMPILE
# endif
# endif
#endif
#ifndef INCdllLibh
# include <dllLib.h>
#endif
# include <dllEpicsLib.h>
#ifndef INCos_depenh
# include <os_depen.h>
@@ -150,7 +152,8 @@ typedef unsigned long ca_time;
# define readch (ca_static->ca_readch)
# define writech (ca_static->ca_writech)
# define excepch (ca_static->ca_excepch)
#elif defined(vxWorks)
#else
# if defined(vxWorks)
# define io_done_sem (ca_static->ca_io_done_sem)
# define evuser (ca_static->ca_evuser)
# define client_lock (ca_static->ca_client_lock)
@@ -159,12 +162,15 @@ typedef unsigned long ca_time;
# define dbfree_ev_list (ca_static->ca_dbfree_ev_list)
# define lcl_buff_list (ca_static->ca_lcl_buff_list)
# define event_tid (ca_static->ca_event_tid)
#elif defined(VMS)
# else
# if defined(VMS)
# define io_done_flag (ca_static->ca_io_done_flag)
# define peek_ast_buf (ca_static->ca_peek_ast_buf)
# define ast_lock_count (ca_static->ca_ast_lock_count)
#else
# else
DONT_COMPILE
# endif
# endif
#endif
@@ -190,11 +196,13 @@ struct ca_static{
#if defined(UNIX)
fd_set ca_readch;
fd_set ca_excepch;
#elif defined(VMS)
#else
# if defined(VMS)
int ca_io_done_flag;
char ca_peek_ast_buf;
long ca_ast_lock_count;
#elif defined(vxWorks)
# else
# if defined(vxWorks)
SEM_ID ca_io_done_sem;
void *ca_evuser;
FAST_LOCK ca_client_lock;
@@ -205,8 +213,10 @@ struct ca_static{
DLLLIST ca_lcl_buff_list;
int ca_event_tid;
unsigned ca_local_ticks;
#else
# else
DONT_COMPILE
# endif
# endif
#endif
struct ioc_in_use{
unsigned outstanding_ack_count;
@@ -234,11 +244,15 @@ struct ca_static{
#if defined(VMS) /* for qio ASTs */
struct sockaddr_in recvfrom;
struct iosb iosb;
#elif defined(vxWorks)
int recv_tid;
#elif defined(UNIX)
#else
# if defined(vxWorks)
int recv_tid;
# else
# if defined(UNIX)
# else
DONT_COMPILE
# endif
# endif
#endif
} ca_iiu[MAXIIU];
};
+51 -25
View File
@@ -38,7 +38,8 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
# ifndef _sys_errno_h
# include <sys/errno.h>
# endif
#elif defined(vxWorks)
#else
# if defined(vxWorks)
# ifndef INCvxWorksh
# include <vxWorks.h>
# endif
@@ -51,9 +52,12 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
# ifndef V5_vxWorks
IMPORT ULONG taskIdCurrent;
# endif
#elif defined(VMS)
#else
# else
# if defined(VMS)
# else
@@@@ dont compile in this case @@@@
# endif
# endif
#endif
@@ -109,7 +113,8 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
# define UNLOCKEVENTS
# define EVENTLOCKTEST (post_msg_active!=0)
# define RECV_ACTIVE(PIIU) (piiu->active)
#elif defined(vxWorks)
#else
# if defined(vxWorks)
# define VXTASKIDNONE 0
# define LOCK FASTLOCK(&client_lock);
# define UNLOCK FASTUNLOCK(&client_lock);
@@ -117,15 +122,18 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
# define UNLOCKEVENTS {event_tid=VXTASKIDNONE; FASTUNLOCK(&event_lock);}
# define EVENTLOCKTEST (FASTLOCKTEST(&event_lock)&&taskIdCurrent==event_tid)
# define RECV_ACTIVE(PIIU) (piiu->recv_tid == taskIdCurrent)
#elif defined(UNIX)
# else
# if defined(UNIX)
# define LOCK
# define UNLOCK
# define LOCKEVENTS
# define UNLOCKEVENTS
# define EVENTLOCKTEST (post_msg_active!=0)
# define RECV_ACTIVE(PIIU) (piiu->active)
#else
# else
@@@@ dont compile in this case @@@@
# endif
# endif
#endif
#ifdef vxWorks
@@ -137,23 +145,29 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
#if defined(VMS)
# if defined(WINTCP) /* Wallangong */
# if defined(WINTCP) /* Wallangong */
/* (the VAXC runtime lib has its own close */
# define socket_close(S) netclose(S)
# define socket_ioctl(A,B,C) ioctl(A,B,C)
# elif defined(UCX) /* GeG 09-DEC-1992 */
# else
# if defined(UCX) /* GeG 09-DEC-1992 */
# define socket_close(S) close(S)
# define socket_ioctl(A,B,C) ioctl(A,B,C)
# else
# endif
#elif defined(UNIX)
# define socket_close(S) close(S)
# define socket_ioctl(A,B,C) ioctl(A,B,C)
#elif defined(vxWorks)
# define socket_close(S) close(S)
# define socket_ioctl(A,B,C) ioctl(A,B,C)
# else
# endif
# endif
#else
# if defined(UNIX)
# define socket_close(S) close(S)
# define socket_ioctl(A,B,C) ioctl(A,B,C)
# else
# if defined(vxWorks)
# define socket_close(S) close(S)
# define socket_ioctl(A,B,C) ioctl(A,B,C)
# else
@@@@ dont compile in this case @@@@
# endif
# endif
#endif
#if defined(VMS)
@@ -164,11 +178,15 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
extern volatile int noshare socket_errno;
# define MYERRNO socket_errno
# endif
#elif defined(vxWorks)
#else
# if defined(vxWorks)
# define MYERRNO (errnoGet()&0xffff)
#elif defined(UNIX)
# else
# if defined(UNIX)
extern int errno;
# define MYERRNO errno
# endif
# endif
#endif
#ifdef VMS
@@ -183,15 +201,19 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
#if defined(vxWorks)
#ifdef V5_vxWorks
# ifdef V5_vxWorks
# define POST_IO_EV semGive(io_done_sem)
#else
# else
# define POST_IO_EV vrtxPost(&io_done_sem->count, TRUE)
#endif
#elif defined(VMS)
# endif
#else
# if defined(VMS)
# define POST_IO_EV sys$setef(io_done_flag)
#elif defined(UNIX)
# else
# if defined(UNIX)
# define POST_IO_EV
# endif
# endif
#endif
/* delay for when a poll is used */
@@ -219,11 +241,13 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
status = sys$waitfr(ef); \
if(~status&STS$M_SUCCESS)lib$signal(status); \
};
#elif defined(vxWorks)
#else
# if defined(vxWorks)
# define SYSFREQ ((long) sysClkRateGet()) /* usually 60 Hz */
# define TCPDELAY taskDelay(ca_static->ca_local_ticks);
# define time(A) (tickGet()/SYSFREQ)
#elif defined(UNIX)
# else
# if defined(UNIX)
# define SYSFREQ 1000000L /* 1 MHz */
/*
* this version of TCPDELAY copies tcpdelayval into temporary storage
@@ -245,6 +269,8 @@ static char *os_depenhSccsId = "$Id$\t$Date$";
# else
extern struct timeval tcpdelayval;
# endif
# endif
# endif
#endif
#endif
+8 -4
View File
@@ -67,22 +67,26 @@ static char *sccsId = "$Id$\t$Date$";
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
#elif defined(UNIX)
#else
# if defined(UNIX)
# include <errno.h>
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
#elif defined(vxWorks)
# else
# if defined(vxWorks)
# include <vxWorks.h>
# include <errno.h>
# include <types.h>
# include <socket.h>
# include <in.h>
#else
# else
@@@@ dont compile @@@@
# endif
# endif
#endif
#include <dllLib.h>
#include <dllEpicsLib.h>
#include <iocmsg.h>
#include <os_depen.h>
+7 -3
View File
@@ -73,16 +73,20 @@ static char *sccsId = "$Id$\t$Date$";
#if defined(VMS)
# include <sys/types.h>
# include <stsdef.h>
#elif defined(UNIX)
#else
# if defined(UNIX)
# include <sys/types.h>
# include <stdio.h>
#elif defined(vxWorks)
# else
# if defined(vxWorks)
# include <vxWorks.h>
# ifndef V5_vxWorks
# include <types.h>
# endif
#else
# else
@@@@ dont compile @@@@
# endif
# endif
#endif
#include <os_depen.h>