Many tweaks to build on Windows.
There might be some more to come since I'm not committing this from my Win32 system.
This commit is contained in:
@@ -311,8 +311,8 @@ LEXOPT += -I
|
||||
# Build compile line here
|
||||
|
||||
PATH_FILTER = $(1)
|
||||
COMPILE.c = $(CC) -c $(CPPFLAGS) $(CFLAGS) $(call PATH_FILTER,$(INCLUDES))
|
||||
COMPILE.cpp = $(CCC) -c $(CPPFLAGS) $(CXXFLAGS) $(call PATH_FILTER,$(INCLUDES))
|
||||
COMPILE.c = $(CC) -c $(CPPFLAGS) $(CFLAGS) $(INCLUDES)
|
||||
COMPILE.cpp = $(CCC) -c $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES)
|
||||
|
||||
#--------------------------------------------------
|
||||
# C preprocessor command
|
||||
|
||||
@@ -216,15 +216,15 @@ $(OBJLIBNAME):%$(OBJ):
|
||||
|
||||
%$(OBJ): %.c
|
||||
@$(RM) $@
|
||||
$(COMPILE.c) $(call PATH_FILTER,$<) $(COMPILE_FILTER.c)
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%$(OBJ): %.cc
|
||||
@$(RM) $@
|
||||
$(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
|
||||
$(COMPILE.cpp) $<
|
||||
|
||||
%$(OBJ): %.cpp
|
||||
@$(RM) $@
|
||||
$(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
|
||||
$(COMPILE.cpp) $<
|
||||
|
||||
# WIN95/NT resource compiler
|
||||
%$(RES): %.rc
|
||||
|
||||
@@ -201,7 +201,7 @@ LINK.cpp += $(PROD_LDFLAGS) $(PROD_LD_OBJS) $(PROD_LD_RESS) $(PROD_LDLIBS)
|
||||
#--------------------------------------------------
|
||||
# Definitions for compile of *_ctdt.c file
|
||||
CFLAGS_ctdt = $(filter-out -pedantic,$(CFLAGS)) -fdollars-in-identifiers
|
||||
COMPILE.ctdt = $(CC) -c $(CPPFLAGS) $(CFLAGS_ctdt) $(call PATH_FILTER,$(INCLUDES)) $(SOURCE_FLAG)
|
||||
COMPILE.ctdt = $(CC) -c $(CPPFLAGS) $(CFLAGS_ctdt) $(INCLUDES) $(SOURCE_FLAG)
|
||||
|
||||
#--------------------------------------------------
|
||||
# C preprocessor command
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#Include definitions common to unix hosts
|
||||
include $(CONFIG)/os/CONFIG.UnixCommon.Common
|
||||
|
||||
# convert UNIX path to native path
|
||||
PATH_FILTER = $(subst /,\\,$(1))
|
||||
|
||||
CP = $(PERL) -MExtUtils::Command -e cp
|
||||
MV = $(PERL) -MExtUtils::Command -e mv
|
||||
RM = $(PERL) -MExtUtils::Command -e rm_f
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
# Sites may override these definitions in CONFIG_SITE.win32-x86.Common
|
||||
#-------------------------------------------------------
|
||||
|
||||
# convert UNIX path to native path
|
||||
PATH_FILTER = $(subst /,\\,$(1))
|
||||
|
||||
CP = $(PERL) -MExtUtils::Command -e cp
|
||||
MV = $(PERL) -MExtUtils::Command -e mv
|
||||
RM = $(PERL) -MExtUtils::Command -e rm_f
|
||||
|
||||
@@ -13,9 +13,6 @@ VALID_BUILDS = Host Ioc
|
||||
|
||||
CMPLR_CLASS = msvc
|
||||
|
||||
# convert UNIX path to native path
|
||||
PATH_FILTER = $(subst /,\\,$(1))
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
#
|
||||
@@ -25,9 +22,9 @@ WINLINK = link
|
||||
|
||||
RCCMD = rc -l 0x409 $(INCLUDES) -fo $@ $<
|
||||
|
||||
ARCMD = lib /nologo /verbose /out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
|
||||
ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
|
||||
|
||||
BAFCMD = bscmake /nologo /o $@
|
||||
BAFCMD = bscmake -nologo -o $@
|
||||
|
||||
#
|
||||
# Configure OS vendor C compiler
|
||||
@@ -38,52 +35,52 @@ GNU = NO
|
||||
HDEPENDS_METHOD = MKMF
|
||||
|
||||
#
|
||||
# /W<N> use warning level N
|
||||
# -W<N> use warning level N
|
||||
# (maximum (lint type) warnings at level 4)
|
||||
# /w44355 set "'this' used in the base initializer list" to be level 4
|
||||
WARN_CFLAGS_YES = /W3 /w44355
|
||||
WARN_CFLAGS_NO = /W1
|
||||
# -w44355 set "'this' used in the base initializer list" to be level 4
|
||||
WARN_CFLAGS_YES = -W3 -w44355
|
||||
WARN_CFLAGS_NO = -W1
|
||||
|
||||
#
|
||||
# /Ox maximum optimizations
|
||||
# /MD use MSVCRT (run-time as DLL, multi-thread support)
|
||||
# /GL whole program optimization
|
||||
# /Zi generate program database for debugging information
|
||||
OPT_CFLAGS_YES = /Ox /GL
|
||||
# -Ox maximum optimizations
|
||||
# -MD use MSVCRT (run-time as DLL, multi-thread support)
|
||||
# -GL whole program optimization
|
||||
# -Zi generate program database for debugging information
|
||||
OPT_CFLAGS_YES = -Ox -GL
|
||||
|
||||
#
|
||||
# /Zi generate program database for debugging information
|
||||
# /Z7 include debugging info in object files
|
||||
# /Fr create source browser file
|
||||
# /GZ catch bugs occurring only in optimized code
|
||||
# /D_CRTDBG_MAP_ALLOC
|
||||
# /RTCsu catch bugs occuring only inoptimized code
|
||||
# /DEPICS_FREELIST_DEBUG good for detecting mem mrg bugs
|
||||
OPT_CFLAGS_NO = /Zi /RTCsu
|
||||
# -Zi generate program database for debugging information
|
||||
# -Z7 include debugging info in object files
|
||||
# -Fr create source browser file
|
||||
# -GZ catch bugs occurring only in optimized code
|
||||
# -D_CRTDBG_MAP_ALLOC
|
||||
# -RTCsu catch bugs occuring only inoptimized code
|
||||
# -DEPICS_FREELIST_DEBUG good for detecting mem mrg bugs
|
||||
OPT_CFLAGS_NO = -Zi -RTCsu
|
||||
|
||||
# specify object file name and location
|
||||
OBJ_CFLAG = /Fo
|
||||
OBJ_CFLAG = -Fo
|
||||
|
||||
#
|
||||
# the following options are required when
|
||||
# vis c++ compiles the code (and includes
|
||||
# the header files)
|
||||
#
|
||||
# /MT static multithreaded C RTL
|
||||
# /MTd static multithreaded C RTL (debug version)
|
||||
# /MD multithreaded C RTL in DLL
|
||||
# /MDd multithreaded C RTL in DLL (debug version)
|
||||
# -MT static multithreaded C RTL
|
||||
# -MTd static multithreaded C RTL (debug version)
|
||||
# -MD multithreaded C RTL in DLL
|
||||
# -MDd multithreaded C RTL in DLL (debug version)
|
||||
VISC_DLL_NO = -DEPICS_DLL_NO
|
||||
VISC_DLL_YES =
|
||||
VISC_DLL = $(VISC_DLL_$(SHARED_LIBRARIES))
|
||||
VISC_STATIC_CFLAGS_DEBUG_NO = d
|
||||
VISC_STATIC_CFLAGS_DEBUG_YES =
|
||||
VISC_STATIC_CFLAGS_DEBUG = $(VISC_STATIC_CFLAGS_DEBUG_$(HOST_OPT))
|
||||
STATIC_CFLAGS_YES= /MT$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CFLAGS_NO= /MD$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CFLAGS_YES= -MT$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CFLAGS_NO= -MD$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
|
||||
# OS vendor c preprocessor
|
||||
CPP = cl /C /E
|
||||
CPP = cl -C -E
|
||||
#GNU c preprocessor
|
||||
#CPP = gcc -x c -E
|
||||
|
||||
@@ -94,66 +91,67 @@ CPP = cl /C /E
|
||||
# 2) set it to 0 to use MS C "extensions" (open for _open etc.)
|
||||
# because MS uses: if __STDC__ ... disable many nice things
|
||||
#
|
||||
# Use of /Za would dissable DLL import/export keywords which
|
||||
# Use of -Za would dissable DLL import/export keywords which
|
||||
# include/excludes using architecture neutral macros
|
||||
#
|
||||
# /EHsc - generate code for exceptions
|
||||
# /GR - generate code for run time type identification
|
||||
# -EHsc - generate code for exceptions
|
||||
# -GR - generate code for run time type identification
|
||||
#
|
||||
CCC = cl /nologo /EHsc /GR
|
||||
CODE_CPPFLAGS += /nologo /D__STDC__=0
|
||||
CODE_CPPFLAGS += /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
||||
CCC = cl -nologo -EHsc -GR
|
||||
CODE_CPPFLAGS += -nologo -D__STDC__=0
|
||||
CODE_CPPFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
|
||||
|
||||
#
|
||||
# /W<N> use warning level N
|
||||
# -W<N> use warning level N
|
||||
# (maximum lint level warnings at level 4)
|
||||
# /w44355 set "'this' used in the base initializer list" to be level 4
|
||||
WARN_CXXFLAGS_YES = /W3 /w44355
|
||||
WARN_CXXFLAGS_NO = /W1
|
||||
# -w44355 set "'this' used in the base initializer list" to be level 4
|
||||
WARN_CXXFLAGS_YES = -W3 -w44355
|
||||
WARN_CXXFLAGS_NO = -W1
|
||||
|
||||
#
|
||||
# /Ox maximum optimizations
|
||||
# /GL whole program optimization
|
||||
# /Zi generate program database for debugging information
|
||||
OPT_CXXFLAGS_YES = /Ox /GL
|
||||
# -Ox maximum optimizations
|
||||
# -GL whole program optimization
|
||||
# -Zi generate program database for debugging information
|
||||
OPT_CXXFLAGS_YES = -Ox -GL
|
||||
|
||||
#
|
||||
# /Zi generate program database for debugging information
|
||||
# /Z7 include debugging info in object files
|
||||
# /Fr create source browser file
|
||||
# /D_CRTDBG_MAP_ALLOC
|
||||
# /RTCsu catch bugs occurring only in optimized code
|
||||
# /DEPICS_FREELIST_DEBUG good for detecting mem mrg bugs
|
||||
OPT_CXXFLAGS_NO = /RTCsu /Zi
|
||||
# -Zi generate program database for debugging information
|
||||
# -Z7 include debugging info in object files
|
||||
# -Fr create source browser file
|
||||
# -D_CRTDBG_MAP_ALLOC
|
||||
# -RTCsu catch bugs occurring only in optimized code
|
||||
# -DEPICS_FREELIST_DEBUG good for detecting mem mrg bugs
|
||||
OPT_CXXFLAGS_NO = -RTCsu -Zi
|
||||
|
||||
# specify object file name and location
|
||||
OBJ_CXXFLAG = /Fo
|
||||
OBJ_CXXFLAG = -Fo
|
||||
|
||||
#
|
||||
# the following options are required when
|
||||
# vis c++ compiles the code (and includes
|
||||
# the header files)
|
||||
#
|
||||
# /MT static multithreaded C RTL
|
||||
# /MTd static multithreaded C RTL (debug version)
|
||||
# /MD multithreaded C RTL in DLL
|
||||
# /MDd multithreaded C RTL in DLL (debug version)
|
||||
STATIC_CXXFLAGS_YES= /MT$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CXXFLAGS_NO= /MD$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
# -MT static multithreaded C RTL
|
||||
# -MTd static multithreaded C RTL (debug version)
|
||||
# -MD multithreaded C RTL in DLL
|
||||
# -MDd multithreaded C RTL in DLL (debug version)
|
||||
STATIC_CXXFLAGS_YES= -MT$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
STATIC_CXXFLAGS_NO= -MD$(VISC_STATIC_CFLAGS_DEBUG) $(VISC_DLL)
|
||||
|
||||
STATIC_LDLIBS_YES=ws2_32.lib advapi32.lib user32.lib kernel32.lib winmm.lib
|
||||
STATIC_LDLIBS_NO=
|
||||
STATIC_LDFLAGS=
|
||||
RANLIB=
|
||||
|
||||
# add /profile here to run the ms profiler
|
||||
# /LTCG - whole program optimization
|
||||
# /fixed:no good for programs such as purify and quantify
|
||||
# /debug good for programs such as purify and quantify
|
||||
LINK_OPT_FLAGS_YES = /LTCG /incremental:no /opt:ref /release $(PROD_VERSION:%=/version:%)
|
||||
LINK_OPT_FLAGS_NO = /debug /incremental:no /fixed:no
|
||||
# add -profile here to run the ms profiler
|
||||
# -LTCG - whole program optimization
|
||||
# -fixed:no good for programs such as purify and quantify
|
||||
# -debug good for programs such as purify and quantify
|
||||
LINK_OPT_FLAGS_YES = -LTCG -incremental:no -opt:ref \
|
||||
-release $(PROD_VERSION:%=-version:%)
|
||||
LINK_OPT_FLAGS_NO = -debug -incremental:no -fixed:no
|
||||
OPT_LDFLAGS = $(LINK_OPT_FLAGS_$(HOST_OPT))
|
||||
LIB_OPT_FLAGS_YES = /LTCG
|
||||
LIB_OPT_FLAGS_YES = -LTCG
|
||||
LIB_OPT_LDFLAGS = $(LIB_OPT_FLAGS_$(HOST_OPT))
|
||||
|
||||
ARCH_DEP_CFLAGS=
|
||||
@@ -173,7 +171,7 @@ BOF=.sbr
|
||||
|
||||
# Problem: MS Visual C++ does not recognize *.cc as C++ source,
|
||||
# so we do C++ compiles using the global flag -TP
|
||||
COMPILER_CXXFLAGS = /TP
|
||||
COMPILER_CXXFLAGS = -TP
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_CFLAGS =
|
||||
@@ -191,12 +189,12 @@ OP_SYS_CXXFLAGS = $(COMPILER_CXXFLAGS)
|
||||
# '-entry:_DllMainCRTStartup$(DLLENTRY)'
|
||||
DLLENTRY = @12
|
||||
|
||||
WIN32_DLLFLAGS = /subsystem:windows /dll $(OPT_LDFLAGS) $(USR_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
|
||||
WIN32_DLLFLAGS = -subsystem:windows -dll $(OPT_LDFLAGS) $(USR_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
|
||||
|
||||
#
|
||||
# specify dll .def file only if it exists
|
||||
#
|
||||
DLL_DEF_FLAG = $(addprefix /def:,$(wildcard ../$(addsuffix .def,$*)))
|
||||
DLL_DEF_FLAG = $(addprefix -def:,$(wildcard ../$(addsuffix .def,$*)))
|
||||
|
||||
#
|
||||
# A WIN32 dll has three parts:
|
||||
@@ -204,9 +202,10 @@ DLL_DEF_FLAG = $(addprefix /def:,$(wildcard ../$(addsuffix .def,$*)))
|
||||
# x.lib: what you link to progs that use the dll (DLL_LINK_LIBNAME)
|
||||
# x.exp: what you need to build the dll (in no variable)
|
||||
#
|
||||
LINK.shrlib = $(WINLINK) /nologo $(WIN32_DLLFLAGS) /implib:$*.lib /out:$*.dll $(DLL_DEF_FLAG)
|
||||
LINK.shrlib += $(call PATH_FILTER, $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS))
|
||||
MUNCH_CMD = $(CCC) /Fo $@ $^
|
||||
LINK.shrlib = $(WINLINK) -nologo $(WIN32_DLLFLAGS) -implib:$*.lib -out:$*.dll \
|
||||
$(DLL_DEF_FLAG)
|
||||
LINK.shrlib += $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS)
|
||||
MUNCH_CMD = $(CCC) -Fo $@ $^
|
||||
|
||||
|
||||
# adjust names of libraries to build
|
||||
@@ -286,8 +285,8 @@ SHRLIB_LDLIBS += $(addsuffix .lib, \
|
||||
|
||||
#--------------------------------------------------
|
||||
# Linker definition
|
||||
LINK.cpp = $(WINLINK) -nologo $(STATIC_LDFLAGS) $(LDFLAGS) $(PROD_LDFLAGS) -out:$@ \
|
||||
$(call PATH_FILTER, $(PROD_LD_OBJS) $(PROD_LD_RESS) $(PROD_LDLIBS))
|
||||
LINK.cpp = $(WINLINK) -nologo $(STATIC_LDFLAGS) $(LDFLAGS) $(PROD_LDFLAGS) \
|
||||
-out:$@ $(PROD_LD_OBJS) $(PROD_LD_RESS) $(PROD_LDLIBS)
|
||||
|
||||
#--------------------------------------------------
|
||||
# UseManifestTool.pl checks MS Visual c++ compiler version number to
|
||||
@@ -295,9 +294,10 @@ LINK.cpp = $(WINLINK) -nologo $(STATIC_LDFLAGS) $(LDFLAGS) $(PROD_LDFLAGS) -out:
|
||||
# linker created .manifest file into a library or product target.
|
||||
# useManifestTool.pl returns 0(don't use) or 1(use).
|
||||
#
|
||||
MT_DLL_COMMAND1 = mt.exe /manifest $@.manifest "/outputresource:$@;\#2"
|
||||
MT.exe = mt.exe -nologo -manifest $@.manifest
|
||||
MT_DLL_COMMAND1 = $(MT.exe) "-outputresource:$@;\#2"
|
||||
MT_EXE_COMMAND_YES =
|
||||
MT_EXE_COMMAND_NO = mt.exe /manifest $@.manifest "/outputresource:$@;\#1"
|
||||
MT_EXE_COMMAND_NO = $(MT.exe) "-outputresource:$@;\#1"
|
||||
MT_EXE_COMMAND1 = $(MT_EXE_COMMAND_$(STATIC_BUILD))
|
||||
MT_DLL_COMMAND = $(MT_DLL_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl))
|
||||
MT_EXE_COMMAND = $(MT_EXE_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
@@ -12,5 +12,5 @@
|
||||
# This is a Makefile fragment, see src/ioc/Makefile.
|
||||
|
||||
$(patsubst %,$(COMMON_DIR)/%,$(BPT_DBD)) : \
|
||||
$(COMMON_DIR)/bpt%.dbd : $(call PATH_FILTER, $(TOOLS)/makeBpt$(HOSTEXE))
|
||||
$(COMMON_DIR)/bpt%.dbd : $(TOOLS)/makeBpt$(HOSTEXE)
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
* This is adaptation of old bldCvtTable
|
||||
*/
|
||||
|
||||
#include "dbBase.h"
|
||||
#include "dbStaticLib.h"
|
||||
#include "epicsPrint.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbBase.h"
|
||||
#include "dbStaticLib.h"
|
||||
#include "dbAccess.h"
|
||||
#include "cvtTable.h"
|
||||
|
||||
|
||||
@@ -17,22 +17,24 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "cantProceed.h"
|
||||
#include "dbChannel.h"
|
||||
#include "dbCommon.h"
|
||||
#include "dbBase.h"
|
||||
#include "dbEvent.h"
|
||||
#include "link.h"
|
||||
#include "freeList.h"
|
||||
#include "dbAccessDefs.h"
|
||||
#include "dbLock.h"
|
||||
#include "dbStaticLib.h"
|
||||
#include "epicsAssert.h"
|
||||
#include "epicsString.h"
|
||||
#include "errlog.h"
|
||||
#include "freeList.h"
|
||||
#include "gpHash.h"
|
||||
#include "yajl_parse.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbBase.h"
|
||||
#include "dbStaticLib.h"
|
||||
#include "link.h"
|
||||
#include "recSup.h"
|
||||
#include "special.h"
|
||||
#include "yajl_parse.h"
|
||||
#include "dbChannel.h"
|
||||
#include "dbCommon.h"
|
||||
#include "dbEvent.h"
|
||||
#include "dbAccessDefs.h"
|
||||
#include "dbLock.h"
|
||||
|
||||
/* The following is defined in db_convert.h */
|
||||
extern unsigned short dbDBRnewToDBRold[DBR_ENUM+1];
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
#include "epicsEvent.h"
|
||||
#include "epicsThread.h"
|
||||
#include "errlog.h"
|
||||
#include "dbChannel.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "db_access_routines.h"
|
||||
#include "dbCAC.h"
|
||||
#include "dbChannel.h"
|
||||
#include "dbChannelIO.h"
|
||||
#include "dbPutNotifyBlocker.h"
|
||||
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
#include "epicsString.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "ellLib.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbStaticLib.h"
|
||||
#include "dbDefs.h"
|
||||
|
||||
#include "dbState.h"
|
||||
|
||||
static ELLLIST states = ELLLIST_INIT;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "epicsConvert.h"
|
||||
#include "dbDefs.h"
|
||||
#include "dbChannel.h"
|
||||
#include "errlog.h"
|
||||
#include "ellLib.h"
|
||||
#include "epicsTime.h"
|
||||
@@ -31,9 +30,11 @@
|
||||
#define db_accessHFORdb_accessC
|
||||
#include "db_access.h"
|
||||
#undef db_accessHFORdb_accessC
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbStaticLib.h"
|
||||
#include "dbBase.h"
|
||||
#include "dbChannel.h"
|
||||
#include "dbCommon.h"
|
||||
#include "recSup.h"
|
||||
#include "dbNotify.h"
|
||||
|
||||
@@ -82,7 +82,7 @@ int gft(char *pname)
|
||||
* TPF
|
||||
* Test put field
|
||||
*/
|
||||
int epicsShareAPI pft(char *pname, char *pvalue)
|
||||
int pft(char *pname, char *pvalue)
|
||||
{
|
||||
struct dbChannel *chan;
|
||||
struct dbCommon *precord;
|
||||
@@ -217,7 +217,7 @@ static void tpnThread(void *pvt)
|
||||
free(ptpnInfo);
|
||||
}
|
||||
|
||||
int epicsShareAPI tpn(char *pname, char *pvalue)
|
||||
int tpn(char *pname, char *pvalue)
|
||||
{
|
||||
struct dbChannel *chan;
|
||||
tpnInfo *ptpnInfo;
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc int epicsShareAPI gft(char *pname);
|
||||
epicsShareFunc int epicsShareAPI pft(char *pname,char *pvalue);
|
||||
epicsShareFunc int epicsShareAPI tpn(char *pname,char *pvalue);
|
||||
epicsShareFunc int gft(char *pname);
|
||||
epicsShareFunc int pft(char *pname,char *pvalue);
|
||||
epicsShareFunc int tpn(char *pname,char *pvalue);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ static void getMaxRangeValues(short field_type, double *pupper_limit,
|
||||
|
||||
|
||||
|
||||
void epicsShareAPI recGblDbaddrError(long status, const struct dbAddr *paddr,
|
||||
void recGblDbaddrError(long status, const struct dbAddr *paddr,
|
||||
const char *pmessage)
|
||||
{
|
||||
dbCommon *precord = 0;
|
||||
@@ -69,7 +69,7 @@ void epicsShareAPI recGblDbaddrError(long status, const struct dbAddr *paddr,
|
||||
return;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblRecordError(long status, void *pdbc,
|
||||
void recGblRecordError(long status, void *pdbc,
|
||||
const char *pmessage)
|
||||
{
|
||||
dbCommon *precord = pdbc;
|
||||
@@ -81,7 +81,7 @@ void epicsShareAPI recGblRecordError(long status, void *pdbc,
|
||||
return;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblRecSupError(long status, const struct dbAddr *paddr,
|
||||
void recGblRecSupError(long status, const struct dbAddr *paddr,
|
||||
const char *pmessage, const char *psupport_name)
|
||||
{
|
||||
dbCommon *precord = 0;
|
||||
@@ -106,7 +106,7 @@ void epicsShareAPI recGblRecSupError(long status, const struct dbAddr *paddr,
|
||||
return;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblGetPrec(const struct dbAddr *paddr,long *precision)
|
||||
void recGblGetPrec(const struct dbAddr *paddr,long *precision)
|
||||
{
|
||||
dbFldDes *pdbFldDes = paddr->pfldDes;
|
||||
|
||||
@@ -133,7 +133,7 @@ void epicsShareAPI recGblGetPrec(const struct dbAddr *paddr,long *precision)
|
||||
return;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblGetGraphicDouble(
|
||||
void recGblGetGraphicDouble(
|
||||
const struct dbAddr *paddr,struct dbr_grDouble *pgd)
|
||||
{
|
||||
dbFldDes *pdbFldDes = paddr->pfldDes;
|
||||
@@ -144,7 +144,7 @@ void epicsShareAPI recGblGetGraphicDouble(
|
||||
return;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblGetAlarmDouble(
|
||||
void recGblGetAlarmDouble(
|
||||
const struct dbAddr *paddr,struct dbr_alDouble *pad)
|
||||
{
|
||||
pad->upper_alarm_limit = 0;
|
||||
@@ -155,7 +155,7 @@ void epicsShareAPI recGblGetAlarmDouble(
|
||||
return;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblGetControlDouble(
|
||||
void recGblGetControlDouble(
|
||||
const struct dbAddr *paddr,struct dbr_ctrlDouble *pcd)
|
||||
{
|
||||
dbFldDes *pdbFldDes=paddr->pfldDes;
|
||||
@@ -166,7 +166,7 @@ void epicsShareAPI recGblGetControlDouble(
|
||||
return;
|
||||
}
|
||||
|
||||
int epicsShareAPI recGblInitConstantLink(
|
||||
int recGblInitConstantLink(
|
||||
struct link *plink,short dbftype,void *pdest)
|
||||
{
|
||||
long status = dbLoadLink(plink, dbftype, pdest);
|
||||
@@ -176,7 +176,7 @@ int epicsShareAPI recGblInitConstantLink(
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
unsigned short epicsShareAPI recGblResetAlarms(void *precord)
|
||||
unsigned short recGblResetAlarms(void *precord)
|
||||
{
|
||||
dbCommon *pdbc = precord;
|
||||
epicsEnum16 prev_stat = pdbc->stat;
|
||||
@@ -225,7 +225,7 @@ int recGblSetSevr(void *precord, epicsEnum16 new_stat, epicsEnum16 new_sevr)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblFwdLink(void *precord)
|
||||
void recGblFwdLink(void *precord)
|
||||
{
|
||||
dbCommon *pdbc = precord;
|
||||
|
||||
@@ -241,7 +241,7 @@ void epicsShareAPI recGblFwdLink(void *precord)
|
||||
pdbc->putf = FALSE;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblGetTimeStamp(void *pvoid)
|
||||
void recGblGetTimeStamp(void *pvoid)
|
||||
{
|
||||
dbCommon* prec = (dbCommon*)pvoid;
|
||||
struct link *plink = &prec->tsel;
|
||||
@@ -264,7 +264,7 @@ void epicsShareAPI recGblGetTimeStamp(void *pvoid)
|
||||
}
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblTSELwasModified(struct link *plink)
|
||||
void recGblTSELwasModified(struct link *plink)
|
||||
{
|
||||
struct pv_link *ppv_link = &plink->value.pv_link;
|
||||
char *pfieldname;
|
||||
|
||||
@@ -10,7 +10,11 @@ TOP=../../../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
PROD_LIBS = dbCore ca Com
|
||||
TESTLIBRARY = xRec
|
||||
|
||||
xRec_SRCS = xRecord.c
|
||||
|
||||
PROD_LIBS = xRec dbCore ca Com
|
||||
|
||||
TESTPROD_HOST += callbackTest
|
||||
callbackTest_SRCS += callbackTest.c
|
||||
@@ -25,7 +29,6 @@ TESTS += dbStateTest
|
||||
TARGETS += $(COMMON_DIR)/dbChannelTest.dbd
|
||||
dbChannelTest_DBD += xRecord.dbd
|
||||
TESTPROD_HOST += dbChannelTest
|
||||
dbChannelTest_SRCS += xRecord.c
|
||||
dbChannelTest_SRCS += dbChannelTest.c
|
||||
dbChannelTest_SRCS += dbChannelTest_registerRecordDeviceDriver.cpp
|
||||
testHarness_SRCS += dbChannelTest.c
|
||||
@@ -36,7 +39,6 @@ TESTS += dbChannelTest
|
||||
TARGETS += $(COMMON_DIR)/chfPluginTest.dbd
|
||||
chfPluginTest_DBD += xRecord.dbd
|
||||
TESTPROD_HOST += chfPluginTest
|
||||
chfPluginTest_SRCS += xRecord.c
|
||||
chfPluginTest_SRCS += chfPluginTest.c
|
||||
chfPluginTest_SRCS += chfPluginTest_registerRecordDeviceDriver.cpp
|
||||
testHarness_SRCS += chfPluginTest.c
|
||||
@@ -47,7 +49,6 @@ TESTS += chfPluginTest
|
||||
TARGETS += $(COMMON_DIR)/arrShorthandTest.dbd
|
||||
arrShorthandTest_DBD += xRecord.dbd
|
||||
TESTPROD_HOST += arrShorthandTest
|
||||
arrShorthandTest_SRCS += xRecord.c
|
||||
arrShorthandTest_SRCS += arrShorthandTest.c
|
||||
arrShorthandTest_SRCS += arrShorthandTest_registerRecordDeviceDriver.cpp
|
||||
testHarness_SRCS += arrShorthandTest.c
|
||||
@@ -57,7 +58,6 @@ TESTS += arrShorthandTest
|
||||
|
||||
# The testHarness runs all the test programs in a known working order.
|
||||
testHarness_SRCS += epicsRunDbTests.c
|
||||
testHarness_SRCS += xRecord.c
|
||||
|
||||
dbTestHarness_SRCS += $(testHarness_SRCS)
|
||||
dbTestHarness_SRCS_RTEMS += rtemsTestHarness.c
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
@@ -14,11 +14,10 @@
|
||||
|
||||
#include "osiUnistd.h"
|
||||
#include "macLib.h"
|
||||
#include "dbAccess.h"
|
||||
#include "dbmf.h"
|
||||
#include "epicsVersion.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbAccess.h"
|
||||
#include "dbLoadTemplate.h"
|
||||
|
||||
static int line_num;
|
||||
|
||||
@@ -192,7 +192,7 @@ static void makeSubstitutions(inputData *inputPvt, MAC_HANDLE *macPvt, char *tem
|
||||
|
||||
p = input;
|
||||
/*skip whitespace at beginning of line*/
|
||||
while(*p && (isspace(*p))) ++p;
|
||||
while(*p && (isspace((int) *p))) ++p;
|
||||
/*Look for i or s */
|
||||
if(*p && (*p=='i' || *p=='s')) command = p;
|
||||
if(command) {
|
||||
@@ -210,7 +210,7 @@ static void makeSubstitutions(inputData *inputPvt, MAC_HANDLE *macPvt, char *tem
|
||||
if(cmdind<0) goto endif;
|
||||
p = command + strlen(cmdNames[cmdind]);
|
||||
/*skip whitespace after command*/
|
||||
while(*p && (isspace(*p))) ++p;
|
||||
while(*p && (isspace((int) *p))) ++p;
|
||||
/*Next character must be quote*/
|
||||
if((*p==0) || (*p!='"')) goto endif;
|
||||
pstart = ++p;
|
||||
@@ -765,7 +765,7 @@ static tokenType subGetNextToken(subFile *psubFile)
|
||||
if(!p) { psubFile->token = tokenEOF; return(tokenEOF);}
|
||||
else { psubFile->token = tokenSeparater; return(tokenSeparater);}
|
||||
}
|
||||
while(isspace(*p)) p++;
|
||||
while(isspace((int) *p)) p++;
|
||||
if(*p=='{') {
|
||||
psubFile->token = tokenLBrace;
|
||||
psubFile->pnextChar = ++p;
|
||||
@@ -776,8 +776,8 @@ static tokenType subGetNextToken(subFile *psubFile)
|
||||
psubFile->pnextChar = ++p;
|
||||
return(tokenRBrace);
|
||||
}
|
||||
if(*p==0 || isspace(*p) || *p==',') {
|
||||
while(isspace(*p) || *p==',') p++;
|
||||
if(*p==0 || isspace((int) *p) || *p==',') {
|
||||
while (isspace((int) *p) || *p==',') p++;
|
||||
psubFile->token = tokenSeparater;
|
||||
psubFile->pnextChar = p;
|
||||
return(tokenSeparater);
|
||||
@@ -807,7 +807,7 @@ static tokenType subGetNextToken(subFile *psubFile)
|
||||
}
|
||||
/*Now take anything up to next non String token and not space*/
|
||||
pto = &psubFile->string[0];
|
||||
while(!isspace(*p) && (strspn(p,"\",{}")==0)) *pto++ = *p++;
|
||||
while(!isspace((int) *p) && (strspn(p,"\",{}")==0)) *pto++ = *p++;
|
||||
*pto = 0;
|
||||
psubFile->pnextChar = p;
|
||||
psubFile->token = tokenString;
|
||||
|
||||
@@ -24,44 +24,44 @@
|
||||
#include "dbDefs.h"
|
||||
#include "epicsThread.h"
|
||||
#include "epicsPrint.h"
|
||||
#include "epicsExit.h"
|
||||
#include "epicsSignal.h"
|
||||
#include "ellLib.h"
|
||||
#include "dbDefs.h"
|
||||
#include "dbBase.h"
|
||||
#include "envDefs.h"
|
||||
#include "errMdef.h"
|
||||
#include "taskwd.h"
|
||||
#include "caeventmask.h"
|
||||
#include "dbAddr.h"
|
||||
#include "dbBkpt.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbBase.h"
|
||||
#include "dbFldTypes.h"
|
||||
#include "link.h"
|
||||
#include "menuConvert.h"
|
||||
#include "menuPini.h"
|
||||
#include "registryRecordType.h"
|
||||
#include "registryDeviceSupport.h"
|
||||
#include "registryDriverSupport.h"
|
||||
#include "devSup.h"
|
||||
#include "drvSup.h"
|
||||
#include "recSup.h"
|
||||
#include "dbStaticLib.h"
|
||||
|
||||
#include "callback.h"
|
||||
#include "dbAddr.h"
|
||||
#include "dbBkpt.h"
|
||||
#include "dbCommon.h"
|
||||
#include "dbLock.h"
|
||||
#include "dbAccess.h"
|
||||
#include "recGbl.h"
|
||||
#include "dbNotify.h"
|
||||
#include "dbCa.h"
|
||||
#include "dbScan.h"
|
||||
#include "taskwd.h"
|
||||
#include "callback.h"
|
||||
#include "dbCommon.h"
|
||||
#include "devSup.h"
|
||||
#include "drvSup.h"
|
||||
#include "menuConvert.h"
|
||||
#include "menuPini.h"
|
||||
#include "registryRecordType.h"
|
||||
#include "registryDeviceSupport.h"
|
||||
#include "registryDriverSupport.h"
|
||||
#include "errMdef.h"
|
||||
#include "recSup.h"
|
||||
#include "envDefs.h"
|
||||
#include "rsrv.h"
|
||||
#include "asDbLib.h"
|
||||
#include "dbStaticLib.h"
|
||||
#include "db_access_routines.h"
|
||||
#include "initHooks.h"
|
||||
#include "epicsExit.h"
|
||||
#include "epicsSignal.h"
|
||||
#include "dbChannel.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "epicsRelease.h"
|
||||
#include "rsrv.h"
|
||||
#include "asDbLib.h"
|
||||
#include "iocInit.h"
|
||||
|
||||
static enum {
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
\*************************************************************************/
|
||||
|
||||
#include "iocsh.h"
|
||||
#include "libComRegister.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbAccess.h"
|
||||
#include "dbStaticIocRegister.h"
|
||||
#include "registryIocRegister.h"
|
||||
@@ -15,9 +18,6 @@
|
||||
#include "dbIocRegister.h"
|
||||
#include "dbtoolsIocRegister.h"
|
||||
#include "rsrvIocRegister.h"
|
||||
#include "libComRegister.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "miscIocRegister.h"
|
||||
#include "iocshRegisterCommon.h"
|
||||
|
||||
|
||||
@@ -31,21 +31,22 @@
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsTime.h"
|
||||
#include "errlog.h"
|
||||
#include "db_access_routines.h"
|
||||
#include "db_access.h"
|
||||
#include "special.h"
|
||||
#include "freeList.h"
|
||||
#include "caerr.h"
|
||||
#include "db_field_log.h"
|
||||
#include "dbEvent.h"
|
||||
#include "dbCommon.h"
|
||||
#include "db_field_log.h"
|
||||
#include "callback.h"
|
||||
#include "asDbLib.h"
|
||||
|
||||
#include "net_convert.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "db_access_routines.h"
|
||||
#include "db_access.h"
|
||||
#include "special.h"
|
||||
#include "db_field_log.h"
|
||||
#include "dbEvent.h"
|
||||
#include "dbChannel.h"
|
||||
#include "dbCommon.h"
|
||||
#include "dbNotify.h"
|
||||
#include "db_field_log.h"
|
||||
#include "callback.h"
|
||||
#include "asDbLib.h"
|
||||
#include "rsrv.h"
|
||||
#include "server.h"
|
||||
|
||||
|
||||
@@ -26,18 +26,19 @@
|
||||
#include "epicsSignal.h"
|
||||
#include "epicsEvent.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsStdio.h"
|
||||
#include "epicsTime.h"
|
||||
#include "errlog.h"
|
||||
#include "taskwd.h"
|
||||
#include "addrList.h"
|
||||
#include "freeList.h"
|
||||
#include "errlog.h"
|
||||
#include "db_field_log.h"
|
||||
#include "dbEvent.h"
|
||||
#include "dbCommon.h"
|
||||
#include "epicsStdio.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "db_field_log.h"
|
||||
#include "dbEvent.h"
|
||||
#include "dbChannel.h"
|
||||
#include "dbCommon.h"
|
||||
#include "rsrv.h"
|
||||
#define GLBLSOURCE
|
||||
#include "server.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
@@ -16,7 +16,7 @@ SRC_DIRS += $(LIBCOM)/as
|
||||
INC += asLib.h
|
||||
INC += asTrapWrite.h
|
||||
|
||||
LIB_SRCS += asLib.c
|
||||
LIB_SRCS += asTrapWrite.c
|
||||
Com_SRCS += asLib.c
|
||||
Com_SRCS += asTrapWrite.c
|
||||
|
||||
CLEANS += asLib.c asLib_lex.c
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
|
||||
# Extra rule since asLib_lex.c is included by asLib.c
|
||||
asLib$(DEP): asLib_lex.c
|
||||
asLib.c: asLib_lex.c
|
||||
|
||||
# Ensure that lexer and parser are built before they are needed
|
||||
asLib.c: $(call PATH_FILTER, $(TOOLS)/antelope$(HOSTEXE))
|
||||
asLib_lex.c: $(call PATH_FILTER, $(TOOLS)/e_flex$(HOSTEXE))
|
||||
asLib.c: $(TOOLS)/antelope$(HOSTEXE)
|
||||
asLib_lex.c: $(TOOLS)/e_flex$(HOSTEXE)
|
||||
asLib_lex.c: $(INSTALL_INCLUDE)/flex.skel.static
|
||||
|
||||
@@ -13,9 +13,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <errlog.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "errlog.h"
|
||||
#include "epicsString.h"
|
||||
#include "macLib.h"
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
#include "cantProceed.h"
|
||||
#include "epicsExit.h"
|
||||
|
||||
typedef void (*epicsExitFunc)(void *arg);
|
||||
|
||||
typedef struct exitNode {
|
||||
ELLNODE node;
|
||||
epicsExitFunc func;
|
||||
@@ -49,13 +47,13 @@ static exitPvt * pExitPvtPerProcess = 0;
|
||||
static epicsMutexId exitPvtLock = 0;
|
||||
static epicsThreadPrivateId exitPvtPerThread = 0;
|
||||
|
||||
static void destroyExitPvt ( exitPvt * pep )
|
||||
static void destroyExitPvt(exitPvt * pep)
|
||||
{
|
||||
ellFree ( &pep->list );
|
||||
free ( pep );
|
||||
}
|
||||
|
||||
static exitPvt * createExitPvt (void)
|
||||
static exitPvt * createExitPvt(void)
|
||||
{
|
||||
exitPvt * pep = calloc ( 1, sizeof ( * pep ) );
|
||||
if ( pep ) {
|
||||
@@ -64,7 +62,7 @@ static exitPvt * createExitPvt (void)
|
||||
return pep;
|
||||
}
|
||||
|
||||
static void exitPvtOnceFunc ( void * pParm )
|
||||
static void exitPvtOnceFunc(void *pParm)
|
||||
{
|
||||
exitPvtPerThread = epicsThreadPrivateCreate ();
|
||||
assert ( exitPvtPerThread );
|
||||
@@ -73,7 +71,7 @@ static void exitPvtOnceFunc ( void * pParm )
|
||||
exitPvtLock = epicsMutexMustCreate ();
|
||||
}
|
||||
|
||||
static void epicsExitCallAtExitsPvt ( exitPvt * pep )
|
||||
static void epicsExitCallAtExitsPvt(exitPvt *pep)
|
||||
{
|
||||
exitNode *pexitNode;
|
||||
while ( ( pexitNode = (exitNode *) ellLast ( & pep->list ) ) ) {
|
||||
@@ -83,7 +81,7 @@ static void epicsExitCallAtExitsPvt ( exitPvt * pep )
|
||||
}
|
||||
}
|
||||
|
||||
epicsShareFunc void epicsShareAPI epicsExitCallAtExits ( void )
|
||||
epicsShareFunc void epicsExitCallAtExits(void)
|
||||
{
|
||||
exitPvt * pep = 0;
|
||||
epicsThreadOnce ( & exitPvtOnce, exitPvtOnceFunc, 0 );
|
||||
@@ -99,7 +97,7 @@ epicsShareFunc void epicsShareAPI epicsExitCallAtExits ( void )
|
||||
}
|
||||
}
|
||||
|
||||
epicsShareFunc void epicsShareAPI epicsExitCallAtThreadExits ( void )
|
||||
epicsShareFunc void epicsExitCallAtThreadExits(void)
|
||||
{
|
||||
exitPvt * pep;
|
||||
epicsThreadOnce ( & exitPvtOnce, exitPvtOnceFunc, 0 );
|
||||
@@ -111,8 +109,7 @@ epicsShareFunc void epicsShareAPI epicsExitCallAtThreadExits ( void )
|
||||
}
|
||||
}
|
||||
|
||||
static int epicsAtExitPvt (
|
||||
exitPvt * pep, epicsExitFunc func, void *arg )
|
||||
static int epicsAtExitPvt(exitPvt *pep, epicsExitFunc func, void *arg)
|
||||
{
|
||||
int status = -1;
|
||||
exitNode * pExitNode
|
||||
@@ -126,8 +123,7 @@ static int epicsAtExitPvt (
|
||||
return status;
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsAtThreadExit (
|
||||
epicsExitFunc func, void *arg )
|
||||
epicsShareFunc int epicsAtThreadExit(epicsExitFunc func, void *arg)
|
||||
{
|
||||
exitPvt * pep;
|
||||
epicsThreadOnce ( & exitPvtOnce, exitPvtOnceFunc, 0 );
|
||||
@@ -142,8 +138,7 @@ epicsShareFunc int epicsShareAPI epicsAtThreadExit (
|
||||
return epicsAtExitPvt ( pep, func, arg );
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsAtExit(
|
||||
epicsExitFunc func, void *arg )
|
||||
epicsShareFunc int epicsAtExit(epicsExitFunc func, void *arg)
|
||||
{
|
||||
int status = -1;
|
||||
epicsThreadOnce ( & exitPvtOnce, exitPvtOnceFunc, 0 );
|
||||
@@ -155,7 +150,7 @@ epicsShareFunc int epicsShareAPI epicsAtExit(
|
||||
return status;
|
||||
}
|
||||
|
||||
epicsShareFunc void epicsShareAPI epicsExit(int status)
|
||||
epicsShareFunc void epicsExit(int status)
|
||||
{
|
||||
epicsExitCallAtExits();
|
||||
epicsThreadSleep(1.0);
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*epicsExit.h*/
|
||||
#ifndef epicsExith
|
||||
@@ -16,14 +15,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc void epicsShareAPI epicsExit(int status);
|
||||
epicsShareFunc void epicsShareAPI epicsExitCallAtExits(void);
|
||||
epicsShareFunc int epicsShareAPI epicsAtExit(
|
||||
void (*epicsExitFunc)(void *arg),void *arg);
|
||||
typedef void (*epicsExitFunc)(void *arg);
|
||||
|
||||
epicsShareFunc void epicsShareAPI epicsExitCallAtThreadExits(void);
|
||||
epicsShareFunc int epicsShareAPI epicsAtThreadExit(
|
||||
void (*epicsExitFunc)(void *arg),void *arg);
|
||||
epicsShareFunc void epicsExit(int status);
|
||||
epicsShareFunc void epicsExitCallAtExits(void);
|
||||
epicsShareFunc int epicsAtExit(epicsExitFunc func, void *arg);
|
||||
|
||||
epicsShareFunc void epicsExitCallAtThreadExits(void);
|
||||
epicsShareFunc int epicsAtThreadExit(epicsExitFunc func, void *arg);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -171,8 +171,8 @@ size_t epicsStrnEscapedFromRawSize(const char *inbuf, size_t inlen)
|
||||
int epicsStrCaseCmp(const char *s1, const char *s2)
|
||||
{
|
||||
while (1) {
|
||||
int ch1 = toupper(*s1);
|
||||
int ch2 = toupper(*s2);
|
||||
int ch1 = toupper((int) *s1);
|
||||
int ch2 = toupper((int) *s2);
|
||||
|
||||
if (ch1 == 0) return (ch2 != 0);
|
||||
if (ch2 == 0) return -1;
|
||||
@@ -188,8 +188,8 @@ int epicsStrnCaseCmp(const char *s1, const char *s2, size_t len)
|
||||
size_t i = 0;
|
||||
|
||||
while (i++ < len) {
|
||||
int ch1 = toupper(*s1);
|
||||
int ch2 = toupper(*s2);
|
||||
int ch1 = toupper((int) *s1);
|
||||
int ch2 = toupper((int) *s2);
|
||||
|
||||
if (ch1 == 0) return (ch2 != 0);
|
||||
if (ch2 == 0) return -1;
|
||||
|
||||
@@ -979,7 +979,7 @@ static void epicsThreadShowInfo ( epicsThreadId id, unsigned level )
|
||||
/*
|
||||
* epicsThreadMap ()
|
||||
*/
|
||||
epicsShareFunc void epicsShareAPI epicsThreadMap ( EPICS_THREAD_HOOK_ROUTINE func )
|
||||
epicsShareFunc void epicsThreadMap ( EPICS_THREAD_HOOK_ROUTINE func )
|
||||
{
|
||||
win32ThreadGlobal * pGbl = fetchWin32ThreadGlobal ();
|
||||
win32ThreadParam * pParm;
|
||||
|
||||
16
src/libCom/osi/os/WIN32/osdThreadExtra.c
Normal file
16
src/libCom/osi/os/WIN32/osdThreadExtra.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2012 ITER Organization
|
||||
*
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* Author: Ralph Lange Date: 26 Jun 2012 */
|
||||
|
||||
/* Null default thread hooks for all platforms that do not do anything special */
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "epicsThread.h"
|
||||
|
||||
epicsShareDef EPICS_THREAD_HOOK_ROUTINE epicsThreadHookDefault;
|
||||
epicsShareDef EPICS_THREAD_HOOK_ROUTINE epicsThreadHookMain;
|
||||
@@ -1,8 +1,7 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2006 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
@@ -14,4 +13,4 @@
|
||||
|
||||
/* This file must contain no definitions other than the following: */
|
||||
|
||||
devLibVME *pdevLibVME;
|
||||
epicsShareDef devLibVME *pdevLibVME;
|
||||
|
||||
@@ -41,14 +41,11 @@ const nothrow_t nothrow ;
|
||||
static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max () - 100;
|
||||
# endif
|
||||
// passing a size_t to printf() needs "%zu" on some platforms
|
||||
# define Z_MODIFIER ""
|
||||
#elif defined(vxWorks)
|
||||
// Neither vxWorks 5 or 6 supply true ANSI C++
|
||||
static const size_t unsuccessfulNewSize = UINT_MAX - 15u;
|
||||
# define Z_MODIFIER ""
|
||||
#else
|
||||
static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();
|
||||
# define Z_MODIFIER "z"
|
||||
#endif
|
||||
|
||||
class exThread : public epicsThreadRunable {
|
||||
@@ -66,10 +63,12 @@ static void epicsExceptionTestPrivate ()
|
||||
{
|
||||
try {
|
||||
char * p = new char [unsuccessfulNewSize];
|
||||
testFail("new char[%" Z_MODIFIER "u] returned %p", unsuccessfulNewSize, p);
|
||||
testFail("new char[%lu] returned %p",
|
||||
(unsigned long) unsuccessfulNewSize, p);
|
||||
}
|
||||
catch ( const bad_alloc & ) {
|
||||
testPass("new char[%" Z_MODIFIER "u] threw", unsuccessfulNewSize);
|
||||
testPass("new char[%lu] threw",
|
||||
(unsigned long) unsuccessfulNewSize);
|
||||
}
|
||||
catch ( ... ) {
|
||||
testFail("new: threw wrong type");
|
||||
|
||||
@@ -39,7 +39,7 @@ static int newThreadIndex(epicsThreadId id)
|
||||
if (epicsMutexLock(tidLock))
|
||||
testAbort("newThreadIndex: Locking problem");
|
||||
|
||||
while (tid[i] != 0 && i < MAX_THREADS)
|
||||
while (i < MAX_THREADS && tid[i] != 0)
|
||||
i++;
|
||||
if (i < MAX_THREADS)
|
||||
tid[i] = id;
|
||||
@@ -54,7 +54,7 @@ static int findThreadIndex(epicsThreadId id)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (tid[i] != id && i < MAX_THREADS)
|
||||
while (i < MAX_THREADS && tid[i] != id)
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <epicsExport.h>
|
||||
#include <freeList.h>
|
||||
#include <dbAccess.h>
|
||||
#include <dbExtractArray.h>
|
||||
@@ -21,6 +20,7 @@
|
||||
#include <recSup.h>
|
||||
#include <special.h>
|
||||
#include <chfPlugin.h>
|
||||
#include <epicsExport.h>
|
||||
|
||||
typedef struct myStruct {
|
||||
epicsInt32 start;
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <epicsExport.h>
|
||||
#include <epicsMath.h>
|
||||
#include <freeList.h>
|
||||
#include <dbConvertFast.h>
|
||||
#include <chfPlugin.h>
|
||||
#include <db_field_log.h>
|
||||
#include <epicsExport.h>
|
||||
|
||||
typedef struct myStruct {
|
||||
int mode;
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "epicsExport.h"
|
||||
#include "freeList.h"
|
||||
#include "db_field_log.h"
|
||||
#include "chfPlugin.h"
|
||||
#include "dbState.h"
|
||||
#include "epicsAssert.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
#define STATE_NAME_LENGTH 20
|
||||
|
||||
|
||||
@@ -10,12 +10,17 @@ TOP=../../../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
PROD_LIBS = dbRecStd dbCore ca Com
|
||||
TESTLIBRARY = Recs
|
||||
|
||||
Recs_SRCS += xRecord.c
|
||||
Recs_SRCS += arrRecord.c
|
||||
Recs_LIBS += dbCore Com
|
||||
|
||||
PROD_LIBS = Recs dbRecStd dbCore ca Com
|
||||
|
||||
TARGETS += $(COMMON_DIR)/tsTest.dbd
|
||||
tsTest_DBD += xRecord.dbd
|
||||
TESTPROD_HOST += tsTest
|
||||
tsTest_SRCS += xRecord.c
|
||||
tsTest_SRCS += tsTest.c
|
||||
tsTest_SRCS += tsTest_registerRecordDeviceDriver.cpp
|
||||
testHarness_SRCS += tsTest.c
|
||||
@@ -26,7 +31,6 @@ TESTS += tsTest
|
||||
TARGETS += $(COMMON_DIR)/dbndTest.dbd
|
||||
dbndTest_DBD += xRecord.dbd
|
||||
TESTPROD_HOST += dbndTest
|
||||
dbndTest_SRCS += xRecord.c
|
||||
dbndTest_SRCS += dbndTest.c
|
||||
dbndTest_SRCS += dbndTest_registerRecordDeviceDriver.cpp
|
||||
testHarness_SRCS += dbndTest.c
|
||||
@@ -37,10 +41,8 @@ TESTS += dbndTest
|
||||
TARGETS += $(COMMON_DIR)/arrTest.dbd
|
||||
arrTest_DBD += arrRecord.dbd
|
||||
TESTPROD_HOST += arrTest
|
||||
arrTest_SRCS += arrRecord.c
|
||||
arrTest_SRCS += arrTest.cpp
|
||||
arrTest_SRCS += arrTest_registerRecordDeviceDriver.cpp
|
||||
testHarness_SRCS += arrRecord.c
|
||||
testHarness_SRCS += arrTest.cpp
|
||||
testHarness_SRCS += arrTest_registerRecordDeviceDriver.cpp
|
||||
TESTFILES += $(COMMON_DIR)/arrTest.dbd
|
||||
@@ -49,7 +51,6 @@ TESTS += arrTest
|
||||
TARGETS += $(COMMON_DIR)/syncTest.dbd
|
||||
syncTest_DBD += xRecord.dbd
|
||||
TESTPROD_HOST += syncTest
|
||||
syncTest_SRCS += xRecord.c
|
||||
syncTest_SRCS += syncTest.c
|
||||
syncTest_SRCS += syncTest_registerRecordDeviceDriver.cpp
|
||||
testHarness_SRCS += syncTest.c
|
||||
@@ -59,7 +60,6 @@ TESTS += syncTest
|
||||
|
||||
# epicsRunFilterTests runs all the test programs in a known working order.
|
||||
testHarness_SRCS += epicsRunFilterTests.c
|
||||
testHarness_SRCS += xRecord.c
|
||||
|
||||
filterTestHarness_SRCS += $(testHarness_SRCS)
|
||||
filterTestHarness_SRCS_RTEMS += rtemsTestHarness.c
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
#include "arrRecord.h"
|
||||
|
||||
extern "C" int arrTest_registerRecordDeviceDriver(struct dbBase *pdbbase);
|
||||
extern "C" void (*pvar_func_arrInitialize)(void);
|
||||
epicsShareExtern void (*pvar_func_arrInitialize)(void);
|
||||
|
||||
|
||||
#define CA_SERVER_PORT "65535"
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#define PATTERN 0x55
|
||||
|
||||
void dbndTest_registerRecordDeviceDriver(struct dbBase *);
|
||||
epicsShareExtern void (*pvar_func_dbndInitialize)(void);
|
||||
|
||||
static db_field_log fl;
|
||||
@@ -99,8 +100,6 @@ static void testHead (char* title) {
|
||||
testDiag("--------------------------------------------------------");
|
||||
}
|
||||
|
||||
void dbndTest_registerRecordDeviceDriver(struct dbBase *);
|
||||
|
||||
MAIN(dbndTest)
|
||||
{
|
||||
dbChannel *pch;
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#define PATTERN 0x55
|
||||
|
||||
void syncTest_registerRecordDeviceDriver(struct dbBase *);
|
||||
epicsShareExtern void (*pvar_func_syncInitialize)(void);
|
||||
|
||||
static db_field_log fl;
|
||||
@@ -130,8 +131,6 @@ static void checkAndOpenChannel(dbChannel *pch, const chFilterPlugin *plug) {
|
||||
checkCtxRead(pch, red);
|
||||
}
|
||||
|
||||
void syncTest_registerRecordDeviceDriver(struct dbBase *);
|
||||
|
||||
MAIN(syncTest)
|
||||
{
|
||||
dbChannel *pch;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#define PATTERN 0x55
|
||||
|
||||
void tsTest_registerRecordDeviceDriver(struct dbBase *);
|
||||
epicsShareExtern void (*pvar_func_tsInitialize)(void);
|
||||
|
||||
static db_field_log fl;
|
||||
@@ -39,8 +40,6 @@ static int fl_equal_ex_ts(const db_field_log *pfl1, const db_field_log *pfl2) {
|
||||
return fl_equal(&fl1, pfl2);
|
||||
}
|
||||
|
||||
void tsTest_registerRecordDeviceDriver(struct dbBase *);
|
||||
|
||||
MAIN(tsTest)
|
||||
{
|
||||
dbChannel *pch;
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <epicsExport.h>
|
||||
#include <chfPlugin.h>
|
||||
#include <dbLock.h>
|
||||
#include <db_field_log.h>
|
||||
#include <epicsExport.h>
|
||||
|
||||
static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
epicsTimeStamp now;
|
||||
|
||||
Reference in New Issue
Block a user