Compare commits
93 Commits
R3.13.0-be
...
R3.13.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b95f7afd3c | ||
|
|
a2db2d88ca | ||
|
|
cbe00bb737 | ||
|
|
7efb007b53 | ||
|
|
4e7917d9fe | ||
|
|
ee8fad1e7a | ||
|
|
0fa8b1e62d | ||
|
|
117f75eac4 | ||
|
|
85432e6307 | ||
|
|
cdbbf69a1e | ||
|
|
fb8e026551 | ||
|
|
5f1b0c19a8 | ||
|
|
bbef91c39e | ||
|
|
f0120adba4 | ||
|
|
457d64640e | ||
|
|
eae68a0872 | ||
|
|
48bbe65f60 | ||
|
|
6e04d47209 | ||
|
|
02dc1c300c | ||
|
|
2d1c1d3e09 | ||
|
|
5e9ebd8b9b | ||
|
|
c5bc89f11b | ||
|
|
bd2407153c | ||
|
|
2b42b3eab0 | ||
|
|
77146706a6 | ||
|
|
b6d0f183de | ||
|
|
4f649964de | ||
|
|
f565901231 | ||
|
|
9821aaa612 | ||
|
|
a364fbe125 | ||
|
|
0500ccb4da | ||
|
|
3db726ddac | ||
|
|
edff0569b6 | ||
|
|
cbbeb7ea25 | ||
|
|
ccb055cf78 | ||
|
|
4ddd63d141 | ||
|
|
fdd89be534 | ||
|
|
ed77e687a3 | ||
|
|
f5e2c72b18 | ||
|
|
1e4e78d6bc | ||
|
|
3ede2a2512 | ||
|
|
1995c735a1 | ||
|
|
79a2ef7ad1 | ||
|
|
11b9be6dfd | ||
|
|
d21c4ba0ab | ||
|
|
a23b0be5a5 | ||
|
|
199fdff643 | ||
|
|
d762ed7af6 | ||
|
|
85e3a6e0a1 | ||
|
|
74f253820a | ||
|
|
3c73143f3a | ||
|
|
18cafc2d06 | ||
|
|
6f6e34dced | ||
|
|
a16f99b8d0 | ||
|
|
46a180f755 | ||
|
|
cebd5f3cf8 | ||
|
|
2ced0242bd | ||
|
|
7edc0cd149 | ||
|
|
417411ab62 | ||
|
|
ea589a75a9 | ||
|
|
d00b72f3e8 | ||
|
|
56cf313613 | ||
|
|
98498419c0 | ||
|
|
653d8f1dae | ||
|
|
8405cf7323 | ||
|
|
80a8d9c37f | ||
|
|
ce87cee840 | ||
|
|
0ca6bf3ecc | ||
|
|
8e0a2c9e0f | ||
|
|
fad67f380d | ||
|
|
4dc12e992d | ||
|
|
bf6f69065c | ||
|
|
be09fad901 | ||
|
|
0b07bf8094 | ||
|
|
d2c38b8db5 | ||
|
|
7f1249ae45 | ||
|
|
617b4dd26f | ||
|
|
ef7b658bc0 | ||
|
|
ef6adf90fc | ||
|
|
ca2a66514f | ||
|
|
ce3095d1fc | ||
|
|
2869b388dd | ||
|
|
dc03deead7 | ||
|
|
99a0613092 | ||
|
|
38044917f4 | ||
|
|
2092f9faee | ||
|
|
f0ea531cc4 | ||
|
|
54de9067ee | ||
|
|
dcbf2a6331 | ||
|
|
63d0339d05 | ||
|
|
8d88cf2277 | ||
|
|
450f76d205 | ||
|
|
890de43c91 |
43
README.cxxTemplates
Normal file
43
README.cxxTemplates
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
The templates supplied with EPICS base are in $(EPICS)/base/src/cxxTemplates
|
||||
|
||||
In Stroustrups's "The C++ Programming Language" Appendix A: r.14.9
|
||||
(ANSI/ISO resolutions) a mechanism is described for the explicit
|
||||
instantiation of template member functions (that are not inline).
|
||||
At this time some compilers do not support this mechanism (and use
|
||||
a template database or smart linker instead). Other compilers
|
||||
(such as g++) provide only limited support for other forms of
|
||||
instantiation.
|
||||
|
||||
Since there is no defacto standard mechanism for instatiating
|
||||
templates at this time we are defining the preprocessor flag
|
||||
EXPL_TEMPL in the build system when the compiler supports
|
||||
explicit instantiation.
|
||||
|
||||
EPICS codes that use templates may need to include a code block
|
||||
as follow that instantiates the template only once into each
|
||||
program.
|
||||
|
||||
#include <classXYZ.h>
|
||||
#include <templXXX.h>
|
||||
#include <templXXX.cc>
|
||||
|
||||
//
|
||||
// if the compiler supports explicit instantiation of
|
||||
// template member functions
|
||||
//
|
||||
#if defined(EXPL_TEMPL)
|
||||
//
|
||||
// From Stroustrups's "The C++ Programming Language"
|
||||
// Appendix A: r.14.9
|
||||
//
|
||||
// This explicitly instantiates the template class's member
|
||||
// functions into "templInst.o"
|
||||
//
|
||||
template class templXXX <classXYZ>;
|
||||
#endif
|
||||
|
||||
Jeff Hill 3-6-97
|
||||
johill@lanl.gov
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
#
|
||||
# The developer may edit this file.
|
||||
|
||||
# Site-specific build options
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_SITE
|
||||
|
||||
# EPICS base definitions
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_COMMON
|
||||
|
||||
# Site-specific build options
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_SITE
|
||||
|
||||
# assume T_A is the host arch if not specified
|
||||
ifndef T_A
|
||||
T_A = $(HOST_ARCH)
|
||||
|
||||
@@ -26,6 +26,8 @@ CCC = CC
|
||||
MV = mv
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -Xa -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -Xa
|
||||
@@ -52,15 +54,18 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
@@ -84,7 +89,7 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
@@ -109,7 +114,8 @@ TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
|
||||
@@ -8,7 +8,6 @@ RANLIB = $(VX_GNU_BIN)/ranlib68k
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
CC = $(VX_GNU_BIN)/cc68k -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
CXX = $(VX_GNU_BIN)/cc68k -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
CPP = $(VX_GNU_BIN)/cpp68k -nostdinc
|
||||
#CPP = $(CC) -E
|
||||
GCC = $(CC)
|
||||
@@ -18,6 +17,53 @@ MV=mv
|
||||
RM=rm -f
|
||||
MKDIR = mkdir
|
||||
RMDIR=rm -rf
|
||||
WHAT = what
|
||||
|
||||
#----------------------------
|
||||
# Only G++ currently supported
|
||||
CPLUSPLUS = G++
|
||||
CXXCMPLR = NORMAL
|
||||
VX_OPT = YES
|
||||
BOARD = $(subst mv,MV,$(T_A))
|
||||
CPU = 68000
|
||||
OS = VXWORKS
|
||||
#----------------------------
|
||||
|
||||
CCC = $(VX_GNU_BIN)/cc68k -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
AR_CCC = $(VX_GNU_BIN)/ar68k
|
||||
CPP_CCC = $(VX_GNU_BIN)/cpp68k -nostdinc
|
||||
RANLIB_CCC = $(VX_GNU_BIN)/ranlib68k
|
||||
LD_CCC = $(VX_GNU_BIN)/ld68k
|
||||
CCC_CCFLAGS =
|
||||
CCC_ARCH_DEP_CCFLAGS =
|
||||
CCC_ARCH_DEP_LDFLAGS =
|
||||
|
||||
G++ = $(GNU_BIN)/sun3-g++ -B$(GNU_LIB)/gcc-lib/ -nostdinc -DEXPL_TEMPL
|
||||
AR_G++ = $(GNU_BIN)/sun3-ar
|
||||
CPP_G++ = $(GNU_BIN)/sun3-cpp
|
||||
RANLIB_G++ = $(GNU_BIN)/sun3-ranlib
|
||||
LD_G++ = $(GNU_BIN)/sun3-ld
|
||||
G++_ARCH_DEP_CCFLAGS = --no-builtin -Wa,"-m68040" -DOS_EQ_$(OS) \
|
||||
-DBOARD_EQ_$(BOARD) -DCPU_EQ_$(CPU) -DBOARD=$(BOARD)
|
||||
G++_ARCH_DEP_LDFLAGS = -Ur -N -T$(EPICS_BASE_BIN)/vxldscript.MRI
|
||||
|
||||
CCC_NORMAL = $(CCC)
|
||||
CCC_STRICT = $(CCC) -ansi -pedantic -Wtraditional \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_NORMAL = $(G++)
|
||||
G++_STRICT = $(G++) -ansi -pedantic -Wtraditional
|
||||
|
||||
CXX = $($(CPLUSPLUS)_$(CXXCMPLR))
|
||||
AR_CXX = $(AR_$(CPLUSPLUS))
|
||||
CPP_CXX = $(CPP_$(CPLUSPLUS))
|
||||
RANLIB_CXX = $(RANLIB_$(CPLUSPLUS))
|
||||
LD_CXX = $(LD_$(CPLUSPLUS))
|
||||
|
||||
ARCH_DEP_CXXFLAGS += $($(CPLUSPLUS)_ARCH_DEP_CCFLAGS) $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_CXXLDFLAGS = $($(CPLUSPLUS)_ARCH_DEP_LDFLAGS) $(ARCH_DEP_LDFLAGS)
|
||||
|
||||
|
||||
# special c library requirements
|
||||
SPECIAL_LANG =
|
||||
@@ -29,13 +75,13 @@ VX_OPT_NO =
|
||||
VX_OPT_FLAGS = $(VX_OPT_$(VX_OPT))
|
||||
|
||||
# Include files
|
||||
VX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
VX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/vxWorks -I$(VX_INCLUDE)
|
||||
|
||||
# Warnings
|
||||
#At some time we should turn on pedantic
|
||||
#VX_WARN_YES = -Wall -pedantic
|
||||
VX_WARN_YES = -W
|
||||
VX_WARN_YES = -Wall
|
||||
VX_WARN_NO =
|
||||
VX_WARN_FLAGS = $(VX_WARN_$(VX_WARN))
|
||||
|
||||
@@ -45,27 +91,29 @@ VX_OP_SYS_FLAGS = -DvxWorks -DV5_vxWorks
|
||||
# Arch dependent flags are set in CONFIG_ARCH.*
|
||||
VX_CFLAGS = $(VX_OPT_FLAGS) $(VX_WARN_FLAGS) \
|
||||
$(VX_INCLUDES) $(VX_OP_SYS_FLAGS)
|
||||
VX_CXXFLAGS += $(VX_CFLAGS)
|
||||
|
||||
#VX_LDFLAGS = -T$(EPICS_BASE)/src/libvxWorks/vxldscript.MRI -o
|
||||
VX_LDFLAGS = -o
|
||||
|
||||
VX_LDFLAGS = -o
|
||||
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(VX_CFLAGS)
|
||||
CXXFLAGS = $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(VX_CFLAGS)
|
||||
LDFLAGS = $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(VX_LDFLAGS)
|
||||
CXXFLAGS = $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(VX_CXXFLAGS)
|
||||
LDFLAGS = $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(VX_LDFLAGS)
|
||||
CXXLDFLAGS = $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_CXXLDFLAGS) $(VX_LDFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
# Build compile line here
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(LD) $(LDFLAGS)
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.cc = $(LD) $(LDFLAGS)
|
||||
LINK.cc = $(LD_CXX) $(CXXLDFLAGS)
|
||||
|
||||
CPPSNCFLAGS = $(VX_INCLUDES)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = -$(COMPILE.cc) -M $(SRCS.cc) > .DEPENDS
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) >> .DEPENDS
|
||||
DEPENDS_RULE.cc = -$(COMPILE.cc) -M $(SRCS.cc) >> .DEPENDS
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ RM=rm -f
|
||||
CP=cp
|
||||
RMDIR=rm -rf
|
||||
MKDIR=mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
# overrides defines in CONFIG_SITE that don't fit Tornado
|
||||
#
|
||||
@@ -55,7 +57,7 @@ VX_OPT_NO = -O0
|
||||
VX_OPT_FLAGS = $(VX_OPT_$(VX_OPT))
|
||||
|
||||
# Include files
|
||||
VX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
VX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/vxWorks -I$(VX_INCLUDE)
|
||||
|
||||
# Warnings
|
||||
@@ -82,7 +84,7 @@ LDFLAGS = $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(VX_LDFLAGS)
|
||||
|
||||
# Build compile line here
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CC) -x 'c++' $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CC) -x 'c++' -DEXPL_TEMPL $(CFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(LD) $(LDFLAGS)
|
||||
|
||||
CPPSNCFLAGS = $(USR_INCLUDES) $(VX_INCLUDES)
|
||||
|
||||
@@ -46,9 +46,10 @@ MV=mv
|
||||
RM=rm -f
|
||||
MKDIR=mkdir
|
||||
RMDIR=rm -rf
|
||||
WHAT = echo
|
||||
|
||||
# Include files
|
||||
HOST_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
HOST_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(ARCH_CLASS)
|
||||
|
||||
# Operating system flags (from win32.mak)
|
||||
@@ -114,8 +115,8 @@ COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
# Problem: MS Visual C++ does not recognize *.cc as C++ source,
|
||||
# we have to compile xx.cc using the flag -Tp xx.cc,
|
||||
# i.e. -Tp has to be immediately before the source file name
|
||||
# -kuk-
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp
|
||||
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -DEXPL_TEMPL -c -Tp
|
||||
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -Fe$@
|
||||
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -Fe$@
|
||||
|
||||
@@ -3,32 +3,47 @@
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
# Currently either Vx or Host
|
||||
BUILD_TYPE = Host
|
||||
|
||||
ARCH_CLASS = alpha
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = gcc
|
||||
ACC = cc -std
|
||||
TRADCC = cc -traditional
|
||||
AR = ar
|
||||
ARCMD = $(AR) $(ARFLAGS)
|
||||
ACC = cc
|
||||
|
||||
AR = ar -rc
|
||||
_AR = $(AR) $(ARFLAGS)
|
||||
G++_AR = $(_AR)
|
||||
CCC_AR = $(AR)
|
||||
ARCMD = $($(CPLUSPLUS)_AR)
|
||||
|
||||
RANLIB = ranlib
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
CCC = cc
|
||||
|
||||
CP=cp
|
||||
MV = mv
|
||||
RM=rm -f
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC)
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -stdl -w
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -stdl
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC)
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -std -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -std
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -std1 -w
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -std1
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -std0 -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -std0
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_NO = $(GCC) -ansi -pedantic
|
||||
@@ -46,15 +61,18 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
@@ -78,7 +96,7 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
@@ -88,8 +106,11 @@ SPECIAL_LDFLAGS =
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -D_OSF_SOURCE -DLITTLE_ENDIAN
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -D_OSF_SOURCE
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_LDLIBS = -lnsl
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
@@ -103,7 +124,8 @@ TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
@@ -112,8 +134,9 @@ LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
# Override defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
# Unlike the 'Unix' makesystem, output flags -o .. are now part of LINK.c[c]
|
||||
LINK.c = $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPEND_RULE.c = @echo no DEPENDS_RULE.c defined in CONFIG.alpha
|
||||
DEPEND_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.alpha
|
||||
|
||||
@@ -24,6 +24,8 @@ CCC = CC
|
||||
MV = mv
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC)
|
||||
@@ -49,15 +51,18 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
@@ -86,7 +91,7 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
@@ -111,7 +116,8 @@ TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
ARFLAGS = rv
|
||||
|
||||
16
config/CONFIG.mv177
Normal file
16
config/CONFIG.mv177
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
ARCH_CLASS = 68k
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCPU=MC68060 -m68040 -DCPU_FAMILY=MC680X0
|
||||
|
||||
@@ -4,36 +4,44 @@
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
# Currently either Vx or Host
|
||||
BUILD_TYPE = Host
|
||||
|
||||
ARCH_CLASS = sgi
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = cc
|
||||
ACC = cc
|
||||
KRCC = cc -cckr
|
||||
|
||||
AR = ar
|
||||
ARCMD = $(AR) $(ARFLAGS)
|
||||
ARFLAGS = r
|
||||
RANLIB = ls
|
||||
RANLIBFLAGS =
|
||||
|
||||
RANLIB =
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
|
||||
CP=cp
|
||||
MV = mv
|
||||
RM=rm -f
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -xansi -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -xansi
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -Xs -xansi -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -Xs -xansi
|
||||
KRCC_TRAD_INVOKE_W_NO = $(KRCC) -w
|
||||
KRCC_TRAD_INVOKE_W_YES = $(KRCC)
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -ansi -w
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -ansi
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -xansi -w
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -xansi
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -cckr -Xs -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -cckr -Xs
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_NO = $(GCC) -ansi -pedantic
|
||||
@@ -51,15 +59,18 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
@@ -84,7 +95,7 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
@@ -95,9 +106,10 @@ UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -DSGI
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
@@ -108,7 +120,8 @@ TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
@@ -117,9 +130,9 @@ LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
# Override defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LOAD.c = ld -shared $(LDFLAGS)
|
||||
# Unlike the 'Unix' makesystem, output flags -o .. are now part of LINK.c[c]
|
||||
LINK.c = $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.sgi
|
||||
|
||||
@@ -31,13 +31,14 @@ LEX = $(ELEX)
|
||||
G++ = /opt/gnu/bin/g++
|
||||
CCC = /opt/SUNWspro/bin/CC
|
||||
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CP=cp
|
||||
MV=mv
|
||||
RM=rm -f
|
||||
MKDIR=mkdir
|
||||
RMDIR=rm -rf
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
@@ -78,16 +79,19 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS = -L$(SPECIAL_LANG)
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
@@ -118,7 +122,7 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
@@ -128,7 +132,7 @@ UNIX_LDFLAGS = -L$(EPICS_BASE_LIB) $(CCOMPILER_LDFLAGS)
|
||||
UNIX_LDLIBS = $(UNIX_SLIBS) -lm $(CCOMPILER_LDLIBS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DSOLARIS
|
||||
ARCH_DEP_CFLAGS = -DSOLARIS -D_REENTRANT
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_LDLIBS = -lsocket -lnsl
|
||||
# -lsocket needed by libca.a
|
||||
@@ -147,7 +151,8 @@ TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
@@ -161,4 +166,4 @@ LINK.c = $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -xM $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.solaris
|
||||
DEPENDS_RULE.cc = -$(COMPILE.cc) -xM $(SRCS.cc) >> .DEPENDS
|
||||
|
||||
@@ -25,9 +25,12 @@ CCC = /usr/lang/CC
|
||||
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
CP=cp
|
||||
MV=mv
|
||||
RM=rm -f
|
||||
WHAT = what
|
||||
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
@@ -83,20 +86,22 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS = -L$(SPECIAL_LANG)
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
|
||||
# Static Build options
|
||||
ACC_SFLAGS_YES= -Bstatic
|
||||
ACC_SFLAGS_NO=
|
||||
@@ -116,7 +121,7 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(EPICS_BASE_INCLUDE) \
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
@@ -142,7 +147,8 @@ TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) \
|
||||
$(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
|
||||
@@ -11,7 +11,7 @@ EPICS_VERSION=3
|
||||
EPICS_REVISION=13
|
||||
EPICS_MODIFICATION=0
|
||||
EPICS_UPDATE_NAME=beta
|
||||
EPICS_UPDATE_LEVEL=5
|
||||
EPICS_UPDATE_LEVEL=8
|
||||
|
||||
EPICS_VERSION_STRING="EPICS Version ${EPICS_VERSION}.${EPICS_REVISION}.${EPICS_MODIFICATION}.${EPICS_UPDATE_NAME}${EPICS_UPDATE_LEVEL}"
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
|
||||
# Common Configuration Information
|
||||
|
||||
BUILD_ARCHS=$(HOST_ARCH)
|
||||
ifndef CROSS_COMPILER_HOST_ARCHS
|
||||
BUILD_ARCHS+=$(CROSS_COMPILER_TARGET_ARCHS)
|
||||
else
|
||||
ifeq ($(HOST_ARCH),$(findstring $(HOST_ARCH),$(CROSS_COMPILER_HOST_ARCHS)))
|
||||
BUILD_ARCHS+=$(CROSS_COMPILER_TARGET_ARCHS)
|
||||
endif
|
||||
endif
|
||||
|
||||
# CROSS1 will be defined only when CROSS_COMPILER_HOST_ARCHS is NOT defined
|
||||
CROSS1 = $(CROSS_COMPILER_TARGET_ARCHS$(word 1,$(CROSS_COMPILER_HOST_ARCHS)))
|
||||
|
||||
# CROSS2 will be defined only when CROSS_COMPILER_HOST_ARCHS is defined
|
||||
# and HOST_ARCH is one of it's words
|
||||
CROSS2 = $(CROSS_COMPILER_TARGET_ARCHS$(filter-out 1,$(words $(filter $(HOST_ARCH),$(CROSS_COMPILER_HOST_ARCHS)))))
|
||||
|
||||
BUILD_ARCHS = $(HOST_ARCH) $(CROSS1) $(CROSS2)
|
||||
|
||||
INSTALL_LOCATION = $(TOP)
|
||||
|
||||
INSTALL_LOCATION_LIB = $(INSTALL_LOCATION)/lib
|
||||
@@ -39,8 +39,8 @@ EPICS_EXTENSIONS_TEMPLATES = $(EPICS_EXTENSIONS)/templates
|
||||
DIVIDER = .
|
||||
|
||||
# private versions of lex/yacc from EPICS
|
||||
EYACC = $(EPICS_BASE)/bin/$(HOST_ARCH)/antelope
|
||||
ELEX = $(EPICS_BASE)/bin/$(HOST_ARCH)/e_flex -S$(EPICS_BASE_INCLUDE)/flex.skel.static
|
||||
EYACC = $(EPICS_BASE)/bin/$(HOST_ARCH)/antelope$(EXE)
|
||||
ELEX = $(EPICS_BASE)/bin/$(HOST_ARCH)/e_flex$(EXE) -S$(EPICS_BASE_INCLUDE)/flex.skel.static
|
||||
|
||||
# install from EPICS
|
||||
INSTALL = $(EPICS_BASE)/bin/$(HOST_ARCH)/installEpics
|
||||
|
||||
@@ -52,9 +52,14 @@ CROSS_COMPILER_TARGET_ARCHS=mv167 mv162
|
||||
#VX_DIR=/usr/local/vw/vxV52/vw
|
||||
VX_DIR=/usr/local/vw/vxV52p1/vw
|
||||
|
||||
# Gnu directory for gcc
|
||||
#VX_GNU = $(VX_DIR)
|
||||
VX_GNU = $(VX_DIR)/../vxgccV2.2.3.1
|
||||
|
||||
# Gnu directory for g++
|
||||
GNU_DIR = /usr/local/hideos/gnu_install-2.7.2
|
||||
GNU_BIN = $(GNU_DIR)/bin
|
||||
GNU_LIB = $(GNU_DIR)/lib
|
||||
|
||||
# Client ANSI Compiler
|
||||
# GCC (gcc -ansi)
|
||||
|
||||
9
config/CONFIG_SITE.mv177
Normal file
9
config/CONFIG_SITE.mv177
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Epics defs
|
||||
|
||||
|
||||
@@ -22,6 +22,6 @@ CXXCMPLR=NORMAL
|
||||
#CXXCMPLR=STRICT
|
||||
|
||||
# Special C library requirements
|
||||
SPECIAL_LANG = /usr/lang/SC2.0.1patch
|
||||
SPECIAL_LANG =
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CONFIGS += CONFIG
|
||||
CONFIGS += CONFIG_BASE
|
||||
CONFIGS += CONFIG_BASE_VERSION
|
||||
CONFIGS += CONFIG_COMMON
|
||||
CONFIGS += CONFIG_ENV
|
||||
|
||||
@@ -50,8 +51,7 @@ CONFIGS += RULES.Vx
|
||||
CONFIGS += RULES_ARCHS
|
||||
CONFIGS += RULES_DIRS
|
||||
CONFIGS += RULES_TOP
|
||||
CONFIGS += RULES.Db
|
||||
CONFIGS += RULES.ioc
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
#RULES.Db
|
||||
SUBTOOL = $(EPICS_BASE_BIN)/subtool
|
||||
PREFIX=$(shell echo $* | sed -e 's-[0-9]--g' | sed -e 's-\.db--g')
|
||||
ARCHS += $(BUILD_ARCHS) host cross
|
||||
ACTIONS += clean inc depends buildInstall build
|
||||
actionArchTargets = $(foreach action, $(ACTIONS) install,\
|
||||
$(foreach arch, $(ARCHS), \
|
||||
$(action)$(DIVIDER)$(arch)))
|
||||
|
||||
all install :: inc buildInstall
|
||||
|
||||
install: .DEPENDS dbd $(DBFROMTEMPLATE) $(INDDBFROMTEMPLATE) $(PROD)
|
||||
|
||||
buildInstall:: install
|
||||
buildInstall: .DEPENDS dbd $(DBFROMTEMPLATE) $(INDDBFROMTEMPLATE) $(PROD)
|
||||
|
||||
inc build depends:
|
||||
|
||||
@@ -39,5 +44,13 @@ $(INDDBFROMTEMPLATE):%.db: %.substitutions
|
||||
clean::
|
||||
@$(RM) dbd $(DBFROMTEMPLATE) $(INDDBFROMTEMPLATE) .DEPENDS $(PROD)
|
||||
|
||||
$(actionArchTargets) :%:
|
||||
$(MAKE) $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
|
||||
$(ARCHS):%: install
|
||||
|
||||
.PHONY :: $(ARCHS) $(ACTIONS)
|
||||
.PHONY :: $(actionArchTargets)
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
|
||||
@@ -296,19 +296,17 @@ buildInstall :: build $(TARGETS) $(INSTALL_LOCATION_BIN) \
|
||||
depends:: $(LIBSRCS) $(SRCS)
|
||||
$(RM) .DEPENDS
|
||||
touch .DEPENDS
|
||||
ifdef DEPENDS_RULE
|
||||
$(DEPENDS_RULE)
|
||||
else
|
||||
@echo RULES.Host: You have no DEPENDS_RULE defined for $(ARCH_CLASS)
|
||||
@echo (DEPENDS_RULE should be able to handle both C and C++ files,
|
||||
@echo use a script if all else failes)
|
||||
@exit
|
||||
ifdef $(SRCS.c)
|
||||
$(DEPENDS_RULE.c)
|
||||
endif
|
||||
ifdef $(SRCS.cc)
|
||||
$(DEPENDS_RULE.cc)
|
||||
endif
|
||||
|
||||
|
||||
clean::
|
||||
@echo "Cleaning"
|
||||
@$(RM) *.i *$(OBJ) *.a $(PROD) $(LIBNAME) $(INC)
|
||||
@$(RM) *.i *$(OBJ) *.a $(PROD) $(TESTPROD) $(LIBNAME) $(INC)
|
||||
|
||||
$(DIRECTORY_TARGETS) :
|
||||
$(MKDIR) $@
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
INCREC +=$(RECTYPES) $(MENUS)
|
||||
INSTALL_PROD = $(PROD:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS = $(LIBNAME:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS_CXX = $(LIBNAME_CXX:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_INC = $(INC:%= $(INSTALL_INCLUDE)/%)
|
||||
INSTALL_OSINCLUDE = $(INSTALL_INCLUDE)/os/vxWorks
|
||||
INSTALL_OSINC = $(OSINC:%= $(INSTALL_OSINCLUDE)/%)
|
||||
@@ -35,7 +36,7 @@ rebuild:: clean install
|
||||
pre_build::
|
||||
|
||||
build:: pre_build $(MENUS) $(RECTYPES) $(BPTS)\
|
||||
$(LIBNAME) $(TARGETS) $(PROD) $(DBDNAME)
|
||||
$(LIBNAME) $(LIBNAME_CXX) $(TARGETS) $(PROD) $(DBDNAME)
|
||||
|
||||
inc:: $(INSTALL_INCLUDE) $(INSTALL_INC) $(INSTALL_INCLUDE)/os \
|
||||
$(INSTALL_OSINCLUDE) $(INSTALL_OSINC)
|
||||
@@ -44,12 +45,13 @@ install:: inc buildInstall
|
||||
|
||||
buildInstall :: build $(INSTALL_INCREC)\
|
||||
$(INSTALL_LOCATION_BIN) \
|
||||
$(INSTALL_BIN) $(INSTALL_LIBS) \
|
||||
$(INSTALL_BIN) $(INSTALL_LIBS) $(INSTALL_LIBS_CXX) \
|
||||
$(TARGETS) $(INSTALL_PROD) \
|
||||
$(INSTALL_MAN) $(INSTALL_MANS)\
|
||||
$(INSTALL_DOC) $(INSTALL_DOCS) \
|
||||
$(INSTALL_SCRIPTS) $(INSTALL_INSTALLS)\
|
||||
$(INSTALL_DBD) $(INSTALL_DBS) $(INSTALL_BPTS) $(INSTALL_DBDNAME)
|
||||
$(INSTALL_DBD) $(INSTALL_DBS) $(INSTALL_BPTS) \
|
||||
$(INSTALL_DBDNAME) binInstalls
|
||||
|
||||
depends:: $(SRCS.c) $(SRCS.cc)
|
||||
ifdef SRCS
|
||||
@@ -151,6 +153,8 @@ $(DIRECTORY_TARGETS) :
|
||||
$(MANGEN) -s $(<F)
|
||||
$(MV) $(<F).nr $(<F).1
|
||||
|
||||
binInstalls: $(BIN_INSTALLS)
|
||||
@$(INSTALL) -m 555 $^ $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_DBD)/%: %
|
||||
@echo "Installing $@"
|
||||
@@ -197,6 +201,11 @@ $(LIBNAME): $(LIBOBJS)
|
||||
@$(RM) $@
|
||||
$(LINK.c) $@ $(LIBOBJS)
|
||||
|
||||
$(LIBNAME_CXX): $(LIBOBJS_CXX)
|
||||
@echo Building CXX library $@
|
||||
@$(RM) $@
|
||||
$(LINK.cc) $@ $(LIBOBJS_CXX)
|
||||
|
||||
$(INSTALL_BIN)/%: %
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -m 555 $< $(INSTALL_BIN)
|
||||
@@ -241,7 +250,13 @@ $(INSTALL_DOC)/%: ../%
|
||||
|
||||
.PRECIOUS: %.o %.c
|
||||
|
||||
.PHONY:: all inc depends build install pre_build clean rebuild buildInstall
|
||||
.PHONY:: all inc depends build install pre_build clean rebuild buildInstall binInstalls
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
ifneq (,$(wildcard ../baseLIBOBJS))
|
||||
$(LIBNAME): ../baseLIBOBJS
|
||||
endif
|
||||
$(LIBNAME): ../Makefile.Vx
|
||||
$(DBDNAME): ../base.dbd $(RECTYPES:%.h=../%.dbd)
|
||||
|
||||
|
||||
@@ -2,10 +2,15 @@
|
||||
APPDIR := $(shell grep '.*".*App/' st.* | sed -e 's/.*"\(.*App\).*/\1/' | sort -u )
|
||||
ASCF = $(TOP)/../ascf
|
||||
TARGETBIN = $(TOP)/bin/$(ARCH)
|
||||
ARCHS = $(BUILD_ARCHS) host cross
|
||||
ACTIONS += clean inc depends buildInstall build
|
||||
actionArchTargets = $(foreach action, $(ACTIONS) install,\
|
||||
$(foreach arch, $(ARCHS), \
|
||||
$(action)$(DIVIDER)$(arch)))
|
||||
|
||||
install: makelinks
|
||||
all install :: inc buildInstall
|
||||
|
||||
buildInstall:: install
|
||||
buildInstall: makelinks
|
||||
|
||||
inc build depends:
|
||||
|
||||
@@ -17,8 +22,10 @@ makelinks:
|
||||
ln -s $(TARGETBIN)/vxWorks.sym vxWorks.sym
|
||||
ln -s $(TOP)/dbd dbd
|
||||
ln -s $(SHARE) share
|
||||
@for dir in $(APPDIR) ; do \
|
||||
if [ -d $(TOP)/$$dir ]; then \
|
||||
@for dir in $(APPDIR) scum ; do \
|
||||
if [ $$dir = scum ]; then \
|
||||
: ; \
|
||||
elif [ -d $(TOP)/$$dir ]; then \
|
||||
ln -s $(TOP)/$$dir $$dir ; \
|
||||
echo "ln -s $(TOP)/$$dir $$dir" ; \
|
||||
elif [ -d $(MASTER_IOCAPPS)/$$dir ]; then \
|
||||
@@ -31,3 +38,13 @@ makelinks:
|
||||
|
||||
clean::
|
||||
@$(RM) ascf bin vxWorks vxWorks.sym dbd share $(APPDIR)
|
||||
|
||||
$(actionArchTargets) :%:
|
||||
$(MAKE) $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
|
||||
$(ARCHS):%: install
|
||||
|
||||
.PHONY :: $(ARCHS) $(ACTIONS)
|
||||
.PHONY :: $(actionArchTargets)
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ $(crossDirs) :
|
||||
#
|
||||
# host/cross action targets
|
||||
#
|
||||
$(ACTIONS) clean : % : %$(DIVIDER)host %$(DIVIDER)cross
|
||||
$(ACTIONS) : % : %$(DIVIDER)host %$(DIVIDER)cross
|
||||
HostActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)host)
|
||||
CrossActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)cross)
|
||||
$(HostActionTargets) : %$(DIVIDER)host : $(addprefix %$(DIVIDER), $(hostArchs))
|
||||
@@ -80,6 +80,8 @@ cross : $(crossArchs)
|
||||
#
|
||||
# special clean rule
|
||||
#
|
||||
clean :
|
||||
$(RMDIR) $(hostDirs) $(crossDirs)
|
||||
clean$(DIVIDER)% :
|
||||
$(RMDIR) O.$*
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -D_NO_PROTO
|
||||
USR_LDLIBS = -lAs -lCom -lDb -lCom -lm -s
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS = ./libAs.a\
|
||||
$(DEPLIBS_BASE)/libCom.a\
|
||||
$(DEPLIBS_BASE)/libDb.a
|
||||
|
||||
INC += asDbLib.h
|
||||
INC += asLib.h
|
||||
|
||||
SRCS.c = ../ascheck.c asLib.c
|
||||
OBJS = ascheck.o
|
||||
LIBOBJS = asLib.o
|
||||
LIBNAME = libAs.a
|
||||
PROD = ascheck
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
# Extra rule since asLib_lex.c is included in asLib.c
|
||||
# In my opinion, these objects should really be built
|
||||
# independently.
|
||||
asLib.o: asLib_lex.c ../asLibRoutines.c
|
||||
|
||||
clean::
|
||||
@$(RM) asLib.c asLib_lex.c
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += bdt.h
|
||||
|
||||
LIBOBJS += bdt.o
|
||||
|
||||
LIBNAME = libBdt.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
@@ -1,15 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += cvtTable.h
|
||||
|
||||
SRCS.c = ../makeBpt.c
|
||||
OBJS = makeBpt.o
|
||||
PROD = makeBpt
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
$(PROD): $(OBJS)
|
||||
$(RM) $@
|
||||
$(LINK.c) -o $@ ${OBJS} $(LDLIBS)
|
||||
|
||||
@@ -135,9 +135,12 @@ $ if f$getsyi("HW_MODEL") .ge. 1024
|
||||
$ then
|
||||
$! turn of no prototype messages because MULTINET does not
|
||||
$! supply prototypes.
|
||||
$ cc_command:== cc /warn=(disable=IMPLICITFUNC)/float=d_float /include=([], [-.include], [-.libcom])
|
||||
$ cc_command:== cc /warn=(disable=IMPLICITFUNC)/float=d_float -
|
||||
/include=([], [-.include], [-.libcom]) -
|
||||
/define=("MULTINET=1")
|
||||
$ else
|
||||
$ cc_command:== cc /include=([], [-.include], [-.libcom])
|
||||
$ cc_command:== cc /include=([], [-.include], [-.libcom]) -
|
||||
/define=("__STDC__=1", "MULTINET=1")
|
||||
$ endif
|
||||
$ endsubroutine
|
||||
$! ************************************************************
|
||||
|
||||
@@ -55,4 +55,10 @@ TESTPROD := catime acctst
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
pcatime : catime.o $(PRODDEPLIBS)
|
||||
$(PURIFY) $(LINK.c) catime.o $(LDLIBS)
|
||||
|
||||
pacctst : acctst.o $(PRODDEPLIBS)
|
||||
$(PURIFY) $(LINK.c) acctst.o $(LDLIBS)
|
||||
|
||||
# EOF Makefile.Host
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CMPLR = STRICT
|
||||
|
||||
USR_LDLIBS = -lca -lCom
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS = ./libca.a $(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
INC += cadef.h
|
||||
INC += caerr.h
|
||||
INC += caeventmask.h
|
||||
INC += caProto.h
|
||||
|
||||
SRCS.c = \
|
||||
../iocinf.c ../access.c ../test_event.c ../service.c \
|
||||
../flow_control.c ../repeater.c ../conn.c \
|
||||
../syncgrp.c ../if_depen.c ../netdb_depen.c ../bsd_depen.c \
|
||||
../posix_depen.c ../caRepeater.c ../acctst.c ../catime.c \
|
||||
../convert.c
|
||||
|
||||
OBJS = caRepeater.o
|
||||
|
||||
LIBOBJS = \
|
||||
iocinf.o access.o test_event.o service.o flow_control.o repeater.o \
|
||||
conn.o syncgrp.o if_depen.o netdb_depen.o \
|
||||
bsd_depen.o posix_depen.o convert.o
|
||||
|
||||
LIBNAME = libca.a
|
||||
|
||||
PROD = caRepeater
|
||||
|
||||
TARGETS = acctst catime
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
pacctst: acctst.o $(DEPLIBS)
|
||||
$(PURIFY) -best-effort $(LINK.c) -o $@ acctst.o $(DEPLIBS)
|
||||
|
||||
|
||||
@@ -99,6 +99,9 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.89 1997/01/10 21:02:10 jhill
|
||||
* host/user name set is now a NOOP
|
||||
*
|
||||
* Revision 1.88 1996/11/22 19:05:48 jhill
|
||||
* added const to build and connect API
|
||||
*
|
||||
@@ -200,7 +203,7 @@ static char *sccsId = "@(#) $Id$";
|
||||
#include "iocinf.h"
|
||||
#include "net_convert.h"
|
||||
#include <epicsPrint.h>
|
||||
#include <stdarg.h> /* for VMS old CC include order madness */
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
@@ -2941,10 +2944,10 @@ int epicsShareAPI ca_test_io()
|
||||
|
||||
|
||||
/*
|
||||
* generateLocalExceptionWithFileAndLine ()
|
||||
* genLocalExcepWFL ()
|
||||
* (generate local exception with file and line number)
|
||||
*/
|
||||
void generateLocalExceptionWithFileAndLine (long stat, char *ctx,
|
||||
char *pFile, unsigned lineNo)
|
||||
void genLocalExcepWFL (long stat, char *ctx, char *pFile, unsigned lineNo)
|
||||
{
|
||||
struct exception_handler_args args;
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@ static char *sccsId = "@(#) $Id$";
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.42 1996/12/12 18:51:41 jhill
|
||||
* doc
|
||||
*
|
||||
* Revision 1.41 1996/12/11 01:10:33 jhill
|
||||
* added additional vector tests
|
||||
*
|
||||
@@ -45,10 +48,6 @@ static char *sccsId = "@(#) $Id$";
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef VMS
|
||||
#include <LIB$ROUTINES.H>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ANSI
|
||||
*/
|
||||
@@ -57,10 +56,11 @@ static char *sccsId = "@(#) $Id$";
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "os_depen.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* CA
|
||||
*/
|
||||
#include <cadef.h>
|
||||
|
||||
#define EVENT_ROUTINE null_event
|
||||
@@ -110,6 +110,8 @@ dbr_float_t epsilon,
|
||||
unsigned iterations);
|
||||
|
||||
#ifdef vxWorks
|
||||
#include <vxWorks.h>
|
||||
#include <taskLib.h>
|
||||
int acctst(char *pname)
|
||||
{
|
||||
|
||||
@@ -166,9 +168,6 @@ int doacctst(char *pname)
|
||||
conn_cb_count = 0;
|
||||
|
||||
printf("begin\n");
|
||||
#ifdef VMS
|
||||
lib$init_timer();
|
||||
#endif /*VMS*/
|
||||
|
||||
printf("CA Client V%s\n", ca_version());
|
||||
|
||||
@@ -360,14 +359,6 @@ int doacctst(char *pname)
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
#ifdef VMS
|
||||
lib$show_timer();
|
||||
#endif /*VMS*/
|
||||
|
||||
#ifdef VMS
|
||||
lib$init_timer();
|
||||
#endif /*VMS*/
|
||||
|
||||
printf("Read Access=%d Write Access=%d\n",
|
||||
ca_read_access(chix1),
|
||||
ca_write_access(chix1));
|
||||
@@ -759,51 +750,71 @@ int doacctst(char *pname)
|
||||
* if multiple elements are present
|
||||
*/
|
||||
if (VALID_DB_REQ(chix1->type)) {
|
||||
if (ca_element_count(chix1)>1u) {
|
||||
dbr_float_t *pRF, *pWF, *pEF, *pT;
|
||||
if (ca_element_count(chix1)>1u && ca_read_access(chix1)) {
|
||||
dbr_float_t *pRF, *pWF, *pEF, *pT1, *pT2;
|
||||
|
||||
printf("Performing array test...");
|
||||
printf("Performing %u element array test...",
|
||||
ca_element_count(chix1));
|
||||
fflush(stdout);
|
||||
|
||||
pRF = (dbr_float_t *) calloc(ca_element_count(chix1), sizeof(*pRF));
|
||||
pRF = (dbr_float_t *) calloc(ca_element_count(chix1),
|
||||
sizeof(*pRF));
|
||||
assert(pRF!=NULL);
|
||||
|
||||
pWF = (dbr_float_t *)calloc(ca_element_count(chix1), sizeof(*pWF));
|
||||
pWF = (dbr_float_t *)calloc(ca_element_count(chix1),
|
||||
sizeof(*pWF));
|
||||
assert(pWF!=NULL);
|
||||
|
||||
/*
|
||||
* write some random numbers into the array
|
||||
*/
|
||||
if (ca_write_access(chix1)) {
|
||||
pT = pWF;
|
||||
while(pRF<pEF) {
|
||||
*pT++ = rand();
|
||||
pT1 = pWF;
|
||||
pEF = &pWF[ca_element_count(chix1)];
|
||||
while(pT1<pEF) {
|
||||
*pT1++ = rand();
|
||||
}
|
||||
status = ca_array_put(
|
||||
DBR_FLOAT,
|
||||
ca_element_count(chix1),
|
||||
chix1,
|
||||
pWF);
|
||||
SEVCHK(status, "array write test failed");
|
||||
SEVCHK(status, "array write request failed");
|
||||
}
|
||||
|
||||
/*
|
||||
* read back the array
|
||||
*/
|
||||
if (ca_read_access(chix1)) {
|
||||
status = ca_array_get(
|
||||
DBR_FLOAT,
|
||||
ca_element_count(chix1),
|
||||
chix1,
|
||||
pRF);
|
||||
SEVCHK(status, "array read test failed");
|
||||
SEVCHK(status, "array read request failed");
|
||||
status = ca_pend_io(30.0);
|
||||
SEVCHK(status, "array read failed");
|
||||
}
|
||||
|
||||
/*
|
||||
* verify read response matches values written
|
||||
*/
|
||||
if (ca_read_access(chix1) && ca_write_access(chix1)) {
|
||||
pEF = &pRF[ca_element_count(chix1)];
|
||||
while(pRF<pEF) {
|
||||
assert(*pRF++ == *pWF++);
|
||||
pT1 = pRF;
|
||||
pT2 = pWF;
|
||||
while (pT1<pEF) {
|
||||
assert (*pT1 == *pT2);
|
||||
pT1++;
|
||||
pT2++;
|
||||
}
|
||||
}
|
||||
printf("done\n");
|
||||
free(pRF);
|
||||
free(pWF);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VMS
|
||||
lib$show_timer();
|
||||
#endif /*VMS*/
|
||||
for (i = 0; i < NUM; i++) {
|
||||
printf("Float value Returned from put/get %f\n", pfloat[i]);
|
||||
printf("Double value Returned from put/get %f\n", pdouble[i]);
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.2 1996/09/16 16:32:49 jhill
|
||||
* added CA version string
|
||||
*
|
||||
* Revision 1.1 1996/06/20 18:02:22 jhill
|
||||
* installed into CVS
|
||||
*
|
||||
@@ -65,6 +68,9 @@
|
||||
*
|
||||
* .10 050594 joh New command added for CA V4.3 - wakeup the server
|
||||
* $Log$
|
||||
* Revision 1.2 1996/09/16 16:32:49 jhill
|
||||
* added CA version string
|
||||
*
|
||||
* Revision 1.1 1996/06/20 18:02:22 jhill
|
||||
* installed into CVS
|
||||
*
|
||||
@@ -80,20 +86,9 @@
|
||||
* CA protocol number
|
||||
* TCP/UDP port number (bumped each major protocol change)
|
||||
*/
|
||||
#define CA_PROTOCOL_VERSION_STR 4
|
||||
#define CA_MINOR_VERSION_STR 7
|
||||
|
||||
/*
|
||||
* add unsigned to the above numbers for numerical
|
||||
* comparisons (two defines above are used to create
|
||||
* version number string - prefer not to have u there)
|
||||
*/
|
||||
#ifndef CONCAT
|
||||
#define CONCAT(A,B) A ## B
|
||||
#endif
|
||||
#define UNSIGNED(N) CONCAT(N,u)
|
||||
#define CA_PROTOCOL_VERSION UNSIGNED(CA_PROTOCOL_VERSION_STR)
|
||||
#define CA_MINOR_VERSION UNSIGNED(CA_MINOR_VERSION_STR)
|
||||
#define CA_PROTOCOL_VERSION 4u
|
||||
#define CA_MINOR_VERSION 7u
|
||||
#define CA_VERSION_STRING "4.7"
|
||||
#define CA_UKN_MINOR_VERSION 0u /* unknown minor version */
|
||||
#if CA_PROTOCOL_VERSION == 4u
|
||||
#define CA_V41(MAJOR,MINOR) ((MINOR)>=1u)
|
||||
@@ -249,14 +244,5 @@ struct monops { /* monitor req opi to ioc */
|
||||
*/
|
||||
#define unreasonablePVNameSize 500u
|
||||
|
||||
#ifndef STRINGOF
|
||||
#define STRINGOF(A) #A
|
||||
#endif
|
||||
#ifndef EXPANDTOSTRING
|
||||
#define EXPANDTOSTRING(A) STRINGOF(A)
|
||||
#endif
|
||||
#define CA_VERSION_STRING \
|
||||
(EXPANDTOSTRING(CA_PROTOCOL_VERSION_STR)"."EXPANDTOSTRING(CA_MINOR_VERSION_STR))
|
||||
|
||||
#endif /* __CAPROTO__ */
|
||||
|
||||
|
||||
@@ -37,11 +37,8 @@
|
||||
|
||||
static char *sccsId = "@(#) $Id$";
|
||||
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
/*
|
||||
* Dont use ca_static based lock macros here because this is
|
||||
* also called by the server. All locks required are applied at
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
/************************************************************************/
|
||||
|
||||
/* $Log$
|
||||
* Revision 1.58 1996/11/02 00:50:56 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.57 1996/09/16 16:38:05 jhill
|
||||
* local except => except handler
|
||||
*
|
||||
@@ -97,7 +100,7 @@
|
||||
# define GLBLTYPE extern
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#if defined(__STDC__) && !defined(VAXC)
|
||||
# define VERSIONID(NAME,VERS) \
|
||||
char *EPICS_CAS_VID_ ## NAME = VERS;
|
||||
#else /*__STDC__*/
|
||||
@@ -670,10 +673,10 @@ void clearChannelResources(unsigned id);
|
||||
void caSetDefaultPrintfHandler (void);
|
||||
void cacDisconnectChannel(ciu chix, enum channel_state state);
|
||||
int caSendMsgPending(void);
|
||||
void generateLocalExceptionWithFileAndLine(long stat, char *ctx,
|
||||
void genLocalExcepWFL(long stat, char *ctx,
|
||||
char *pFile, unsigned line);
|
||||
#define genLocalExcep(STAT, PCTX) \
|
||||
generateLocalExceptionWithFileAndLine (STAT, PCTX, __FILE__, __LINE__)
|
||||
genLocalExcepWFL (STAT, PCTX, __FILE__, __LINE__)
|
||||
|
||||
/*
|
||||
* !!KLUDGE!!
|
||||
|
||||
@@ -35,22 +35,12 @@
|
||||
|
||||
static char *os_depenhSccsId = "$Id$";
|
||||
|
||||
/*
|
||||
* errno.h is ANSI however we
|
||||
* include it here because of differences
|
||||
* between error code sets provided by
|
||||
* each socket library
|
||||
*/
|
||||
#ifdef UNIX
|
||||
# include <errno.h>
|
||||
# include <time.h>
|
||||
# define CA_OS_CONFIGURED
|
||||
#endif
|
||||
|
||||
#ifdef vxWorks
|
||||
# include <vxWorks.h>
|
||||
# include <errno.h>
|
||||
|
||||
# include <ioLib.h>
|
||||
# include <tickLib.h>
|
||||
# include <taskHookLib.h>
|
||||
@@ -73,32 +63,10 @@ static char *os_depenhSccsId = "$Id$";
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
#if !defined(UCX)
|
||||
# include <tcp/errno.h>
|
||||
#else
|
||||
# include <errno>
|
||||
#endif
|
||||
# include <ssdef>
|
||||
# include <stsdef>
|
||||
# include <iodef.h>
|
||||
# include <psldef.h>
|
||||
# include <prcdef.h>
|
||||
# include <descrip.h>
|
||||
# define MAXHOSTNAMELEN 75
|
||||
#ifdef UCX /* GeG 09-DEC-1992 */
|
||||
# include <sys/ucx$inetdef.h>
|
||||
# include <ucx.h>
|
||||
#else
|
||||
# include <net/if.h>
|
||||
# include <vms/inetiodef.h>
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
# define CA_OS_CONFIGURED
|
||||
#endif /*VMS*/
|
||||
|
||||
#ifdef WIN32
|
||||
# include <errno.h>
|
||||
# include <time.h>
|
||||
# define CA_OS_CONFIGURED
|
||||
#endif /*WIN32*/
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
* cjm 20-Nov-95 Add code for gettimeofday
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.20 1996/07/02 23:04:07 jhill
|
||||
* took &tz out of gettimeofday()
|
||||
*
|
||||
* Revision 1.19 1995/12/19 19:35:24 jhill
|
||||
* -cjm 20-Nov-95 Add code for gettimeofday
|
||||
*
|
||||
@@ -47,20 +50,16 @@
|
||||
/*
|
||||
* VMS includes
|
||||
*/
|
||||
#include <stsdef.h>
|
||||
#include <ssdef.h>
|
||||
#include <stsdef.h>
|
||||
#include <iodef.h>
|
||||
#include <psldef.h>
|
||||
#include <prcdef.h>
|
||||
#include <jpidef.h>
|
||||
#include <descrip.h>
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#ifdef UCX
|
||||
#include "ucx.h"
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define CONNECTION_TIMER_ID 56
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* cac_gettimeval
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
|
||||
TOP = ../../..
|
||||
CAS = ../../..
|
||||
SRC = $(CAS)/generic
|
||||
IOSRC = $(CAS)/io/bsdSocket
|
||||
OSSRC = $(CAS)/os/posix
|
||||
VPATH = $(SRC) $(IOSRC) $(OSSRC)
|
||||
|
||||
include Target.include
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_INCLUDES = -I$(CAS)/../ca -I$(OSSRC) -I$(IOSRC) -I$(CAS)/gdd
|
||||
USR_LDLIBS = -lcas -lm
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
|
||||
#CPLUSPLUS = G++
|
||||
|
||||
SRCS.cc += $(SRC)/caServer.cc
|
||||
SRCS.cc += $(SRC)/casClient.cc
|
||||
SRCS.cc += $(SRC)/casDGClient.cc
|
||||
SRCS.cc += $(SRC)/casStreamClient.cc
|
||||
SRCS.cc += $(SRC)/casPV.cc
|
||||
SRCS.cc += $(SRC)/casPVI.cc
|
||||
SRCS.cc += $(SRC)/casChannel.cc
|
||||
SRCS.cc += $(SRC)/casChannelI.cc
|
||||
SRCS.cc += $(SRC)/casClientMon.cc
|
||||
SRCS.cc += $(SRC)/casMsgIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIOI.cc
|
||||
SRCS.cc += $(SRC)/casEventSys.cc
|
||||
SRCS.cc += $(SRC)/outBuf.cc
|
||||
SRCS.cc += $(SRC)/inBuf.cc
|
||||
SRCS.cc += $(SRC)/casMapDBR.cc
|
||||
|
||||
SRCS.cc += $(OSSRC)/casDGOS.cc
|
||||
SRCS.cc += $(OSSRC)/casServerOS.cc
|
||||
SRCS.cc += $(OSSRC)/casStreamOS.cc
|
||||
|
||||
SRCS.cc += $(IOSRC)/casDGIO.cc
|
||||
SRCS.cc += $(IOSRC)/casStreamIO.cc
|
||||
SRCS.cc += $(IOSRC)/caServerIO.cc
|
||||
|
||||
LIBOBJS += caServer.o
|
||||
LIBOBJS += casClient.o
|
||||
LIBOBJS += casDGClient.o
|
||||
LIBOBJS += casStreamClient.o
|
||||
LIBOBJS += casPV.o
|
||||
LIBOBJS += casPVI.o
|
||||
LIBOBJS += casChannel.o
|
||||
LIBOBJS += casChannelI.o
|
||||
LIBOBJS += casClientMon.o
|
||||
LIBOBJS += casMsgIO.o
|
||||
LIBOBJS += casAsyncIO.o
|
||||
LIBOBJS += casAsyncIOI.o
|
||||
LIBOBJS += casEventSys.o
|
||||
LIBOBJS += outBuf.o
|
||||
LIBOBJS += inBuf.o
|
||||
LIBOBJS += casMapDBR.o
|
||||
|
||||
LIBOBJS += casDGOS.o
|
||||
LIBOBJS += casServerOS.o
|
||||
LIBOBJS += casStreamOS.o
|
||||
|
||||
LIBOBJS += casDGIO.o
|
||||
LIBOBJS += casStreamIO.o
|
||||
LIBOBJS += caServerIO.o
|
||||
|
||||
LIBNAME = libcas.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
obj: $(LIBOBJS)
|
||||
|
||||
clean::
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
|
||||
#HERE := $(shell pwd)
|
||||
HERE = .
|
||||
CAS := $(HERE)/../../..
|
||||
TOP = $(CAS)/../..
|
||||
SRC = $(CAS)/generic
|
||||
CA = $(CAS)/../ca
|
||||
IOSRC = $(CAS)/io/bsdSocket
|
||||
STSRC = $(SRC)/st
|
||||
VPATH = $(SRC) $(STSRC) $(IOSRC)
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
USR_INCLUDES = -I$(SRC) -I$(IOSRC) -I$(STSRC) -I$(CA)
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
|
||||
SRCS.cc += caServer.cc
|
||||
SRCS.cc += caServerI.cc
|
||||
SRCS.cc += casCoreClient.cc
|
||||
SRCS.cc += casClient.cc
|
||||
SRCS.cc += casDGClient.cc
|
||||
SRCS.cc += casStrmClient.cc
|
||||
SRCS.cc += casPV.cc
|
||||
SRCS.cc += casPVI.cc
|
||||
SRCS.cc += casChannel.cc
|
||||
SRCS.cc += casChannelI.cc
|
||||
SRCS.cc += casPVListChan.cc
|
||||
SRCS.cc += casClientMon.cc
|
||||
SRCS.cc += casChanDelEv.cc
|
||||
SRCS.cc += casMsgIO.cc
|
||||
SRCS.cc += casAsyncIO.cc
|
||||
SRCS.cc += casAsyncIOI.cc
|
||||
SRCS.cc += casAsyncXXIO.cc
|
||||
SRCS.cc += casAsyncRdIOI.cc
|
||||
SRCS.cc += casAsyncWtIOI.cc
|
||||
SRCS.cc += casAsyncExIOI.cc
|
||||
SRCS.cc += casEventSys.cc
|
||||
SRCS.cc += casMonitor.cc
|
||||
SRCS.cc += casMonEvent.cc
|
||||
SRCS.cc += casOpaqueAddr.cc
|
||||
SRCS.cc += inBuf.cc
|
||||
SRCS.cc += outBuf.cc
|
||||
SRCS.cc += dgInBuf.cc
|
||||
SRCS.cc += dgOutBuf.cc
|
||||
SRCS.cc += casCtx.cc
|
||||
SRCS.cc += casEventMask.cc
|
||||
SRCS.cc += ioBlocked.cc
|
||||
SRCS.cc += templInst.cc
|
||||
|
||||
SRCS.cc += caServerOS.cc
|
||||
SRCS.cc += casIntfOS.cc
|
||||
SRCS.cc += casDGIntfOS.cc
|
||||
SRCS.cc += casDGOS.cc
|
||||
SRCS.cc += casStreamOS.cc
|
||||
|
||||
SRCS.cc += caServerIO.cc
|
||||
SRCS.cc += casIntfIO.cc
|
||||
SRCS.cc += casDGIntfIO.cc
|
||||
SRCS.cc += casDGIO.cc
|
||||
SRCS.cc += casStreamIO.cc
|
||||
SRCS.c += sigPipeIgnore.c
|
||||
|
||||
LIBOBJS += caServer.o
|
||||
LIBOBJS += caServerI.o
|
||||
LIBOBJS += casCoreClient.o
|
||||
LIBOBJS += casClient.o
|
||||
LIBOBJS += casDGClient.o
|
||||
LIBOBJS += casStrmClient.o
|
||||
LIBOBJS += casPV.o
|
||||
LIBOBJS += casPVI.o
|
||||
LIBOBJS += casChannel.o
|
||||
LIBOBJS += casChannelI.o
|
||||
LIBOBJS += casPVListChan.o
|
||||
LIBOBJS += casClientMon.o
|
||||
LIBOBJS += casChanDelEv.o
|
||||
LIBOBJS += casMsgIO.o
|
||||
LIBOBJS += casAsyncIO.o
|
||||
LIBOBJS += casAsyncIOI.o
|
||||
LIBOBJS += casAsyncXXIO.o
|
||||
LIBOBJS += casAsyncRdIOI.o
|
||||
LIBOBJS += casAsyncWtIOI.o
|
||||
LIBOBJS += casAsyncExIOI.o
|
||||
LIBOBJS += casEventSys.o
|
||||
LIBOBJS += casMonitor.o
|
||||
LIBOBJS += casMonEvent.o
|
||||
LIBOBJS += casOpaqueAddr.o
|
||||
LIBOBJS += inBuf.o
|
||||
LIBOBJS += outBuf.o
|
||||
LIBOBJS += dgInBuf.o
|
||||
LIBOBJS += dgOutBuf.o
|
||||
LIBOBJS += casCtx.o
|
||||
LIBOBJS += casEventMask.o
|
||||
LIBOBJS += ioBlocked.o
|
||||
LIBOBJS += templInst.o
|
||||
|
||||
LIBOBJS += caServerOS.o
|
||||
LIBOBJS += casIntfOS.o
|
||||
LIBOBJS += casDGIntfOS.o
|
||||
LIBOBJS += casDGOS.o
|
||||
LIBOBJS += casStreamOS.o
|
||||
|
||||
LIBOBJS += caServerIO.o
|
||||
LIBOBJS += casIntfIO.o
|
||||
LIBOBJS += casDGIntfIO.o
|
||||
LIBOBJS += casStreamIO.o
|
||||
LIBOBJS += casDGIO.o
|
||||
LIBOBJS += sigPipeIgnore.o
|
||||
|
||||
LIBNAME = libcas.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
obj: $(LIBOBJS)
|
||||
|
||||
clean::
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
|
||||
CAS = ../../..
|
||||
TOP = $(CAS)/../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
USR_INCLUDES =
|
||||
USR_LDLIBS = -lcas -lca -lCom -lgdd
|
||||
|
||||
USR_LDFLAGS =
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
DEPLIBSWOCAS = $(DEPLIBS_BASE)/libca.a $(DEPLIBS_BASE)/libCom.a \
|
||||
$(DEPLIBS_BASE)/libgdd.a
|
||||
DEPLIBS = $(DEPLIBS_BASE)/libcas.a $(DEPLIBSWOCAS)
|
||||
|
||||
SRCS.cc += ../main.cc
|
||||
SRCS.cc += ../exServer.cc
|
||||
SRCS.cc += ../exPV.cc
|
||||
SRCS.cc += ../exVectorPV.cc
|
||||
SRCS.cc += ../exScalarPV.cc
|
||||
SRCS.cc += ../exAsyncPV.cc
|
||||
SRCS.cc += ../exChannel.cc
|
||||
SRCS.cc += ../templInst.cc
|
||||
|
||||
OBJS += main.o
|
||||
OBJS += exServer.o
|
||||
OBJS += exPV.o
|
||||
OBJS += exVectorPV.o
|
||||
OBJS += exScalarPV.o
|
||||
OBJS += exAsyncPV.o
|
||||
OBJS += exChannel.o
|
||||
OBJS += templInst.o
|
||||
|
||||
PROD += excas
|
||||
|
||||
BUILDDIR = $(CAS)/build/singleThread/O.$(HOST_ARCH)/
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServer.o
|
||||
GLOMBOBJ += $(BUILDDIR)caServerI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casCoreClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStrmClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casPV.o
|
||||
GLOMBOBJ += $(BUILDDIR)casPVI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChannel.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChannelI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casPVListChan.o
|
||||
GLOMBOBJ += $(BUILDDIR)casClientMon.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChanDelEv.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMsgIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncIOI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncXXIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncRdIOI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncWtIOI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncExIOI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casEventSys.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMonitor.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMonEvent.o
|
||||
GLOMBOBJ += $(BUILDDIR)inBuf.o
|
||||
GLOMBOBJ += $(BUILDDIR)outBuf.o
|
||||
GLOMBOBJ += $(BUILDDIR)dgInBuf.o
|
||||
GLOMBOBJ += $(BUILDDIR)dgOutBuf.o
|
||||
GLOMBOBJ += $(BUILDDIR)casCtx.o
|
||||
GLOMBOBJ += $(BUILDDIR)casEventMask.o
|
||||
GLOMBOBJ += $(BUILDDIR)ioBlocked.o
|
||||
GLOMBOBJ += $(BUILDDIR)templInst.o
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServerOS.o
|
||||
GLOMBOBJ += $(BUILDDIR)casIntfOS.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGIntfOS.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGOS.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStreamOS.o
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServerIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casIntfIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGIntfIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStreamIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)sigPipeIgnore.o
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
excas: $(OBJS) $(DEPLIBS)
|
||||
$(LINK.cc) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
#
|
||||
# fast link (without waiting for library build)
|
||||
# -- this no longer works with sun pro c++ because
|
||||
# they do not support explicit template instantiation
|
||||
# (they use a template db instead) --
|
||||
#
|
||||
fexcas: $(OBJS) $(GLOMBOBJ) $(DEPLIBSWOCAS)
|
||||
$(LINK.cc) -o $@ $(OBJS) $(GLOMBOBJ) $(DEPLIBSWOCAS)
|
||||
|
||||
#
|
||||
# build with purify
|
||||
#
|
||||
pexcas: $(OBJS) $(DEPLIBS)
|
||||
$(PURIFY) $(LINK.cc) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
clean::
|
||||
@$(RM) excas
|
||||
@$(RM) fexcas
|
||||
@$(RM) pexcas
|
||||
@$(RM) -rf Templates.DB
|
||||
@$(RM) core
|
||||
|
||||
9
src/cas/example/testdb/Makefile
Normal file
9
src/cas/example/testdb/Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Log$
|
||||
|
||||
TOP=../../../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
23
src/cas/example/testdb/Makefile.Host
Normal file
23
src/cas/example/testdb/Makefile.Host
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
# $Log$
|
||||
|
||||
CAS = ../../..
|
||||
TOP = $(CAS)/../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
PROD_LIBS := cas ca gdd Com
|
||||
|
||||
SRCS += pvServ.cc
|
||||
|
||||
PROD :=pvServ
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
clean::
|
||||
@$(RM) pvServ
|
||||
@$(RM) -rf Templates.DB
|
||||
@$(RM) core
|
||||
|
||||
279
src/cas/example/testdb/pvServ.cc
Normal file
279
src/cas/example/testdb/pvServ.cc
Normal file
@@ -0,0 +1,279 @@
|
||||
|
||||
// $Id$
|
||||
// $Log$
|
||||
|
||||
#include <stdio.h>
|
||||
#include "pvServ.h"
|
||||
#include "fdManager.h"
|
||||
#include "gdd.h"
|
||||
#include "gddAppTable.h"
|
||||
#include "alarm.h"
|
||||
|
||||
static int appValue;
|
||||
|
||||
void dBase::eventReady(void)
|
||||
{
|
||||
if(counter+1.0 > 100.0)
|
||||
writeData(0.0);
|
||||
else
|
||||
writeData(counter+1.0);
|
||||
}
|
||||
|
||||
void dBase::writeData(double x)
|
||||
{
|
||||
counter=x;
|
||||
time((time_t*)&ts.tv_sec);
|
||||
|
||||
if(counter>hihi)
|
||||
{ sevr=MAJOR_ALARM; stat=HIHI_ALARM; }
|
||||
else if(counter<lolo)
|
||||
{ sevr=MAJOR_ALARM; stat=LOLO_ALARM; }
|
||||
else if(counter>high)
|
||||
{ sevr=MINOR_ALARM; stat=HIGH_ALARM; }
|
||||
else if(counter<low)
|
||||
{ sevr=MINOR_ALARM; stat=LOW_ALARM; }
|
||||
else
|
||||
{ sevr=NO_ALARM; stat=0; }
|
||||
|
||||
if(node) node->eventReady();
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
gddApplicationTypeTable& table=gddApplicationTypeTable::AppTable();
|
||||
int rc;
|
||||
int total_pv;
|
||||
double rate;
|
||||
serv* server;
|
||||
char* name;
|
||||
|
||||
if(argc<3)
|
||||
{
|
||||
fprintf(stderr,"Usage %s pv_total monitor_rate optional_pv_prefix\n",
|
||||
argv[0]);
|
||||
fprintf(stderr," pv_total is the number of PVs to generate (int)\n");
|
||||
fprintf(stderr," monitor_rate is events per second (float)\n");
|
||||
fprintf(stderr," optional_pv_prefix defaults to your login name\n");
|
||||
fprintf(stderr,"\n");
|
||||
fprintf(stderr," PVs are named <PREFIX>_#\n");
|
||||
fprintf(stderr," where # is an integer is the range [0,pv_total)\n");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(sscanf(argv[1],"%d",&total_pv)!=1)
|
||||
{
|
||||
fprintf(stderr,"Failed to convert pv_total argument to number\n");
|
||||
return -1;
|
||||
}
|
||||
if(sscanf(argv[2],"%lf",&rate)!=1)
|
||||
{
|
||||
fprintf(stderr,"Failed to convert monitor_rate argument to number\n");
|
||||
return -1;
|
||||
}
|
||||
if(argc<=4)
|
||||
name=argv[3];
|
||||
else
|
||||
name=NULL;
|
||||
|
||||
appValue=table.getApplicationType("value");
|
||||
|
||||
Debug3("total=%d,rate=%lf,prefix=%s\n",total_pv,rate,name);
|
||||
|
||||
server = new serv(total_pv,rate,name,40u,total_pv,total_pv);
|
||||
rc=server->Main();
|
||||
delete server;
|
||||
return rc;
|
||||
}
|
||||
|
||||
int serv::InitDB(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
db_sync=new dBase[pv_total];
|
||||
|
||||
for(i=0;i<pv_total;i++)
|
||||
sprintf(db_sync[i].pvname,"%s_%d",prefix,i);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int serv::Main(void)
|
||||
{
|
||||
unsigned i;
|
||||
int not_done=1;
|
||||
|
||||
double inv=(1.0/event_rate);
|
||||
double num=(unsigned long)inv;
|
||||
double fract=inv-num;
|
||||
unsigned long lfract=fract?(unsigned long)(1.0/fract):0;
|
||||
unsigned long nsec = lfract?1000000000u/lfract:0;
|
||||
unsigned long sec = (unsigned long)num;
|
||||
struct timeval tv_curr,tv_prev;
|
||||
|
||||
osiTime delay(sec,nsec);
|
||||
|
||||
tv_prev.tv_sec=0;
|
||||
tv_prev.tv_usec=0;
|
||||
|
||||
Debug2("Update every sec=%lu nsec=%lu\n",sec,nsec);
|
||||
|
||||
while(not_done)
|
||||
{
|
||||
fileDescriptorManager.process(delay);
|
||||
|
||||
gettimeofday(&tv_curr,NULL);
|
||||
|
||||
if(tv_curr.tv_sec-tv_prev.tv_sec >= sec &&
|
||||
tv_curr.tv_usec-tv_prev.tv_usec >= (nsec/1000))
|
||||
{
|
||||
for(i=0;i<pv_total;i++)
|
||||
db_sync[i].eventReady();
|
||||
}
|
||||
|
||||
tv_prev=tv_curr;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ------------------------- server stuff ----------------------------
|
||||
|
||||
serv::serv(int tot,double rate,char* name,
|
||||
unsigned max_name_len,unsigned pv_count_est,unsigned max_sim_io):
|
||||
caServer(max_name_len, pv_count_est, max_sim_io),
|
||||
db_sync(NULL),pv_total(tot),event_rate(rate),prefix(name)
|
||||
{
|
||||
event_mask|=(alarmEventMask|valueEventMask|logEventMask);
|
||||
|
||||
if(name)
|
||||
prefix=name;
|
||||
else if((prefix=getenv("LOGNAME"))==NULL)
|
||||
prefix="noname";
|
||||
|
||||
prefix_len=strlen(prefix);
|
||||
|
||||
InitDB();
|
||||
}
|
||||
|
||||
serv::~serv(void)
|
||||
{
|
||||
delete [] db_sync;
|
||||
}
|
||||
|
||||
pvExistReturn serv::pvExistTest(const casCtx&,const char* pvname)
|
||||
{
|
||||
int val;
|
||||
dBase* node=NULL;
|
||||
caStatus rc=S_casApp_pvNotFound;
|
||||
|
||||
if(strncmp(pvname,prefix,prefix_len)==0)
|
||||
{
|
||||
// we may have this one, number is after underscore
|
||||
if(sscanf(&pvname[prefix_len+1],"%d",&val)==1)
|
||||
{
|
||||
if(val>=0 && val<pv_total)
|
||||
{
|
||||
Debug("ExistTest: I have this PV\n");
|
||||
node=&db_sync[val];
|
||||
rc=S_casApp_success;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (rc==S_casApp_success)?pvExistReturn(rc,node->pvname):
|
||||
pvExistReturn(rc);
|
||||
}
|
||||
|
||||
casPV* serv::createPV(const casCtx& in,const char* pvname)
|
||||
{
|
||||
casPV* rc=NULL;
|
||||
int val;
|
||||
|
||||
Debug1("createPV: %s\n",pvname);
|
||||
|
||||
if(strncmp(pvname,prefix,prefix_len)==0)
|
||||
{
|
||||
// we may have this one, number is after underscore
|
||||
if(sscanf(&pvname[prefix_len+1],"%d",&val)==1)
|
||||
{
|
||||
Debug("createPV: I am making this PV\n");
|
||||
if(val>=0 && val<pv_total)
|
||||
rc=new servPV(in,*this,pvname,db_sync[val]);
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
// -----------------------PV stuff -------------------------------
|
||||
|
||||
servPV::servPV(const casCtx& c,serv& m,const char* n,dBase& x):
|
||||
casPV(c,n),db(x),mgr(m),monitored(0)
|
||||
{
|
||||
db.node=this;
|
||||
value=new gddScalar(appValue,aitEnumFloat64);
|
||||
}
|
||||
|
||||
servPV::~servPV(void)
|
||||
{
|
||||
value->unreference();
|
||||
db.node=NULL;
|
||||
}
|
||||
|
||||
unsigned servPV::maxSimultAsyncOps(void) const { return 100000u; }
|
||||
|
||||
caStatus servPV::interestRegister()
|
||||
{
|
||||
if(!monitored) monitored=1;
|
||||
return S_casApp_success;
|
||||
}
|
||||
|
||||
void servPV::interestDelete()
|
||||
{
|
||||
if(monitored) monitored=0;
|
||||
}
|
||||
|
||||
aitEnum servPV::bestExternalType() const
|
||||
{
|
||||
return aitEnumFloat64;
|
||||
}
|
||||
|
||||
caStatus servPV::read(const casCtx&, gdd &dd)
|
||||
{
|
||||
Debug1("read: %s\n",db.pvname);
|
||||
gddApplicationTypeTable& table=gddApplicationTypeTable::AppTable();
|
||||
|
||||
// this is a cheesy way to do this
|
||||
value->put(db.counter);
|
||||
value->setStatSevr(db.stat,db.sevr);
|
||||
value->setTimeStamp(&db.ts);
|
||||
|
||||
table.smartCopy(&dd,value);
|
||||
return S_casApp_success;
|
||||
}
|
||||
|
||||
caStatus servPV::write(const casCtx&, gdd &dd)
|
||||
{
|
||||
Debug1("write: %s\n",db.pvname);
|
||||
gddApplicationTypeTable& table=gddApplicationTypeTable::AppTable();
|
||||
|
||||
// this is also cheesy
|
||||
table.smartCopy(value,&dd);
|
||||
db.writeData((double)*value);
|
||||
return S_casApp_success;
|
||||
}
|
||||
|
||||
void servPV::destroy()
|
||||
{
|
||||
casPV::destroy();
|
||||
}
|
||||
|
||||
void servPV::eventReady(void)
|
||||
{
|
||||
value->put(db.counter);
|
||||
value->setStatSevr(db.stat,db.sevr);
|
||||
value->setTimeStamp(&db.ts);
|
||||
postEvent(mgr.event_mask,*value);
|
||||
}
|
||||
|
||||
92
src/cas/example/testdb/pvServ.h
Normal file
92
src/cas/example/testdb/pvServ.h
Normal file
@@ -0,0 +1,92 @@
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
* $Log$
|
||||
*/
|
||||
|
||||
#include "casdef.h"
|
||||
#include "osiTimer.h"
|
||||
|
||||
class gdd;
|
||||
class servPV;
|
||||
|
||||
#ifdef PVDEBUG
|
||||
#define Debug(str) { fprintf(stderr,str); }
|
||||
#define Debug1(str,val) { fprintf(stderr,str,val); }
|
||||
#define Debug2(str,val1,val2) { fprintf(stderr,str,val1,val2); }
|
||||
#define Debug3(str,val1,val2,val3) { fprintf(stderr,str,val1,val2,val3); }
|
||||
#else
|
||||
#define Debug(str) ;
|
||||
#define Debug1(str,val) ;
|
||||
#define Debug2(str,val1,val2) ;
|
||||
#define Debug3(str,val1,val2,val3) ;
|
||||
#endif
|
||||
|
||||
class dBase
|
||||
{
|
||||
public:
|
||||
dBase(void)
|
||||
{
|
||||
pvname[0]='\0';counter=0;
|
||||
hihi=90.0;high=80.0;low=20.0;lolo=10.0;
|
||||
ts.tv_sec=0; ts.tv_nsec=0;
|
||||
stat=0; sevr=0;
|
||||
node=NULL;
|
||||
}
|
||||
|
||||
void eventReady(void);
|
||||
void writeData(double);
|
||||
|
||||
char pvname[50];
|
||||
double counter;
|
||||
double hihi,high,low,lolo;
|
||||
aitTimeStamp ts;
|
||||
aitInt16 stat,sevr;
|
||||
servPV* node;
|
||||
};
|
||||
|
||||
class serv : public caServer
|
||||
{
|
||||
public:
|
||||
serv(int totpv,double rate,char* prefix,
|
||||
unsigned maxnamelen,unsigned pvtotalest, unsigned maxsimio);
|
||||
virtual ~serv(void);
|
||||
|
||||
virtual pvExistReturn pvExistTest(const casCtx& c,const char* pvname);
|
||||
virtual casPV* createPV(const casCtx& c,const char* pvname);
|
||||
|
||||
int InitDB(void);
|
||||
int Main(void);
|
||||
|
||||
// sloppy
|
||||
char* prefix;
|
||||
int prefix_len;
|
||||
int pv_total;
|
||||
double event_rate;
|
||||
casEventMask event_mask;
|
||||
dBase* db_sync;
|
||||
};
|
||||
|
||||
class servPV : public casPV
|
||||
{
|
||||
public:
|
||||
servPV(const casCtx&,serv&,const char* pvname,dBase&);
|
||||
virtual ~servPV(void);
|
||||
|
||||
virtual caStatus interestRegister(void);
|
||||
virtual void interestDelete(void);
|
||||
virtual aitEnum bestExternalType(void) const;
|
||||
virtual caStatus read(const casCtx &ctx, gdd &prototype);
|
||||
virtual caStatus write(const casCtx &ctx, gdd &value);
|
||||
virtual void destroy(void);
|
||||
virtual unsigned maxSimultAsyncOps(void) const;
|
||||
|
||||
void eventReady(void);
|
||||
|
||||
private:
|
||||
serv& mgr;
|
||||
dBase& db;
|
||||
gdd* value;
|
||||
int monitored;
|
||||
};
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += casdef.h
|
||||
INC += casInternal.h
|
||||
INC += casEventMask.h
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_LDLIBS = -lCom
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
|
||||
DEPLIBS = \
|
||||
$(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
SRCS.c = \
|
||||
sf2dbYacc.c\
|
||||
../sdr2gblmenu.c\
|
||||
../sdr2driver.c\
|
||||
../sdr2device.c\
|
||||
../sdr2recordtype.c\
|
||||
../dbStaticLib.c
|
||||
|
||||
OBJS = \
|
||||
sdr2gblmenu.o \
|
||||
sdr2driver.o \
|
||||
sdr2device.o \
|
||||
sdr2recordtype.o \
|
||||
dbStaticLib.o
|
||||
|
||||
MAN1 = sf2db.1
|
||||
|
||||
PROD = sf2db sdr2gblmenu sdr2driver sdr2device sdr2recordtype
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
sdr2gblmenu: sdr2gblmenu.o dbStaticLib.o
|
||||
$(LINK.c) -o $@ sdr2gblmenu.o dbStaticLib.o $(LDLIBS)
|
||||
|
||||
sdr2driver: sdr2driver.o dbStaticLib.o
|
||||
$(LINK.c) -o $@ sdr2driver.o dbStaticLib.o $(LDLIBS)
|
||||
|
||||
sdr2device: sdr2device.o dbStaticLib.o
|
||||
$(LINK.c) -o $@ sdr2device.o dbStaticLib.o $(LDLIBS)
|
||||
|
||||
sdr2recordtype: sdr2recordtype.o dbStaticLib.o
|
||||
$(LINK.c) -o $@ sdr2recordtype.o dbStaticLib.o $(LDLIBS)
|
||||
|
||||
sf2db: sf2dbYacc.o
|
||||
$(LINK.c) -o $@ sf2dbYacc.o
|
||||
|
||||
sf2dbYacc.o: sf2dbLex.c
|
||||
|
||||
clean::
|
||||
$(RM) -f sf2dbYacc.c sf2dbLex.c
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += resourceLib.h
|
||||
INC += resourceLib.cc
|
||||
INC += tsDLList.h
|
||||
INC += tsSLList.h
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
|
||||
C++ templates
|
||||
C++ templates:
|
||||
tsSLList.h - type safe single linked list template
|
||||
tsDLList.h - type safe double linked list template
|
||||
resourceLib.h - hash table template
|
||||
|
||||
the test subdir contains examples
|
||||
|
||||
|
||||
10
src/cxxTemplates/test/Makefile.Host
Normal file
10
src/cxxTemplates/test/Makefile.Host
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
TESTPROD := resourceLibTest tsDLListBench tsDLListTest tsDLListTest \
|
||||
tsSLListBench tsSLListTest
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
SRCS.cc += ../resourceLibTest.cc
|
||||
SRCS.cc += ../tsDLListBench.cc
|
||||
SRCS.cc += ../tsDLListTest.cc
|
||||
SRCS.cc += ../tsSLListBench.cc
|
||||
SRCS.cc += ../tsSLListTest.cc
|
||||
|
||||
TARGETS += buildHere
|
||||
#TARGETS += resourceLibTest
|
||||
#TARGETS += tsDLListBench
|
||||
#TARGETS += tsDLListTest
|
||||
#TARGETS += tsSLListTest
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
buildHere: resourceLibTest tsDLListBench tsDLListTest tsSLListBench tsSLListTest
|
||||
|
||||
resourceLibTest: resourceLibTest.o
|
||||
$(LINK.cc) -o $@ $<
|
||||
|
||||
tsDLListBench: tsDLListBench.o
|
||||
$(LINK.cc) -o $@ $<
|
||||
|
||||
tsDLListTest: tsDLListTest.o
|
||||
$(LINK.cc) -o $@ $<
|
||||
|
||||
tsSLListBench: tsSLListBench.o
|
||||
$(LINK.cc) -o $@ $<
|
||||
|
||||
tsSLListTest: tsSLListTest.o
|
||||
$(LINK.cc) -o $@ $<
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <resourceLib.h>
|
||||
|
||||
#include "resourceLib.h"
|
||||
#include "resourceLib.cc"
|
||||
|
||||
#ifdef SUNOS4
|
||||
#ifndef CLOCKS_PER_SEC
|
||||
@@ -11,7 +13,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class fred : public uintId, tsSLNode<fred> {
|
||||
class fred : public uintId, public tsSLNode<fred> {
|
||||
public:
|
||||
fred (const char *pNameIn, unsigned idIn) :
|
||||
pName(pNameIn), uintId(idIn) {}
|
||||
@@ -23,11 +25,26 @@ private:
|
||||
const char * const pName;
|
||||
};
|
||||
|
||||
class jane : public stringId, tsSLNode<jane> {
|
||||
class jane : public stringId, public tsSLNode<jane> {
|
||||
public:
|
||||
jane (const char *pNameIn) : stringId(pNameIn) {}
|
||||
};
|
||||
|
||||
//
|
||||
// Sun C++ 4.1 still appears to be lacking support in this area
|
||||
//
|
||||
#if !defined(__SUNPRO_CC)
|
||||
//
|
||||
// From Stroustrups's "The C++ Programming Language"
|
||||
// Appendix A: r.14.9
|
||||
//
|
||||
// This explicitly instantiates the template class's member
|
||||
// functions into "templInst.o"
|
||||
//
|
||||
template class resTable<fred,uintId>;
|
||||
template class resTable<jane,stringId>;
|
||||
#endif
|
||||
|
||||
main()
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
@@ -41,14 +41,14 @@ main ()
|
||||
|
||||
clk = clock();
|
||||
iter = list;
|
||||
while (pFred = iter()) {
|
||||
while ( (pFred = iter()) ) {
|
||||
pFred->inc();
|
||||
}
|
||||
diff = clock() - clk;
|
||||
delay = diff;
|
||||
delay = delay/CLOCKS_PER_SEC;
|
||||
delay = delay/LOOPCOUNT;
|
||||
printf("delay = %15.10lf\n", delay);
|
||||
printf("delay = %15.10f\n", delay);
|
||||
|
||||
pFred = new fred();
|
||||
clk = clock();
|
||||
@@ -60,6 +60,6 @@ main ()
|
||||
delay = diff;
|
||||
delay = delay/CLOCKS_PER_SEC;
|
||||
delay = delay/LOOPCOUNT;
|
||||
printf("delay = %15.10lf\n", delay);
|
||||
printf("delay = %15.10f\n", delay);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ main ()
|
||||
list.add(* new fred("D"));
|
||||
|
||||
iter.reset();
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
@@ -62,27 +62,27 @@ main ()
|
||||
pJane = new jane("JB");
|
||||
janeList.add(*pJane);
|
||||
|
||||
while (pJane = janeFwdIter()) {
|
||||
while ( (pJane = janeFwdIter()) ) {
|
||||
pJane->show();
|
||||
}
|
||||
|
||||
while (pJane = janeBwdIter()) {
|
||||
while ( (pJane = janeBwdIter()) ) {
|
||||
pJane->show();
|
||||
}
|
||||
|
||||
iter = list;
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
iter = list;
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
iter.remove();
|
||||
}
|
||||
assert(list.count()==0);
|
||||
|
||||
janeFwdIter = janeList;
|
||||
while (pFredBack = janeFwdIter()) {
|
||||
while ( (pFredBack = janeFwdIter()) ) {
|
||||
janeFwdIter.remove();
|
||||
}
|
||||
assert(janeList.count()==0);
|
||||
@@ -92,7 +92,7 @@ main ()
|
||||
pJane = new jane("JB");
|
||||
janeList.add(*pJane);
|
||||
janeBwdIter = janeList;
|
||||
while (pFredBack = janeBwdIter()) {
|
||||
while ( (pFredBack = janeBwdIter()) ) {
|
||||
janeBwdIter.remove();
|
||||
}
|
||||
assert(janeList.count()==0);
|
||||
|
||||
@@ -6,6 +6,13 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
/*
|
||||
* gnuc does not provide this under sunos4
|
||||
*/
|
||||
#if !defined(CLOCKS_PER_SEC) && defined(SUNOS4)
|
||||
# define CLOCKS_PER_SEC 1000000
|
||||
#endif
|
||||
|
||||
class fred : public tsSLNode<fred> {
|
||||
public:
|
||||
fred() : count(0) {}
|
||||
@@ -39,14 +46,14 @@ main ()
|
||||
|
||||
clk = clock();
|
||||
iter = list;
|
||||
while (pFred = iter()) {
|
||||
while ( (pFred = iter()) ) {
|
||||
pFred->inc();
|
||||
}
|
||||
diff = clock() - clk;
|
||||
delay = diff;
|
||||
delay = delay/CLOCKS_PER_SEC;
|
||||
delay = delay/LOOPCOUNT;
|
||||
printf("delay = %15.10lf\n", delay);
|
||||
printf("delay = %15.10f\n", delay);
|
||||
|
||||
pFred = new fred();
|
||||
clk = clock();
|
||||
@@ -58,6 +65,6 @@ main ()
|
||||
delay = diff;
|
||||
delay = delay/CLOCKS_PER_SEC;
|
||||
delay = delay/LOOPCOUNT;
|
||||
printf("delay = %15.10lf\n", delay);
|
||||
printf("delay = %15.10f\n", delay);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ main ()
|
||||
list.add(* new fred("C"));
|
||||
list.add(* new fred("D"));
|
||||
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
@@ -65,15 +65,15 @@ main ()
|
||||
pJane = new jane("JB");
|
||||
janeList.add(*pJane);
|
||||
|
||||
while (pJane = janeIter()) {
|
||||
while ( (pJane = janeIter()) ) {
|
||||
pJane->show();
|
||||
}
|
||||
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
iter.remove();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.5 1996/11/02 01:07:19 jhill
|
||||
* many improvements
|
||||
*
|
||||
* Revision 1.4 1996/08/14 12:32:09 jbk
|
||||
* added first() to list class, added first()/last() to iterator.
|
||||
*
|
||||
@@ -49,6 +52,31 @@
|
||||
#ifndef tsDLListH_include
|
||||
#define tsDLListH_include
|
||||
|
||||
//
|
||||
// tsDLNode<T>
|
||||
//
|
||||
template <class T>
|
||||
class tsDLNode {
|
||||
friend class tsDLList<T>;
|
||||
friend class tsDLIter<T>;
|
||||
friend class tsDLFwdIter<T>;
|
||||
friend class tsDLBwdIter<T>;
|
||||
public:
|
||||
tsDLNode() : pNext(0), pPrev(0) {}
|
||||
//
|
||||
// when someone copies in a class deriving from this
|
||||
// do _not_ change the node pointers
|
||||
//
|
||||
void operator = (tsDLNode<T> &) {}
|
||||
|
||||
protected:
|
||||
T *getNext(void) { return pNext; }
|
||||
T *getPrev(void) { return pPrev; }
|
||||
private:
|
||||
T *pNext;
|
||||
T *pPrev;
|
||||
};
|
||||
|
||||
//
|
||||
// tsDLList<T>
|
||||
//
|
||||
@@ -278,31 +306,6 @@ private:
|
||||
unsigned itemCount;
|
||||
};
|
||||
|
||||
//
|
||||
// tsDLNode<T>
|
||||
//
|
||||
template <class T>
|
||||
class tsDLNode {
|
||||
friend class tsDLList<T>;
|
||||
friend class tsDLIter<T>;
|
||||
friend class tsDLFwdIter<T>;
|
||||
friend class tsDLBwdIter<T>;
|
||||
public:
|
||||
tsDLNode() : pNext(0), pPrev(0) {}
|
||||
//
|
||||
// when someone copies in a class deriving from this
|
||||
// do _not_ change the node pointers
|
||||
//
|
||||
void operator = (tsDLNode<T> &) {}
|
||||
|
||||
protected:
|
||||
T *getNext(void) { return pNext; }
|
||||
T *getPrev(void) { return pPrev; }
|
||||
private:
|
||||
T *pNext;
|
||||
T *pPrev;
|
||||
};
|
||||
|
||||
//
|
||||
// tsDLIter<T>
|
||||
//
|
||||
@@ -482,7 +485,7 @@ template <class T>
|
||||
class tsDLBwdIter : private tsDLIter<T> {
|
||||
public:
|
||||
tsDLBwdIter(tsDLList<T> &listIn) :
|
||||
tsDLIter<T>(&listIn) {}
|
||||
tsDLIter<T>(listIn) {}
|
||||
|
||||
void reset ()
|
||||
{
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.5 1996/11/02 01:07:20 jhill
|
||||
* many improvements
|
||||
*
|
||||
* Revision 1.4 1996/09/04 19:57:07 jhill
|
||||
* string id resource now copies id
|
||||
*
|
||||
@@ -50,6 +53,27 @@
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
//
|
||||
// tsSLNode<>
|
||||
//
|
||||
template <class T>
|
||||
class tsSLNode {
|
||||
friend class tsSLList<T>;
|
||||
friend class tsSLIter<T>;
|
||||
public:
|
||||
tsSLNode() : pNext(0) {}
|
||||
|
||||
//
|
||||
// when someone copies into a class deriving from this
|
||||
// do _not_ change the node pointers
|
||||
//
|
||||
void operator = (tsSLNode<T> &) {}
|
||||
|
||||
private:
|
||||
T *pNext;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// tsSLList<>
|
||||
//
|
||||
@@ -112,27 +136,7 @@ public:
|
||||
};
|
||||
|
||||
//
|
||||
// tsSLNode<>
|
||||
//
|
||||
template <class T>
|
||||
class tsSLNode {
|
||||
friend class tsSLList<T>;
|
||||
friend class tsSLIter<T>;
|
||||
public:
|
||||
tsSLNode() : pNext(0) {}
|
||||
|
||||
//
|
||||
// when someone copies into a class deriving from this
|
||||
// do _not_ change the node pointers
|
||||
//
|
||||
void operator = (tsSLNode<T> &) {}
|
||||
|
||||
private:
|
||||
T *pNext;
|
||||
};
|
||||
|
||||
//
|
||||
// tsDLFwdIter<T>
|
||||
// tsSLIter<T>
|
||||
//
|
||||
// Notes:
|
||||
// 1) No direct access to pCurrent is provided since
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += drvTS.h
|
||||
INC += drvSup.h
|
||||
INC += callback.h
|
||||
INC += dbLock.h
|
||||
INC += dbAccess.h
|
||||
INC += dbConvert.h
|
||||
INC += dbEvent.h
|
||||
INC += dbScan.h
|
||||
INC += db_access.h
|
||||
INC += dbAddr.h
|
||||
INC += db_field_log.h
|
||||
INC += fast_lock.h
|
||||
INC += initHooks.h
|
||||
INC += recSup.h
|
||||
INC += devSup.h
|
||||
INC += taskwd.h
|
||||
INC += recGbl.h
|
||||
INC += dbBkpt.h
|
||||
INC += devLib.h
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
@@ -95,6 +95,8 @@ LOCAL EVENTFUNC wake_cancel;
|
||||
|
||||
LOCAL int event_read(struct event_que *ev_que);
|
||||
|
||||
LOCAL int db_post_single_event_private(struct event_block *event);
|
||||
|
||||
/* what to do with unrecoverable errors */
|
||||
#define abort(S) taskSuspend((int)taskIdCurrent);
|
||||
|
||||
@@ -162,13 +164,13 @@ int db_event_list(char *name)
|
||||
printf(" ev %lx\n", (unsigned long) pevent);
|
||||
printf(" ev que %lx\n", (unsigned long) pevent->ev_que);
|
||||
printf(" ev user %lx\n", (unsigned long) pevent->ev_que->evuser);
|
||||
printf("ring space %u\n", RNGSPACE(pevent->ev_que));
|
||||
#endif
|
||||
printf( "task %x select %x pfield %lx behind by %ld\n",
|
||||
pevent->ev_que->evuser->taskid,
|
||||
pevent->select,
|
||||
(unsigned long) pevent->paddr->pfield,
|
||||
pevent->npend);
|
||||
printf("ring space %u\n", RNGSPACE(pevent->ev_que));
|
||||
}
|
||||
UNLOCKREC(precord);
|
||||
|
||||
@@ -448,7 +450,7 @@ int db_cancel_event(struct event_block *pevent)
|
||||
flush_event.user_sub = wake_cancel;
|
||||
flush_event.user_arg = &pevu->pflush_sem;
|
||||
flush_event.npend = 0ul;
|
||||
if(db_post_single_event(&flush_event)==OK){
|
||||
if(db_post_single_event_private(&flush_event)==OK){
|
||||
/*
|
||||
* insure that the event is
|
||||
* removed from the queue
|
||||
@@ -571,6 +573,7 @@ int db_post_extra_labor(struct event_user *evuser)
|
||||
/*
|
||||
* DB_POST_EVENTS()
|
||||
*
|
||||
* NOTE: This assumes that the db scan lock is already applied
|
||||
*
|
||||
*/
|
||||
int db_post_events(
|
||||
@@ -597,7 +600,7 @@ unsigned int select
|
||||
if ( (event->paddr->pfield == (void *)pval || pval==NULL) &&
|
||||
(select & event->select)) {
|
||||
|
||||
db_post_single_event(event);
|
||||
db_post_single_event_private(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -609,8 +612,26 @@ unsigned int select
|
||||
|
||||
/*
|
||||
* DB_POST_SINGLE_EVENT()
|
||||
*
|
||||
*/
|
||||
int db_post_single_event(struct event_block *event)
|
||||
{
|
||||
struct dbCommon *precord = event->paddr->precord;
|
||||
int status;
|
||||
|
||||
dbScanLock(precord);
|
||||
status = db_post_single_event_private(event);
|
||||
dbScanUnlock(precord);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* DB_POST_SINGLE_EVENT_PRIVATE()
|
||||
*
|
||||
* NOTE: This assumes that the db scan lock is already applied
|
||||
*/
|
||||
LOCAL int db_post_single_event_private(struct event_block *event)
|
||||
{
|
||||
struct event_que *ev_que;
|
||||
db_field_log *pLog;
|
||||
|
||||
@@ -270,17 +270,40 @@ static long cvt_st_e(
|
||||
unsigned short *to,
|
||||
struct dbAddr *paddr)
|
||||
{
|
||||
struct rset *prset = 0;
|
||||
long status;
|
||||
struct rset *prset = 0;
|
||||
long status;
|
||||
unsigned short *pfield= (unsigned short*)(paddr->pfield);
|
||||
unsigned int nchoices,ind;
|
||||
int nargs,nchars;
|
||||
struct dbr_enumStrs enumStrs;
|
||||
|
||||
if(paddr) prset = dbGetRset(paddr);
|
||||
|
||||
if (prset && prset->put_enum_str)
|
||||
return (*prset->put_enum_str)(paddr, from);
|
||||
|
||||
status = S_db_noRSET;
|
||||
recGblRecSupError(status, paddr, "dbPutField", "put_enum_str");
|
||||
return(S_db_badDbrtype);
|
||||
if(paddr && (prset=dbGetRset(paddr))
|
||||
&& (prset->put_enum_str)) {
|
||||
status = (*prset->put_enum_str)(paddr,from);
|
||||
if(!status) return(0);
|
||||
if(prset->get_enum_strs) {
|
||||
status = (*prset->get_enum_strs)(paddr,&enumStrs);
|
||||
if(!status) {
|
||||
nchoices = enumStrs.no_str;
|
||||
nargs = sscanf(from," %u %n",&ind,&nchars);
|
||||
if(nargs==1 && nchars==strlen(from) && ind<nchoices) {
|
||||
*pfield = ind;
|
||||
return(0);
|
||||
}
|
||||
status = S_db_badChoice;
|
||||
}
|
||||
}else {
|
||||
status=S_db_noRSET;
|
||||
}
|
||||
} else {
|
||||
status=S_db_noRSET;
|
||||
}
|
||||
if(status == S_db_noRSET) {
|
||||
recGblRecSupError(status,paddr,"dbPutField","put_enum_str");
|
||||
} else {
|
||||
recGblRecordError(status,(void *)paddr->precord,from);
|
||||
}
|
||||
return(status);
|
||||
}
|
||||
|
||||
/* Convert String to Menu */
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.18 1997/01/20 15:31:00 jbk
|
||||
* Print IP address on report
|
||||
*
|
||||
* Revision 1.17 1996/11/02 01:16:43 jhill
|
||||
* added byte swapping for pc arch
|
||||
*
|
||||
*
|
||||
* added net-host conversions kuk
|
||||
*
|
||||
@@ -318,6 +324,11 @@ long TSreport()
|
||||
TSprintf("Total events supported = %d\n",TSdata.total_events);
|
||||
TSprintf("Request Time Out = %lu milliseconds\n",TSdata.time_out);
|
||||
|
||||
TSprintf("Broadcast address: %s\n",
|
||||
inet_ntoa(((struct sockaddr_in*)&TSdata.hunt)->sin_addr));
|
||||
TSprintf("Master address: %s\n",
|
||||
inet_ntoa(((struct sockaddr_in*)&TSdata.master)->sin_addr));
|
||||
|
||||
if(TSdata.UserRequestedType)
|
||||
TSprintf("\nForced to not use the event system\n");
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_LDLIBS = -lDb -lCom -lm
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
#USR_CFLAGS = -v -g
|
||||
#CC = $(PURIFYHOME)/purify $(C_$(CMPLR))
|
||||
|
||||
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS = ./libDb.a\
|
||||
$(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
INC += alarm.h
|
||||
INC += alarmString.h
|
||||
INC += dbBase.h
|
||||
INC += dbFldTypes.h
|
||||
INC += dbStaticLib.h
|
||||
INC += link.h
|
||||
INC += special.h
|
||||
INC += guigroup.h
|
||||
|
||||
SRCS.c = \
|
||||
dbYacc.c \
|
||||
../dbReadTest.c\
|
||||
../dbExpand.c\
|
||||
../dbPvdLib.c\
|
||||
../dbStaticNoRun.c\
|
||||
../dbStaticLib.c\
|
||||
../dbToMenuH.c\
|
||||
../dbToRecordtypeH.c
|
||||
|
||||
OBJS = \
|
||||
dbReadTest.o\
|
||||
dbExpand.o\
|
||||
dbToMenuH.o\
|
||||
dbToRecordtypeH.o
|
||||
|
||||
LIBOBJS = dbStaticLib.o dbYacc.o dbPvdLib.o dbStaticNoRun.o
|
||||
LIBNAME = libDb.a
|
||||
|
||||
PROD = \
|
||||
dbReadTest\
|
||||
dbExpand\
|
||||
dbToMenuH\
|
||||
dbToRecordtypeH
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
# Extra rule since dbLexRoutines.c is included in dbYacc.c
|
||||
dbYacc.o: dbLex.c ../dbLexRoutines.c
|
||||
|
||||
clean::
|
||||
@$(RM) dbLex.c dbYacc.c
|
||||
|
||||
@@ -70,14 +70,15 @@ static unsigned short hash( char *pname, int length)
|
||||
unsigned char h0=0;
|
||||
unsigned char h1=0;
|
||||
unsigned short ind0,ind1;
|
||||
int even = TRUE;
|
||||
unsigned char c;
|
||||
int i;
|
||||
int isOdd;
|
||||
int i,n;
|
||||
|
||||
for(i=0; i<length; i++, pname++) {
|
||||
c = *pname;
|
||||
if(even) {h0 = T[h0^c]; even = FALSE;}
|
||||
else {h1 = T[h1^c]; even = TRUE;}
|
||||
isOdd = length%2; /*See if length is odd number of chanacters*/
|
||||
n = (isOdd ? (length-1) : length);
|
||||
if(isOdd) h0 = T[h0^*(pname + length -1)];
|
||||
for(i=0; i<n; i+=2, pname+=2) {
|
||||
h0 = T[h0^*pname];
|
||||
h1 = T[h1^*(pname+1)];
|
||||
}
|
||||
ind0 = (unsigned short)h0;
|
||||
ind1 = (unsigned short)h1;
|
||||
|
||||
@@ -2472,6 +2472,8 @@ int dbAllocForm(DBENTRY *psave)
|
||||
epicsPrintf("dbAllocForm called but not DBF_DEVICE or DBF_xxxLINK\n");
|
||||
goto done;
|
||||
}
|
||||
plink = (DBLINK *)(pdbentry->pfield);
|
||||
if(plink->type==MACRO_LINK) goto done;
|
||||
if(strcmp(pflddes->name,"INP")==0 || strcmp(pflddes->name,"OUT")==0){
|
||||
status = setLinkType(pdbentry);
|
||||
if(status) {
|
||||
|
||||
@@ -7,6 +7,11 @@ include $(TOP)/config/CONFIG_BASE
|
||||
YACCOPT := -l
|
||||
LEXOPT := -L
|
||||
|
||||
# This is ugly, but it is the only way I could get it to work
|
||||
ifeq ($(T_A),alpha)
|
||||
CMPLR=OLD
|
||||
endif
|
||||
|
||||
# includes and manual pages to install:
|
||||
#
|
||||
INC := dbVarSub.h
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
# USR_CFLAGS = -v
|
||||
|
||||
YACCOPT = -l
|
||||
LEXOPT = -L
|
||||
|
||||
INC += dbVarSub.h
|
||||
|
||||
SRCS.c = ../dbVarSub.c dbLoadTemplate_lex.c dbLoadTemplate.c \
|
||||
dbLoadRecords_lex.c dbLoadRecords.c \
|
||||
../BSlib.c ../PVSserver.c ../rdbapplist.c ../rdbls.c ../ioc_stats.c
|
||||
|
||||
VAR_OBJS = dbVarSub.o dbLoadTemplate.o dbLoadRecords.o
|
||||
|
||||
LIBOBJS = BSlib.o
|
||||
LIBNAME = BSlib.a
|
||||
|
||||
PROD = subtool dbLoadTemplate rdbls rdbapplist PVSserver ioc_stats
|
||||
|
||||
MAN1 = dbLoadTemplate.1 subtool.1
|
||||
MAN3 = dbLoadRecords.3 dbLoadTemplate.3
|
||||
MAN5 = templatefile.5 dbfile.5
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
dbLoadTemplate.o: dbLoadTemplate_lex.c
|
||||
dbLoadRecords.o: dbLoadRecords_lex.c
|
||||
|
||||
PVSserver: PVSserver.o BSlib.o
|
||||
$(LINK.c) -o $@ $^ $(LDLIBS)
|
||||
|
||||
rdbls: rdbls.o BSlib.o
|
||||
$(LINK.c) -o $@ $^ $(LDLIBS)
|
||||
|
||||
ioc_stats: ioc_stats.o BSlib.o
|
||||
$(LINK.c) -o $@ $^ $(LDLIBS)
|
||||
|
||||
rdbapplist: rdbapplist.o BSlib.o
|
||||
$(LINK.c) -o $@ $^ $(LDLIBS)
|
||||
|
||||
subtool.o: dbLoadTemplate.c dbLoadTemplate_lex.c
|
||||
$(COMPILE.c) -DSUB_TOOL -o $@ $<
|
||||
|
||||
subtool: subtool.o dbVarSub.o
|
||||
$(LINK.c) -DSUB_TOOL -o $@ $^ -s $(LDLIBS)
|
||||
|
||||
dbLoadTemplate: $(VAR_OBJS)
|
||||
$(LINK.c) -o $@ $^ $(LDLIBS) -lDb
|
||||
|
||||
clean::
|
||||
@$(RM) dbLoadTemplate_lex.c dbLoadTemplate.c dbLoadRecords_lex.c \
|
||||
dbLoadRecords.c
|
||||
|
||||
@@ -33,13 +33,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef vxWorks
|
||||
#include <memLib.h>
|
||||
#else
|
||||
#include <memory.h>
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "dbVarSub.h"
|
||||
#include <dbStaticLib.h>
|
||||
|
||||
@@ -33,13 +33,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef vxWorks
|
||||
#include <memLib.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <memory.h>
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "dbVarSub.h"
|
||||
#include <epicsVersion.h>
|
||||
|
||||
@@ -271,9 +271,12 @@ static int Mz8310_shutdown()
|
||||
{
|
||||
int card,chip;
|
||||
volatile unsigned char *pcmd;
|
||||
int maxCards;
|
||||
|
||||
if(mz8310NoShutdown) return(0);
|
||||
for(card=0;card<MAXCARDS;card++)
|
||||
maxCards = MAXCARDS;
|
||||
if(tm_num_channels[MZ8310] < maxCards) maxCards = tm_num_channels[MZ8310];
|
||||
for(card=0;card<maxCards;card++)
|
||||
{
|
||||
if(mz8310_info[card].present==TRUE)
|
||||
{
|
||||
|
||||
@@ -65,6 +65,10 @@
|
||||
* This driver currently needs work on error message generation.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.3 1996/05/03 19:04:44 winans
|
||||
* Fixed a reversed set of parms to a semBCreate().
|
||||
* Changed the data type of a parameter to memory probe call.
|
||||
*
|
||||
* Revision 1.2 1995/09/26 14:50:31 winans
|
||||
* Added code to send last byte of a RAC_RESET in pepTxTask(). It was left
|
||||
* out in a previous mod that modes the last byte transmission into a locked
|
||||
@@ -171,10 +175,33 @@ STATIC int BBDumpXactHistory(XactHistStruct *pXact);
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Used to limit the TOTAL number of simultaneous messages that can be
|
||||
* outstanding on a single Xycom link. (Shell settable.)
|
||||
* outstanding on a single Xycom/PEP link. (Shell settable.) PEP limit
|
||||
* of 7 is a magic number. Anything more and PEP board will throw away
|
||||
* your transaction resulting in a TIMEOUT. Ugh.
|
||||
*
|
||||
*****************************************************************************/
|
||||
int XycomMaxOutstandMsgs = XYCOM_BB_MAX_OUTSTAND_MSGS;
|
||||
int PepMaxOutstandMsgs = 7; /* pre-determined magic number */
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Create an artificial delay to prevent back-to-back message
|
||||
* loading of the PEP FIFO, since this has proven to induce protocol
|
||||
* errors. If the global PepLinkXDelay variable is 0 or positive,
|
||||
* use a software spin loop for the delay. If the PepLinkXDelay
|
||||
* variable is negative, wait for the 80C152 "currently transmitting"
|
||||
* bit to clear (bit 7 == 0).
|
||||
*
|
||||
*****************************************************************************/
|
||||
int PepLink0Delay = 450;
|
||||
int PepLink1Delay = 450;
|
||||
int PepLink2Delay = 450;
|
||||
int PepLink3Delay = 450;
|
||||
int PepLink0ConsecutiveDelay = 0;
|
||||
int PepLink1ConsecutiveDelay = 0;
|
||||
int PepLink2ConsecutiveDelay = 0;
|
||||
int PepLink3ConsecutiveDelay = 0;
|
||||
int PepLink0PulseNode = 1;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -1980,6 +2007,16 @@ pepRxTask(int link)
|
||||
if (rxHead[6] == 0x91)
|
||||
{ /* something bad happened... inject a delay to the */
|
||||
/* requested timeout duration. */
|
||||
|
||||
/* start of saunders patch */
|
||||
if (link==0 && PepLink0PulseNode == -1) {
|
||||
pulseSysMon();
|
||||
} else if (link==0 && PepLink0PulseNode > 0) {
|
||||
if (rxHead[4] == PepLink0PulseNode)
|
||||
pulseSysMon();
|
||||
}
|
||||
/* end of saunders patch */
|
||||
|
||||
if (bbDebug)
|
||||
printf("pepRxTask(%d): 0x91 from node %d, invoking synthetic delay\n", link, rxHead[4]);
|
||||
(pBBLink[link]->syntheticDelay[rxDpvtHead->txMsg.node]) = rxDpvtHead->retire;
|
||||
@@ -2432,7 +2469,8 @@ STATIC int pepTxTask(int link)
|
||||
printf("pepTxTask(%d): got an event\n", link);
|
||||
|
||||
working = 1;
|
||||
while ((working != 0) && (pBBLink[link]->abortFlag == 0)) {
|
||||
while ((working != 0) && (pBBLink[link]->abortFlag == 0) &&
|
||||
(pBBLink[link]->busyList.elements < PepMaxOutstandMsgs)) {
|
||||
working = 0;
|
||||
|
||||
prio = BB_NUM_PRIO-1;
|
||||
@@ -2462,6 +2500,63 @@ STATIC int pepTxTask(int link)
|
||||
}
|
||||
}
|
||||
|
||||
/* Start of unpleasant patch.
|
||||
Create an artificial delay to prevent back-to-back message
|
||||
loading of the PEP FIFO, since this has proven to induce protocol
|
||||
errors. If the global PepLinkXDelay variable is 0 or positive,
|
||||
use a software spin loop for the delay. If the PepLinkXDelay
|
||||
variable is negative, wait for the 80C152 "currently transmitting"
|
||||
bit to clear (bit 7 == 0).
|
||||
*/
|
||||
switch (link) {
|
||||
case 0:
|
||||
if (PepLink0Delay >= 0) {
|
||||
for (x=0 ; x < PepLink0Delay ; x++);
|
||||
} else {
|
||||
stuck = -PepLink0Delay;
|
||||
while (((pBBLink[link]->l.PepLink.bbRegs->stat_ctl & 0x80)
|
||||
== 0x0) && --stuck)
|
||||
for(x=0;x<100;x++);
|
||||
}
|
||||
PepLink0ConsecutiveDelay++;
|
||||
break;
|
||||
case 1:
|
||||
if (PepLink1Delay >= 0) {
|
||||
for (x=0 ; x < PepLink1Delay ; x++);
|
||||
} else {
|
||||
stuck = -PepLink1Delay;
|
||||
while (((pBBLink[link]->l.PepLink.bbRegs->stat_ctl & 0x80)
|
||||
== 0x0) && --stuck)
|
||||
for(x=0;x<100;x++);
|
||||
}
|
||||
PepLink1ConsecutiveDelay++;
|
||||
break;
|
||||
case 2:
|
||||
if (PepLink2Delay >= 0) {
|
||||
for (x=0 ; x < PepLink2Delay ; x++);
|
||||
} else {
|
||||
stuck = -PepLink2Delay;
|
||||
while (((pBBLink[link]->l.PepLink.bbRegs->stat_ctl & 0x80)
|
||||
== 0x0) && --stuck)
|
||||
for(x=0;x<100;x++);
|
||||
}
|
||||
PepLink2ConsecutiveDelay++;
|
||||
break;
|
||||
case 3:
|
||||
if (PepLink3Delay >= 0) {
|
||||
for (x=0 ; x < PepLink3Delay ; x++);
|
||||
} else {
|
||||
stuck = -PepLink3Delay;
|
||||
while (((pBBLink[link]->l.PepLink.bbRegs->stat_ctl & 0x80)
|
||||
== 0x0) && --stuck)
|
||||
for(x=0;x<100;x++);
|
||||
}
|
||||
PepLink3ConsecutiveDelay++;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
/* End unpleasant patch */
|
||||
|
||||
if (pnode != NULL) { /* have an xact to start processing */
|
||||
working = 1;
|
||||
|
||||
@@ -2635,3 +2730,49 @@ int pepDumpStat(int link)
|
||||
printf("stat_ctl reg: %2X\n",stat_ctl);
|
||||
return(OK);
|
||||
}
|
||||
|
||||
/* pulseSysMon.c */
|
||||
/* Function for pulsing a bit on System Monitor Board */
|
||||
/* TEMPORARY ROUTINE TO FIND BITBUS PROBLEMS*/
|
||||
typedef struct SysmonStruct {
|
||||
char Pad[36]; /*** nF0 - nF17 36 bytes ***/
|
||||
unsigned short SysmonStatusLink; /*** nF18 ***/
|
||||
unsigned short SysmonDio; /*** nF19 ***/
|
||||
unsigned short SysmonIntMask; /*** nF20 ***/
|
||||
unsigned short SysmonTemperature; /*** nF21 ***/
|
||||
unsigned short SysmonWatchdog; /*** nF22 ***/
|
||||
unsigned short SysmonVXIVector; /*** nF23 ***/
|
||||
unsigned short SysmonIntVector; /*** nF24 ***/
|
||||
unsigned short SysmonIRQ1; /*** nF25 ***/
|
||||
unsigned short SysmonIRQ2; /*** nF26 ***/
|
||||
unsigned short SysmonIRQ3; /*** nF27 ***/
|
||||
unsigned short SysmonIRQ4; /*** nF28 ***/
|
||||
unsigned short SysmonIRQ5; /*** nF29 ***/
|
||||
unsigned short SysmonIRQ6; /*** nF30 ***/
|
||||
unsigned short SysmonIRQ7; /*** nF31 ***/
|
||||
} SysmonStruct;
|
||||
|
||||
int bitbusTriggerWidth = 1500;
|
||||
|
||||
long pulseSysMon() {
|
||||
volatile SysmonStruct *SysmonBase;
|
||||
volatile unsigned short *pReg;
|
||||
int i;
|
||||
volatile int j = 0;
|
||||
|
||||
if (sysBusToLocalAdrs(VME_AM_SUP_SHORT_IO, (char *)0x8b80,
|
||||
(char **)&(SysmonBase)) == ERROR) {
|
||||
printf("can't convert to local address, aborting\n");
|
||||
return(1);
|
||||
}
|
||||
pReg = &(SysmonBase->SysmonDio);
|
||||
|
||||
*pReg = 0xffff;
|
||||
for (i=0 ; i < bitbusTriggerWidth ; i++) {
|
||||
j++;
|
||||
j--;
|
||||
}
|
||||
*pReg = 0x0000;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,14 @@ LIBSRCS := gdd.cc gddTest.cc gddAppTable.cc gddNewDel.cc \
|
||||
|
||||
LIBRARY := gdd
|
||||
|
||||
# build locally:
|
||||
TESTPROD:=genApps
|
||||
TESTPROD_SRCS:=genApps.cc gdd.cc gddTest.cc gddAppTable.cc\
|
||||
gddNewDel.cc gddAppDefs.cc \
|
||||
aitTypes.cc aitConvert.cc aitHelpers.cc
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
# cannot generate these dependencies automatically
|
||||
#
|
||||
# Problem: Some dependencies are include files that may
|
||||
@@ -43,12 +51,6 @@ aitConvertGenerated.cc: aitGen$(EXE) ../aitTypes.h
|
||||
./gddApps.h: genApps$(EXE)
|
||||
./genApps$(EXE) $@
|
||||
|
||||
# build locally:
|
||||
TESTPROD:=genApps
|
||||
TESTPROD_SRCS:=genApps.cc gdd.cc gddTest.cc gddAppTable.cc\
|
||||
gddNewDel.cc gddAppDefs.cc \
|
||||
aitTypes.cc aitConvert.cc aitHelpers.cc
|
||||
|
||||
# unfortunately there is only one TESTPROD/TESTPROD_SRCS allowed
|
||||
# right now
|
||||
# (or many 'simple' progs:
|
||||
@@ -63,6 +65,4 @@ aitGen$(EXE): aitGen$(OBJ) aitTypes$(OBJ)
|
||||
clean::
|
||||
$(RM) aitConvertGenerated.cc aitGen$(EXE) genApps$(EXE)
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
# EOF base/src/gdd/Makefile.Host
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
#
|
||||
# Author: Jim Kowalkowski
|
||||
# Date: 2/96
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.12 1996/10/14 16:33:36 jba
|
||||
# Clean rule now uses rm macro. Removed . in VPATH def.
|
||||
#
|
||||
# Revision 1.11 1996/07/24 22:47:29 jhill
|
||||
# removed OPTIM_YES=-g which caused link fail
|
||||
#
|
||||
# Revision 1.10 1996/07/23 17:13:29 jbk
|
||||
# various fixes - dbmapper incorrectly worked with enum types
|
||||
#
|
||||
# Revision 1.9 1996/07/10 23:48:03 jhill
|
||||
# added install for gddAppFuncTable.h
|
||||
#
|
||||
# Revision 1.8 1996/07/09 22:58:55 jhill
|
||||
# added installation of the include files
|
||||
#
|
||||
# Revision 1.7 1996/07/08 15:20:02 jba
|
||||
# Moved include RULES.Unix
|
||||
#
|
||||
# Revision 1.6 1996/07/03 00:02:55 jhill
|
||||
# use ./aitGen and ./genApps per Janet's request
|
||||
#
|
||||
# Revision 1.5 1996/06/28 19:17:31 jhill
|
||||
# took out purify etc - also include dbMapper
|
||||
#
|
||||
# Revision 1.4 1996/06/28 15:19:44 jba
|
||||
# Moved config dir to base/config.
|
||||
#
|
||||
# Revision 1.3 1996/06/26 21:17:10 jhill
|
||||
# fixed to match config in src
|
||||
#
|
||||
# Revision 1.2 1996/06/25 19:18:11 jbk
|
||||
# moved from extensions to base - fixed trouble in dbMapper.cc
|
||||
#
|
||||
# Revision 1.1 1996/06/25 19:11:25 jbk
|
||||
# new in EPICS base
|
||||
#
|
||||
#
|
||||
# *Revision 1.4 1996/06/25 18:58:56 jbk
|
||||
# *more fixes for the aitString management functions and mapping menus
|
||||
# *Revision 1.3 1996/06/24 03:15:26 jbk
|
||||
# *name changes and fixes for aitString and fixed string functions
|
||||
# *Revision 1.2 1996/06/11 01:55:18 jbk
|
||||
# *completed ful build
|
||||
# *Revision 1.1 1996/05/31 13:15:14 jbk
|
||||
# *add new stuff
|
||||
|
||||
VPATH=..
|
||||
|
||||
TOP= ../../..
|
||||
# EPICS = /usr/local/epics/R3.12.2
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
#OPTIM_YES=-g
|
||||
|
||||
INC += gdd.h
|
||||
INC += gddNewDel.h
|
||||
INC += gddUtils.h
|
||||
INC += gddErrorCodes.h
|
||||
INC += aitTypes.h
|
||||
INC += aitConvert.h
|
||||
INC += aitHelpers.h
|
||||
INC += dbMapper.h
|
||||
INC += gddAppTable.h
|
||||
# template class and inline member func
|
||||
INC += gddAppFuncTable.h
|
||||
# template member func (not "inline")
|
||||
INC += gddAppFuncTable.cc
|
||||
INC += gddApps.h
|
||||
|
||||
DEPENDS_RULE.cc = -$(COMPILE.cc) -xM $(SRCS.cc) >> .DEPENDS
|
||||
|
||||
USR_LDFLAGS = -L$(EPICS_EXTENSIONS_LIB) -L.
|
||||
USR_CFLAGS = -L$(EPICS_EXTENSIONS_LIB) -L.
|
||||
|
||||
SRCS.cc = ../aitGen.c ../aitTypes.c ../aitHelpers.cc \
|
||||
../gdd.cc ../gddAppDefs.cc ../gddAppTable.cc ../gddNewDel.cc \
|
||||
../gddTest.cc ../genApps.cc ../dbMapper.cc
|
||||
|
||||
MY_OBJS = gdd.o gddTest.o gddAppTable.o gddNewDel.o gddAppDefs.o \
|
||||
aitTypes.o aitConvert.o aitHelpers.o
|
||||
|
||||
LIBOBJS = $(MY_OBJS) dbMapper.o
|
||||
|
||||
LIBNAME = libgdd.a
|
||||
|
||||
TARGETS = dbMapper.o
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
# cannot generate dependencies for aitConvert automatically
|
||||
|
||||
aitConvert.o: aitConvert.cc aitConvert.h aitConvertGenerated.cc aitTypes.h
|
||||
|
||||
aitConvertGenerated.cc: aitGen aitTypes.h
|
||||
./aitGen
|
||||
|
||||
aitGen: aitGen.o aitTypes.o
|
||||
$(LINK.c) -o $@ $^ $(LDLIBS)
|
||||
|
||||
# cannot generate dependencies for dbMapper.o automatically
|
||||
|
||||
dbMapper.o: ../dbMapper.cc gdd.h gddAppTable.h dbMapper.h gddApps.h aitTypes.h
|
||||
$(COMPILE.cc) $<
|
||||
$(AR) r $(LIBNAME) $@
|
||||
|
||||
gddApps.h: genApps
|
||||
./genApps $@
|
||||
|
||||
genApps: genApps.o $(MY_OBJS)
|
||||
$(LINK.cc) -o $@ $^ $(LDLIBS)
|
||||
|
||||
clean::
|
||||
$(RM) -f aitConvertGenerated.cc aitGen genApps
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
// $Id$
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.17 1997/01/12 20:32:45 jbk
|
||||
// many errors fixed
|
||||
//
|
||||
// Revision 1.15 1996/12/17 15:04:42 jbk
|
||||
// fixed bug in copyData, sets bounds now
|
||||
//
|
||||
@@ -1002,6 +1005,7 @@ gddStatus gdd::clearData(void)
|
||||
destruct->destroy(dataPointer());
|
||||
destruct=NULL;
|
||||
}
|
||||
freeBounds();
|
||||
setData(NULL);
|
||||
}
|
||||
return rc;
|
||||
|
||||
@@ -17,15 +17,15 @@ OSINC += osiSock.h
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
-include $(TOP)/config/CONFIG_BASE_VERSION
|
||||
include $(TOP)/config/CONFIG_BASE_VERSION
|
||||
|
||||
epicsVersion.h: $(TOP)/config/CONFIG_BASE_VERSION
|
||||
@$(RM) $@
|
||||
@echo "#define BASE_VERSION $(BASE_VERSION)" > $@
|
||||
@echo "#define BASE_REVISION $(BASE_REVISION)" >> $@
|
||||
@echo "#define BASE_MODIFICATION $(BASE_MODIFICATION)" >> $@
|
||||
@echo "#define BASE_UPDATE_NAME $(BASE_UPDATE_NAME)" >> $@
|
||||
@echo "#define BASE_UPDATE_LEVEL $(BASE_UPDATE_LEVEL)" >> $@
|
||||
@echo "#define BASE_VERSION_STRING \"EPICS Version $(BASE_VERSION_STRING)\" " >> $@
|
||||
@echo "#define epicsReleaseVersion \"@(#)Version R$(BASE_VERSION_STRING) $(CVS_DATE)\" " >> $@
|
||||
@echo "#define EPICS_VERSION $(EPICS_VERSION)" > $@
|
||||
@echo "#define EPICS_REVISION $(EPICS_REVISION)" >> $@
|
||||
@echo "#define EPICS_MODIFICATION $(EPICS_MODIFICATION)" >> $@
|
||||
@echo "#define EPICS_UPDATE_NAME $(EPICS_UPDATE_NAME)" >> $@
|
||||
@echo "#define EPICS_UPDATE_LEVEL $(EPICS_UPDATE_LEVEL)" >> $@
|
||||
@echo "#define EPICS_VERSION_STRING \"$(EPICS_VERSION_STRING)\" " >> $@
|
||||
@echo "#define epicsReleaseVersion \"@(#)$(EPICS_VERSION_STRING) $(CVS_DATE)\" " >> $@
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += dbDefs.h
|
||||
INC += camacLib.h
|
||||
INC += epicsTypes.h
|
||||
INC += epicsVersion.h
|
||||
INC += gsd_sync_defs.h
|
||||
INC += module_types.h
|
||||
INC += shareLib.h
|
||||
INC += createSoftLinks.sh
|
||||
INC += bsdProto.h
|
||||
INC += task_params.h
|
||||
INC += osiMutexNOOP.h
|
||||
|
||||
OSINC += osiSock.h
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
-include $(TOP)/config/CONFIG_BASE_VERSION
|
||||
|
||||
epicsVersion.h: $(TOP)/config/CONFIG_BASE_VERSION
|
||||
@$(RM) $@
|
||||
@echo "#define BASE_VERSION $(BASE_VERSION)" > $@
|
||||
@echo "#define BASE_REVISION $(BASE_REVISION)" >> $@
|
||||
@echo "#define BASE_MODIFICATION $(BASE_MODIFICATION)" >> $@
|
||||
@echo "#define BASE_UPDATE_NAME $(BASE_UPDATE_NAME)" >> $@
|
||||
@echo "#define BASE_UPDATE_LEVEL $(BASE_UPDATE_LEVEL)" >> $@
|
||||
@echo "#define BASE_VERSION_STRING \"EPICS Version $(BASE_VERSION_STRING)\" " >> $@
|
||||
@echo "#define epicsReleaseVersion \"@(#)Version R$(BASE_VERSION_STRING) $(CVS_DATE)\" " >> $@
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
* EPICS Version information
|
||||
*/
|
||||
#define EPICS_VERSION 3
|
||||
#define EPICS_REVISION 13
|
||||
#define EPICS_MODIFICATION 0
|
||||
#define EPICS_UPDATE_LEVEL 4
|
||||
|
||||
#define epicsReleaseVersion "@(#)Version R3.13.0.beta4 $Date$"
|
||||
|
||||
#define EPICS_VERSION_STRING "EPICS Version 3.13.0.beta4"
|
||||
@@ -6,6 +6,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#pragma warning (disable:4237)
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <winsock.h>
|
||||
|
||||
void ipAddrToA (const struct sockaddr_in *pInetAddr,
|
||||
|
||||
51
src/include/os/alpha/osiSock.h
Normal file
51
src/include/os/alpha/osiSock.h
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
/*
|
||||
* Solaris specifif socket include
|
||||
*/
|
||||
|
||||
#ifndef osiSockH
|
||||
#define osiSockH
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h> /* for MAXHOSTNAMELEN */
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
/* #include <sys/filio.h> */
|
||||
/* #include <sys/sockio.h> */
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h> /* close() and others */
|
||||
|
||||
void ipAddrToA(const struct sockaddr_in *pInetAddr,
|
||||
char *pBuf, const unsigned bufSize);
|
||||
|
||||
/*
|
||||
* as far as I can tell there is no header file for these
|
||||
*/
|
||||
int gethostname(char *name, int namelen);
|
||||
int sethostname(char *name, int namelen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET (-1)
|
||||
#define SOCKERRNO errno
|
||||
#define socket_close(S) close(S)
|
||||
#define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
|
||||
#define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
|
||||
|
||||
#endif /*osiSockH*/
|
||||
|
||||
82
src/include/os/cygwin32/osiSock.h
Normal file
82
src/include/os/cygwin32/osiSock.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* cygwin32 specific include
|
||||
*/
|
||||
|
||||
|
||||
#ifndef osiSockH
|
||||
#define osiSockH
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h> /* for MAXHOSTNAMELEN */
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h> /* close() and others */
|
||||
|
||||
void ipAddrToA(const struct sockaddr_in *pInetAddr,
|
||||
char *pBuf, const unsigned bufSize);
|
||||
|
||||
/*
|
||||
* as far as I can tell there is no header file for these
|
||||
*/
|
||||
int gethostname(char *name, int namelen);
|
||||
int sethostname(char *name, int namelen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET (-1)
|
||||
#define SOCKERRNO errno
|
||||
#define socket_close(S) close(S)
|
||||
#define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
|
||||
#define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
|
||||
|
||||
/*
|
||||
* Windows Sockets errors redefined as regular Berkeley error constants
|
||||
*/
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
|
||||
/*
|
||||
* All Windows Sockets error constants are biased by WSABASEERR from
|
||||
* the "normal"
|
||||
*/
|
||||
#define WSABASEERR 10000
|
||||
#define WSAETIMEDOUT (WSABASEERR+60)
|
||||
|
||||
|
||||
#define IOCPARM_MASK 0xff /* parameters must be < 256 bytes */
|
||||
#define IOC_OUT 0x40000000 /* copy out parameters */
|
||||
#define IOC_IN 0x80000000 /* copy in parameters */
|
||||
#define IOC_INOUT (IOC_IN|IOC_OUT)
|
||||
|
||||
#define _IOWR(x, y, t) \
|
||||
(IOC_INOUT|((((int)sizeof (t))&IOCPARM_MASK)<<16)|(x<<8)|y)
|
||||
|
||||
/* Used by ca/if_depends.c */
|
||||
#define SIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
|
||||
#define SIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
|
||||
|
||||
/* Used by ca/if_depends.c db/drvTS.c dbtools/BSlib.c */
|
||||
#define SIOCGIFBRDADDR _IOWR('i', 23, struct ifreq) /* get broadcast addr */
|
||||
|
||||
|
||||
/* Used by ca/if_depends.c ca/ucx.h */
|
||||
#define IFF_POINTOPOINT 0x10
|
||||
|
||||
|
||||
|
||||
#endif /*osiSockH*/
|
||||
|
||||
51
src/include/os/sgi/osiSock.h
Normal file
51
src/include/os/sgi/osiSock.h
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
/*
|
||||
* Solaris specifif socket include
|
||||
*/
|
||||
|
||||
#ifndef osiSockH
|
||||
#define osiSockH
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h> /* for MAXHOSTNAMELEN */
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
/* #include <sys/filio.h> */
|
||||
/* #include <sys/sockio.h> */
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h> /* close() and others */
|
||||
|
||||
void ipAddrToA(const struct sockaddr_in *pInetAddr,
|
||||
char *pBuf, const unsigned bufSize);
|
||||
|
||||
/*
|
||||
* as far as I can tell there is no header file for these
|
||||
*/
|
||||
/* int gethostname(char *name, int namelen); */
|
||||
/* int sethostname(char *name, int namelen); */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET (-1)
|
||||
#define SOCKERRNO errno
|
||||
#define socket_close(S) close(S)
|
||||
#define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
|
||||
#define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
|
||||
|
||||
#endif /*osiSockH*/
|
||||
|
||||
@@ -22,6 +22,7 @@ extern "C" {
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h> /* close() and others */
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ extern "C" {
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <net/if.h>
|
||||
|
||||
int ioctl (int fd, int req, ...);
|
||||
int close (int fd);
|
||||
|
||||
@@ -10,20 +10,27 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#if !defined(UCX)
|
||||
#if defined(UCX) /* GeG 09-DEC-1992 */
|
||||
# include <sys/ucx$inetdef.h>
|
||||
# include <ucx.h>
|
||||
# include <errno.h>
|
||||
#else
|
||||
# include <tcp/errno.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/ioctl.h>
|
||||
#else
|
||||
# include <errno.h>
|
||||
# include <net/if.h>
|
||||
# include <vms/inetiodef.h>
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#if 0
|
||||
int ioctl (int fd, int req, ...);
|
||||
int close (int fd);
|
||||
#endif
|
||||
int gettimeofday (struct timeval *tp, struct timezone *tzp);
|
||||
int gethostname (char *name, int namelen);
|
||||
|
||||
@@ -51,11 +58,12 @@ int getsockopt (int socket, int level, int optname,
|
||||
int socket (int domain, int type, int protocol);
|
||||
int recvfrom (int socket, char *buf, int len,
|
||||
int flags, struct sockaddr *from, int *fromlen);
|
||||
int getsockname (int socket, struct sockaddr *name, int *namelen);
|
||||
int getsockname (int socket, struct sockaddr *name, int *namelen);
|
||||
|
||||
unsigned long inet_addr (char *);
|
||||
char * inet_ntoa (struct in_addr in);
|
||||
|
||||
#if 0
|
||||
struct hostent {
|
||||
char *h_name; /* official name of host */
|
||||
char **h_aliases; /* alias list */
|
||||
@@ -64,6 +72,7 @@ struct hostent {
|
||||
char **h_addr_list; /* list of addresses from name server */
|
||||
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
|
||||
};
|
||||
#endif
|
||||
struct hostent *gethostbyaddr(char *addr, int len, int type);
|
||||
|
||||
void ipAddrToA (const struct sockaddr_in *pInetAddr,
|
||||
@@ -75,10 +84,20 @@ void ipAddrToA (const struct sockaddr_in *pInetAddr,
|
||||
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET (-1)
|
||||
#define socket_close(S) close(S)
|
||||
#define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
/*
|
||||
* (the VAXC runtime lib has its own close
|
||||
*/
|
||||
#if defined(WINTCP) /* Wallangong */
|
||||
# define socket_close(S) netclose(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
#endif
|
||||
#if defined(UCX) /* GeG 09-DEC-1992 */
|
||||
# define socket_close(S) close(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
#endif
|
||||
|
||||
#ifdef WINTCP
|
||||
|
||||
#ifdef WINTCP /* Wallangong */
|
||||
extern int uerrno;
|
||||
# define SOCKERRNO uerrno
|
||||
#else
|
||||
@@ -89,23 +108,6 @@ typedef int SOCKET;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#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)
|
||||
#endif
|
||||
#if defined(UCX) /* GeG 09-DEC-1992 */
|
||||
# define socket_close(S) close(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
#endif
|
||||
# define POST_IO_EV
|
||||
# define LOCK
|
||||
# define UNLOCK
|
||||
# define LOCKEVENTS
|
||||
# define UNLOCKEVENTS
|
||||
# define EVENTLOCKTEST (post_msg_active)
|
||||
#endif
|
||||
|
||||
#define MAXHOSTNAMELEN 75
|
||||
|
||||
#define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
|
||||
|
||||
101
src/include/os/vms/ucx.h
Normal file
101
src/include/os/vms/ucx.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
*
|
||||
* U C X . H
|
||||
* UNIX ioctl structures and defines used for VAX/UCX
|
||||
* Author: Gerhard Grygiel (GeG)
|
||||
*
|
||||
* GeG 09-DEC-1992 initial edit
|
||||
* CJM 13-Jul-1994 add fd_set etc for R3.12
|
||||
* CJM 09-Dec-1994 define fd_set etc. so it will compile for
|
||||
* both DEC C and Vax C
|
||||
* CJM 19-Nov-1995 use memset instead of bzero following advice
|
||||
* from Jeff Hill and add a definition of struct
|
||||
* timezone to support gettimeofday
|
||||
*
|
||||
*/
|
||||
#ifndef _UCX_H_
|
||||
#define _UCX_H_
|
||||
#ifdef UCX
|
||||
|
||||
#define IFF_UP 0x1 /* interface is up */
|
||||
#define IFF_BROADCAST 0x2 /* broadcast address valid */
|
||||
#define IFF_LOOPBACK 0x8 /* is a loopback net */
|
||||
#define IFF_POINTOPOINT 0x10 /* interface is point to point */
|
||||
/*
|
||||
* Interface request structure used for socket
|
||||
* ioctl's. All interface ioctl's must have parameter
|
||||
* definitions which begin with ifr_name. The
|
||||
* remainder may be interface specific.
|
||||
*/
|
||||
struct ifreq {
|
||||
#define IFNAMSIZ 16
|
||||
char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
|
||||
union {
|
||||
struct sockaddr ifru_addr;
|
||||
struct sockaddr ifru_dstaddr;
|
||||
struct sockaddr ifru_broadaddr;
|
||||
short ifru_flags;
|
||||
int ifru_metric;
|
||||
caddr_t ifru_data;
|
||||
} ifr_ifru;
|
||||
#define ifr_addr ifr_ifru.ifru_addr /* address */
|
||||
#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
|
||||
#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
|
||||
#define ifr_flags ifr_ifru.ifru_flags /* flags */
|
||||
#define ifr_metric ifr_ifru.ifru_metric /* metric */
|
||||
#define ifr_data ifr_ifru.ifru_data /* for use by interface */
|
||||
};
|
||||
|
||||
/* Structure used in SIOCGIFCONF request.
|
||||
* Used to retrieve interface configuration
|
||||
* for machine (useful for programs which
|
||||
* must know all networks accessible).
|
||||
*/
|
||||
struct ifconf {
|
||||
int ifc_len; /* size of associated buffer */
|
||||
union {
|
||||
caddr_t ifcu_buf;
|
||||
struct ifreq *ifcu_req;
|
||||
} ifc_ifcu;
|
||||
#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
|
||||
#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
|
||||
};
|
||||
|
||||
#ifndef NBBY
|
||||
#define NBBY 8
|
||||
#endif
|
||||
|
||||
#ifndef FD_SETSIZE
|
||||
#define FD_SETSIZE 256
|
||||
#endif
|
||||
|
||||
typedef long fd_mask ;
|
||||
#define NFDBITS (sizeof (fd_mask) * NBBY ) /* bits per mask */
|
||||
#ifndef howmany
|
||||
#define howmany(x, y) (((x)+((y)-1))/(y))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Both DEC C and VAX C only allow 32 fd's at once
|
||||
*/
|
||||
typedef int fd_set ;
|
||||
|
||||
#define FD_SET(n, p) (*(p) |= (1 << ((n) % NFDBITS)))
|
||||
#define FD_CLR(n, p) (*(p) &= ~(1 << ((n) % NFDBITS)))
|
||||
#define FD_ISSET(n, p) (*(p) & (1 << ((n) % NFDBITS)))
|
||||
#define FD_ZERO(p) memset((char *)(p), 0, sizeof (*(p)))
|
||||
|
||||
#include <iodef.h>
|
||||
#define IO$_RECEIVE (IO$_WRITEVBLK)
|
||||
|
||||
struct timezone {
|
||||
int tz_minuteswest ; /* minutes west of Greenwich */
|
||||
int tz_dsttime ; /* type of dst correction */
|
||||
};
|
||||
|
||||
#define TWOPOWER32 4294967296.0
|
||||
#define TWOPOWER31 2147483648.0
|
||||
#define UNIX_EPOCH_AS_MJD 40587.0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
|
||||
void ipAddrToA (const struct sockaddr_in *pInetAddr,
|
||||
char *pBuf, const unsigned bufSize);
|
||||
|
||||
@@ -24,7 +24,5 @@ include $(TOP)/config/RULES.Vx
|
||||
|
||||
iocCore: $(IOC_CORE_OBJS)
|
||||
$(LINK.c) $@ $(IOC_CORE_OBJS)
|
||||
ifneq ($(HOST_ARCH),WIN32)
|
||||
@what $@
|
||||
endif
|
||||
@$(WHAT) $@
|
||||
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
CMPLR = STRICT
|
||||
|
||||
USR_CFLAGS = -D_NO_PROTO
|
||||
USR_INCLUDES = -I$(TOP)/src/include/os/$(T_A)
|
||||
USR_LDLIBS += -lCom
|
||||
USR_LDFLAGS += -L.
|
||||
#USR_CFLAGS = -v -g
|
||||
#CC = $(PURIFYHOME)/purify $(C_$(CMPLR))
|
||||
|
||||
VPATH = ../os/generic
|
||||
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS += $(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
INC += cvtFast.h
|
||||
INC += ellLib.h
|
||||
INC += envDefs.h
|
||||
INC += epicsAssert.h
|
||||
INC += epicsPrint.h
|
||||
INC += errMdef.h
|
||||
INC += error.h
|
||||
INC += fdmgr.h
|
||||
INC += freeList.h
|
||||
INC += gpHash.h
|
||||
INC += memDebugLib.h
|
||||
INC += tsDefs.h
|
||||
INC += bucketLib.h
|
||||
INC += pal.h
|
||||
INC += fdManager.h
|
||||
INC += osiTime.h
|
||||
INC += osiTimer.h
|
||||
INC += macLib.h
|
||||
INC += impLib.h
|
||||
|
||||
SRCS.c += ../bucketLib.c
|
||||
SRCS.c += ../calcPerform.c
|
||||
SRCS.c += ../cvtFast.c
|
||||
SRCS.c += ../ellLib.c
|
||||
SRCS.c += ../envSubr.c
|
||||
SRCS.c += envData.c
|
||||
SRCS.c += ../errMtst.c
|
||||
SRCS.c += ../errPrintfUNIX.c
|
||||
SRCS.c += ../errSymLib.c
|
||||
SRCS.c += errSymTbl.c
|
||||
SRCS.c += ../fdmgr.c
|
||||
SRCS.c += ../freeListLib.c
|
||||
SRCS.c += ../gpHashLib.c
|
||||
SRCS.c += ../memDebugLib.c
|
||||
SRCS.c += ../nextFieldSubr.c
|
||||
SRCS.c += ../postfix.c
|
||||
SRCS.c += ../realpath.c
|
||||
SRCS.c += ../tsSubr.c
|
||||
SRCS.c += ../assertUNIX.c
|
||||
#SRCS.c += ../fdManager.cc
|
||||
#SRCS.c += ../osiTimer.cc
|
||||
SRCS.c += ../macCore.c
|
||||
SRCS.c += ../macUtil.c
|
||||
SRCS.c += ../os/generic/ipAddrToA.c
|
||||
#SRCS.c += ../os/generic/osdTime.cc
|
||||
SRCS.c += ../impLib.c
|
||||
SRCS.c += ../impExpand.c
|
||||
|
||||
LIBOBJS += bucketLib.o
|
||||
LIBOBJS += calcPerform.o
|
||||
LIBOBJS += cvtFast.o
|
||||
LIBOBJS += ellLib.o
|
||||
LIBOBJS += envSubr.o
|
||||
LIBOBJS += envData.o
|
||||
LIBOBJS += errMtst.o
|
||||
LIBOBJS += errPrintfUNIX.o
|
||||
LIBOBJS += errSymLib.o
|
||||
LIBOBJS += errSymTbl.o
|
||||
LIBOBJS += fdmgr.o
|
||||
LIBOBJS += freeListLib.o
|
||||
LIBOBJS += gpHashLib.o
|
||||
LIBOBJS += memDebugLib.o
|
||||
LIBOBJS += nextFieldSubr.o
|
||||
LIBOBJS += postfix.o
|
||||
LIBOBJS += realpath.o
|
||||
LIBOBJS += tsSubr.o
|
||||
LIBOBJS += assertUNIX.o
|
||||
#LIBOBJS += fdManager.o
|
||||
#LIBOBJS += osiTimer.o
|
||||
LIBOBJS += macCore.o
|
||||
LIBOBJS += macUtil.o
|
||||
LIBOBJS += ipAddrToA.o
|
||||
#LIBOBJS += osdTime.o
|
||||
LIBOBJS += impLib.o
|
||||
#LIBOBJS += impExpand.o # this looks like an error, it's a product!!
|
||||
|
||||
LIBNAME = libCom.a
|
||||
|
||||
#TARGETS = tsTest
|
||||
PROD += impExpand
|
||||
|
||||
MAN3 = gpHash.3 freeList.3
|
||||
|
||||
SRC = $(TOP)/src
|
||||
|
||||
ERR_S_FILES += $(TOP)/src/as/asLib.h
|
||||
ERR_S_FILES += $(TOP)/src/db/dbAccess.h
|
||||
ERR_S_FILES += $(TOP)/src/db/devLib.h
|
||||
ERR_S_FILES += $(TOP)/src/db/devSup.h
|
||||
ERR_S_FILES += $(TOP)/src/db/drvSup.h
|
||||
ERR_S_FILES += $(TOP)/src/db/recSup.h
|
||||
ERR_S_FILES += $(TOP)/src/dbStatic/dbStaticLib.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/ansi/drvEpvxi.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/old/drvBitBusErr.h
|
||||
ERR_S_FILES += $(TOP)/src/drv/old/drvGpibErr.h
|
||||
ERR_S_FILES += ../tsDefs.h
|
||||
ERR_S_FILES += ../errMdef.h
|
||||
ERR_S_FILES += $(TOP)/src/cas/generic/casdef.h
|
||||
ERR_S_FILES += $(TOP)/src/gdd/gddAppFuncTable.h
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
errSymTbl.o: errSymTbl.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
envData.c: ../envDefs.h $(TOP)/config/CONFIG_ENV \
|
||||
$(TOP)/config/CONFIG_SITE_ENV
|
||||
../bldEnvData $(TOP)/config
|
||||
|
||||
tsTest: tsSubr.o
|
||||
$(LINK.c) -o $@ tsSubr.o -lCom -lDb -lCom -lm -s
|
||||
|
||||
clean::
|
||||
@$(RM) errSymTbl.c envData.c
|
||||
|
||||
errSymTbl.c: $(ERR_S_FILES)
|
||||
@/bin/rm -f errSymTbl.c ;\
|
||||
../makeStatTbl $(ERR_S_FILES) >errSymTbl.c
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
On WIN32, libCom is build as a DLL Com.dll.
|
||||
|
||||
Because the sources are not adjusted to export all
|
||||
functions 'automatically' with _declspec(dllexport),
|
||||
a def-file 'Com.def' is used to list all
|
||||
functions that should be included in the DLL.
|
||||
|
||||
It may well be that I missed to include some
|
||||
functions in Com.def,
|
||||
so if some function is missing in the DLL,
|
||||
add a line to Com.def!
|
||||
|
||||
To rebuild the dll:
|
||||
|
||||
rm O.WIN32/Com.*
|
||||
gnumake
|
||||
|
||||
-kuk-
|
||||
@@ -27,6 +27,9 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.6 1996/11/02 01:56:55 jhill
|
||||
* improved message
|
||||
*
|
||||
* Revision 1.5 1996/06/19 17:14:11 jhill
|
||||
* print out the EPICS release when there is an assert failure
|
||||
*
|
||||
@@ -72,8 +75,7 @@ void epicsAssert (const char *pFile, const unsigned line, const char *pMsg,
|
||||
"Please send the text of this message to \"%s\"\n", pAuthorName);
|
||||
|
||||
epicsPrintf (
|
||||
"(the author of this software) or to \"tech-talk@aps.anl.gov\"\n");
|
||||
|
||||
"(the author of this call to assert()) or to \"tech-talk@aps.anl.gov\"\n");
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.5 1996/06/19 17:14:12 jhill
|
||||
* print out the EPICS release when there is an assert failure
|
||||
*
|
||||
* Revision 1.4 1995/12/19 19:40:07 jhill
|
||||
* added author name
|
||||
*
|
||||
@@ -75,7 +78,8 @@ void epicsAssert (const char *pFile, const unsigned line, const char *pMsg,
|
||||
taskId);
|
||||
|
||||
epicsPrintf (
|
||||
"to \"%s\" (the author of this software) or \"tech-talk@aps.anl.gov\"\n", pAuthorName);
|
||||
"to \"%s\" (the author of this call to assert()) or \"tech-talk@aps.anl.gov\"\n",
|
||||
pAuthorName);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
# Experimental Physics and Industrial Control System (EPICS)
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.6 1996/11/02 01:57:45 jhill
|
||||
# use correct form of #include
|
||||
#
|
||||
# Revision 1.5 1996/09/16 18:41:13 jhill
|
||||
# include shareLib.h
|
||||
#
|
||||
@@ -37,9 +40,9 @@
|
||||
|
||||
# Usage bldEnvData
|
||||
|
||||
HERE=`/bin/pwd`
|
||||
HERE=`pwd`
|
||||
cd $1
|
||||
CONFIG_DIR=`/bin/pwd`
|
||||
CONFIG_DIR=`pwd`
|
||||
cd ${HERE}
|
||||
SRC=../envDefs.h
|
||||
ENV_DATA=${CONFIG_DIR}/CONFIG_ENV
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
|
||||
C++ templates
|
||||
C++ templates:
|
||||
tsSLList.h - type safe single linked list template
|
||||
tsDLList.h - type safe double linked list template
|
||||
resourceLib.h - hash table template
|
||||
|
||||
the test subdir contains examples
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <resourceLib.h>
|
||||
|
||||
#include "resourceLib.h"
|
||||
#include "resourceLib.cc"
|
||||
|
||||
#ifdef SUNOS4
|
||||
#ifndef CLOCKS_PER_SEC
|
||||
@@ -11,7 +13,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class fred : public uintId, tsSLNode<fred> {
|
||||
class fred : public uintId, public tsSLNode<fred> {
|
||||
public:
|
||||
fred (const char *pNameIn, unsigned idIn) :
|
||||
pName(pNameIn), uintId(idIn) {}
|
||||
@@ -23,11 +25,26 @@ private:
|
||||
const char * const pName;
|
||||
};
|
||||
|
||||
class jane : public stringId, tsSLNode<jane> {
|
||||
class jane : public stringId, public tsSLNode<jane> {
|
||||
public:
|
||||
jane (const char *pNameIn) : stringId(pNameIn) {}
|
||||
};
|
||||
|
||||
//
|
||||
// Sun C++ 4.1 still appears to be lacking support in this area
|
||||
//
|
||||
#if !defined(__SUNPRO_CC)
|
||||
//
|
||||
// From Stroustrups's "The C++ Programming Language"
|
||||
// Appendix A: r.14.9
|
||||
//
|
||||
// This explicitly instantiates the template class's member
|
||||
// functions into "templInst.o"
|
||||
//
|
||||
template class resTable<fred,uintId>;
|
||||
template class resTable<jane,stringId>;
|
||||
#endif
|
||||
|
||||
main()
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
@@ -41,14 +41,14 @@ main ()
|
||||
|
||||
clk = clock();
|
||||
iter = list;
|
||||
while (pFred = iter()) {
|
||||
while ( (pFred = iter()) ) {
|
||||
pFred->inc();
|
||||
}
|
||||
diff = clock() - clk;
|
||||
delay = diff;
|
||||
delay = delay/CLOCKS_PER_SEC;
|
||||
delay = delay/LOOPCOUNT;
|
||||
printf("delay = %15.10lf\n", delay);
|
||||
printf("delay = %15.10f\n", delay);
|
||||
|
||||
pFred = new fred();
|
||||
clk = clock();
|
||||
@@ -60,6 +60,6 @@ main ()
|
||||
delay = diff;
|
||||
delay = delay/CLOCKS_PER_SEC;
|
||||
delay = delay/LOOPCOUNT;
|
||||
printf("delay = %15.10lf\n", delay);
|
||||
printf("delay = %15.10f\n", delay);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ main ()
|
||||
list.add(* new fred("D"));
|
||||
|
||||
iter.reset();
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
@@ -62,27 +62,27 @@ main ()
|
||||
pJane = new jane("JB");
|
||||
janeList.add(*pJane);
|
||||
|
||||
while (pJane = janeFwdIter()) {
|
||||
while ( (pJane = janeFwdIter()) ) {
|
||||
pJane->show();
|
||||
}
|
||||
|
||||
while (pJane = janeBwdIter()) {
|
||||
while ( (pJane = janeBwdIter()) ) {
|
||||
pJane->show();
|
||||
}
|
||||
|
||||
iter = list;
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
iter = list;
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
iter.remove();
|
||||
}
|
||||
assert(list.count()==0);
|
||||
|
||||
janeFwdIter = janeList;
|
||||
while (pFredBack = janeFwdIter()) {
|
||||
while ( (pFredBack = janeFwdIter()) ) {
|
||||
janeFwdIter.remove();
|
||||
}
|
||||
assert(janeList.count()==0);
|
||||
@@ -92,7 +92,7 @@ main ()
|
||||
pJane = new jane("JB");
|
||||
janeList.add(*pJane);
|
||||
janeBwdIter = janeList;
|
||||
while (pFredBack = janeBwdIter()) {
|
||||
while ( (pFredBack = janeBwdIter()) ) {
|
||||
janeBwdIter.remove();
|
||||
}
|
||||
assert(janeList.count()==0);
|
||||
|
||||
@@ -6,6 +6,13 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
/*
|
||||
* gnuc does not provide this under sunos4
|
||||
*/
|
||||
#if !defined(CLOCKS_PER_SEC) && defined(SUNOS4)
|
||||
# define CLOCKS_PER_SEC 1000000
|
||||
#endif
|
||||
|
||||
class fred : public tsSLNode<fred> {
|
||||
public:
|
||||
fred() : count(0) {}
|
||||
@@ -39,14 +46,14 @@ main ()
|
||||
|
||||
clk = clock();
|
||||
iter = list;
|
||||
while (pFred = iter()) {
|
||||
while ( (pFred = iter()) ) {
|
||||
pFred->inc();
|
||||
}
|
||||
diff = clock() - clk;
|
||||
delay = diff;
|
||||
delay = delay/CLOCKS_PER_SEC;
|
||||
delay = delay/LOOPCOUNT;
|
||||
printf("delay = %15.10lf\n", delay);
|
||||
printf("delay = %15.10f\n", delay);
|
||||
|
||||
pFred = new fred();
|
||||
clk = clock();
|
||||
@@ -58,6 +65,6 @@ main ()
|
||||
delay = diff;
|
||||
delay = delay/CLOCKS_PER_SEC;
|
||||
delay = delay/LOOPCOUNT;
|
||||
printf("delay = %15.10lf\n", delay);
|
||||
printf("delay = %15.10f\n", delay);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ main ()
|
||||
list.add(* new fred("C"));
|
||||
list.add(* new fred("D"));
|
||||
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
@@ -65,15 +65,15 @@ main ()
|
||||
pJane = new jane("JB");
|
||||
janeList.add(*pJane);
|
||||
|
||||
while (pJane = janeIter()) {
|
||||
while ( (pJane = janeIter()) ) {
|
||||
pJane->show();
|
||||
}
|
||||
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
while (pFredBack = iter()) {
|
||||
while ( (pFredBack = iter()) ) {
|
||||
iter.remove();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.5 1996/11/02 01:07:19 jhill
|
||||
* many improvements
|
||||
*
|
||||
* Revision 1.4 1996/08/14 12:32:09 jbk
|
||||
* added first() to list class, added first()/last() to iterator.
|
||||
*
|
||||
@@ -49,6 +52,31 @@
|
||||
#ifndef tsDLListH_include
|
||||
#define tsDLListH_include
|
||||
|
||||
//
|
||||
// tsDLNode<T>
|
||||
//
|
||||
template <class T>
|
||||
class tsDLNode {
|
||||
friend class tsDLList<T>;
|
||||
friend class tsDLIter<T>;
|
||||
friend class tsDLFwdIter<T>;
|
||||
friend class tsDLBwdIter<T>;
|
||||
public:
|
||||
tsDLNode() : pNext(0), pPrev(0) {}
|
||||
//
|
||||
// when someone copies in a class deriving from this
|
||||
// do _not_ change the node pointers
|
||||
//
|
||||
void operator = (tsDLNode<T> &) {}
|
||||
|
||||
protected:
|
||||
T *getNext(void) { return pNext; }
|
||||
T *getPrev(void) { return pPrev; }
|
||||
private:
|
||||
T *pNext;
|
||||
T *pPrev;
|
||||
};
|
||||
|
||||
//
|
||||
// tsDLList<T>
|
||||
//
|
||||
@@ -278,31 +306,6 @@ private:
|
||||
unsigned itemCount;
|
||||
};
|
||||
|
||||
//
|
||||
// tsDLNode<T>
|
||||
//
|
||||
template <class T>
|
||||
class tsDLNode {
|
||||
friend class tsDLList<T>;
|
||||
friend class tsDLIter<T>;
|
||||
friend class tsDLFwdIter<T>;
|
||||
friend class tsDLBwdIter<T>;
|
||||
public:
|
||||
tsDLNode() : pNext(0), pPrev(0) {}
|
||||
//
|
||||
// when someone copies in a class deriving from this
|
||||
// do _not_ change the node pointers
|
||||
//
|
||||
void operator = (tsDLNode<T> &) {}
|
||||
|
||||
protected:
|
||||
T *getNext(void) { return pNext; }
|
||||
T *getPrev(void) { return pPrev; }
|
||||
private:
|
||||
T *pNext;
|
||||
T *pPrev;
|
||||
};
|
||||
|
||||
//
|
||||
// tsDLIter<T>
|
||||
//
|
||||
@@ -482,7 +485,7 @@ template <class T>
|
||||
class tsDLBwdIter : private tsDLIter<T> {
|
||||
public:
|
||||
tsDLBwdIter(tsDLList<T> &listIn) :
|
||||
tsDLIter<T>(&listIn) {}
|
||||
tsDLIter<T>(listIn) {}
|
||||
|
||||
void reset ()
|
||||
{
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.5 1996/11/02 01:07:20 jhill
|
||||
* many improvements
|
||||
*
|
||||
* Revision 1.4 1996/09/04 19:57:07 jhill
|
||||
* string id resource now copies id
|
||||
*
|
||||
@@ -50,6 +53,27 @@
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
//
|
||||
// tsSLNode<>
|
||||
//
|
||||
template <class T>
|
||||
class tsSLNode {
|
||||
friend class tsSLList<T>;
|
||||
friend class tsSLIter<T>;
|
||||
public:
|
||||
tsSLNode() : pNext(0) {}
|
||||
|
||||
//
|
||||
// when someone copies into a class deriving from this
|
||||
// do _not_ change the node pointers
|
||||
//
|
||||
void operator = (tsSLNode<T> &) {}
|
||||
|
||||
private:
|
||||
T *pNext;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// tsSLList<>
|
||||
//
|
||||
@@ -112,27 +136,7 @@ public:
|
||||
};
|
||||
|
||||
//
|
||||
// tsSLNode<>
|
||||
//
|
||||
template <class T>
|
||||
class tsSLNode {
|
||||
friend class tsSLList<T>;
|
||||
friend class tsSLIter<T>;
|
||||
public:
|
||||
tsSLNode() : pNext(0) {}
|
||||
|
||||
//
|
||||
// when someone copies into a class deriving from this
|
||||
// do _not_ change the node pointers
|
||||
//
|
||||
void operator = (tsSLNode<T> &) {}
|
||||
|
||||
private:
|
||||
T *pNext;
|
||||
};
|
||||
|
||||
//
|
||||
// tsDLFwdIter<T>
|
||||
// tsSLIter<T>
|
||||
//
|
||||
// Notes:
|
||||
// 1) No direct access to pCurrent is provided since
|
||||
|
||||
@@ -10,20 +10,27 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#if !defined(UCX)
|
||||
#if defined(UCX) /* GeG 09-DEC-1992 */
|
||||
# include <sys/ucx$inetdef.h>
|
||||
# include <ucx.h>
|
||||
# include <errno.h>
|
||||
#else
|
||||
# include <tcp/errno.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/ioctl.h>
|
||||
#else
|
||||
# include <errno.h>
|
||||
# include <net/if.h>
|
||||
# include <vms/inetiodef.h>
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#if 0
|
||||
int ioctl (int fd, int req, ...);
|
||||
int close (int fd);
|
||||
#endif
|
||||
int gettimeofday (struct timeval *tp, struct timezone *tzp);
|
||||
int gethostname (char *name, int namelen);
|
||||
|
||||
@@ -51,11 +58,12 @@ int getsockopt (int socket, int level, int optname,
|
||||
int socket (int domain, int type, int protocol);
|
||||
int recvfrom (int socket, char *buf, int len,
|
||||
int flags, struct sockaddr *from, int *fromlen);
|
||||
int getsockname (int socket, struct sockaddr *name, int *namelen);
|
||||
int getsockname (int socket, struct sockaddr *name, int *namelen);
|
||||
|
||||
unsigned long inet_addr (char *);
|
||||
char * inet_ntoa (struct in_addr in);
|
||||
|
||||
#if 0
|
||||
struct hostent {
|
||||
char *h_name; /* official name of host */
|
||||
char **h_aliases; /* alias list */
|
||||
@@ -64,6 +72,7 @@ struct hostent {
|
||||
char **h_addr_list; /* list of addresses from name server */
|
||||
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
|
||||
};
|
||||
#endif
|
||||
struct hostent *gethostbyaddr(char *addr, int len, int type);
|
||||
|
||||
void ipAddrToA (const struct sockaddr_in *pInetAddr,
|
||||
@@ -75,10 +84,20 @@ void ipAddrToA (const struct sockaddr_in *pInetAddr,
|
||||
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET (-1)
|
||||
#define socket_close(S) close(S)
|
||||
#define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
/*
|
||||
* (the VAXC runtime lib has its own close
|
||||
*/
|
||||
#if defined(WINTCP) /* Wallangong */
|
||||
# define socket_close(S) netclose(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
#endif
|
||||
#if defined(UCX) /* GeG 09-DEC-1992 */
|
||||
# define socket_close(S) close(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
#endif
|
||||
|
||||
#ifdef WINTCP
|
||||
|
||||
#ifdef WINTCP /* Wallangong */
|
||||
extern int uerrno;
|
||||
# define SOCKERRNO uerrno
|
||||
#else
|
||||
@@ -89,23 +108,6 @@ typedef int SOCKET;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#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)
|
||||
#endif
|
||||
#if defined(UCX) /* GeG 09-DEC-1992 */
|
||||
# define socket_close(S) close(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
#endif
|
||||
# define POST_IO_EV
|
||||
# define LOCK
|
||||
# define UNLOCK
|
||||
# define LOCKEVENTS
|
||||
# define UNLOCKEVENTS
|
||||
# define EVENTLOCKTEST (post_msg_active)
|
||||
#endif
|
||||
|
||||
#define MAXHOSTNAMELEN 75
|
||||
|
||||
#define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
|
||||
|
||||
101
src/libCom/osi/os/VMS/ucx.h
Normal file
101
src/libCom/osi/os/VMS/ucx.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
*
|
||||
* U C X . H
|
||||
* UNIX ioctl structures and defines used for VAX/UCX
|
||||
* Author: Gerhard Grygiel (GeG)
|
||||
*
|
||||
* GeG 09-DEC-1992 initial edit
|
||||
* CJM 13-Jul-1994 add fd_set etc for R3.12
|
||||
* CJM 09-Dec-1994 define fd_set etc. so it will compile for
|
||||
* both DEC C and Vax C
|
||||
* CJM 19-Nov-1995 use memset instead of bzero following advice
|
||||
* from Jeff Hill and add a definition of struct
|
||||
* timezone to support gettimeofday
|
||||
*
|
||||
*/
|
||||
#ifndef _UCX_H_
|
||||
#define _UCX_H_
|
||||
#ifdef UCX
|
||||
|
||||
#define IFF_UP 0x1 /* interface is up */
|
||||
#define IFF_BROADCAST 0x2 /* broadcast address valid */
|
||||
#define IFF_LOOPBACK 0x8 /* is a loopback net */
|
||||
#define IFF_POINTOPOINT 0x10 /* interface is point to point */
|
||||
/*
|
||||
* Interface request structure used for socket
|
||||
* ioctl's. All interface ioctl's must have parameter
|
||||
* definitions which begin with ifr_name. The
|
||||
* remainder may be interface specific.
|
||||
*/
|
||||
struct ifreq {
|
||||
#define IFNAMSIZ 16
|
||||
char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
|
||||
union {
|
||||
struct sockaddr ifru_addr;
|
||||
struct sockaddr ifru_dstaddr;
|
||||
struct sockaddr ifru_broadaddr;
|
||||
short ifru_flags;
|
||||
int ifru_metric;
|
||||
caddr_t ifru_data;
|
||||
} ifr_ifru;
|
||||
#define ifr_addr ifr_ifru.ifru_addr /* address */
|
||||
#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
|
||||
#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
|
||||
#define ifr_flags ifr_ifru.ifru_flags /* flags */
|
||||
#define ifr_metric ifr_ifru.ifru_metric /* metric */
|
||||
#define ifr_data ifr_ifru.ifru_data /* for use by interface */
|
||||
};
|
||||
|
||||
/* Structure used in SIOCGIFCONF request.
|
||||
* Used to retrieve interface configuration
|
||||
* for machine (useful for programs which
|
||||
* must know all networks accessible).
|
||||
*/
|
||||
struct ifconf {
|
||||
int ifc_len; /* size of associated buffer */
|
||||
union {
|
||||
caddr_t ifcu_buf;
|
||||
struct ifreq *ifcu_req;
|
||||
} ifc_ifcu;
|
||||
#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
|
||||
#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
|
||||
};
|
||||
|
||||
#ifndef NBBY
|
||||
#define NBBY 8
|
||||
#endif
|
||||
|
||||
#ifndef FD_SETSIZE
|
||||
#define FD_SETSIZE 256
|
||||
#endif
|
||||
|
||||
typedef long fd_mask ;
|
||||
#define NFDBITS (sizeof (fd_mask) * NBBY ) /* bits per mask */
|
||||
#ifndef howmany
|
||||
#define howmany(x, y) (((x)+((y)-1))/(y))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Both DEC C and VAX C only allow 32 fd's at once
|
||||
*/
|
||||
typedef int fd_set ;
|
||||
|
||||
#define FD_SET(n, p) (*(p) |= (1 << ((n) % NFDBITS)))
|
||||
#define FD_CLR(n, p) (*(p) &= ~(1 << ((n) % NFDBITS)))
|
||||
#define FD_ISSET(n, p) (*(p) & (1 << ((n) % NFDBITS)))
|
||||
#define FD_ZERO(p) memset((char *)(p), 0, sizeof (*(p)))
|
||||
|
||||
#include <iodef.h>
|
||||
#define IO$_RECEIVE (IO$_WRITEVBLK)
|
||||
|
||||
struct timezone {
|
||||
int tz_minuteswest ; /* minutes west of Greenwich */
|
||||
int tz_dsttime ; /* type of dst correction */
|
||||
};
|
||||
|
||||
#define TWOPOWER32 4294967296.0
|
||||
#define TWOPOWER31 2147483648.0
|
||||
#define UNIX_EPOCH_AS_MJD 40587.0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user