From eaee851a2d1bf4c768de753937cea91842867d2e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 3 Mar 2020 00:58:48 -0600 Subject: [PATCH 01/11] Add script to generate *API.h headers --- src/tools/Makefile | 2 + src/tools/makeAPIheader.pl | 141 +++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 src/tools/makeAPIheader.pl diff --git a/src/tools/Makefile b/src/tools/Makefile index c58c923b9..792440591 100644 --- a/src/tools/Makefile +++ b/src/tools/Makefile @@ -29,6 +29,7 @@ PERL_SCRIPTS += epicsProve.pl PERL_SCRIPTS += expandVars.pl PERL_SCRIPTS += fullPathName.pl PERL_SCRIPTS += installEpics.pl +PERL_SCRIPTS += makeAPIheader.pl PERL_SCRIPTS += makeMakefile.pl PERL_SCRIPTS += makeTestfile.pl PERL_SCRIPTS += mkmf.pl @@ -47,6 +48,7 @@ HTMLS += EPICS/Getopts.html HTMLS += EPICS/Path.html HTMLS += EPICS/Readfile.html HTMLS += fullPathName.html +HTMLS += makeAPIheader.html HTMLS += munch.html HTMLS += podToHtml.html HTMLS += podRemove.html diff --git a/src/tools/makeAPIheader.pl b/src/tools/makeAPIheader.pl new file mode 100644 index 000000000..79965a615 --- /dev/null +++ b/src/tools/makeAPIheader.pl @@ -0,0 +1,141 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use Getopt::Std; +$Getopt::Std::STANDARD_HELP_VERSION = 1; + +use Pod::Usage; + +=head1 NAME + +makeAPIheader.pl - Create a header for marking API import/export + +=head1 SYNOPSIS + +B [B<-h>] [B<-o> fileAPI.h] stem + +=head1 DESCRIPTION + +Creates a C/C++ header file containing macro definitions for C and +C which on Windows will expand to the appropriate C<__declspec> +and C<__stdcall> keywords and under GCC to a C attribute. + +=head1 OPTIONS + +B understands the following options: + +=over 4 + +=item B<-h> + +Help, display this document as text. + +=item B<-o> fileAPI.h + +Name of the output file to be created. Must end C. + +=back + +If no output filename is set, the filename will be generated by appending +C to the B argument. + +=head1 USAGE FOR EPICS + +In the Makefile that is building a DLL or shared library, set the variable +C to the name of the name of the header file to be generated, +which must end with C. The part before that is referred to as the +I for this library. For example the stem here is C: + + # Generate our library API header file + API_HEADER = libComAPI.h + +Lower down in the RULES section of the same Makefile (below the line that +includes the C<$(TOP)/configure/RULES> file), add a line like this: + + # Set the API Building flag while we are building the code + $(LIBNAME) $(SHRLIBNAME): USR_CPPFLAGS += -DLIBCOM_API_BUILDING + +Replace the string C above with the upper-case version of the stem +that you used in your header filename. + +Then in each header and source file that declares or defines a routine to be +exported by the library, decorate the routine declaration or definition with +the keyword C like this: + + LIBCOM_API void epicsExit(int status); + +The header also defines a second macro C which is for Windows +builds to indicate that the calling convention for this routine must be +C<__stdcall>. If needed, this macro should be placed between the return type +and the routine name, like this: + + LIBCOM_API int LIBCOMSTD_API iocshCmd(const char *cmd); + +=cut + +our ($opt_o, $opt_h); + +sub HELP_MESSAGE { + pod2usage(-exitval => 2, -verbose => $opt_h); +} + +HELP_MESSAGE() if !getopts('ho:') || $opt_h || @ARGV != 1; + +my $stem = shift @ARGV; +my $outfile = defined($opt_o) ? $opt_o : "${stem}API.h"; + +die "makeAPIheader.pl: Output filename must end with 'API.h'\n" + unless $outfile =~ m/API\.h$/; + +my $STEM = uc $stem; +my $guard = "INC_${stem}API_H"; + +open my $o, '>', $outfile or + die "makeAPIheader.pl: Can't create $outfile: $!\n"; + +print $o <<"__EOF__"; +/* This is a generated file, do not edit! */ + +#ifndef $guard +#define $guard + +#if defined(_WIN32) || defined(__CYGWIN__) +# define ${STEM}STD_API __stdcall + +# if defined(BUILDING_${stem}_API) && defined(EPICS_BUILD_DLL) +/* Building library as dll */ +# define ${STEM}_API __declspec(dllexport) +# elif !defined(BUILDING_${stem}_API) && defined(EPICS_CALL_DLL) +/* Calling library in dll form */ +# define ${STEM}_API __declspec(dllimport) +# endif + +#elif __GNUC__ >= 4 +# define ${STEM}_API __attribute__ ((visibility("default"))) +#endif + +#if !defined(${STEM}_API) +# define ${STEM}_API +#endif + +#if !defined(${STEM}STD_API) +# define ${STEM}STD_API +#endif + +#endif /* $guard */ + +__EOF__ + +close $o; + + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2020 UChicago Argonne LLC, as Operator of Argonne National +Laboratory. + +This software is distributed under the terms of the EPICS Open License. + +=cut From 9e7fc1915b388704e5fd8c45004486bd91999fce Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 3 Mar 2020 01:00:42 -0600 Subject: [PATCH 02/11] Add build rules to generate and install *API.h header files --- configure/CONFIG_COMMON | 2 +- configure/RULES_BUILD | 16 ++++++++++++++++ configure/RULES_TARGET | 13 +++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON index b79e15cf5..6c0e11e0d 100644 --- a/configure/CONFIG_COMMON +++ b/configure/CONFIG_COMMON @@ -306,7 +306,7 @@ LDLIBS = $(POSIX_LDLIBS) $(ARCH_DEP_LDLIBS) $(DEBUG_LDLIBS) $(OP_SYS_LDLIBS)\ CPPFLAGS = $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS) $(OPT_CPPFLAGS)\ $(DEBUG_CPPFLAGS) $(WARN_CPPFLAGS) $(BASE_CPPFLAGS) $(TARGET_CPPFLAGS)\ $(USR_CPPFLAGS) $(CMD_CPPFLAGS) $(ARCH_DEP_CPPFLAGS) $(OP_SYS_CPPFLAGS)\ - $(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS) + $(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS) $(API_CPPFLAGS) #-------------------------------------------------- # ar definition default diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 3df3052b4..99bbb0726 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -409,6 +409,22 @@ endif $(PERL) $(TOOLS)/makeTestfile.pl $(T_A) $(EPICS_HOST_ARCH) $@ $< #--------------------------------------------------------------- +# Generate an $(API_HEADER) file on request (%API.h) + +ifdef API_HEADER +# Install it +INC += $(API_HEADER) + +# Ensure we generate it early enough +$(filter-out $(INSTALL_INCLUDE)/$(API_HEADER), $(INSTALL_INC)) $(HDEPENDS_FILES): \ + | $(INSTALL_INCLUDE)/$(API_HEADER) + +# How to make it +$(COMMON_DIR)/$(API_HEADER): + @$(RM) $@ + $(PERL) $(TOOLS)/makeAPIheader.pl -o $@ $(API_HEADER:API.h=) +endif + # Generate header with version number from VCS ifneq ($(GENVERSION),) diff --git a/configure/RULES_TARGET b/configure/RULES_TARGET index e96232876..5d77b105e 100644 --- a/configure/RULES_TARGET +++ b/configure/RULES_TARGET @@ -95,12 +95,20 @@ $(1)_DLL_DEPLIBS=$$(foreach lib, $$($(1)_DLL_LIBS), \ $$(LIB_PREFIX)$(1)$$(LIB_SUFFIX):$$($(1)_OBJSNAME) $$($(1)_RESS) $$(LIB_PREFIX)$(1)$$(LIB_SUFFIX):$$($(1)_DEPLIBS) +ifneq ($$($(1)_API),) +$$(LIB_PREFIX)$(1)$$(LIB_SUFFIX): API_CPPFLAGS += -DBUILDING_$$($(1)_API)_API +endif + ifeq ($$(SHARED_LIBRARIES),YES) ifdef SHRLIB_SUFFIX $$(SHRLIB_PREFIX)$(1)$$(SHRLIB_SUFFIX):$$($(1)_OBJSNAME) $$($(1)_RESS) $$(SHRLIB_PREFIX)$(1)$$(SHRLIB_SUFFIX):$$($(1)_DEPLIBS) $$(SHRLIB_PREFIX)$(1)$$(SHRLIB_SUFFIX):$$($(1)_DLL_DEPLIBS) + +ifneq ($$($(1)_API),) +$$(SHRLIB_PREFIX)$(1)$$(SHRLIB_SUFFIX): API_CPPFLAGS += -DBUILDING_$$($(1)_API)_API +endif endif endif @@ -141,6 +149,11 @@ $(1)_DLL_DEPLIBS=$$(foreach lib, $$($(1)_DLL_LIBS),\ $$(LOADABLE_SHRLIB_PREFIX)$(1)$$(LOADABLE_SHRLIB_SUFFIX):$$($(1)_OBJSNAME) $$($(1)_RESS) $$(LOADABLE_SHRLIB_PREFIX)$(1)$$(LOADABLE_SHRLIB_SUFFIX):$$($(1)_DEPLIBS) $$(LOADABLE_SHRLIB_PREFIX)$(1)$$(LOADABLE_SHRLIB_SUFFIX):$$($(1)_DLL_DEPLIBS) + +ifneq ($$($(1)_API),) +$$(LOADABLE_SHRLIB_PREFIX)$(1)$$(LOADABLE_SHRLIB_SUFFIX): \ + API_CPPFLAGS += -DBUILDING_$$($(1)_API)_API +endif endef $(foreach target, $(LOADABLE_LIBRARY), \ From 0cf38bfb29eaf557fb0a28410337eceeb2ce740a Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sat, 7 Mar 2020 01:32:36 -0600 Subject: [PATCH 03/11] Try out a representative sample of APIs from multiple libraries --- modules/ca/src/client/Makefile | 3 + modules/ca/src/client/access.cpp | 35 ++--- modules/ca/src/client/ca_client_context.cpp | 4 +- modules/ca/src/client/cacIO.h | 22 ++-- modules/ca/src/client/cadef.h | 135 ++++++++++---------- modules/ca/src/client/caerr.h | 6 +- modules/ca/src/client/db_access.h | 26 ++-- modules/database/src/ioc/Makefile | 3 + modules/database/src/ioc/db/dbChannel.h | 38 +++--- modules/database/src/ioc/db/dbJLink.c | 6 +- modules/database/src/ioc/db/dbJLink.h | 16 +-- modules/database/src/std/Makefile | 3 + modules/libcom/src/Makefile | 4 + modules/libcom/src/yajl/yajl.c | 1 - modules/libcom/src/yajl/yajl_alloc.c | 1 - modules/libcom/src/yajl/yajl_buf.c | 1 - modules/libcom/src/yajl/yajl_common.h | 4 +- modules/libcom/src/yajl/yajl_encode.c | 1 - modules/libcom/src/yajl/yajl_gen.c | 1 - modules/libcom/src/yajl/yajl_lex.c | 1 - modules/libcom/src/yajl/yajl_parser.c | 1 - 21 files changed, 157 insertions(+), 155 deletions(-) diff --git a/modules/ca/src/client/Makefile b/modules/ca/src/client/Makefile index fa7d0916f..57d113e6b 100644 --- a/modules/ca/src/client/Makefile +++ b/modules/ca/src/client/Makefile @@ -73,6 +73,9 @@ LIBSRCS += comBuf.cpp LIBSRCS += hostNameCache.cpp LIBSRCS += msgForMultiplyDefinedPV.cpp +API_HEADER = libCaAPI.h +ca_API = libCa + LIBRARY=ca ca_RCS = ca.rc diff --git a/modules/ca/src/client/access.cpp b/modules/ca/src/client/access.cpp index a36899c02..b39406014 100644 --- a/modules/ca/src/client/access.cpp +++ b/modules/ca/src/client/access.cpp @@ -785,8 +785,7 @@ void epicsShareAPI ca_self_test () pcac->selfTest (); } -// extern "C" -epicsShareDef const int epicsTypeToDBR_XXXX [lastEpicsType+1] = { +const int epicsTypeToDBR_XXXX [lastEpicsType+1] = { DBR_SHORT, /* forces conversion fronm uint8 to int16 */ DBR_CHAR, DBR_SHORT, @@ -800,8 +799,7 @@ epicsShareDef const int epicsTypeToDBR_XXXX [lastEpicsType+1] = { DBR_STRING }; -// extern "C" -epicsShareDef const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = { +const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = { epicsOldStringT, epicsInt16T, epicsFloat32T, @@ -848,8 +846,7 @@ epicsShareDef const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = { epicsOldStringT }; -// extern "C" -epicsShareDef const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = { +const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = { sizeof(dbr_string_t), /* string max size */ sizeof(dbr_short_t), /* short */ sizeof(dbr_float_t), /* IEEE Float */ @@ -898,8 +895,7 @@ epicsShareDef const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = { sizeof(dbr_string_t), /* string max size */ }; -// extern "C" -epicsShareDef const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = { +const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = { sizeof(dbr_string_t), /* string max size */ sizeof(dbr_short_t), /* short */ sizeof(dbr_float_t), /* IEEE Float */ @@ -949,7 +945,7 @@ epicsShareDef const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = { }; //extern "C" -epicsShareDef const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = { +const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = { dbr_class_string, /* string max size */ dbr_class_int, /* short */ dbr_class_float, /* IEEE Float */ @@ -995,8 +991,7 @@ epicsShareDef const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = { dbr_class_string, /* string max size */ }; -// extern "C" -epicsShareDef const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = { +const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = { 0, /* string */ 0, /* short */ 0, /* IEEE Float */ @@ -1038,8 +1033,7 @@ epicsShareDef const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = { 0, /* string */ }; -// extern "C" -epicsShareDef const char *dbf_text[LAST_TYPE+3] = { +const char *dbf_text[LAST_TYPE+3] = { "TYPENOTCONN", "DBF_STRING", "DBF_SHORT", @@ -1051,14 +1045,11 @@ epicsShareDef const char *dbf_text[LAST_TYPE+3] = { "DBF_NO_ACCESS" }; -// extern "C" -epicsShareDef const char *dbf_text_invalid = "DBF_invalid"; +const char *dbf_text_invalid = "DBF_invalid"; -// extern "C" -epicsShareDef const short dbf_text_dim = (sizeof dbf_text)/(sizeof (char *)); +const short dbf_text_dim = (sizeof dbf_text)/(sizeof (char *)); -// extern "C" -epicsShareDef const char *dbr_text[LAST_BUFFER_TYPE+1] = { +const char *dbr_text[LAST_BUFFER_TYPE+1] = { "DBR_STRING", "DBR_SHORT", "DBR_FLOAT", @@ -1100,8 +1091,6 @@ epicsShareDef const char *dbr_text[LAST_BUFFER_TYPE+1] = { "DBR_CLASS_NAME" }; -// extern "C" -epicsShareDef const char *dbr_text_invalid = "DBR_invalid"; +const char *dbr_text_invalid = "DBR_invalid"; -// extern "C" -epicsShareDef const short dbr_text_dim = (sizeof dbr_text) / (sizeof (char *)) + 1; +const short dbr_text_dim = (sizeof dbr_text) / (sizeof (char *)) + 1; diff --git a/modules/ca/src/client/ca_client_context.cpp b/modules/ca/src/client/ca_client_context.cpp index 3fd0512d6..011a4f105 100644 --- a/modules/ca/src/client/ca_client_context.cpp +++ b/modules/ca/src/client/ca_client_context.cpp @@ -39,7 +39,7 @@ #include "oldAccess.h" #include "cac.h" -epicsShareDef epicsThreadPrivateId caClientCallbackThreadId; +epicsThreadPrivateId caClientCallbackThreadId; static epicsThreadOnceId cacOnce = EPICS_THREAD_ONCE_INIT; @@ -741,7 +741,7 @@ void epicsShareAPI caInstallDefaultService ( cacService & service ) ca_client_context::installDefaultService ( service ); } -epicsShareFunc int epicsShareAPI ca_clear_subscription ( evid pMon ) +LIBCA_API int epicsShareAPI ca_clear_subscription ( evid pMon ) { oldChannelNotify & chan = pMon->channel (); ca_client_context & cac = chan.getClientCtx (); diff --git a/modules/ca/src/client/cacIO.h b/modules/ca/src/client/cacIO.h index 4e8af4a05..f75c18cc4 100644 --- a/modules/ca/src/client/cacIO.h +++ b/modules/ca/src/client/cacIO.h @@ -62,6 +62,8 @@ # include "shareLib.h" #endif +#include "libCaAPI.h" + class cacChannel; @@ -69,7 +71,7 @@ typedef unsigned long arrayElementCount; // 1) this should not be passing caerr.h status to the exception callback // 2) needless-to-say the data should be passed here using the new data access API -class epicsShareClass cacWriteNotify { +class LIBCA_API cacWriteNotify { public: virtual ~cacWriteNotify () = 0; virtual void completion ( epicsGuard < epicsMutex > & ) = 0; @@ -82,7 +84,7 @@ public: // 1) this should not be passing caerr.h status to the exception callback // 2) needless-to-say the data should be passed here using the new data access API -class epicsShareClass cacReadNotify { +class LIBCA_API cacReadNotify { public: virtual ~cacReadNotify () = 0; virtual void completion ( @@ -97,7 +99,7 @@ public: // 1) this should not be passing caerr.h status to the exception callback // 2) needless-to-say the data should be passed here using the new data access API -class epicsShareClass cacStateNotify { +class LIBCA_API cacStateNotify { public: virtual ~cacStateNotify () = 0; virtual void current ( @@ -131,7 +133,7 @@ private: bool f_operatorConfirmationRequest:1; }; -class epicsShareClass cacChannelNotify { +class LIBCA_API cacChannelNotify { public: virtual ~cacChannelNotify () = 0; virtual void connectNotify ( epicsGuard < epicsMutex > & ) = 0; @@ -169,7 +171,7 @@ private: // but perhaps is a bad practice that should be eliminated? If so, // then the IO should not store or use a pointer to the channel. // -class epicsShareClass cacChannel { +class LIBCA_API cacChannel { public: typedef unsigned priLev; static const priLev priorityMax; @@ -277,7 +279,7 @@ private: cacChannel & operator = ( const cacChannel & ); }; -class epicsShareClass cacContext { +class LIBCA_API cacContext { public: virtual ~cacContext (); virtual cacChannel & createChannel ( @@ -296,7 +298,7 @@ public: epicsGuard < epicsMutex > &, unsigned level ) const = 0; }; -class epicsShareClass cacContextNotify { +class LIBCA_API cacContextNotify { public: virtual ~cacContextNotify () = 0; virtual cacContext & createNetworkContext ( @@ -316,7 +318,7 @@ public: // **** Lock Hierarchy **** // callbackControl must be taken before mutualExclusion if both are held at // the same time -class epicsShareClass cacService { +class LIBCA_API cacService { public: virtual ~cacService () = 0; virtual cacContext & contextCreate ( @@ -325,9 +327,9 @@ public: cacContextNotify & ) = 0; }; -epicsShareFunc void epicsShareAPI caInstallDefaultService ( cacService & service ); +LIBCA_API void epicsShareAPI caInstallDefaultService ( cacService & service ); -epicsShareExtern epicsThreadPrivateId caClientCallbackThreadId; +LIBCA_API extern epicsThreadPrivateId caClientCallbackThreadId; inline cacChannel::cacChannel ( cacChannelNotify & notify ) : callback ( notify ) diff --git a/modules/ca/src/client/cadef.h b/modules/ca/src/client/cadef.h index e62dd7249..1b37be3f9 100644 --- a/modules/ca/src/client/cadef.h +++ b/modules/ca/src/client/cadef.h @@ -44,6 +44,7 @@ # include "shareLib.h" #endif +#include "libCaAPI.h" #include "caerr.h" #include "db_access.h" @@ -102,7 +103,7 @@ typedef struct event_handler_args { } evargs; typedef void caEventCallBackFunc (struct event_handler_args); -epicsShareFunc void epicsShareAPI ca_test_event +LIBCA_API void epicsShareAPI ca_test_event ( struct event_handler_args ); @@ -158,13 +159,13 @@ typedef unsigned CA_SYNC_GID; #define TYPENOTCONN (-1) /* the channel's native type when disconnected */ -epicsShareFunc short epicsShareAPI ca_field_type (chid chan); -epicsShareFunc unsigned long epicsShareAPI ca_element_count (chid chan); -epicsShareFunc const char * epicsShareAPI ca_name (chid chan); -epicsShareFunc void epicsShareAPI ca_set_puser (chid chan, void *puser); -epicsShareFunc void * epicsShareAPI ca_puser (chid chan); -epicsShareFunc unsigned epicsShareAPI ca_read_access (chid chan); -epicsShareFunc unsigned epicsShareAPI ca_write_access (chid chan); +LIBCA_API short epicsShareAPI ca_field_type (chid chan); +LIBCA_API unsigned long epicsShareAPI ca_element_count (chid chan); +LIBCA_API const char * epicsShareAPI ca_name (chid chan); +LIBCA_API void epicsShareAPI ca_set_puser (chid chan, void *puser); +LIBCA_API void * epicsShareAPI ca_puser (chid chan); +LIBCA_API unsigned epicsShareAPI ca_read_access (chid chan); +LIBCA_API unsigned epicsShareAPI ca_write_access (chid chan); /* * cs_ - `channel state' @@ -175,27 +176,27 @@ epicsShareFunc unsigned epicsShareAPI ca_write_access (chid chan); * cs_closed channel deleted by user */ enum channel_state {cs_never_conn, cs_prev_conn, cs_conn, cs_closed}; -epicsShareFunc enum channel_state epicsShareAPI ca_state (chid chan); +LIBCA_API enum channel_state epicsShareAPI ca_state (chid chan); /************************************************************************/ /* Perform Library Initialization */ /* */ /* Must be called once before calling any of the other routines */ /************************************************************************/ -epicsShareFunc int epicsShareAPI ca_task_initialize (void); +LIBCA_API int epicsShareAPI ca_task_initialize (void); enum ca_preemptive_callback_select { ca_disable_preemptive_callback, ca_enable_preemptive_callback }; -epicsShareFunc int epicsShareAPI +LIBCA_API int epicsShareAPI ca_context_create (enum ca_preemptive_callback_select select); -epicsShareFunc void epicsShareAPI ca_detach_context (); +LIBCA_API void epicsShareAPI ca_detach_context (); /************************************************************************/ /* Remove CA facility from your task */ /* */ /* Normally called automatically at task exit */ /************************************************************************/ -epicsShareFunc int epicsShareAPI ca_task_exit (void); -epicsShareFunc void epicsShareAPI ca_context_destroy (void); +LIBCA_API int epicsShareAPI ca_task_exit (void); +LIBCA_API void epicsShareAPI ca_context_destroy (void); typedef unsigned capri; #define CA_PRIORITY_MAX 99 @@ -218,7 +219,7 @@ typedef unsigned capri; * priority R priority level in the server 0 - 100 * pChanID RW channel id written here */ -epicsShareFunc int epicsShareAPI ca_create_channel +LIBCA_API int epicsShareAPI ca_create_channel ( const char *pChanName, caCh *pConnStateCallback, @@ -233,7 +234,7 @@ epicsShareFunc int epicsShareAPI ca_create_channel * chan R channel identifier * pfunc R address of connection call-back function */ -epicsShareFunc int epicsShareAPI ca_change_connection_event +LIBCA_API int epicsShareAPI ca_change_connection_event ( chid chan, caCh * pfunc @@ -245,7 +246,7 @@ epicsShareFunc int epicsShareAPI ca_change_connection_event * chan R channel identifier * pfunc R address of access rights call-back function */ -epicsShareFunc int epicsShareAPI ca_replace_access_rights_event ( +LIBCA_API int epicsShareAPI ca_replace_access_rights_event ( chid chan, caArh *pfunc ); @@ -260,7 +261,7 @@ epicsShareFunc int epicsShareAPI ca_replace_access_rights_event ( * call-back function */ typedef void caExceptionHandler (struct exception_handler_args); -epicsShareFunc int epicsShareAPI ca_add_exception_event +LIBCA_API int epicsShareAPI ca_add_exception_event ( caExceptionHandler *pfunc, void *pArg @@ -272,7 +273,7 @@ epicsShareFunc int epicsShareAPI ca_add_exception_event * * chanId R channel ID */ -epicsShareFunc int epicsShareAPI ca_clear_channel +LIBCA_API int epicsShareAPI ca_clear_channel ( chid chanId ); @@ -320,7 +321,7 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue) * chan R channel identifier * pValue R new channel value copied from this location */ -epicsShareFunc int epicsShareAPI ca_array_put +LIBCA_API int epicsShareAPI ca_array_put ( chtype type, unsigned long count, @@ -345,7 +346,7 @@ epicsShareFunc int epicsShareAPI ca_array_put * pFunc R pointer to call-back function * pArg R copy of this pointer passed to pFunc */ -epicsShareFunc int epicsShareAPI ca_array_put_callback +LIBCA_API int epicsShareAPI ca_array_put_callback ( chtype type, unsigned long count, @@ -402,7 +403,7 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue)) * chan R channel identifier * pValue W channel value copied to this location */ -epicsShareFunc int epicsShareAPI ca_array_get +LIBCA_API int epicsShareAPI ca_array_get ( chtype type, unsigned long count, @@ -461,7 +462,7 @@ ca_array_get_callback (type, 1u, chan, pFunc, pArg) * pFunc R pointer to call-back function * pArg R copy of this pointer passed to pFunc */ -epicsShareFunc int epicsShareAPI ca_array_get_callback +LIBCA_API int epicsShareAPI ca_array_get_callback ( chtype type, unsigned long count, @@ -491,7 +492,7 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback * pArg R copy of this pointer passed to pFunc * pEventID W event id written at specified address */ -epicsShareFunc int epicsShareAPI ca_create_subscription +LIBCA_API int epicsShareAPI ca_create_subscription ( chtype type, unsigned long count, @@ -512,12 +513,12 @@ epicsShareFunc int epicsShareAPI ca_create_subscription * * eventID R event id */ -epicsShareFunc int epicsShareAPI ca_clear_subscription +LIBCA_API int epicsShareAPI ca_clear_subscription ( evid eventID ); -epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id ); +LIBCA_API chid epicsShareAPI ca_evid_to_chid ( evid id ); /************************************************************************/ @@ -571,7 +572,7 @@ epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id ); * * timeOut R wait for this delay in seconds */ -epicsShareFunc int epicsShareAPI ca_pend_event (ca_real timeOut); +LIBCA_API int epicsShareAPI ca_pend_event (ca_real timeOut); #define ca_poll() ca_pend_event(1e-12) /* @@ -581,10 +582,10 @@ epicsShareFunc int epicsShareAPI ca_pend_event (ca_real timeOut); * if all get requests (or search requests with null * connection handler pointer have completed) */ -epicsShareFunc int epicsShareAPI ca_pend_io (ca_real timeOut); +LIBCA_API int epicsShareAPI ca_pend_io (ca_real timeOut); /* calls ca_pend_io() if early is true otherwise ca_pend_event() is called */ -epicsShareFunc int epicsShareAPI ca_pend (ca_real timeout, int early); +LIBCA_API int epicsShareAPI ca_pend (ca_real timeout, int early); /* * ca_test_io() @@ -592,7 +593,7 @@ epicsShareFunc int epicsShareAPI ca_pend (ca_real timeout, int early); * returns TRUE when get requests (or search requests with null * connection handler pointer) are outstanding */ -epicsShareFunc int epicsShareAPI ca_test_io (void); +LIBCA_API int epicsShareAPI ca_test_io (void); /************************************************************************/ /* Send out all outstanding messages in the send queue */ @@ -600,7 +601,7 @@ epicsShareFunc int epicsShareAPI ca_test_io (void); /* * ca_flush_io() */ -epicsShareFunc int epicsShareAPI ca_flush_io (void); +LIBCA_API int epicsShareAPI ca_flush_io (void); /* @@ -609,7 +610,7 @@ epicsShareFunc int epicsShareAPI ca_flush_io (void); * errorCode R status returned from channel access function * pCtxStr R context string included with error print out */ -epicsShareFunc void epicsShareAPI ca_signal +LIBCA_API void epicsShareAPI ca_signal ( long errorCode, const char *pCtxStr @@ -623,7 +624,7 @@ epicsShareFunc void epicsShareAPI ca_signal * lineNo R line number included with error print out * */ -epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno +LIBCA_API void epicsShareAPI ca_signal_with_file_and_lineno ( long errorCode, const char *pCtxStr, @@ -639,7 +640,7 @@ epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno * pFormat R printf dtyle format string (and optional arguments) * */ -epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm, +LIBCA_API void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm, int lineno, const char *pFormat, ...); /* @@ -649,9 +650,9 @@ epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char * * !!!! this function is _not_ thread safe !!!! */ -epicsShareFunc const char * epicsShareAPI ca_host_name (chid channel); +LIBCA_API const char * epicsShareAPI ca_host_name (chid channel); /* thread safe version */ -epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan, +LIBCA_API unsigned epicsShareAPI ca_get_host_name ( chid pChan, char *pBuf, unsigned bufLength ); /* @@ -674,7 +675,7 @@ typedef void CAFDHANDLER (void *parg, int fd, int opened); * when an fd is created or deleted * pArg R argument passed to above function */ -epicsShareFunc int epicsShareAPI ca_add_fd_registration +LIBCA_API int epicsShareAPI ca_add_fd_registration ( CAFDHANDLER *pHandler, void *pArg @@ -698,7 +699,7 @@ epicsShareFunc int epicsShareAPI ca_add_fd_registration * * pgid W pointer to sync group id that will be written */ -epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); +LIBCA_API int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); /* * ca_sg_delete() @@ -707,7 +708,7 @@ epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); * * gid R sync group id */ -epicsShareFunc int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); +LIBCA_API int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); /* * ca_sg_block() @@ -718,7 +719,7 @@ epicsShareFunc int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); * timeout R wait for this duration prior to timing out * and returning ECA_TIMEOUT */ -epicsShareFunc int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real timeout); +LIBCA_API int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real timeout); /* * ca_sg_test() @@ -729,14 +730,14 @@ epicsShareFunc int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real tim * * returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE */ -epicsShareFunc int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid); +LIBCA_API int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid); /* * ca_sg_reset * * gid R sync group id */ -epicsShareFunc int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid); +LIBCA_API int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid); /* * ca_sg_array_get() @@ -750,7 +751,7 @@ epicsShareFunc int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid); * chan R channel identifier * pValue W channel value copied to this location */ -epicsShareFunc int epicsShareAPI ca_sg_array_get +LIBCA_API int epicsShareAPI ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, @@ -774,7 +775,7 @@ ca_sg_array_get (gid, type, 1u, chan, pValue) * chan R channel identifier * pValue R new channel value copied from this location */ -epicsShareFunc int epicsShareAPI ca_sg_array_put +LIBCA_API int epicsShareAPI ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, @@ -793,9 +794,9 @@ ca_sg_array_put (gid, type, 1u, chan, pValue) * * gid R sync group id */ -epicsShareFunc int epicsShareAPI ca_sg_stat (CA_SYNC_GID gid); +LIBCA_API int epicsShareAPI ca_sg_stat (CA_SYNC_GID gid); -epicsShareFunc void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, const void * pbuffer); +LIBCA_API void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, const void * pbuffer); /* @@ -808,14 +809,14 @@ epicsShareFunc void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, cons * * (returns true or false) */ -epicsShareFunc int epicsShareAPI ca_v42_ok (chid chan); +LIBCA_API int epicsShareAPI ca_v42_ok (chid chan); /* * ca_version() * * returns the CA version string */ -epicsShareFunc const char * epicsShareAPI ca_version (void); +LIBCA_API const char * epicsShareAPI ca_version (void); /* * ca_replace_printf_handler () @@ -830,7 +831,7 @@ epicsShareFunc const char * epicsShareAPI ca_version (void); */ #ifndef CA_DONT_INCLUDE_STDARGH typedef int caPrintfFunc (const char *pformat, va_list args); -epicsShareFunc int epicsShareAPI ca_replace_printf_handler ( +LIBCA_API int epicsShareAPI ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ); #endif /*CA_DONT_INCLUDE_STDARGH*/ @@ -838,24 +839,24 @@ epicsShareFunc int epicsShareAPI ca_replace_printf_handler ( /* * (for testing purposes only) */ -epicsShareFunc unsigned epicsShareAPI ca_get_ioc_connection_count (void); -epicsShareFunc int epicsShareAPI ca_preemtive_callback_is_enabled (void); -epicsShareFunc void epicsShareAPI ca_self_test (void); -epicsShareFunc unsigned epicsShareAPI ca_beacon_anomaly_count (void); -epicsShareFunc unsigned epicsShareAPI ca_search_attempts (chid chan); -epicsShareFunc double epicsShareAPI ca_beacon_period (chid chan); -epicsShareFunc double epicsShareAPI ca_receive_watchdog_delay (chid chan); +LIBCA_API unsigned epicsShareAPI ca_get_ioc_connection_count (void); +LIBCA_API int epicsShareAPI ca_preemtive_callback_is_enabled (void); +LIBCA_API void epicsShareAPI ca_self_test (void); +LIBCA_API unsigned epicsShareAPI ca_beacon_anomaly_count (void); +LIBCA_API unsigned epicsShareAPI ca_search_attempts (chid chan); +LIBCA_API double epicsShareAPI ca_beacon_period (chid chan); +LIBCA_API double epicsShareAPI ca_receive_watchdog_delay (chid chan); /* * used when an auxillary thread needs to join a CA client context started * by another thread */ -epicsShareFunc struct ca_client_context * epicsShareAPI ca_current_context (); -epicsShareFunc int epicsShareAPI ca_attach_context ( struct ca_client_context * context ); +LIBCA_API struct ca_client_context * epicsShareAPI ca_current_context (); +LIBCA_API int epicsShareAPI ca_attach_context ( struct ca_client_context * context ); -epicsShareFunc int epicsShareAPI ca_client_status ( unsigned level ); -epicsShareFunc int epicsShareAPI ca_context_status ( struct ca_client_context *, unsigned level ); +LIBCA_API int epicsShareAPI ca_client_status ( unsigned level ); +LIBCA_API int epicsShareAPI ca_context_status ( struct ca_client_context *, unsigned level ); /* * deprecated @@ -864,16 +865,16 @@ epicsShareFunc int epicsShareAPI ca_context_status ( struct ca_client_context *, ca_build_and_connect(NAME, XXXXX, 1, CHIDPTR, YYYYY, 0, 0) #define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\ ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0) -epicsShareFunc int epicsShareAPI ca_build_and_connect +LIBCA_API int epicsShareAPI ca_build_and_connect ( const char *pChanName, chtype, unsigned long, chid * pChanID, void *, caCh * pFunc, void * pArg ); #define ca_search(pChanName, pChanID)\ ca_search_and_connect (pChanName, pChanID, 0, 0) -epicsShareFunc int epicsShareAPI ca_search_and_connect +LIBCA_API int epicsShareAPI ca_search_and_connect ( const char * pChanName, chid * pChanID, caCh *pFunc, void * pArg ); -epicsShareFunc int epicsShareAPI ca_channel_status (epicsThreadId tid); -epicsShareFunc int epicsShareAPI ca_clear_event ( evid eventID ); +LIBCA_API int epicsShareAPI ca_channel_status (epicsThreadId tid); +LIBCA_API int epicsShareAPI ca_clear_event ( evid eventID ); #define ca_add_event(type,chan,pFunc,pArg,pEventID)\ ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID) #define ca_add_delta_event(TYPE,CHID,ENTRY,ARG,DELTA,EVID)\ @@ -882,7 +883,7 @@ ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID) ca_add_array_event(TYPE,1,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID) #define ca_add_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)\ ca_add_masked_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID, DBE_VALUE | DBE_ALARM) -epicsShareFunc int epicsShareAPI ca_add_masked_array_event +LIBCA_API int epicsShareAPI ca_add_masked_array_event ( chtype type, unsigned long count, chid chanId, caEventCallBackFunc * pFunc, void * pArg, ca_real p_delta, ca_real n_delta, ca_real timeout, evid * pEventID, long mask ); @@ -890,8 +891,8 @@ epicsShareFunc int epicsShareAPI ca_add_masked_array_event /* * defunct */ -epicsShareFunc int epicsShareAPI ca_modify_user_name ( const char *pUserName ); -epicsShareFunc int epicsShareAPI ca_modify_host_name ( const char *pHostName ); +LIBCA_API int epicsShareAPI ca_modify_user_name ( const char *pUserName ); +LIBCA_API int epicsShareAPI ca_modify_host_name ( const char *pHostName ); #ifdef __cplusplus } diff --git a/modules/ca/src/client/caerr.h b/modules/ca/src/client/caerr.h index 53930962d..4c0b36835 100644 --- a/modules/ca/src/client/caerr.h +++ b/modules/ca/src/client/caerr.h @@ -35,6 +35,8 @@ # include "shareLib.h" #endif +#include "libCaAPI.h" + /* CA Status Code Definitions */ #define CA_K_INFO 3 /* successful */ @@ -149,9 +151,9 @@ extern "C" { #endif -epicsShareFunc const char * epicsShareAPI ca_message(long ca_status); +LIBCA_API const char * epicsShareAPI ca_message(long ca_status); -epicsShareExtern const char * ca_message_text []; +LIBCA_API extern const char * ca_message_text []; #ifdef __cplusplus } diff --git a/modules/ca/src/client/db_access.h b/modules/ca/src/client/db_access.h index 92aa5d011..5ad565863 100644 --- a/modules/ca/src/client/db_access.h +++ b/modules/ca/src/client/db_access.h @@ -30,6 +30,8 @@ # include "shareLib.h" #endif +#include "libCaAPI.h" + #ifdef __cplusplus extern "C" { @@ -128,12 +130,12 @@ typedef epicsOldString dbr_class_name_t; * of type DBR types. In some cases we select the a * larger type to avoid loss of information */ -epicsShareExtern const int epicsTypeToDBR_XXXX [lastEpicsType+1]; +LIBCA_API extern const int epicsTypeToDBR_XXXX [lastEpicsType+1]; /* * The DBR_XXXX types are indicies into this array */ -epicsShareExtern const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1]; +LIBCA_API extern const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1]; /* values returned for each field type * DBR_STRING returns a NULL terminated string @@ -528,10 +530,10 @@ struct dbr_ctrl_double{ ((unsigned)((COUNT)<=0?dbr_size[TYPE]:dbr_size[TYPE]+((COUNT)-1)*dbr_value_size[TYPE])) /* size for each type - array indexed by the DBR_ type code */ -epicsShareExtern const unsigned short dbr_size[]; +LIBCA_API extern const unsigned short dbr_size[]; /* size for each type's value - array indexed by the DBR_ type code */ -epicsShareExtern const unsigned short dbr_value_size[]; +LIBCA_API extern const unsigned short dbr_value_size[]; #ifndef db_accessHFORdb_accessC /* class for each type's value */ @@ -541,7 +543,7 @@ enum dbr_value_class { dbr_class_string, dbr_class_max}; -epicsShareExtern const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1]; +LIBCA_API extern const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1]; /* * ptr to value given a pointer to the structure and the DBR type @@ -555,7 +557,7 @@ epicsShareExtern const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1]; #define dbr_value_ptr_from_structure(PDBR, STRUCTURE)\ ((void *)(((char *)PDBR)+BYTE_OS(STRUCTURE, value))) -epicsShareExtern const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1]; +LIBCA_API extern const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1]; /* union for each fetch buffers */ @@ -724,13 +726,13 @@ union db_access_val{ (type) + 4*(dbf_text_dim-2) : -1 ) -epicsShareExtern const char *dbf_text[LAST_TYPE+3]; -epicsShareExtern const short dbf_text_dim; -epicsShareExtern const char *dbf_text_invalid; +LIBCA_API extern const char *dbf_text[LAST_TYPE+3]; +LIBCA_API extern const short dbf_text_dim; +LIBCA_API extern const char *dbf_text_invalid; -epicsShareExtern const char *dbr_text[LAST_BUFFER_TYPE+1]; -epicsShareExtern const short dbr_text_dim; -epicsShareExtern const char *dbr_text_invalid; +LIBCA_API extern const char *dbr_text[LAST_BUFFER_TYPE+1]; +LIBCA_API extern const short dbr_text_dim; +LIBCA_API extern const char *dbr_text_invalid; #endif /*db_accessHFORdb_accessC*/ #ifdef __cplusplus diff --git a/modules/database/src/ioc/Makefile b/modules/database/src/ioc/Makefile index 70b1b5558..23c9c02b6 100644 --- a/modules/database/src/ioc/Makefile +++ b/modules/database/src/ioc/Makefile @@ -15,6 +15,9 @@ USR_CPPFLAGS += -DUSE_TYPED_RSET SHRLIB_VERSION = 3.17.0 +API_HEADER = dbCoreAPI.h +dbCore_API = dbCore + LIBRARY_IOC += dbCore dbCore_LIBS += ca Com dbCore_SYS_LIBS_WIN32 += ws2_32 diff --git a/modules/database/src/ioc/db/dbChannel.h b/modules/database/src/ioc/db/dbChannel.h index fab9c6627..e30270a1c 100644 --- a/modules/database/src/ioc/db/dbChannel.h +++ b/modules/database/src/ioc/db/dbChannel.h @@ -21,9 +21,9 @@ #include "ellLib.h" #include "epicsTypes.h" #include "errMdef.h" -#include "shareLib.h" #include "db_field_log.h" #include "dbEvent.h" +#include "dbCoreAPI.h" #ifdef __cplusplus extern "C" { @@ -148,14 +148,14 @@ struct chFilter { struct dbCommon; struct dbFldDes; -epicsShareFunc void dbChannelInit (void); -epicsShareFunc void dbChannelExit(void); -epicsShareFunc long dbChannelTest(const char *name); -epicsShareFunc dbChannel * dbChannelCreate(const char *name); -epicsShareFunc long dbChannelOpen(dbChannel *chan); +DBCORE_API void dbChannelInit (void); +DBCORE_API void dbChannelExit(void); +DBCORE_API long dbChannelTest(const char *name); +DBCORE_API dbChannel * dbChannelCreate(const char *name); +DBCORE_API long dbChannelOpen(dbChannel *chan); /*Following is also defined in db_convert.h*/ -epicsShareExtern unsigned short dbDBRnewToDBRold[]; +DBCORE_API extern unsigned short dbDBRnewToDBRold[]; /* In the following macros pChan is dbChannel* */ @@ -206,25 +206,25 @@ epicsShareExtern unsigned short dbDBRnewToDBRold[]; #define dbChannelField(pChan) ((pChan)->addr.pfield) -epicsShareFunc long dbChannelGet(dbChannel *chan, short type, +DBCORE_API long dbChannelGet(dbChannel *chan, short type, void *pbuffer, long *options, long *nRequest, void *pfl); -epicsShareFunc long dbChannelGetField(dbChannel *chan, short type, +DBCORE_API long dbChannelGetField(dbChannel *chan, short type, void *pbuffer, long *options, long *nRequest, void *pfl); -epicsShareFunc long dbChannelPut(dbChannel *chan, short type, +DBCORE_API long dbChannelPut(dbChannel *chan, short type, const void *pbuffer, long nRequest); -epicsShareFunc long dbChannelPutField(dbChannel *chan, short type, +DBCORE_API long dbChannelPutField(dbChannel *chan, short type, const void *pbuffer, long nRequest); -epicsShareFunc void dbChannelShow(dbChannel *chan, int level, +DBCORE_API void dbChannelShow(dbChannel *chan, int level, const unsigned short indent); -epicsShareFunc void dbChannelFilterShow(dbChannel *chan, int level, +DBCORE_API void dbChannelFilterShow(dbChannel *chan, int level, const unsigned short indent); -epicsShareFunc void dbChannelDelete(dbChannel *chan); +DBCORE_API void dbChannelDelete(dbChannel *chan); -epicsShareFunc void dbRegisterFilter(const char *key, const chFilterIf *fif, void *puser); -epicsShareFunc db_field_log* dbChannelRunPreChain(dbChannel *chan, db_field_log *pLogIn); -epicsShareFunc db_field_log* dbChannelRunPostChain(dbChannel *chan, db_field_log *pLogIn); -epicsShareFunc const chFilterPlugin * dbFindFilter(const char *key, size_t len); -epicsShareFunc void dbChannelMakeArrayCopy(void *pvt, db_field_log *pfl, dbChannel *chan); +DBCORE_API void dbRegisterFilter(const char *key, const chFilterIf *fif, void *puser); +DBCORE_API db_field_log* dbChannelRunPreChain(dbChannel *chan, db_field_log *pLogIn); +DBCORE_API db_field_log* dbChannelRunPostChain(dbChannel *chan, db_field_log *pLogIn); +DBCORE_API const chFilterPlugin * dbFindFilter(const char *key, size_t len); +DBCORE_API void dbChannelMakeArrayCopy(void *pvt, db_field_log *pfl, dbChannel *chan); #ifdef __cplusplus } diff --git a/modules/database/src/ioc/db/dbJLink.c b/modules/database/src/ioc/db/dbJLink.c index 3acf75660..7f8b41216 100644 --- a/modules/database/src/ioc/db/dbJLink.c +++ b/modules/database/src/ioc/db/dbJLink.c @@ -27,7 +27,7 @@ #include "link.h" #include "epicsExport.h" -epicsShareDef int dbJLinkDebug = 0; +int dbJLinkDebug = 0; epicsExportAddress(int, dbJLinkDebug); #define IFDEBUG(n) if (dbJLinkDebug >= (n)) @@ -39,12 +39,12 @@ typedef struct parseContext { short jsonDepth; } parseContext; -epicsShareDef const char *jlif_result_name[2] = { +const char *jlif_result_name[2] = { "jlif_stop", "jlif_continue", }; -epicsShareDef const char *jlif_key_result_name[5] = { +const char *jlif_key_result_name[5] = { "jlif_key_stop", "jlif_key_continue", "jlif_key_child_inlink", diff --git a/modules/database/src/ioc/db/dbJLink.h b/modules/database/src/ioc/db/dbJLink.h index bd1a6c8a2..fdd4def3e 100644 --- a/modules/database/src/ioc/db/dbJLink.h +++ b/modules/database/src/ioc/db/dbJLink.h @@ -10,7 +10,7 @@ #define INC_dbJLink_H #include -#include +#include #ifdef __cplusplus extern "C" { @@ -124,18 +124,18 @@ typedef struct jlif { */ } jlif; -epicsShareFunc long dbJLinkParse(const char *json, size_t len, short dbfType, +DBCORE_API long dbJLinkParse(const char *json, size_t len, short dbfType, jlink **ppjlink); -epicsShareFunc long dbJLinkInit(struct link *plink); +DBCORE_API long dbJLinkInit(struct link *plink); -epicsShareFunc void dbJLinkFree(jlink *); -epicsShareFunc void dbJLinkReport(jlink *, int level, int indent); +DBCORE_API void dbJLinkFree(jlink *); +DBCORE_API void dbJLinkReport(jlink *, int level, int indent); -epicsShareFunc long dbJLinkMapChildren(struct link *, +DBCORE_API long dbJLinkMapChildren(struct link *, jlink_map_fn rtn, void *ctx); -epicsShareFunc long dbjlr(const char *recname, int level); -epicsShareFunc long dbJLinkMapAll(char *recname, jlink_map_fn rtn, void *ctx); +DBCORE_API long dbjlr(const char *recname, int level); +DBCORE_API long dbJLinkMapAll(char *recname, jlink_map_fn rtn, void *ctx); #ifdef __cplusplus } diff --git a/modules/database/src/std/Makefile b/modules/database/src/std/Makefile index d8eb39bdb..b037b41fb 100644 --- a/modules/database/src/std/Makefile +++ b/modules/database/src/std/Makefile @@ -15,6 +15,9 @@ USR_CPPFLAGS += -DUSE_TYPED_RSET SHRLIB_VERSION = 3.17.0 +API_HEADER = dbRecStdAPI.h +dbRecStd_API = dbRecStd + LIBRARY_IOC += dbRecStd dbRecStd_LIBS = dbCore ca Com diff --git a/modules/libcom/src/Makefile b/modules/libcom/src/Makefile index 57533bafe..f90fde6a6 100644 --- a/modules/libcom/src/Makefile +++ b/modules/libcom/src/Makefile @@ -45,6 +45,10 @@ include $(LIBCOM)/timer/Makefile include $(LIBCOM)/yacc/Makefile include $(LIBCOM)/yajl/Makefile +# Generate library API header file +API_HEADER = libComAPI.h +Com_API = libCom + # Library to build: LIBRARY=Com diff --git a/modules/libcom/src/yajl/yajl.c b/modules/libcom/src/yajl/yajl.c index 6c4977598..02ca188ac 100644 --- a/modules/libcom/src/yajl/yajl.c +++ b/modules/libcom/src/yajl/yajl.c @@ -19,7 +19,6 @@ #include #include -#define epicsExportSharedSymbols #include "yajl_parse.h" #include "yajl_lex.h" #include "yajl_parser.h" diff --git a/modules/libcom/src/yajl/yajl_alloc.c b/modules/libcom/src/yajl/yajl_alloc.c index 5b2601685..2388814be 100644 --- a/modules/libcom/src/yajl/yajl_alloc.c +++ b/modules/libcom/src/yajl/yajl_alloc.c @@ -22,7 +22,6 @@ #include -#define epicsExportSharedSymbols #include "yajl_alloc.h" static void * yajl_internal_malloc(void *ctx, size_t sz) diff --git a/modules/libcom/src/yajl/yajl_buf.c b/modules/libcom/src/yajl/yajl_buf.c index 0f9c28046..182db7257 100644 --- a/modules/libcom/src/yajl/yajl_buf.c +++ b/modules/libcom/src/yajl/yajl_buf.c @@ -18,7 +18,6 @@ #include #include -#define epicsExportSharedSymbols #include "yajl_buf.h" #define YAJL_BUF_INIT_SIZE 2048 diff --git a/modules/libcom/src/yajl/yajl_common.h b/modules/libcom/src/yajl/yajl_common.h index 4bc63eead..8bf0b44c6 100644 --- a/modules/libcom/src/yajl/yajl_common.h +++ b/modules/libcom/src/yajl/yajl_common.h @@ -18,7 +18,7 @@ #define __YAJL_COMMON_H__ #include -#include +#include #include @@ -42,7 +42,7 @@ extern "C" { #define YAJL_MAX_DEPTH 128 -#define YAJL_API epicsShareFunc +#define YAJL_API LIBCOM_API /** pointer to a malloc function, supporting client overriding memory * allocation routines */ diff --git a/modules/libcom/src/yajl/yajl_encode.c b/modules/libcom/src/yajl/yajl_encode.c index 980021ee5..0aa06a3d6 100644 --- a/modules/libcom/src/yajl/yajl_encode.c +++ b/modules/libcom/src/yajl/yajl_encode.c @@ -19,7 +19,6 @@ #include #include -#define epicsExportSharedSymbols #include "yajl_encode.h" static void CharToHex(unsigned char c, char * hexBuf) diff --git a/modules/libcom/src/yajl/yajl_gen.c b/modules/libcom/src/yajl/yajl_gen.c index 7f669247d..0727e9fc1 100644 --- a/modules/libcom/src/yajl/yajl_gen.c +++ b/modules/libcom/src/yajl/yajl_gen.c @@ -19,7 +19,6 @@ #include #include -#define epicsExportSharedSymbols #include "epicsMath.h" #include "yajl_gen.h" #include "yajl_buf.h" diff --git a/modules/libcom/src/yajl/yajl_lex.c b/modules/libcom/src/yajl/yajl_lex.c index 0159cfa55..b911da678 100644 --- a/modules/libcom/src/yajl/yajl_lex.c +++ b/modules/libcom/src/yajl/yajl_lex.c @@ -19,7 +19,6 @@ #include #include -#define epicsExportSharedSymbols #include "yajl_lex.h" #include "yajl_buf.h" diff --git a/modules/libcom/src/yajl/yajl_parser.c b/modules/libcom/src/yajl/yajl_parser.c index 7e4da6924..cb910f79d 100644 --- a/modules/libcom/src/yajl/yajl_parser.c +++ b/modules/libcom/src/yajl/yajl_parser.c @@ -23,7 +23,6 @@ #include #include -#define epicsExportSharedSymbols #include "yajl_parse.h" #include "yajl_lex.h" #include "yajl_parser.h" From 18402f035419d98ceaddbed9ab00bf48acb5165f Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 9 Mar 2020 23:53:22 -0500 Subject: [PATCH 04/11] Convert modules/ca to use LIBCA_API instead of epicsShare Also unified the header exclusion guard names, removed a couple of files that are no longer used, dropped the '3.13.7' from the Copyright header. --- modules/ca/src/client/CASG.cpp | 1 - modules/ca/src/client/SearchDest.h | 8 +- modules/ca/src/client/access.cpp | 4 +- modules/ca/src/client/addrList.h | 22 ++-- modules/ca/src/client/autoPtrFreeList.h | 20 +--- modules/ca/src/client/baseNMIU.cpp | 5 +- modules/ca/src/client/bhe.cpp | 6 +- modules/ca/src/client/bhe.h | 54 ++++------ modules/ca/src/client/caConnTest.cpp | 5 +- modules/ca/src/client/caConnTestMain.cpp | 5 +- modules/ca/src/client/caDiagnostics.h | 11 +- modules/ca/src/client/caEventRate.cpp | 5 +- modules/ca/src/client/caEventRateMain.cpp | 5 +- modules/ca/src/client/caProto.h | 11 +- modules/ca/src/client/caRepeater.cpp | 5 +- modules/ca/src/client/caServerID.h | 13 +-- modules/ca/src/client/caVersion.h | 14 +-- modules/ca/src/client/caVersionNum.h@ | 2 +- modules/ca/src/client/ca_client_context.cpp | 1 - modules/ca/src/client/cac.cpp | 1 - modules/ca/src/client/cac.h | 17 +-- modules/ca/src/client/cacChannel.cpp | 6 +- modules/ca/src/client/cacChannelNotify.cpp | 7 +- modules/ca/src/client/cacContextNotify.cpp | 7 +- modules/ca/src/client/cacIO.h | 19 +--- modules/ca/src/client/cacReadNotify.cpp | 7 +- modules/ca/src/client/cacStateNotify.cpp | 7 +- modules/ca/src/client/cacWriteNotify.cpp | 7 +- modules/ca/src/client/cadef.h | 22 +--- modules/ca/src/client/caerr.h | 21 +--- modules/ca/src/client/casw.cpp | 5 +- modules/ca/src/client/comBuf.cpp | 5 +- modules/ca/src/client/comBuf.h | 11 +- modules/ca/src/client/comQueRecv.cpp | 5 +- modules/ca/src/client/comQueRecv.h | 11 +- modules/ca/src/client/comQueSend.cpp | 6 +- modules/ca/src/client/comQueSend.h | 13 ++- modules/ca/src/client/convert.cpp | 6 +- modules/ca/src/client/db_access.h | 33 ++---- .../ca/src/client/disconnectGovernorTimer.cpp | 6 +- .../ca/src/client/disconnectGovernorTimer.h | 22 ++-- modules/ca/src/client/getCallback.cpp | 6 +- modules/ca/src/client/getCopy.cpp | 6 +- modules/ca/src/client/hostNameCache.cpp | 5 +- modules/ca/src/client/hostNameCache.h | 20 +--- modules/ca/src/client/inetAddrID.h | 11 +- modules/ca/src/client/iocinf.cpp | 5 +- modules/ca/src/client/iocinf.h | 11 +- modules/ca/src/client/localHostName.cpp | 5 +- modules/ca/src/client/localHostName.h | 20 +--- .../ca/src/client/msgForMultiplyDefinedPV.cpp | 6 +- .../ca/src/client/msgForMultiplyDefinedPV.h | 20 +--- modules/ca/src/client/nciu.cpp | 4 +- modules/ca/src/client/nciu.h | 19 +--- modules/ca/src/client/netIO.h | 11 +- modules/ca/src/client/netReadNotifyIO.cpp | 5 +- modules/ca/src/client/netSubscription.cpp | 6 +- modules/ca/src/client/netWriteNotifyIO.cpp | 5 +- modules/ca/src/client/net_convert.h | 15 ++- modules/ca/src/client/netiiu.cpp | 5 +- modules/ca/src/client/netiiu.h | 11 +- modules/ca/src/client/noopiiu.cpp | 6 +- modules/ca/src/client/noopiiu.h | 11 +- modules/ca/src/client/oldAccess.h | 20 +--- modules/ca/src/client/oldChannelNotify.cpp | 4 +- modules/ca/src/client/oldSubscription.cpp | 6 +- modules/ca/src/client/putCallback.cpp | 6 +- modules/ca/src/client/repeater.cpp | 3 +- modules/ca/src/client/repeaterClient.h | 23 ++-- .../ca/src/client/repeaterSubscribeTimer.cpp | 7 +- .../ca/src/client/repeaterSubscribeTimer.h | 23 ++-- modules/ca/src/client/searchTimer.cpp | 6 +- modules/ca/src/client/searchTimer.h | 22 ++-- modules/ca/src/client/sgAutoPtr.h | 11 +- modules/ca/src/client/syncGroup.h | 20 +--- modules/ca/src/client/syncGroupNotify.cpp | 6 +- modules/ca/src/client/syncGroupReadNotify.cpp | 4 +- .../ca/src/client/syncGroupWriteNotify.cpp | 4 +- modules/ca/src/client/syncgrp.cpp | 4 +- modules/ca/src/client/tcpRecvThread.cpp | 11 -- modules/ca/src/client/tcpRecvWatchdog.cpp | 5 +- modules/ca/src/client/tcpRecvWatchdog.h | 21 ++-- modules/ca/src/client/tcpSendWatchdog.cpp | 5 +- modules/ca/src/client/tcpSendWatchdog.h | 22 ++-- modules/ca/src/client/tcpiiu.cpp | 3 +- modules/ca/src/client/test_event.cpp | 6 +- modules/ca/src/client/ucx.h | 102 ------------------ modules/ca/src/client/udpiiu.cpp | 3 +- modules/ca/src/client/udpiiu.h | 28 ++--- modules/ca/src/client/virtualCircuit.h | 8 +- 90 files changed, 308 insertions(+), 729 deletions(-) delete mode 100644 modules/ca/src/client/tcpRecvThread.cpp delete mode 100644 modules/ca/src/client/ucx.h diff --git a/modules/ca/src/client/CASG.cpp b/modules/ca/src/client/CASG.cpp index 4ffb414c7..bb0cc2083 100644 --- a/modules/ca/src/client/CASG.cpp +++ b/modules/ca/src/client/CASG.cpp @@ -18,7 +18,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "syncGroup.h" #include "oldAccess.h" diff --git a/modules/ca/src/client/SearchDest.h b/modules/ca/src/client/SearchDest.h index c22be7c87..cb9c3e737 100644 --- a/modules/ca/src/client/SearchDest.h +++ b/modules/ca/src/client/SearchDest.h @@ -5,11 +5,11 @@ * 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. + * in file LICENSE that is included with this distribution. \*************************************************************************/ -#ifndef SearchDest_h -#define SearchDest_h +#ifndef INC_SearchDest_H +#define INC_SearchDest_H #include #include @@ -36,4 +36,4 @@ struct SearchDest : virtual void show ( epicsGuard < epicsMutex > &, unsigned level ) const = 0; }; -#endif // SearchDest_h +#endif // ifndef INC_SearchDest_H diff --git a/modules/ca/src/client/access.cpp b/modules/ca/src/client/access.cpp index b39406014..42e25686d 100644 --- a/modules/ca/src/client/access.cpp +++ b/modules/ca/src/client/access.cpp @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -40,7 +39,6 @@ */ #define CAC_VERSION_GLOBAL -#define epicsExportSharedSymbols #include "iocinf.h" #include "oldAccess.h" #include "cac.h" diff --git a/modules/ca/src/client/addrList.h b/modules/ca/src/client/addrList.h index c06c8b2bc..c59f8e7af 100644 --- a/modules/ca/src/client/addrList.h +++ b/modules/ca/src/client/addrList.h @@ -3,38 +3,38 @@ * 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. \*************************************************************************/ -#ifndef addrListh -#define addrListh +#ifndef INC_addrList_H +#define INC_addrList_H -#include "shareLib.h" #include "envDefs.h" #include "osiSock.h" +#include "libCaAPI.h" + #ifdef __cplusplus extern "C" { #endif -epicsShareFunc void epicsShareAPI configureChannelAccessAddressList +LIBCA_API void epicsShareAPI configureChannelAccessAddressList ( struct ELLLIST *pList, SOCKET sock, unsigned short port ); -epicsShareFunc int epicsShareAPI addAddrToChannelAccessAddressList +LIBCA_API int epicsShareAPI addAddrToChannelAccessAddressList ( struct ELLLIST *pList, const ENV_PARAM *pEnv, unsigned short port, int ignoreNonDefaultPort ); -epicsShareFunc void epicsShareAPI printChannelAccessAddressList +LIBCA_API void epicsShareAPI printChannelAccessAddressList ( const struct ELLLIST *pList ); -epicsShareFunc void epicsShareAPI removeDuplicateAddresses +LIBCA_API void epicsShareAPI removeDuplicateAddresses ( struct ELLLIST *pDestList, ELLLIST *pSrcList, int silent); #ifdef __cplusplus } #endif -#endif /* ifndef addrListh */ +#endif /* ifndef INC_addrList_H */ diff --git a/modules/ca/src/client/autoPtrFreeList.h b/modules/ca/src/client/autoPtrFreeList.h index 7dc73609a..b3679c6e8 100644 --- a/modules/ca/src/client/autoPtrFreeList.h +++ b/modules/ca/src/client/autoPtrFreeList.h @@ -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. \*************************************************************************/ /* @@ -23,21 +22,12 @@ * 505 665 1831 */ -#ifndef autoPtrFreeListh -#define autoPtrFreeListh - -#ifdef epicsExportSharedSymbols -# define autoPtrFreeListh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_autoPtrFreeList_H +#define INC_autoPtrFreeList_H #include "tsFreeList.h" #include "compilerDependencies.h" -#ifdef autoPtrFreeListh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -#endif - template < class T, unsigned N = 0x400, class MUTEX = epicsMutex > class autoPtrFreeList { public: @@ -101,4 +91,4 @@ inline T * autoPtrFreeList < T, N, MUTEX >::release () return pTmp; } -#endif // #ifdef autoPtrFreeListh +#endif // #ifndef INC_autoPtrFreeList_H diff --git a/modules/ca/src/client/baseNMIU.cpp b/modules/ca/src/client/baseNMIU.cpp index 20f153b0a..226568e62 100644 --- a/modules/ca/src/client/baseNMIU.cpp +++ b/modules/ca/src/client/baseNMIU.cpp @@ -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. \*************************************************************************/ /* diff --git a/modules/ca/src/client/bhe.cpp b/modules/ca/src/client/bhe.cpp index d6f1796be..8ba679e7d 100644 --- a/modules/ca/src/client/bhe.cpp +++ b/modules/ca/src/client/bhe.cpp @@ -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. \*************************************************************************/ /* @@ -28,7 +27,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "virtualCircuit.h" #include "bhe.h" diff --git a/modules/ca/src/client/bhe.h b/modules/ca/src/client/bhe.h index 4da95202a..b503ebb42 100644 --- a/modules/ca/src/client/bhe.h +++ b/modules/ca/src/client/bhe.h @@ -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. \*************************************************************************/ /* @@ -19,24 +18,15 @@ * Author: Jeff Hill */ -#ifndef bheh -#define bheh - -#ifdef epicsExportSharedSymbols -# define bhehEpicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_bhe_H +#define INC_bhe_H #include "tsDLList.h" #include "tsFreeList.h" #include "epicsTime.h" #include "compilerDependencies.h" -#ifdef bhehEpicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - +#include "libCaAPI.h" #include "inetAddrID.h" #include "caProto.h" @@ -45,7 +35,7 @@ class bheMemoryManager; // using a pure abstract wrapper class around the free list avoids // Tornado 2.0.1 GNU compiler bugs -class epicsShareClass bheMemoryManager { +class LIBCA_API bheMemoryManager { public: virtual ~bheMemoryManager (); virtual void * allocate ( size_t ) = 0; @@ -54,24 +44,24 @@ public: class bhe : public tsSLNode < bhe >, public inetAddrID { public: - epicsShareFunc bhe ( - epicsMutex &, const epicsTime & initialTimeStamp, + LIBCA_API bhe ( + epicsMutex &, const epicsTime & initialTimeStamp, unsigned initialBeaconNumber, const inetAddrID & addr ); - epicsShareFunc ~bhe (); - epicsShareFunc bool updatePeriod ( + LIBCA_API ~bhe (); + LIBCA_API bool updatePeriod ( epicsGuard < epicsMutex > &, - const epicsTime & programBeginTime, - const epicsTime & currentTime, ca_uint32_t beaconNumber, + const epicsTime & programBeginTime, + const epicsTime & currentTime, ca_uint32_t beaconNumber, unsigned protocolRevision ); - epicsShareFunc double period ( epicsGuard < epicsMutex > & ) const; - epicsShareFunc epicsTime updateTime ( epicsGuard < epicsMutex > & ) const; - epicsShareFunc void show ( unsigned level ) const; - epicsShareFunc void show ( epicsGuard < epicsMutex > &, unsigned /* level */ ) const; - epicsShareFunc void registerIIU ( epicsGuard < epicsMutex > &, tcpiiu & ); - epicsShareFunc void unregisterIIU ( epicsGuard < epicsMutex > &, tcpiiu & ); - epicsShareFunc void * operator new ( size_t size, bheMemoryManager & ); + LIBCA_API double period ( epicsGuard < epicsMutex > & ) const; + LIBCA_API epicsTime updateTime ( epicsGuard < epicsMutex > & ) const; + LIBCA_API void show ( unsigned level ) const; + LIBCA_API void show ( epicsGuard < epicsMutex > &, unsigned /* level */ ) const; + LIBCA_API void registerIIU ( epicsGuard < epicsMutex > &, tcpiiu & ); + LIBCA_API void unregisterIIU ( epicsGuard < epicsMutex > &, tcpiiu & ); + LIBCA_API void * operator new ( size_t size, bheMemoryManager & ); #ifdef CXX_PLACEMENT_DELETE - epicsShareFunc void operator delete ( void *, bheMemoryManager & ); + LIBCA_API void operator delete ( void *, bheMemoryManager & ); #endif private: epicsTime timeStamp; @@ -87,7 +77,7 @@ private: const epicsTime & currentTime ); bhe ( const bhe & ); bhe & operator = ( const bhe & ); - epicsShareFunc void operator delete ( void * ); + LIBCA_API void operator delete ( void * ); }; // using a wrapper class around the free list avoids @@ -117,6 +107,6 @@ inline void bhe::operator delete ( void * pCadaver, } #endif -#endif // ifdef bheh +#endif // ifndef INC_bhe_H diff --git a/modules/ca/src/client/caConnTest.cpp b/modules/ca/src/client/caConnTest.cpp index 21077398a..6f6ed0d1b 100644 --- a/modules/ca/src/client/caConnTest.cpp +++ b/modules/ca/src/client/caConnTest.cpp @@ -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. \*************************************************************************/ #include diff --git a/modules/ca/src/client/caConnTestMain.cpp b/modules/ca/src/client/caConnTestMain.cpp index f3985801a..aaab0f1d2 100644 --- a/modules/ca/src/client/caConnTestMain.cpp +++ b/modules/ca/src/client/caConnTestMain.cpp @@ -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. \*************************************************************************/ #include diff --git a/modules/ca/src/client/caDiagnostics.h b/modules/ca/src/client/caDiagnostics.h index 90221e1ed..56318e764 100644 --- a/modules/ca/src/client/caDiagnostics.h +++ b/modules/ca/src/client/caDiagnostics.h @@ -3,13 +3,12 @@ * 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. \*************************************************************************/ -#ifndef caDiagnosticsh -#define caDiagnosticsh +#ifndef INC_caDiagnostics_H +#define INC_caDiagnostics_H #include "cadef.h" @@ -33,6 +32,6 @@ int acctst ( const char *pname, unsigned logggingInterestLevel, void caConnTest ( const char *pNameIn, unsigned channelCountIn, double delayIn ); -#endif /* caDiagnosticsh */ +#endif /* ifndef INC_caDiagnostics_H */ diff --git a/modules/ca/src/client/caEventRate.cpp b/modules/ca/src/client/caEventRate.cpp index 8beb16333..414464948 100644 --- a/modules/ca/src/client/caEventRate.cpp +++ b/modules/ca/src/client/caEventRate.cpp @@ -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. \*************************************************************************/ #include diff --git a/modules/ca/src/client/caEventRateMain.cpp b/modules/ca/src/client/caEventRateMain.cpp index 725e66102..f773c5de4 100644 --- a/modules/ca/src/client/caEventRateMain.cpp +++ b/modules/ca/src/client/caEventRateMain.cpp @@ -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. \*************************************************************************/ #include diff --git a/modules/ca/src/client/caProto.h b/modules/ca/src/client/caProto.h index 781c89b34..f43a848bb 100644 --- a/modules/ca/src/client/caProto.h +++ b/modules/ca/src/client/caProto.h @@ -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. \*************************************************************************/ /* * @@ -14,8 +13,8 @@ * 505 665 1831 */ -#ifndef __CAPROTO__ -#define __CAPROTO__ +#ifndef INC_caProto_H +#define INC_caProto_H #define capStrOf(A) #A #define capStrOfX(A) capStrOf ( A ) @@ -183,5 +182,5 @@ struct mon_info { */ #define unreasonablePVNameSize 500u -#endif /* __CAPROTO__ */ +#endif /* ifndef INC_caProto_H */ diff --git a/modules/ca/src/client/caRepeater.cpp b/modules/ca/src/client/caRepeater.cpp index 2561223a5..a9cefbdf7 100644 --- a/modules/ca/src/client/caRepeater.cpp +++ b/modules/ca/src/client/caRepeater.cpp @@ -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. \*************************************************************************/ /* * diff --git a/modules/ca/src/client/caServerID.h b/modules/ca/src/client/caServerID.h index 08bfdd5df..b2df7cafb 100644 --- a/modules/ca/src/client/caServerID.h +++ b/modules/ca/src/client/caServerID.h @@ -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. \*************************************************************************/ /* * @@ -18,8 +17,8 @@ * Author: Jeff Hill */ -#ifndef caServerIDh -#define caServerIDh +#ifndef INC_caServerID_H +#define INC_caServerID_H #include "osiSock.h" #include "resourceLib.h" @@ -83,6 +82,4 @@ inline unsigned caServerID::priority () const return this->pri; } -#endif // ifdef caServerID - - +#endif // ifdef INC_caServerID_H diff --git a/modules/ca/src/client/caVersion.h b/modules/ca/src/client/caVersion.h index cdae17dce..9dda32c60 100644 --- a/modules/ca/src/client/caVersion.h +++ b/modules/ca/src/client/caVersion.h @@ -5,15 +5,10 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -#ifndef CAVERSION_H -#define CAVERSION_H +#ifndef INC_caVersion_H +#define INC_caVersion_H #include -#include - -#ifndef VERSION_INT -# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) -#endif /* include generated headers with: * EPICS_CA_MAJOR_VERSION @@ -23,6 +18,7 @@ */ #include "caVersionNum.h" -#define CA_VERSION_INT VERSION_INT(EPICS_CA_MAJOR_VERSION, EPICS_CA_MINOR_VERSION, EPICS_CA_MAINTENANCE_VERSION, 0) +#define CA_VERSION_INT VERSION_INT(EPICS_CA_MAJOR_VERSION, \ + EPICS_CA_MINOR_VERSION, EPICS_CA_MAINTENANCE_VERSION, 0) -#endif // CAVERSION_H +#endif /* ifndef INC_caVersion_H */ diff --git a/modules/ca/src/client/caVersionNum.h@ b/modules/ca/src/client/caVersionNum.h@ index 26ce6e1af..dcd7518c0 100644 --- a/modules/ca/src/client/caVersionNum.h@ +++ b/modules/ca/src/client/caVersionNum.h@ @@ -1,4 +1,4 @@ -#ifndef CAVERSION_H +#ifndef INC_caVersion_H # error include caVersion.h, not this header #endif #define EPICS_CA_MAJOR_VERSION @EPICS_CA_MAJOR_VERSION@ diff --git a/modules/ca/src/client/ca_client_context.cpp b/modules/ca/src/client/ca_client_context.cpp index 011a4f105..6e5bbb88e 100644 --- a/modules/ca/src/client/ca_client_context.cpp +++ b/modules/ca/src/client/ca_client_context.cpp @@ -34,7 +34,6 @@ #include "errlog.h" #include "locationException.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "oldAccess.h" #include "cac.h" diff --git a/modules/ca/src/client/cac.cpp b/modules/ca/src/client/cac.cpp index 476d1c380..ecf67e0e5 100644 --- a/modules/ca/src/client/cac.cpp +++ b/modules/ca/src/client/cac.cpp @@ -34,7 +34,6 @@ #include "errlog.h" #include "epicsExport.h" -#define epicsExportSharedSymbols #include "addrList.h" #include "iocinf.h" #include "cac.h" diff --git a/modules/ca/src/client/cac.h b/modules/ca/src/client/cac.h index 7db5c6ddc..f59245c26 100644 --- a/modules/ca/src/client/cac.h +++ b/modules/ca/src/client/cac.h @@ -19,13 +19,8 @@ * */ -#ifndef cach -#define cach - -#ifdef epicsExportSharedSymbols -# define cach_restore_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_cac_H +#define INC_cac_H #include "compilerDependencies.h" #include "ipAddrToAsciiAsynchronous.h" @@ -35,11 +30,7 @@ #include "freeList.h" #include "localHostName.h" -#ifdef cach_restore_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - +#include "libCaAPI.h" #include "nciu.h" #include "comBuf.h" #include "bhe.h" @@ -432,4 +423,4 @@ inline double cac :: return this->connTMO; } -#endif // ifdef cach +#endif // ifndef INC_cac_H diff --git a/modules/ca/src/client/cacChannel.cpp b/modules/ca/src/client/cacChannel.cpp index c1a52a002..6a7fd287d 100644 --- a/modules/ca/src/client/cacChannel.cpp +++ b/modules/ca/src/client/cacChannel.cpp @@ -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. \*************************************************************************/ @@ -27,7 +26,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "localHostName.h" #include "cacIO.h" diff --git a/modules/ca/src/client/cacChannelNotify.cpp b/modules/ca/src/client/cacChannelNotify.cpp index 08d2cab94..67e23164c 100644 --- a/modules/ca/src/client/cacChannelNotify.cpp +++ b/modules/ca/src/client/cacChannelNotify.cpp @@ -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. \*************************************************************************/ /* * @@ -24,9 +23,7 @@ #include "iocinf.h" -#define epicsExportSharedSymbols #include "cacIO.h" -#undef epicsExportSharedSymbols cacChannelNotify::~cacChannelNotify () { diff --git a/modules/ca/src/client/cacContextNotify.cpp b/modules/ca/src/client/cacContextNotify.cpp index a4498ac04..aa8904e17 100644 --- a/modules/ca/src/client/cacContextNotify.cpp +++ b/modules/ca/src/client/cacContextNotify.cpp @@ -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. \*************************************************************************/ /* @@ -23,9 +22,7 @@ #include "iocinf.h" -#define epicsExportSharedSymbols #include "cacIO.h" -#undef epicsExportSharedSymbols cacContextNotify::~cacContextNotify () { diff --git a/modules/ca/src/client/cacIO.h b/modules/ca/src/client/cacIO.h index f75c18cc4..640b9a3c1 100644 --- a/modules/ca/src/client/cacIO.h +++ b/modules/ca/src/client/cacIO.h @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -22,8 +21,8 @@ * 505 665 1831 */ -#ifndef cacIOh -#define cacIOh +#ifndef INC_cacIO_H +#define INC_cacIO_H // // Open Issues @@ -47,21 +46,11 @@ #include #include -#ifdef epicsExportSharedSymbols -# define cacIOh_restore_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include "tsDLList.h" #include "epicsMutex.h" #include "epicsGuard.h" #include "epicsThread.h" -#ifdef cacIOh_restore_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - #include "libCaAPI.h" @@ -391,4 +380,4 @@ inline bool caAccessRights::operatorConfirmationRequest () const return this->f_operatorConfirmationRequest; } -#endif // ifndef cacIOh +#endif // ifndef INC_cacIO_H diff --git a/modules/ca/src/client/cacReadNotify.cpp b/modules/ca/src/client/cacReadNotify.cpp index 23284c8df..c8e9a5434 100644 --- a/modules/ca/src/client/cacReadNotify.cpp +++ b/modules/ca/src/client/cacReadNotify.cpp @@ -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. \*************************************************************************/ /* @@ -21,9 +20,7 @@ #include "iocinf.h" -#define epicsExportSharedSymbols #include "cacIO.h" -#undef epicsExportSharedSymbols cacReadNotify::~cacReadNotify () { diff --git a/modules/ca/src/client/cacStateNotify.cpp b/modules/ca/src/client/cacStateNotify.cpp index 08852489a..799b0dfa0 100644 --- a/modules/ca/src/client/cacStateNotify.cpp +++ b/modules/ca/src/client/cacStateNotify.cpp @@ -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. \*************************************************************************/ /* @@ -21,9 +20,7 @@ #include "iocinf.h" -#define epicsExportSharedSymbols #include "cacIO.h" -#undef epicsExportSharedSymbols cacStateNotify::~cacStateNotify () { diff --git a/modules/ca/src/client/cacWriteNotify.cpp b/modules/ca/src/client/cacWriteNotify.cpp index 13d47cd45..79b98bb66 100644 --- a/modules/ca/src/client/cacWriteNotify.cpp +++ b/modules/ca/src/client/cacWriteNotify.cpp @@ -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. \*************************************************************************/ /* @@ -21,9 +20,7 @@ #include "iocinf.h" -#define epicsExportSharedSymbols #include "cacIO.h" -#undef epicsExportSharedSymbols cacWriteNotify::~cacWriteNotify () { diff --git a/modules/ca/src/client/cadef.h b/modules/ca/src/client/cadef.h index 1b37be3f9..afa81f927 100644 --- a/modules/ca/src/client/cadef.h +++ b/modules/ca/src/client/cadef.h @@ -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. \*************************************************************************/ /* * @@ -21,8 +20,8 @@ * */ -#ifndef INCLcadefh -#define INCLcadefh +#ifndef INC_cadef_H +#define INC_cadef_H /* * done in two ifdef steps so that we will remain compatible with @@ -32,20 +31,9 @@ # include #endif -#ifdef epicsExportSharedSymbols -# define INCLcadefh_accessh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include "epicsThread.h" -#ifdef INCLcadefh_accessh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - #include "libCaAPI.h" - #include "caerr.h" #include "db_access.h" #include "caeventmask.h" @@ -901,5 +889,5 @@ LIBCA_API int epicsShareAPI ca_modify_host_name ( const char *pHostName ); /* * no additions below this endif */ -#endif /* ifndef INCLcadefh */ +#endif /* ifndef INC_cadef_H */ diff --git a/modules/ca/src/client/caerr.h b/modules/ca/src/client/caerr.h index 4c0b36835..ead86db9f 100644 --- a/modules/ca/src/client/caerr.h +++ b/modules/ca/src/client/caerr.h @@ -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. \*************************************************************************/ /* * @@ -20,20 +19,10 @@ */ -#ifndef INCLcaerrh -#define INCLcaerrh +#ifndef INC_caerr_H +#define INC_caerr_H -#ifdef epicsExportSharedSymbols -# define INCLcaerrh_accessh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - -# include "epicsTypes.h" - -#ifdef INCLcaerrh_accessh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif +#include "epicsTypes.h" #include "libCaAPI.h" diff --git a/modules/ca/src/client/casw.cpp b/modules/ca/src/client/casw.cpp index ed1766072..74e38dca9 100644 --- a/modules/ca/src/client/casw.cpp +++ b/modules/ca/src/client/casw.cpp @@ -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. \*************************************************************************/ /* diff --git a/modules/ca/src/client/comBuf.cpp b/modules/ca/src/client/comBuf.cpp index 94245d387..21c73ebba 100644 --- a/modules/ca/src/client/comBuf.cpp +++ b/modules/ca/src/client/comBuf.cpp @@ -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. \*************************************************************************/ /* * diff --git a/modules/ca/src/client/comBuf.h b/modules/ca/src/client/comBuf.h index 59e38780b..281961c6d 100644 --- a/modules/ca/src/client/comBuf.h +++ b/modules/ca/src/client/comBuf.h @@ -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. \*************************************************************************/ /* * @@ -21,8 +20,8 @@ * johill@lanl.gov */ -#ifndef comBufh -#define comBufh +#ifndef INC_comBuf_H +#define INC_comBuf_H #include #include @@ -332,4 +331,4 @@ comBuf :: popStatus comBuf :: pop ( T & returnVal ) return status; } -#endif // ifndef comBufh +#endif // ifndef INC_comBuf_H diff --git a/modules/ca/src/client/comQueRecv.cpp b/modules/ca/src/client/comQueRecv.cpp index 88263544d..3628ad181 100644 --- a/modules/ca/src/client/comQueRecv.cpp +++ b/modules/ca/src/client/comQueRecv.cpp @@ -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. \*************************************************************************/ /* * diff --git a/modules/ca/src/client/comQueRecv.h b/modules/ca/src/client/comQueRecv.h index 7f3153d8d..96b6b5eac 100644 --- a/modules/ca/src/client/comQueRecv.h +++ b/modules/ca/src/client/comQueRecv.h @@ -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. \*************************************************************************/ /* @@ -23,8 +22,8 @@ * 505 665 1831 */ -#ifndef comQueRecvh -#define comQueRecvh +#ifndef INC_comQueRecv_H +#define INC_comQueRecv_H #include "comBuf.h" @@ -108,4 +107,4 @@ inline epicsFloat64 comQueRecv::popFloat64 () return AlignedWireRef < epicsFloat64 > ( tmp._fp ); } -#endif // ifndef comQueRecvh +#endif // ifndef INC_comQueRecv_H diff --git a/modules/ca/src/client/comQueSend.cpp b/modules/ca/src/client/comQueSend.cpp index 6ed516bb3..b81411c37 100644 --- a/modules/ca/src/client/comQueSend.cpp +++ b/modules/ca/src/client/comQueSend.cpp @@ -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. \*************************************************************************/ /* @@ -67,7 +66,6 @@ #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" -#define epicsExportSharedSymbols #include "iocinf.h" #include "virtualCircuit.h" #include "db_access.h" // for dbr_short_t etc diff --git a/modules/ca/src/client/comQueSend.h b/modules/ca/src/client/comQueSend.h index 808285e7a..30ef30712 100644 --- a/modules/ca/src/client/comQueSend.h +++ b/modules/ca/src/client/comQueSend.h @@ -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. \*************************************************************************/ @@ -24,10 +23,10 @@ * 505 665 1831 */ -#ifndef comQueSendh -#define comQueSendh +#ifndef INC_comQueSend_H +#define INC_comQueSend_H -#include +#include #include "tsDLList.h" #include "comBuf.h" @@ -235,4 +234,4 @@ inline comBuf * comQueSend::newComBuf () return new ( this->comBufMemMgr ) comBuf; } -#endif // ifndef comQueSendh +#endif // ifndef INC_comQueSend_H diff --git a/modules/ca/src/client/convert.cpp b/modules/ca/src/client/convert.cpp index 851711774..e70e6be9e 100644 --- a/modules/ca/src/client/convert.cpp +++ b/modules/ca/src/client/convert.cpp @@ -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. \*************************************************************************/ /* * C O N V E R T . C @@ -29,7 +28,6 @@ #include "osiSock.h" #include "osiWireFormat.h" -#define epicsExportSharedSymbols #include "net_convert.h" #include "iocinf.h" #include "caProto.h" diff --git a/modules/ca/src/client/db_access.h b/modules/ca/src/client/db_access.h index 5ad565863..b82ae4243 100644 --- a/modules/ca/src/client/db_access.h +++ b/modules/ca/src/client/db_access.h @@ -3,33 +3,22 @@ * 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. \*************************************************************************/ /* base/include/db_access.h */ /* Author: Bob Dalesio * Date: 4-4-88 */ -#ifndef INCLdb_accessh -#define INCLdb_accessh +#ifndef INC_db_access_H +#define INC_db_access_H #include -#ifdef epicsExportSharedSymbols -# define INCLdb_accessh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include "epicsTypes.h" #include "epicsTime.h" -#ifdef INCLdb_accessh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - #include "libCaAPI.h" @@ -726,17 +715,17 @@ union db_access_val{ (type) + 4*(dbf_text_dim-2) : -1 ) -LIBCA_API extern const char *dbf_text[LAST_TYPE+3]; -LIBCA_API extern const short dbf_text_dim; -LIBCA_API extern const char *dbf_text_invalid; +LIBCA_API extern const char *dbf_text[LAST_TYPE+3]; +LIBCA_API extern const short dbf_text_dim; +LIBCA_API extern const char *dbf_text_invalid; -LIBCA_API extern const char *dbr_text[LAST_BUFFER_TYPE+1]; -LIBCA_API extern const short dbr_text_dim; -LIBCA_API extern const char *dbr_text_invalid; +LIBCA_API extern const char *dbr_text[LAST_BUFFER_TYPE+1]; +LIBCA_API extern const short dbr_text_dim; +LIBCA_API extern const char *dbr_text_invalid; #endif /*db_accessHFORdb_accessC*/ #ifdef __cplusplus } #endif -#endif /* INCLdb_accessh */ +#endif /* ifndef INC_db_access_H */ diff --git a/modules/ca/src/client/disconnectGovernorTimer.cpp b/modules/ca/src/client/disconnectGovernorTimer.cpp index f1d517f07..987c54a84 100644 --- a/modules/ca/src/client/disconnectGovernorTimer.cpp +++ b/modules/ca/src/client/disconnectGovernorTimer.cpp @@ -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. \*************************************************************************/ // // @@ -20,7 +19,6 @@ #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" -#define epicsExportSharedSymbols #include "disconnectGovernorTimer.h" #include "udpiiu.h" #include "nciu.h" diff --git a/modules/ca/src/client/disconnectGovernorTimer.h b/modules/ca/src/client/disconnectGovernorTimer.h index f636d6260..70127a711 100644 --- a/modules/ca/src/client/disconnectGovernorTimer.h +++ b/modules/ca/src/client/disconnectGovernorTimer.h @@ -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. \*************************************************************************/ // @@ -23,23 +22,14 @@ // 505 665 1831 // -#ifndef disconnectGovernorTimerh -#define disconnectGovernorTimerh - -#ifdef epicsExportSharedSymbols -# define searchTimerh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_disconnectGovernorTimer_H +#define INC_disconnectGovernorTimer_H #include "epicsMutex.h" #include "epicsGuard.h" #include "epicsTimer.h" -#ifdef searchTimerh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - +#include "libCaAPI.h" #include "caProto.h" #include "netiiu.h" @@ -74,4 +64,4 @@ private: disconnectGovernorTimer & operator = ( const disconnectGovernorTimer & ); }; -#endif // ifdef disconnectGovernorTimerh +#endif // ifdef INC_disconnectGovernorTimer_H diff --git a/modules/ca/src/client/getCallback.cpp b/modules/ca/src/client/getCallback.cpp index 0fc050043..f5c4e760d 100644 --- a/modules/ca/src/client/getCallback.cpp +++ b/modules/ca/src/client/getCallback.cpp @@ -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. \*************************************************************************/ /* @@ -28,7 +27,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "oldAccess.h" diff --git a/modules/ca/src/client/getCopy.cpp b/modules/ca/src/client/getCopy.cpp index 23a508d9a..7f1ccf07c 100644 --- a/modules/ca/src/client/getCopy.cpp +++ b/modules/ca/src/client/getCopy.cpp @@ -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. \*************************************************************************/ /* @@ -30,7 +29,6 @@ #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" -#define epicsExportSharedSymbols #include "iocinf.h" #include "oldAccess.h" #include "cac.h" diff --git a/modules/ca/src/client/hostNameCache.cpp b/modules/ca/src/client/hostNameCache.cpp index c3d105c06..d82ffde13 100644 --- a/modules/ca/src/client/hostNameCache.cpp +++ b/modules/ca/src/client/hostNameCache.cpp @@ -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. \*************************************************************************/ /* diff --git a/modules/ca/src/client/hostNameCache.h b/modules/ca/src/client/hostNameCache.h index a4eacfbb3..0fc7e7860 100644 --- a/modules/ca/src/client/hostNameCache.h +++ b/modules/ca/src/client/hostNameCache.h @@ -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. \*************************************************************************/ /* @@ -23,21 +22,12 @@ * 505 665 1831 */ -#ifndef hostNameCacheh -#define hostNameCacheh - -#ifdef epicsExportSharedSymbols -# define hostNameCache_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_hostNameCache_H +#define INC_hostNameCache_H #include "ipAddrToAsciiAsynchronous.h" #include "epicsMutex.h" -#ifdef hostNameCache_epicsExportSharedSymbols -# define epicsExportSharedSymbols -#endif - class hostNameCache : public ipAddrToAsciiCallBack { public: hostNameCache ( const osiSockAddr & addr, ipAddrToAsciiEngine & engine ); @@ -58,4 +48,4 @@ inline const char * hostNameCache::pointer () const return this->hostNameBuf; } -#endif // #ifndef hostNameCacheh +#endif // #ifndef INC_hostNameCache_H diff --git a/modules/ca/src/client/inetAddrID.h b/modules/ca/src/client/inetAddrID.h index 978787599..d7ee160cb 100644 --- a/modules/ca/src/client/inetAddrID.h +++ b/modules/ca/src/client/inetAddrID.h @@ -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. \*************************************************************************/ /* @@ -19,8 +18,8 @@ * Author: Jeff Hill */ -#ifndef inetAddrIDh -#define inetAddrIDh +#ifndef INC_inetAddrID_H +#define INC_inetAddrID_H #include "osiSock.h" #include "resourceLib.h" @@ -67,6 +66,6 @@ inline void inetAddrID::name ( char *pBuf, unsigned bufSize ) const ipAddrToDottedIP ( &this->addr, pBuf, bufSize ); } -#endif // ifdef inetAddrID +#endif // ifdef INC_inetAddrID_H diff --git a/modules/ca/src/client/iocinf.cpp b/modules/ca/src/client/iocinf.cpp index 09eea292b..c0f6e7cab 100644 --- a/modules/ca/src/client/iocinf.cpp +++ b/modules/ca/src/client/iocinf.cpp @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -31,10 +31,7 @@ #include "errlog.h" #include "osiWireFormat.h" -#define epicsExportSharedSymbols #include "addrList.h" -#undef epicsExportSharedSymbols - #include "iocinf.h" /* diff --git a/modules/ca/src/client/iocinf.h b/modules/ca/src/client/iocinf.h index 0d3b57db1..fee060370 100644 --- a/modules/ca/src/client/iocinf.h +++ b/modules/ca/src/client/iocinf.h @@ -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. \*************************************************************************/ /* * @@ -22,8 +21,8 @@ * 505 665 1831 */ -#ifndef INCiocinfh -#define INCiocinfh +#ifndef INC_iocinf_H +#define INC_iocinf_H #ifdef DEBUG # define debugPrintf(argsInParen) ::printf argsInParen @@ -67,4 +66,4 @@ static const unsigned contiguousMsgCountWhichTriggersFlowControl = 10u; #define genLocalExcep( CBGUARD, GUARD, CAC, STAT, PCTX ) \ (CAC).exception ( CBGUARD, GUARD, STAT, PCTX, __FILE__, __LINE__ ) -#endif // ifdef INCiocinfh +#endif // ifdef INC_iocinf_H diff --git a/modules/ca/src/client/localHostName.cpp b/modules/ca/src/client/localHostName.cpp index b0b96bb47..4810a279c 100644 --- a/modules/ca/src/client/localHostName.cpp +++ b/modules/ca/src/client/localHostName.cpp @@ -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. \*************************************************************************/ /* diff --git a/modules/ca/src/client/localHostName.h b/modules/ca/src/client/localHostName.h index f116b8140..95d1452f8 100644 --- a/modules/ca/src/client/localHostName.h +++ b/modules/ca/src/client/localHostName.h @@ -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. \*************************************************************************/ /* @@ -19,22 +18,13 @@ * Author: Jeff Hill */ -#ifndef localHostNameh -#define localHostNameh +#ifndef INC_localHostName_H +#define INC_localHostName_H #include -#ifdef epicsExportSharedSymbols -# define localHostNameh_restore_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include "epicsSingleton.h" -#ifdef localHostNameh_restore_epicsExportSharedSymbols -# define epicsExportSharedSymbols -#endif - class localHostName { public: localHostName (); @@ -60,6 +50,6 @@ inline const char * localHostName::pointer () const return this->cache; } -#endif // ifndef localHostNameh +#endif // ifndef INC_localHostName_H diff --git a/modules/ca/src/client/msgForMultiplyDefinedPV.cpp b/modules/ca/src/client/msgForMultiplyDefinedPV.cpp index 7002dd4b9..06c2ce354 100644 --- a/modules/ca/src/client/msgForMultiplyDefinedPV.cpp +++ b/modules/ca/src/client/msgForMultiplyDefinedPV.cpp @@ -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. \*************************************************************************/ /* @@ -30,7 +29,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "msgForMultiplyDefinedPV.h" #include "cac.h" diff --git a/modules/ca/src/client/msgForMultiplyDefinedPV.h b/modules/ca/src/client/msgForMultiplyDefinedPV.h index 3f1e771c0..afcbc807e 100644 --- a/modules/ca/src/client/msgForMultiplyDefinedPV.h +++ b/modules/ca/src/client/msgForMultiplyDefinedPV.h @@ -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. \*************************************************************************/ /* @@ -23,23 +22,14 @@ * 505 665 1831 */ -#ifndef msgForMultiplyDefinedPVh -#define msgForMultiplyDefinedPVh - -#ifdef epicsExportSharedSymbols -# define msgForMultiplyDefinedPVh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_msgForMultiplyDefinedPV_H +#define INC_msgForMultiplyDefinedPV_H #include "ipAddrToAsciiAsynchronous.h" #include "tsFreeList.h" #include "tsDLList.h" #include "compilerDependencies.h" -#ifdef msgForMultiplyDefinedPVh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -#endif - class callbackForMultiplyDefinedPV { public: virtual ~callbackForMultiplyDefinedPV () = 0; @@ -75,5 +65,5 @@ inline void msgForMultiplyDefinedPV::ioInitiate ( const osiSockAddr & rej ) this->dnsTransaction.ipAddrToAscii ( rej, *this ); } -#endif // ifdef msgForMultiplyDefinedPVh +#endif // ifdef INC_msgForMultiplyDefinedPV_H diff --git a/modules/ca/src/client/nciu.cpp b/modules/ca/src/client/nciu.cpp index 8eb89c5c3..d3ea7097b 100644 --- a/modules/ca/src/client/nciu.cpp +++ b/modules/ca/src/client/nciu.cpp @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -29,7 +28,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "cac.h" #include "osiWireFormat.h" diff --git a/modules/ca/src/client/nciu.h b/modules/ca/src/client/nciu.h index 7cba6e82b..52b73302c 100644 --- a/modules/ca/src/client/nciu.h +++ b/modules/ca/src/client/nciu.h @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -22,13 +21,8 @@ * 505 665 1831 */ -#ifndef nciuh -#define nciuh - -#ifdef epicsExportSharedSymbols -# define nciuh_restore_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_nciu_H +#define INC_nciu_H #include "resourceLib.h" #include "tsDLList.h" @@ -36,10 +30,7 @@ #include "epicsMutex.h" #include "compilerDependencies.h" -#ifdef nciuh_restore_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif +#include "libCaAPI.h" #define CA_MINOR_PROTOCOL_REVISION 13 #include "caProto.h" @@ -382,4 +373,4 @@ inline bool channelNode::isInstalledInServer ( epicsGuard < epicsMutex > & ) con this->listMember == cs_subscripUpdateReqPend; } -#endif // ifdef nciuh +#endif // ifdef INC_nciu_H diff --git a/modules/ca/src/client/netIO.h b/modules/ca/src/client/netIO.h index e728d2a1a..74d48adbb 100644 --- a/modules/ca/src/client/netIO.h +++ b/modules/ca/src/client/netIO.h @@ -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. \*************************************************************************/ /* * @@ -22,8 +21,8 @@ * 505 665 1831 */ -#ifndef netIOh -#define netIOh +#ifndef INC_netIO_H +#define INC_netIO_H #include "nciu.h" #include "compilerDependencies.h" @@ -303,4 +302,4 @@ inline void * netWriteNotifyIO::operator new ( size_t size, } #endif -#endif // ifdef netIOh +#endif // ifdef INC_netIO_H diff --git a/modules/ca/src/client/netReadNotifyIO.cpp b/modules/ca/src/client/netReadNotifyIO.cpp index 2e4b8ead6..41199c1dd 100644 --- a/modules/ca/src/client/netReadNotifyIO.cpp +++ b/modules/ca/src/client/netReadNotifyIO.cpp @@ -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. \*************************************************************************/ /* * diff --git a/modules/ca/src/client/netSubscription.cpp b/modules/ca/src/client/netSubscription.cpp index fe2426a89..78f0b71c8 100644 --- a/modules/ca/src/client/netSubscription.cpp +++ b/modules/ca/src/client/netSubscription.cpp @@ -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. \*************************************************************************/ /* * @@ -25,7 +24,6 @@ #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" -#define epicsExportSharedSymbols #include "iocinf.h" #include "nciu.h" #include "cac.h" diff --git a/modules/ca/src/client/netWriteNotifyIO.cpp b/modules/ca/src/client/netWriteNotifyIO.cpp index afa9996d5..045217e66 100644 --- a/modules/ca/src/client/netWriteNotifyIO.cpp +++ b/modules/ca/src/client/netWriteNotifyIO.cpp @@ -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. \*************************************************************************/ /* * diff --git a/modules/ca/src/client/net_convert.h b/modules/ca/src/client/net_convert.h index bee51c0c4..1c3aac5df 100644 --- a/modules/ca/src/client/net_convert.h +++ b/modules/ca/src/client/net_convert.h @@ -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. \*************************************************************************/ /* * @@ -13,11 +12,11 @@ * */ -#ifndef _NET_CONVERT_H -#define _NET_CONVERT_H +#ifndef INC_net_convert_H +#define INC_net_convert_H #include "db_access.h" -#include "shareLib.h" +#include "libCaAPI.h" #ifdef __cplusplus extern "C" { @@ -25,7 +24,7 @@ extern "C" { typedef unsigned long arrayElementCount; -epicsShareFunc int caNetConvert ( +LIBCA_API int caNetConvert ( unsigned type, const void *pSrc, void *pDest, int hton, arrayElementCount count ); @@ -33,4 +32,4 @@ epicsShareFunc int caNetConvert ( } #endif -#endif /* define _NET_CONVERT_H */ +#endif /* ifndef INC_net_convert_H */ diff --git a/modules/ca/src/client/netiiu.cpp b/modules/ca/src/client/netiiu.cpp index a81b15533..cfd4b8091 100644 --- a/modules/ca/src/client/netiiu.cpp +++ b/modules/ca/src/client/netiiu.cpp @@ -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. \*************************************************************************/ /* diff --git a/modules/ca/src/client/netiiu.h b/modules/ca/src/client/netiiu.h index 2caa3d0fa..7c2ca2cae 100644 --- a/modules/ca/src/client/netiiu.h +++ b/modules/ca/src/client/netiiu.h @@ -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. \*************************************************************************/ /* * @@ -22,8 +21,8 @@ * 505 665 1831 */ -#ifndef netiiuh -#define netiiuh +#ifndef INC_netiiu_H +#define INC_netiiu_H #include "cacIO.h" #include "caProto.h" @@ -94,4 +93,4 @@ public: const char * pName, unsigned nameLength ) = 0; }; -#endif // netiiuh +#endif // ifndef INC_netiiu_H diff --git a/modules/ca/src/client/noopiiu.cpp b/modules/ca/src/client/noopiiu.cpp index a3d20b59b..84edb3828 100644 --- a/modules/ca/src/client/noopiiu.cpp +++ b/modules/ca/src/client/noopiiu.cpp @@ -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. \*************************************************************************/ /* * @@ -24,7 +23,6 @@ #include "osiSock.h" -#define epicsExportSharedSymbols #include "noopiiu.h" noopiiu noopIIU; diff --git a/modules/ca/src/client/noopiiu.h b/modules/ca/src/client/noopiiu.h index f373edec8..f6ed87fcb 100644 --- a/modules/ca/src/client/noopiiu.h +++ b/modules/ca/src/client/noopiiu.h @@ -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. \*************************************************************************/ /* * @@ -22,8 +21,8 @@ * 505 665 1831 */ -#ifndef noopiiuh -#define noopiiuh +#ifndef INC_noopiiu_H +#define INC_noopiiu_H #include "netiiu.h" @@ -89,4 +88,4 @@ public: extern noopiiu noopIIU; -#endif // ifndef noopiiuh +#endif // ifndef INC_noopiiu_H diff --git a/modules/ca/src/client/oldAccess.h b/modules/ca/src/client/oldAccess.h index 1337cb31a..273b550c5 100644 --- a/modules/ca/src/client/oldAccess.h +++ b/modules/ca/src/client/oldAccess.h @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -23,25 +22,16 @@ * 505 665 1831 */ -#ifndef oldAccessh -#define oldAccessh +#ifndef INC_oldAccess_H +#define INC_oldAccess_H #include -#ifdef epicsExportSharedSymbols -# define oldAccessh_restore_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include "tsFreeList.h" #include "compilerDependencies.h" #include "osiSock.h" -#ifdef oldAccessh_restore_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - +#include "libCaAPI.h" #include "caProto.h" #include "cacIO.h" #include "cadef.h" @@ -607,4 +597,4 @@ void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO ( } } -#endif // ifndef oldAccessh +#endif // ifndef INC_oldAccess_H diff --git a/modules/ca/src/client/oldChannelNotify.cpp b/modules/ca/src/client/oldChannelNotify.cpp index 701f51fc1..1af7a7453 100644 --- a/modules/ca/src/client/oldChannelNotify.cpp +++ b/modules/ca/src/client/oldChannelNotify.cpp @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -33,7 +32,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "oldAccess.h" #include "cac.h" diff --git a/modules/ca/src/client/oldSubscription.cpp b/modules/ca/src/client/oldSubscription.cpp index 34b58a48d..39e6bb002 100644 --- a/modules/ca/src/client/oldSubscription.cpp +++ b/modules/ca/src/client/oldSubscription.cpp @@ -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. \*************************************************************************/ /* @@ -23,7 +22,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "oldAccess.h" diff --git a/modules/ca/src/client/putCallback.cpp b/modules/ca/src/client/putCallback.cpp index 85fcaeb7f..50f4542aa 100644 --- a/modules/ca/src/client/putCallback.cpp +++ b/modules/ca/src/client/putCallback.cpp @@ -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. \*************************************************************************/ /* @@ -28,7 +27,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "oldAccess.h" diff --git a/modules/ca/src/client/repeater.cpp b/modules/ca/src/client/repeater.cpp index 67429e659..418174198 100644 --- a/modules/ca/src/client/repeater.cpp +++ b/modules/ca/src/client/repeater.cpp @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* * @@ -69,7 +69,6 @@ #include "taskwd.h" #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "caProto.h" #include "udpiiu.h" diff --git a/modules/ca/src/client/repeaterClient.h b/modules/ca/src/client/repeaterClient.h index faaf0809f..7a028810f 100644 --- a/modules/ca/src/client/repeaterClient.h +++ b/modules/ca/src/client/repeaterClient.h @@ -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. \*************************************************************************/ /* @@ -23,22 +22,14 @@ * 505 665 1831 */ -#ifndef repeaterClienth -#define repeaterClienth - -#ifdef epicsExportSharedSymbols -# define repeaterClienth_restore_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_repeaterClient_H +#define INC_repeaterClient_H #include "tsDLList.h" #include "tsFreeList.h" #include "compilerDependencies.h" -#ifdef repeaterClienth_restore_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif +#include "libCaAPI.h" union osiSockAddr; @@ -67,6 +58,4 @@ private: void operator delete ( void * ); }; -#endif // repeaterClienth - - +#endif // ifndef INC_repeaterClient_H diff --git a/modules/ca/src/client/repeaterSubscribeTimer.cpp b/modules/ca/src/client/repeaterSubscribeTimer.cpp index 71ba5ad06..5e3d856bd 100644 --- a/modules/ca/src/client/repeaterSubscribeTimer.cpp +++ b/modules/ca/src/client/repeaterSubscribeTimer.cpp @@ -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. \*************************************************************************/ /* * @@ -25,9 +24,7 @@ #include "iocinf.h" #include "repeaterSubscribeTimer.h" -#define epicsExportSharedSymbols #include "udpiiu.h" -#undef epicsExportSharedSymbols static const double repeaterSubscribeTimerInitialPeriod = 10.0; // sec static const double repeaterSubscribeTimerPeriod = 1.0; // sec diff --git a/modules/ca/src/client/repeaterSubscribeTimer.h b/modules/ca/src/client/repeaterSubscribeTimer.h index fa4768499..cc5431b71 100644 --- a/modules/ca/src/client/repeaterSubscribeTimer.h +++ b/modules/ca/src/client/repeaterSubscribeTimer.h @@ -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. \*************************************************************************/ /* @@ -23,22 +22,12 @@ * 505 665 1831 */ -#ifndef repeaterSubscribeTimerh -#define repeaterSubscribeTimerh +#ifndef INC_repeaterSubscribeTimer_H +#define INC_repeaterSubscribeTimer_H #include "epicsTimer.h" -#ifdef epicsExportSharedSymbols -# define repeaterSubscribeTimerh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - -#include "epicsTimer.h" - -#ifdef repeaterSubscribeTimerh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif +#include "libCaAPI.h" class epicsMutex; class cacContextNotify; @@ -79,4 +68,4 @@ private: repeaterSubscribeTimer & operator = ( const repeaterSubscribeTimer & ); }; -#endif // ifdef repeaterSubscribeTimerh +#endif // ifdef INC_repeaterSubscribeTimer_H diff --git a/modules/ca/src/client/searchTimer.cpp b/modules/ca/src/client/searchTimer.cpp index bb9b9a91c..a98537795 100644 --- a/modules/ca/src/client/searchTimer.cpp +++ b/modules/ca/src/client/searchTimer.cpp @@ -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. \*************************************************************************/ // // @@ -26,7 +25,6 @@ #include "envDefs.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "udpiiu.h" #include "nciu.h" diff --git a/modules/ca/src/client/searchTimer.h b/modules/ca/src/client/searchTimer.h index 7b9fe1717..0baa3caed 100644 --- a/modules/ca/src/client/searchTimer.h +++ b/modules/ca/src/client/searchTimer.h @@ -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. \*************************************************************************/ // @@ -23,23 +22,14 @@ // 505 665 1831 // -#ifndef searchTimerh -#define searchTimerh - -#ifdef epicsExportSharedSymbols -# define searchTimerh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_searchTimer_H +#define INC_searchTimer_H #include "epicsMutex.h" #include "epicsGuard.h" #include "epicsTimer.h" -#ifdef searchTimerh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - +#include "libCaAPI.h" #include "caProto.h" #include "netiiu.h" @@ -105,4 +95,4 @@ private: searchTimer & operator = ( const searchTimer & ); // not implemented }; -#endif // ifdef searchTimerh +#endif // ifdef INC_searchTimer_H diff --git a/modules/ca/src/client/sgAutoPtr.h b/modules/ca/src/client/sgAutoPtr.h index e2899468c..f42877e25 100644 --- a/modules/ca/src/client/sgAutoPtr.h +++ b/modules/ca/src/client/sgAutoPtr.h @@ -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. \*************************************************************************/ /* @@ -23,8 +22,8 @@ * 505 665 1831 */ -#ifndef sgAutoPtrh -#define sgAutoPtrh +#ifndef INC_sgAutoPtr_H +#define INC_sgAutoPtr_H template < class T > class sgAutoPtr { @@ -100,4 +99,4 @@ inline T * sgAutoPtr < T > :: get () return this->pNotify; } -#endif // sgAutoPtrh +#endif // ifndef INC_sgAutoPtr_H diff --git a/modules/ca/src/client/syncGroup.h b/modules/ca/src/client/syncGroup.h index 3b9c3cd4f..3b4247537 100644 --- a/modules/ca/src/client/syncGroup.h +++ b/modules/ca/src/client/syncGroup.h @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -22,13 +21,8 @@ * 505 665 1831 */ -#ifndef syncGrouph -#define syncGrouph - -#ifdef epicsExportSharedSymbols -# define syncGrouph_restore_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_syncGroup_H +#define INC_syncGroup_H #include "tsDLList.h" #include "tsFreeList.h" @@ -36,11 +30,7 @@ #include "epicsEvent.h" #include "compilerDependencies.h" -#ifdef syncGrouph_restore_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - +#include "libCaAPI.h" #include "cadef.h" #include "cacIO.h" @@ -277,4 +267,4 @@ inline bool syncGroupReadNotify::ioPending ( return ! this->ioComplete; } -#endif // ifdef syncGrouph +#endif // ifdef INC_syncGroup_H diff --git a/modules/ca/src/client/syncGroupNotify.cpp b/modules/ca/src/client/syncGroupNotify.cpp index 2780fbe89..800641feb 100644 --- a/modules/ca/src/client/syncGroupNotify.cpp +++ b/modules/ca/src/client/syncGroupNotify.cpp @@ -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. \*************************************************************************/ /* @@ -16,7 +15,6 @@ #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" -#define epicsExportSharedSymbols #include "iocinf.h" #include "syncGroup.h" #include "oldAccess.h" diff --git a/modules/ca/src/client/syncGroupReadNotify.cpp b/modules/ca/src/client/syncGroupReadNotify.cpp index 711a2fae4..e7390fade 100644 --- a/modules/ca/src/client/syncGroupReadNotify.cpp +++ b/modules/ca/src/client/syncGroupReadNotify.cpp @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -21,7 +20,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "syncGroup.h" #include "oldAccess.h" diff --git a/modules/ca/src/client/syncGroupWriteNotify.cpp b/modules/ca/src/client/syncGroupWriteNotify.cpp index f0bf42753..5d4d49055 100644 --- a/modules/ca/src/client/syncGroupWriteNotify.cpp +++ b/modules/ca/src/client/syncGroupWriteNotify.cpp @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -21,7 +20,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "iocinf.h" #include "syncGroup.h" #include "oldAccess.h" diff --git a/modules/ca/src/client/syncgrp.cpp b/modules/ca/src/client/syncgrp.cpp index 9727ae8df..1ba8057d0 100644 --- a/modules/ca/src/client/syncgrp.cpp +++ b/modules/ca/src/client/syncgrp.cpp @@ -3,8 +3,7 @@ * 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 +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -15,7 +14,6 @@ #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" -#define epicsExportSharedSymbols #include "iocinf.h" #include "oldAccess.h" #include "syncGroup.h" diff --git a/modules/ca/src/client/tcpRecvThread.cpp b/modules/ca/src/client/tcpRecvThread.cpp deleted file mode 100644 index 34bf8ca83..000000000 --- a/modules/ca/src/client/tcpRecvThread.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* 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. -\*************************************************************************/ - - diff --git a/modules/ca/src/client/tcpRecvWatchdog.cpp b/modules/ca/src/client/tcpRecvWatchdog.cpp index 72c92968b..4596c33dc 100644 --- a/modules/ca/src/client/tcpRecvWatchdog.cpp +++ b/modules/ca/src/client/tcpRecvWatchdog.cpp @@ -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. \*************************************************************************/ /* * diff --git a/modules/ca/src/client/tcpRecvWatchdog.h b/modules/ca/src/client/tcpRecvWatchdog.h index 0b15e22d8..ca214c222 100644 --- a/modules/ca/src/client/tcpRecvWatchdog.h +++ b/modules/ca/src/client/tcpRecvWatchdog.h @@ -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. \*************************************************************************/ /* @@ -23,20 +22,12 @@ * 505 665 1831 */ -#ifndef tcpRecvWatchdogh -#define tcpRecvWatchdogh - -#ifdef epicsExportSharedSymbols -# define tcpRecvWatchdogh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_tcpRecvWatchdog_H +#define INC_tcpRecvWatchdog_H #include "epicsTimer.h" -#ifdef tcpRecvWatchdogh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif +#include "libCaAPI.h" class tcpiiu; @@ -81,5 +72,5 @@ private: tcpRecvWatchdog & operator = ( const tcpRecvWatchdog & ); }; -#endif // #ifndef tcpRecvWatchdogh +#endif // #ifndef INC_tcpRecvWatchdog_H diff --git a/modules/ca/src/client/tcpSendWatchdog.cpp b/modules/ca/src/client/tcpSendWatchdog.cpp index 6834b39e7..140fdba39 100644 --- a/modules/ca/src/client/tcpSendWatchdog.cpp +++ b/modules/ca/src/client/tcpSendWatchdog.cpp @@ -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. \*************************************************************************/ /* diff --git a/modules/ca/src/client/tcpSendWatchdog.h b/modules/ca/src/client/tcpSendWatchdog.h index 05a2dfe75..3d9bc05fa 100644 --- a/modules/ca/src/client/tcpSendWatchdog.h +++ b/modules/ca/src/client/tcpSendWatchdog.h @@ -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. \*************************************************************************/ /* @@ -23,21 +22,12 @@ * 505 665 1831 */ -#ifndef tcpSendWatchdogh -#define tcpSendWatchdogh - - -#ifdef epicsExportSharedSymbols -# define tcpSendWatchdogh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif +#ifndef INC_tcpSendWatchdog_H +#define INC_tcpSendWatchdog_H #include "epicsTimer.h" -#ifdef tcpSendWatchdogh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif +#include "libCaAPI.h" class tcpSendWatchdog : private epicsTimerNotify { public: @@ -60,4 +50,4 @@ private: tcpSendWatchdog & operator = ( const tcpSendWatchdog & ); }; -#endif // #ifndef tcpSendWatchdog +#endif // #ifndef INC_tcpSendWatchdog_H diff --git a/modules/ca/src/client/tcpiiu.cpp b/modules/ca/src/client/tcpiiu.cpp index 9d174ab84..0b6f99d6e 100644 --- a/modules/ca/src/client/tcpiiu.cpp +++ b/modules/ca/src/client/tcpiiu.cpp @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -31,7 +31,6 @@ #include "errlog.h" -#define epicsExportSharedSymbols #include "localHostName.h" #include "iocinf.h" #include "virtualCircuit.h" diff --git a/modules/ca/src/client/test_event.cpp b/modules/ca/src/client/test_event.cpp index 8b5a8bb54..78179f31e 100644 --- a/modules/ca/src/client/test_event.cpp +++ b/modules/ca/src/client/test_event.cpp @@ -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. \*************************************************************************/ /* * @@ -16,7 +15,6 @@ #include "epicsStdioRedirect.h" -#define epicsExportSharedSymbols #include "cadef.h" extern "C" void epicsShareAPI ca_test_event ( struct event_handler_args args ) diff --git a/modules/ca/src/client/ucx.h b/modules/ca/src/client/ucx.h deleted file mode 100644 index c164161a5..000000000 --- a/modules/ca/src/client/ucx.h +++ /dev/null @@ -1,102 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* 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. -\*************************************************************************/ -/* - * - * U C X . H - * UNIX ioctl structures and defines used for VAX/UCX - * - */ -#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 -#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 - diff --git a/modules/ca/src/client/udpiiu.cpp b/modules/ca/src/client/udpiiu.cpp index 4efa8ba32..de94f1f63 100644 --- a/modules/ca/src/client/udpiiu.cpp +++ b/modules/ca/src/client/udpiiu.cpp @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -32,7 +32,6 @@ #include "errlog.h" #include "locationException.h" -#define epicsExportSharedSymbols #include "addrList.h" #include "caerr.h" // for ECA_NOSEARCHADDR #include "udpiiu.h" diff --git a/modules/ca/src/client/udpiiu.h b/modules/ca/src/client/udpiiu.h index fdf348296..00e415622 100644 --- a/modules/ca/src/client/udpiiu.h +++ b/modules/ca/src/client/udpiiu.h @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -22,26 +22,17 @@ * 505 665 1831 */ -#ifndef udpiiuh -#define udpiiuh +#ifndef INC_udpiiu_H +#define INC_udpiiu_H #include -#ifdef epicsExportSharedSymbols -# define udpiiuh_accessh_epicsExportSharedSymbols -# undef epicsExportSharedSymbols -#endif - #include "osiSock.h" #include "epicsThread.h" #include "epicsTime.h" #include "tsDLList.h" -#ifdef udpiiuh_accessh_epicsExportSharedSymbols -# define epicsExportSharedSymbols -# include "shareLib.h" -#endif - +#include "libCaAPI.h" #include "netiiu.h" #include "searchTimer.h" #include "disconnectGovernorTimer.h" @@ -50,13 +41,13 @@ extern "C" void cacRecvThreadUDP ( void *pParam ); -epicsShareFunc void epicsShareAPI caStartRepeaterIfNotInstalled ( +LIBCA_API void epicsShareAPI caStartRepeaterIfNotInstalled ( unsigned repeaterPort ); -epicsShareFunc void epicsShareAPI caRepeaterRegistrationMessage ( +LIBCA_API void epicsShareAPI caRepeaterRegistrationMessage ( SOCKET sock, unsigned repeaterPort, unsigned attemptNumber ); -extern "C" epicsShareFunc void caRepeaterThread ( +extern "C" LIBCA_API void caRepeaterThread ( void * pDummy ); -epicsShareFunc void ca_repeater ( void ); +LIBCA_API void ca_repeater ( void ); class cac; class cacContextNotify; @@ -314,5 +305,4 @@ private: friend class udpiiu::M_repeaterTimerNotify; }; -#endif // udpiiuh - +#endif // ifndef INC_udpiiu_H diff --git a/modules/ca/src/client/virtualCircuit.h b/modules/ca/src/client/virtualCircuit.h index d06d87c60..dd68cac93 100644 --- a/modules/ca/src/client/virtualCircuit.h +++ b/modules/ca/src/client/virtualCircuit.h @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -22,8 +22,8 @@ * 505 665 1831 */ -#ifndef virtualCircuith -#define virtualCircuith +#ifndef INC_virtualCircuit_H +#define INC_virtualCircuit_H #include "tsDLList.h" @@ -418,4 +418,4 @@ inline void SearchDestTCP::setCircuit ( tcpiiu * piiu ) _ptcpiiu = piiu; } -#endif // ifdef virtualCircuith +#endif // ifdef INC_virtualCircuit_H From eb817ba056f212ab8490636a5dbb70603e17b906 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 10 Mar 2020 23:35:03 -0500 Subject: [PATCH 05/11] Modify rules to allow multiple API.h libraries to be built --- configure/RULES_BUILD | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 99bbb0726..3664efd38 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -409,20 +409,21 @@ endif $(PERL) $(TOOLS)/makeTestfile.pl $(T_A) $(EPICS_HOST_ARCH) $@ $< #--------------------------------------------------------------- -# Generate an $(API_HEADER) file on request (%API.h) +# Generate $(API_HEADER) files on request (%API.h) ifdef API_HEADER -# Install it +# Install them INC += $(API_HEADER) -# Ensure we generate it early enough -$(filter-out $(INSTALL_INCLUDE)/$(API_HEADER), $(INSTALL_INC)) $(HDEPENDS_FILES): \ - | $(INSTALL_INCLUDE)/$(API_HEADER) +# Ensure we generate them early enough +INSTALL_API_HEADERS = $(addprefix $(INSTALL_INCLUDE)/,$(API_HEADER)) +$(filter-out $(INSTALL_API_HEADERS), $(INSTALL_INC)) $(HDEPENDS_FILES): \ + | $(INSTALL_API_HEADERS) -# How to make it -$(COMMON_DIR)/$(API_HEADER): +# How to make one +$(COMMON_DIR)/%API.h: $(TOOLS)/makeAPIheader.pl @$(RM) $@ - $(PERL) $(TOOLS)/makeAPIheader.pl -o $@ $(API_HEADER:API.h=) + $(PERL) $(TOOLS)/makeAPIheader.pl -o $@ $(@:$(COMMON_DIR)/%API.h=%) endif # Generate header with version number from VCS From 017d561b8d95bc207885bf2b86e51b5497c4a3b7 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 10 Mar 2020 23:41:15 -0500 Subject: [PATCH 06/11] Update generator script Rename xxxSTD_API to epicsStdCall, don't redefine. Ensure name stem is a legal C identifier. Update the Pod text --- src/tools/makeAPIheader.pl | 87 +++++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 30 deletions(-) diff --git a/src/tools/makeAPIheader.pl b/src/tools/makeAPIheader.pl index 79965a615..cb7fde97d 100644 --- a/src/tools/makeAPIheader.pl +++ b/src/tools/makeAPIheader.pl @@ -10,17 +10,18 @@ use Pod::Usage; =head1 NAME -makeAPIheader.pl - Create a header for marking API import/export +makeAPIheader.pl - Create a header for marking API symbols import/export =head1 SYNOPSIS -B [B<-h>] [B<-o> fileAPI.h] stem +B [B<-h>] [B<-o> path/fileB] stem =head1 DESCRIPTION Creates a C/C++ header file containing macro definitions for C and -C which on Windows will expand to the appropriate C<__declspec> -and C<__stdcall> keywords and under GCC to a C attribute. +C which on Windows will expand to the appropriate C<__declspec> +and C<__stdcall> keywords respectively, and on GCC to a C +attribute and nothing. =head1 OPTIONS @@ -32,58 +33,81 @@ B understands the following options: Help, display this document as text. -=item B<-o> fileAPI.h +=item B<-o> path/fileB -Name of the output file to be created. Must end C. +Pathname to the output file to be created. Must end with C. =back -If no output filename is set, the filename will be generated by appending -C to the B argument. +If no output filename is set, the name will be generated by appending +C to the I argument. -=head1 USAGE FOR EPICS +The I used must be a legal C identifier, starting with a letter or +underscore followed by any combination of digits, letters and underscores. -In the Makefile that is building a DLL or shared library, set the variable -C to the name of the name of the header file to be generated, -which must end with C. The part before that is referred to as the -I for this library. For example the stem here is C: +=head1 PURPOSE + +The generated header and the macros in it replace the C macros +that were defined in the C header, avoiding the need for shared +library implementation code to define the C macro in +between the import and export headers. The order of including header files no +longer matters when using this approach. + +=head1 USING WITH EPICS + +In a Makefile that is building a DLL or shared library, set the variable +C to the name of the API header file to be generated. This name +must start with a legal C identifier and end with C. The C identifier +part preceeding the C is referred to here as the I for this +header file, and should be a short name in lower case or camelCase. For +example the stem used in the example here is C: # Generate our library API header file - API_HEADER = libComAPI.h + API_HEADER += libComAPI.h Lower down in the RULES section of the same Makefile (below the line that -includes the C<$(TOP)/configure/RULES> file), add a line like this: +says C), add another line like this: # Set the API Building flag while we are building the code - $(LIBNAME) $(SHRLIBNAME): USR_CPPFLAGS += -DLIBCOM_API_BUILDING + $(LIBNAME) $(SHRLIBNAME): USR_CPPFLAGS += -DBUILDING_libCom_API -Replace the string C above with the upper-case version of the stem -that you used in your header filename. +For your library replace the string C in the last word above with +the stem from your header filename. -Then in each header and source file that declares or defines a routine to be -exported by the library, decorate the routine declaration or definition with -the keyword C like this: +Then in each header file that declares a function, global variable or C++ +class or method to be exported by the library, decorate those declarations +with the all-uppercase keyword C as in these examples: LIBCOM_API void epicsExit(int status); + LIBCOM_API int asCheckClientIP; + class LIBCOM_API epicsTime { ... } + LIBCOM_API virtual ~fdManager (); -The header also defines a second macro C which is for Windows -builds to indicate that the calling convention for this routine must be -C<__stdcall>. If needed, this macro should be placed between the return type -and the routine name, like this: +The generated header file also defines a second macro C which on +Windows expands to C<__stdcall> to indicate the calling convention for this +routine. When used, this macro should be placed between the return type and +the routine name, like this: - LIBCOM_API int LIBCOMSTD_API iocshCmd(const char *cmd); + LIBCOM_API int epicsStdCall iocshCmd(const char *cmd); + +It is possible to build more than one shared library in the same Makefile, +although each C or C++ source file can only be included in one library. Just +repeat the above instructions, using different stems for each library. =cut our ($opt_o, $opt_h); sub HELP_MESSAGE { - pod2usage(-exitval => 2, -verbose => $opt_h); + pod2usage(-exitval => 2, -verbose => $opt_h ? 2 : 0); } HELP_MESSAGE() if !getopts('ho:') || $opt_h || @ARGV != 1; my $stem = shift @ARGV; +die "makeAPIheader.pl: API stem '$stem' is not a legal C identifier\n" + unless $stem =~ m/^ [A-Za-z_][0-9A-Za-z_]* $/x; + my $outfile = defined($opt_o) ? $opt_o : "${stem}API.h"; die "makeAPIheader.pl: Output filename must end with 'API.h'\n" @@ -102,7 +126,10 @@ print $o <<"__EOF__"; #define $guard #if defined(_WIN32) || defined(__CYGWIN__) -# define ${STEM}STD_API __stdcall + +# if !defined(epicsStdCall) +# define epicsStdCall __stdcall +# endif # if defined(BUILDING_${stem}_API) && defined(EPICS_BUILD_DLL) /* Building library as dll */ @@ -120,8 +147,8 @@ print $o <<"__EOF__"; # define ${STEM}_API #endif -#if !defined(${STEM}STD_API) -# define ${STEM}STD_API +#if !defined(epicsStdCall) +# define epicsStdCall #endif #endif /* $guard */ From 33c3b1c89ad5155ec1073825f76b24f528afbb6c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 10 Mar 2020 23:42:42 -0500 Subject: [PATCH 07/11] Convert epicsShareAPI to epicsStdCall in modules/ca --- modules/ca/src/client/access.cpp | 72 +++++------ modules/ca/src/client/addrList.h | 8 +- modules/ca/src/client/ca_client_context.cpp | 4 +- modules/ca/src/client/cacIO.h | 2 +- modules/ca/src/client/cadef.h | 134 ++++++++++---------- modules/ca/src/client/caerr.h | 2 +- modules/ca/src/client/iocinf.cpp | 8 +- modules/ca/src/client/oldAccess.h | 74 +++++------ modules/ca/src/client/oldChannelNotify.cpp | 42 +++--- modules/ca/src/client/syncgrp.cpp | 16 +-- modules/ca/src/client/test_event.cpp | 4 +- modules/ca/src/client/udpiiu.cpp | 4 +- modules/ca/src/client/udpiiu.h | 4 +- 13 files changed, 187 insertions(+), 187 deletions(-) diff --git a/modules/ca/src/client/access.cpp b/modules/ca/src/client/access.cpp index 42e25686d..a290805f7 100644 --- a/modules/ca/src/client/access.cpp +++ b/modules/ca/src/client/access.cpp @@ -163,13 +163,13 @@ int fetchClientContext ( ca_client_context **ppcac ) * ca_task_initialize () */ // extern "C" -int epicsShareAPI ca_task_initialize ( void ) +int epicsStdCall ca_task_initialize ( void ) { return ca_context_create ( ca_disable_preemptive_callback ); } // extern "C" -int epicsShareAPI ca_context_create ( +int epicsStdCall ca_context_create ( ca_preemptive_callback_select premptiveCallbackSelect ) { ca_client_context *pcac; @@ -209,7 +209,7 @@ int epicsShareAPI ca_context_create ( // defunct // // extern "C" -int epicsShareAPI ca_modify_host_name ( const char * ) +int epicsStdCall ca_modify_host_name ( const char * ) { return ECA_NORMAL; } @@ -220,7 +220,7 @@ int epicsShareAPI ca_modify_host_name ( const char * ) // defunct // // extern "C" -int epicsShareAPI ca_modify_user_name ( const char * ) +int epicsStdCall ca_modify_user_name ( const char * ) { return ECA_NORMAL; } @@ -229,7 +229,7 @@ int epicsShareAPI ca_modify_user_name ( const char * ) // ca_context_destroy () // // extern "C" -void epicsShareAPI ca_context_destroy () +void epicsStdCall ca_context_destroy () { ca_client_context *pcac; @@ -248,7 +248,7 @@ void epicsShareAPI ca_context_destroy () * releases all resources alloc to a channel access client */ // extern "C" -int epicsShareAPI ca_task_exit () +int epicsStdCall ca_task_exit () { ca_context_destroy (); return ECA_NORMAL; @@ -261,7 +261,7 @@ int epicsShareAPI ca_task_exit () * backwards compatible entry point to ca_search_and_connect() */ // extern "C" -int epicsShareAPI ca_build_and_connect ( const char *name_str, chtype get_type, +int epicsStdCall ca_build_and_connect ( const char *name_str, chtype get_type, arrayElementCount get_count, chid * chan, void *pvalue, caCh *conn_func, void *puser ) { @@ -276,7 +276,7 @@ int epicsShareAPI ca_build_and_connect ( const char *name_str, chtype get_type, * ca_search_and_connect() */ // extern "C" -int epicsShareAPI ca_search_and_connect ( +int epicsStdCall ca_search_and_connect ( const char * name_str, chid * chanptr, caCh * conn_func, void * puser ) { @@ -285,7 +285,7 @@ int epicsShareAPI ca_search_and_connect ( } // extern "C" -int epicsShareAPI ca_create_channel ( +int epicsStdCall ca_create_channel ( const char * name_str, caCh * conn_func, void * puser, capri priority, chid * chanptr ) { @@ -360,7 +360,7 @@ int epicsShareAPI ca_create_channel ( * its context */ // extern "C" -int epicsShareAPI ca_clear_channel ( chid pChan ) +int epicsStdCall ca_clear_channel ( chid pChan ) { ca_client_context & cac = pChan->getClientCtx (); { @@ -399,7 +399,7 @@ int epicsShareAPI ca_clear_channel ( chid pChan ) * Specify an event subroutine to be run for asynch exceptions */ // extern "C" -int epicsShareAPI ca_add_exception_event ( caExceptionHandler *pfunc, void *arg ) +int epicsStdCall ca_add_exception_event ( caExceptionHandler *pfunc, void *arg ) { ca_client_context *pcac; int caStatus = fetchClientContext ( &pcac ); @@ -415,7 +415,7 @@ int epicsShareAPI ca_add_exception_event ( caExceptionHandler *pfunc, void *arg /* * ca_add_masked_array_event */ -int epicsShareAPI ca_add_masked_array_event ( +int epicsStdCall ca_add_masked_array_event ( chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pCallBack, void *pCallBackArg, ca_real, ca_real, ca_real, @@ -428,19 +428,19 @@ int epicsShareAPI ca_add_masked_array_event ( /* * ca_clear_event () */ -int epicsShareAPI ca_clear_event ( evid pMon ) +int epicsStdCall ca_clear_event ( evid pMon ) { return ca_clear_subscription ( pMon ); } // extern "C" -chid epicsShareAPI ca_evid_to_chid ( evid pMon ) +chid epicsStdCall ca_evid_to_chid ( evid pMon ) { return & pMon->channel (); } // extern "C" -int epicsShareAPI ca_pend ( ca_real timeout, int early ) +int epicsStdCall ca_pend ( ca_real timeout, int early ) { if ( early ) { return ca_pend_io ( timeout ); @@ -454,7 +454,7 @@ int epicsShareAPI ca_pend ( ca_real timeout, int early ) * ca_pend_event () */ // extern "C" -int epicsShareAPI ca_pend_event ( ca_real timeout ) +int epicsStdCall ca_pend_event ( ca_real timeout ) { ca_client_context *pcac; int status = fetchClientContext ( &pcac ); @@ -481,7 +481,7 @@ int epicsShareAPI ca_pend_event ( ca_real timeout ) * ca_pend_io () */ // extern "C" -int epicsShareAPI ca_pend_io ( ca_real timeout ) +int epicsStdCall ca_pend_io ( ca_real timeout ) { ca_client_context *pcac; int status = fetchClientContext ( &pcac ); @@ -506,7 +506,7 @@ int epicsShareAPI ca_pend_io ( ca_real timeout ) /* * ca_flush_io () */ -int epicsShareAPI ca_flush_io () +int epicsStdCall ca_flush_io () { ca_client_context * pcac; int caStatus = fetchClientContext (&pcac); @@ -523,7 +523,7 @@ int epicsShareAPI ca_flush_io () /* * CA_TEST_IO () */ -int epicsShareAPI ca_test_io () +int epicsStdCall ca_test_io () { ca_client_context *pcac; int caStatus = fetchClientContext ( &pcac ); @@ -543,7 +543,7 @@ int epicsShareAPI ca_test_io () * CA_SIGNAL() */ // extern "C" -void epicsShareAPI ca_signal ( long ca_status, const char *message ) +void epicsStdCall ca_signal ( long ca_status, const char *message ) { ca_signal_with_file_and_lineno ( ca_status, message, NULL, 0 ); } @@ -558,7 +558,7 @@ void epicsShareAPI ca_signal ( long ca_status, const char *message ) * (if they call this routine again). */ // extern "C" -const char * epicsShareAPI ca_message ( long ca_status ) +const char * epicsStdCall ca_message ( long ca_status ) { unsigned msgNo = CA_EXTRACT_MSG_NO ( ca_status ); @@ -574,7 +574,7 @@ const char * epicsShareAPI ca_message ( long ca_status ) * ca_signal_with_file_and_lineno() */ // extern "C" -void epicsShareAPI ca_signal_with_file_and_lineno ( long ca_status, +void epicsStdCall ca_signal_with_file_and_lineno ( long ca_status, const char *message, const char *pfilenm, int lineno ) { ca_signal_formated ( ca_status, pfilenm, lineno, message ); @@ -584,7 +584,7 @@ void epicsShareAPI ca_signal_with_file_and_lineno ( long ca_status, * ca_signal_formated() */ // extern "C" -void epicsShareAPI ca_signal_formated ( long ca_status, const char *pfilenm, +void epicsStdCall ca_signal_formated ( long ca_status, const char *pfilenm, int lineno, const char *pFormat, ... ) { ca_client_context *pcac; @@ -620,7 +620,7 @@ void epicsShareAPI ca_signal_formated ( long ca_status, const char *pfilenm, * */ // extern "C" -int epicsShareAPI ca_add_fd_registration ( CAFDHANDLER * func, void * arg ) +int epicsStdCall ca_add_fd_registration ( CAFDHANDLER * func, void * arg ) { ca_client_context *pcac; int caStatus = fetchClientContext ( &pcac ); @@ -638,7 +638,7 @@ int epicsShareAPI ca_add_fd_registration ( CAFDHANDLER * func, void * arg ) * function that returns the CA version string */ // extern "C" -const char * epicsShareAPI ca_version () +const char * epicsStdCall ca_version () { return CA_VERSION_STRING ( CA_MINOR_PROTOCOL_REVISION ); } @@ -647,7 +647,7 @@ const char * epicsShareAPI ca_version () * ca_replace_printf_handler () */ // extern "C" -int epicsShareAPI ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ) +int epicsStdCall ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ) { ca_client_context *pcac; int caStatus = fetchClientContext (&pcac); @@ -667,7 +667,7 @@ int epicsShareAPI ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ) * (for testing purposes only) */ // extern "C" -unsigned epicsShareAPI ca_get_ioc_connection_count () +unsigned epicsStdCall ca_get_ioc_connection_count () { ca_client_context * pcac; int caStatus = fetchClientContext ( & pcac ); @@ -678,7 +678,7 @@ unsigned epicsShareAPI ca_get_ioc_connection_count () return pcac->circuitCount (); } -unsigned epicsShareAPI ca_beacon_anomaly_count () +unsigned epicsStdCall ca_beacon_anomaly_count () { ca_client_context * pcac; int caStatus = fetchClientContext ( & pcac ); @@ -690,7 +690,7 @@ unsigned epicsShareAPI ca_beacon_anomaly_count () } // extern "C" -int epicsShareAPI ca_channel_status ( epicsThreadId /* tid */ ) +int epicsStdCall ca_channel_status ( epicsThreadId /* tid */ ) { ::printf ("The R3.14 EPICS OS abstraction API does not allow peeking at thread private storage of another thread.\n"); ::printf ("Please call \"ca_client_status ( unsigned level )\" from the subsystem specific diagnostic code.\n"); @@ -698,7 +698,7 @@ int epicsShareAPI ca_channel_status ( epicsThreadId /* tid */ ) } // extern "C" -int epicsShareAPI ca_client_status ( unsigned level ) +int epicsStdCall ca_client_status ( unsigned level ) { ca_client_context *pcac; int caStatus = fetchClientContext ( &pcac ); @@ -710,7 +710,7 @@ int epicsShareAPI ca_client_status ( unsigned level ) return ECA_NORMAL; } -int epicsShareAPI ca_context_status ( ca_client_context * pcac, unsigned level ) +int epicsStdCall ca_context_status ( ca_client_context * pcac, unsigned level ) { pcac->show ( level ); return ECA_NORMAL; @@ -723,7 +723,7 @@ int epicsShareAPI ca_context_status ( ca_client_context * pcac, unsigned level ) * by another thread */ // extern "C" -struct ca_client_context * epicsShareAPI ca_current_context () +struct ca_client_context * epicsStdCall ca_current_context () { struct ca_client_context *pCtx; if ( caClientContextId ) { @@ -743,7 +743,7 @@ struct ca_client_context * epicsShareAPI ca_current_context () * by another thread */ // extern "C" -int epicsShareAPI ca_attach_context ( struct ca_client_context * pCtx ) +int epicsStdCall ca_attach_context ( struct ca_client_context * pCtx ) { ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId ); if ( pcac && pCtx != 0 ) { @@ -756,14 +756,14 @@ int epicsShareAPI ca_attach_context ( struct ca_client_context * pCtx ) return ECA_NORMAL; } -void epicsShareAPI ca_detach_context () +void epicsStdCall ca_detach_context () { if ( caClientContextId ) { epicsThreadPrivateSet ( caClientContextId, 0 ); } } -int epicsShareAPI ca_preemtive_callback_is_enabled () +int epicsStdCall ca_preemtive_callback_is_enabled () { ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId ); if ( ! pcac ) { @@ -774,7 +774,7 @@ int epicsShareAPI ca_preemtive_callback_is_enabled () // extern "C" -void epicsShareAPI ca_self_test () +void epicsStdCall ca_self_test () { ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId ); if ( ! pcac ) { diff --git a/modules/ca/src/client/addrList.h b/modules/ca/src/client/addrList.h index c59f8e7af..bc0fd9d7e 100644 --- a/modules/ca/src/client/addrList.h +++ b/modules/ca/src/client/addrList.h @@ -19,17 +19,17 @@ extern "C" { #endif -LIBCA_API void epicsShareAPI configureChannelAccessAddressList +LIBCA_API void epicsStdCall configureChannelAccessAddressList ( struct ELLLIST *pList, SOCKET sock, unsigned short port ); -LIBCA_API int epicsShareAPI addAddrToChannelAccessAddressList +LIBCA_API int epicsStdCall addAddrToChannelAccessAddressList ( struct ELLLIST *pList, const ENV_PARAM *pEnv, unsigned short port, int ignoreNonDefaultPort ); -LIBCA_API void epicsShareAPI printChannelAccessAddressList +LIBCA_API void epicsStdCall printChannelAccessAddressList ( const struct ELLLIST *pList ); -LIBCA_API void epicsShareAPI removeDuplicateAddresses +LIBCA_API void epicsStdCall removeDuplicateAddresses ( struct ELLLIST *pDestList, ELLLIST *pSrcList, int silent); #ifdef __cplusplus diff --git a/modules/ca/src/client/ca_client_context.cpp b/modules/ca/src/client/ca_client_context.cpp index 6e5bbb88e..f9b02e192 100644 --- a/modules/ca/src/client/ca_client_context.cpp +++ b/modules/ca/src/client/ca_client_context.cpp @@ -735,12 +735,12 @@ void ca_client_context::installDefaultService ( cacService & service ) ca_client_context::pDefaultService = & service; } -void epicsShareAPI caInstallDefaultService ( cacService & service ) +void epicsStdCall caInstallDefaultService ( cacService & service ) { ca_client_context::installDefaultService ( service ); } -LIBCA_API int epicsShareAPI ca_clear_subscription ( evid pMon ) +LIBCA_API int epicsStdCall ca_clear_subscription ( evid pMon ) { oldChannelNotify & chan = pMon->channel (); ca_client_context & cac = chan.getClientCtx (); diff --git a/modules/ca/src/client/cacIO.h b/modules/ca/src/client/cacIO.h index 640b9a3c1..699626a54 100644 --- a/modules/ca/src/client/cacIO.h +++ b/modules/ca/src/client/cacIO.h @@ -316,7 +316,7 @@ public: cacContextNotify & ) = 0; }; -LIBCA_API void epicsShareAPI caInstallDefaultService ( cacService & service ); +LIBCA_API void epicsStdCall caInstallDefaultService ( cacService & service ); LIBCA_API extern epicsThreadPrivateId caClientCallbackThreadId; diff --git a/modules/ca/src/client/cadef.h b/modules/ca/src/client/cadef.h index afa81f927..32cef0070 100644 --- a/modules/ca/src/client/cadef.h +++ b/modules/ca/src/client/cadef.h @@ -91,7 +91,7 @@ typedef struct event_handler_args { } evargs; typedef void caEventCallBackFunc (struct event_handler_args); -LIBCA_API void epicsShareAPI ca_test_event +LIBCA_API void epicsStdCall ca_test_event ( struct event_handler_args ); @@ -147,13 +147,13 @@ typedef unsigned CA_SYNC_GID; #define TYPENOTCONN (-1) /* the channel's native type when disconnected */ -LIBCA_API short epicsShareAPI ca_field_type (chid chan); -LIBCA_API unsigned long epicsShareAPI ca_element_count (chid chan); -LIBCA_API const char * epicsShareAPI ca_name (chid chan); -LIBCA_API void epicsShareAPI ca_set_puser (chid chan, void *puser); -LIBCA_API void * epicsShareAPI ca_puser (chid chan); -LIBCA_API unsigned epicsShareAPI ca_read_access (chid chan); -LIBCA_API unsigned epicsShareAPI ca_write_access (chid chan); +LIBCA_API short epicsStdCall ca_field_type (chid chan); +LIBCA_API unsigned long epicsStdCall ca_element_count (chid chan); +LIBCA_API const char * epicsStdCall ca_name (chid chan); +LIBCA_API void epicsStdCall ca_set_puser (chid chan, void *puser); +LIBCA_API void * epicsStdCall ca_puser (chid chan); +LIBCA_API unsigned epicsStdCall ca_read_access (chid chan); +LIBCA_API unsigned epicsStdCall ca_write_access (chid chan); /* * cs_ - `channel state' @@ -164,27 +164,27 @@ LIBCA_API unsigned epicsShareAPI ca_write_access (chid chan); * cs_closed channel deleted by user */ enum channel_state {cs_never_conn, cs_prev_conn, cs_conn, cs_closed}; -LIBCA_API enum channel_state epicsShareAPI ca_state (chid chan); +LIBCA_API enum channel_state epicsStdCall ca_state (chid chan); /************************************************************************/ /* Perform Library Initialization */ /* */ /* Must be called once before calling any of the other routines */ /************************************************************************/ -LIBCA_API int epicsShareAPI ca_task_initialize (void); +LIBCA_API int epicsStdCall ca_task_initialize (void); enum ca_preemptive_callback_select { ca_disable_preemptive_callback, ca_enable_preemptive_callback }; -LIBCA_API int epicsShareAPI +LIBCA_API int epicsStdCall ca_context_create (enum ca_preemptive_callback_select select); -LIBCA_API void epicsShareAPI ca_detach_context (); +LIBCA_API void epicsStdCall ca_detach_context (); /************************************************************************/ /* Remove CA facility from your task */ /* */ /* Normally called automatically at task exit */ /************************************************************************/ -LIBCA_API int epicsShareAPI ca_task_exit (void); -LIBCA_API void epicsShareAPI ca_context_destroy (void); +LIBCA_API int epicsStdCall ca_task_exit (void); +LIBCA_API void epicsStdCall ca_context_destroy (void); typedef unsigned capri; #define CA_PRIORITY_MAX 99 @@ -207,7 +207,7 @@ typedef unsigned capri; * priority R priority level in the server 0 - 100 * pChanID RW channel id written here */ -LIBCA_API int epicsShareAPI ca_create_channel +LIBCA_API int epicsStdCall ca_create_channel ( const char *pChanName, caCh *pConnStateCallback, @@ -222,7 +222,7 @@ LIBCA_API int epicsShareAPI ca_create_channel * chan R channel identifier * pfunc R address of connection call-back function */ -LIBCA_API int epicsShareAPI ca_change_connection_event +LIBCA_API int epicsStdCall ca_change_connection_event ( chid chan, caCh * pfunc @@ -234,7 +234,7 @@ LIBCA_API int epicsShareAPI ca_change_connection_event * chan R channel identifier * pfunc R address of access rights call-back function */ -LIBCA_API int epicsShareAPI ca_replace_access_rights_event ( +LIBCA_API int epicsStdCall ca_replace_access_rights_event ( chid chan, caArh *pfunc ); @@ -249,7 +249,7 @@ LIBCA_API int epicsShareAPI ca_replace_access_rights_event ( * call-back function */ typedef void caExceptionHandler (struct exception_handler_args); -LIBCA_API int epicsShareAPI ca_add_exception_event +LIBCA_API int epicsStdCall ca_add_exception_event ( caExceptionHandler *pfunc, void *pArg @@ -261,7 +261,7 @@ LIBCA_API int epicsShareAPI ca_add_exception_event * * chanId R channel ID */ -LIBCA_API int epicsShareAPI ca_clear_channel +LIBCA_API int epicsStdCall ca_clear_channel ( chid chanId ); @@ -309,7 +309,7 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue) * chan R channel identifier * pValue R new channel value copied from this location */ -LIBCA_API int epicsShareAPI ca_array_put +LIBCA_API int epicsStdCall ca_array_put ( chtype type, unsigned long count, @@ -334,7 +334,7 @@ LIBCA_API int epicsShareAPI ca_array_put * pFunc R pointer to call-back function * pArg R copy of this pointer passed to pFunc */ -LIBCA_API int epicsShareAPI ca_array_put_callback +LIBCA_API int epicsStdCall ca_array_put_callback ( chtype type, unsigned long count, @@ -391,7 +391,7 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue)) * chan R channel identifier * pValue W channel value copied to this location */ -LIBCA_API int epicsShareAPI ca_array_get +LIBCA_API int epicsStdCall ca_array_get ( chtype type, unsigned long count, @@ -450,7 +450,7 @@ ca_array_get_callback (type, 1u, chan, pFunc, pArg) * pFunc R pointer to call-back function * pArg R copy of this pointer passed to pFunc */ -LIBCA_API int epicsShareAPI ca_array_get_callback +LIBCA_API int epicsStdCall ca_array_get_callback ( chtype type, unsigned long count, @@ -480,7 +480,7 @@ LIBCA_API int epicsShareAPI ca_array_get_callback * pArg R copy of this pointer passed to pFunc * pEventID W event id written at specified address */ -LIBCA_API int epicsShareAPI ca_create_subscription +LIBCA_API int epicsStdCall ca_create_subscription ( chtype type, unsigned long count, @@ -501,12 +501,12 @@ LIBCA_API int epicsShareAPI ca_create_subscription * * eventID R event id */ -LIBCA_API int epicsShareAPI ca_clear_subscription +LIBCA_API int epicsStdCall ca_clear_subscription ( evid eventID ); -LIBCA_API chid epicsShareAPI ca_evid_to_chid ( evid id ); +LIBCA_API chid epicsStdCall ca_evid_to_chid ( evid id ); /************************************************************************/ @@ -560,7 +560,7 @@ LIBCA_API chid epicsShareAPI ca_evid_to_chid ( evid id ); * * timeOut R wait for this delay in seconds */ -LIBCA_API int epicsShareAPI ca_pend_event (ca_real timeOut); +LIBCA_API int epicsStdCall ca_pend_event (ca_real timeOut); #define ca_poll() ca_pend_event(1e-12) /* @@ -570,10 +570,10 @@ LIBCA_API int epicsShareAPI ca_pend_event (ca_real timeOut); * if all get requests (or search requests with null * connection handler pointer have completed) */ -LIBCA_API int epicsShareAPI ca_pend_io (ca_real timeOut); +LIBCA_API int epicsStdCall ca_pend_io (ca_real timeOut); /* calls ca_pend_io() if early is true otherwise ca_pend_event() is called */ -LIBCA_API int epicsShareAPI ca_pend (ca_real timeout, int early); +LIBCA_API int epicsStdCall ca_pend (ca_real timeout, int early); /* * ca_test_io() @@ -581,7 +581,7 @@ LIBCA_API int epicsShareAPI ca_pend (ca_real timeout, int early); * returns TRUE when get requests (or search requests with null * connection handler pointer) are outstanding */ -LIBCA_API int epicsShareAPI ca_test_io (void); +LIBCA_API int epicsStdCall ca_test_io (void); /************************************************************************/ /* Send out all outstanding messages in the send queue */ @@ -589,7 +589,7 @@ LIBCA_API int epicsShareAPI ca_test_io (void); /* * ca_flush_io() */ -LIBCA_API int epicsShareAPI ca_flush_io (void); +LIBCA_API int epicsStdCall ca_flush_io (void); /* @@ -598,7 +598,7 @@ LIBCA_API int epicsShareAPI ca_flush_io (void); * errorCode R status returned from channel access function * pCtxStr R context string included with error print out */ -LIBCA_API void epicsShareAPI ca_signal +LIBCA_API void epicsStdCall ca_signal ( long errorCode, const char *pCtxStr @@ -612,7 +612,7 @@ LIBCA_API void epicsShareAPI ca_signal * lineNo R line number included with error print out * */ -LIBCA_API void epicsShareAPI ca_signal_with_file_and_lineno +LIBCA_API void epicsStdCall ca_signal_with_file_and_lineno ( long errorCode, const char *pCtxStr, @@ -628,7 +628,7 @@ LIBCA_API void epicsShareAPI ca_signal_with_file_and_lineno * pFormat R printf dtyle format string (and optional arguments) * */ -LIBCA_API void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm, +LIBCA_API void epicsStdCall ca_signal_formated (long ca_status, const char *pfilenm, int lineno, const char *pFormat, ...); /* @@ -638,9 +638,9 @@ LIBCA_API void epicsShareAPI ca_signal_formated (long ca_status, const char *pfi * * !!!! this function is _not_ thread safe !!!! */ -LIBCA_API const char * epicsShareAPI ca_host_name (chid channel); +LIBCA_API const char * epicsStdCall ca_host_name (chid channel); /* thread safe version */ -LIBCA_API unsigned epicsShareAPI ca_get_host_name ( chid pChan, +LIBCA_API unsigned epicsStdCall ca_get_host_name ( chid pChan, char *pBuf, unsigned bufLength ); /* @@ -663,7 +663,7 @@ typedef void CAFDHANDLER (void *parg, int fd, int opened); * when an fd is created or deleted * pArg R argument passed to above function */ -LIBCA_API int epicsShareAPI ca_add_fd_registration +LIBCA_API int epicsStdCall ca_add_fd_registration ( CAFDHANDLER *pHandler, void *pArg @@ -687,7 +687,7 @@ LIBCA_API int epicsShareAPI ca_add_fd_registration * * pgid W pointer to sync group id that will be written */ -LIBCA_API int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); +LIBCA_API int epicsStdCall ca_sg_create (CA_SYNC_GID * pgid); /* * ca_sg_delete() @@ -696,7 +696,7 @@ LIBCA_API int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); * * gid R sync group id */ -LIBCA_API int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); +LIBCA_API int epicsStdCall ca_sg_delete (const CA_SYNC_GID gid); /* * ca_sg_block() @@ -707,7 +707,7 @@ LIBCA_API int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); * timeout R wait for this duration prior to timing out * and returning ECA_TIMEOUT */ -LIBCA_API int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real timeout); +LIBCA_API int epicsStdCall ca_sg_block (const CA_SYNC_GID gid, ca_real timeout); /* * ca_sg_test() @@ -718,14 +718,14 @@ LIBCA_API int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real timeout) * * returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE */ -LIBCA_API int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid); +LIBCA_API int epicsStdCall ca_sg_test (const CA_SYNC_GID gid); /* * ca_sg_reset * * gid R sync group id */ -LIBCA_API int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid); +LIBCA_API int epicsStdCall ca_sg_reset(const CA_SYNC_GID gid); /* * ca_sg_array_get() @@ -739,7 +739,7 @@ LIBCA_API int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid); * chan R channel identifier * pValue W channel value copied to this location */ -LIBCA_API int epicsShareAPI ca_sg_array_get +LIBCA_API int epicsStdCall ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, @@ -763,7 +763,7 @@ ca_sg_array_get (gid, type, 1u, chan, pValue) * chan R channel identifier * pValue R new channel value copied from this location */ -LIBCA_API int epicsShareAPI ca_sg_array_put +LIBCA_API int epicsStdCall ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, @@ -782,9 +782,9 @@ ca_sg_array_put (gid, type, 1u, chan, pValue) * * gid R sync group id */ -LIBCA_API int epicsShareAPI ca_sg_stat (CA_SYNC_GID gid); +LIBCA_API int epicsStdCall ca_sg_stat (CA_SYNC_GID gid); -LIBCA_API void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, const void * pbuffer); +LIBCA_API void epicsStdCall ca_dump_dbr (chtype type, unsigned count, const void * pbuffer); /* @@ -797,14 +797,14 @@ LIBCA_API void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, const voi * * (returns true or false) */ -LIBCA_API int epicsShareAPI ca_v42_ok (chid chan); +LIBCA_API int epicsStdCall ca_v42_ok (chid chan); /* * ca_version() * * returns the CA version string */ -LIBCA_API const char * epicsShareAPI ca_version (void); +LIBCA_API const char * epicsStdCall ca_version (void); /* * ca_replace_printf_handler () @@ -819,7 +819,7 @@ LIBCA_API const char * epicsShareAPI ca_version (void); */ #ifndef CA_DONT_INCLUDE_STDARGH typedef int caPrintfFunc (const char *pformat, va_list args); -LIBCA_API int epicsShareAPI ca_replace_printf_handler ( +LIBCA_API int epicsStdCall ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ); #endif /*CA_DONT_INCLUDE_STDARGH*/ @@ -827,24 +827,24 @@ LIBCA_API int epicsShareAPI ca_replace_printf_handler ( /* * (for testing purposes only) */ -LIBCA_API unsigned epicsShareAPI ca_get_ioc_connection_count (void); -LIBCA_API int epicsShareAPI ca_preemtive_callback_is_enabled (void); -LIBCA_API void epicsShareAPI ca_self_test (void); -LIBCA_API unsigned epicsShareAPI ca_beacon_anomaly_count (void); -LIBCA_API unsigned epicsShareAPI ca_search_attempts (chid chan); -LIBCA_API double epicsShareAPI ca_beacon_period (chid chan); -LIBCA_API double epicsShareAPI ca_receive_watchdog_delay (chid chan); +LIBCA_API unsigned epicsStdCall ca_get_ioc_connection_count (void); +LIBCA_API int epicsStdCall ca_preemtive_callback_is_enabled (void); +LIBCA_API void epicsStdCall ca_self_test (void); +LIBCA_API unsigned epicsStdCall ca_beacon_anomaly_count (void); +LIBCA_API unsigned epicsStdCall ca_search_attempts (chid chan); +LIBCA_API double epicsStdCall ca_beacon_period (chid chan); +LIBCA_API double epicsStdCall ca_receive_watchdog_delay (chid chan); /* * used when an auxillary thread needs to join a CA client context started * by another thread */ -LIBCA_API struct ca_client_context * epicsShareAPI ca_current_context (); -LIBCA_API int epicsShareAPI ca_attach_context ( struct ca_client_context * context ); +LIBCA_API struct ca_client_context * epicsStdCall ca_current_context (); +LIBCA_API int epicsStdCall ca_attach_context ( struct ca_client_context * context ); -LIBCA_API int epicsShareAPI ca_client_status ( unsigned level ); -LIBCA_API int epicsShareAPI ca_context_status ( struct ca_client_context *, unsigned level ); +LIBCA_API int epicsStdCall ca_client_status ( unsigned level ); +LIBCA_API int epicsStdCall ca_context_status ( struct ca_client_context *, unsigned level ); /* * deprecated @@ -853,16 +853,16 @@ LIBCA_API int epicsShareAPI ca_context_status ( struct ca_client_context *, unsi ca_build_and_connect(NAME, XXXXX, 1, CHIDPTR, YYYYY, 0, 0) #define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\ ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0) -LIBCA_API int epicsShareAPI ca_build_and_connect +LIBCA_API int epicsStdCall ca_build_and_connect ( const char *pChanName, chtype, unsigned long, chid * pChanID, void *, caCh * pFunc, void * pArg ); #define ca_search(pChanName, pChanID)\ ca_search_and_connect (pChanName, pChanID, 0, 0) -LIBCA_API int epicsShareAPI ca_search_and_connect +LIBCA_API int epicsStdCall ca_search_and_connect ( const char * pChanName, chid * pChanID, caCh *pFunc, void * pArg ); -LIBCA_API int epicsShareAPI ca_channel_status (epicsThreadId tid); -LIBCA_API int epicsShareAPI ca_clear_event ( evid eventID ); +LIBCA_API int epicsStdCall ca_channel_status (epicsThreadId tid); +LIBCA_API int epicsStdCall ca_clear_event ( evid eventID ); #define ca_add_event(type,chan,pFunc,pArg,pEventID)\ ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID) #define ca_add_delta_event(TYPE,CHID,ENTRY,ARG,DELTA,EVID)\ @@ -871,7 +871,7 @@ ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID) ca_add_array_event(TYPE,1,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID) #define ca_add_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)\ ca_add_masked_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID, DBE_VALUE | DBE_ALARM) -LIBCA_API int epicsShareAPI ca_add_masked_array_event +LIBCA_API int epicsStdCall ca_add_masked_array_event ( chtype type, unsigned long count, chid chanId, caEventCallBackFunc * pFunc, void * pArg, ca_real p_delta, ca_real n_delta, ca_real timeout, evid * pEventID, long mask ); @@ -879,8 +879,8 @@ LIBCA_API int epicsShareAPI ca_add_masked_array_event /* * defunct */ -LIBCA_API int epicsShareAPI ca_modify_user_name ( const char *pUserName ); -LIBCA_API int epicsShareAPI ca_modify_host_name ( const char *pHostName ); +LIBCA_API int epicsStdCall ca_modify_user_name ( const char *pUserName ); +LIBCA_API int epicsStdCall ca_modify_host_name ( const char *pHostName ); #ifdef __cplusplus } diff --git a/modules/ca/src/client/caerr.h b/modules/ca/src/client/caerr.h index ead86db9f..9104a4f02 100644 --- a/modules/ca/src/client/caerr.h +++ b/modules/ca/src/client/caerr.h @@ -140,7 +140,7 @@ extern "C" { #endif -LIBCA_API const char * epicsShareAPI ca_message(long ca_status); +LIBCA_API const char * epicsStdCall ca_message(long ca_status); LIBCA_API extern const char * ca_message_text []; diff --git a/modules/ca/src/client/iocinf.cpp b/modules/ca/src/client/iocinf.cpp index c0f6e7cab..8dcf8c087 100644 --- a/modules/ca/src/client/iocinf.cpp +++ b/modules/ca/src/client/iocinf.cpp @@ -70,7 +70,7 @@ static char *getToken ( const char **ppString, char *pBuf, unsigned bufSIze ) /* * addAddrToChannelAccessAddressList () */ -extern "C" int epicsShareAPI addAddrToChannelAccessAddressList +extern "C" int epicsStdCall addAddrToChannelAccessAddressList ( ELLLIST *pList, const ENV_PARAM *pEnv, unsigned short port, int ignoreNonDefaultPort ) { @@ -119,7 +119,7 @@ extern "C" int epicsShareAPI addAddrToChannelAccessAddressList /* * removeDuplicateAddresses () */ -extern "C" void epicsShareAPI removeDuplicateAddresses +extern "C" void epicsStdCall removeDuplicateAddresses ( ELLLIST *pDestList, ELLLIST *pSrcList, int silent ) { ELLNODE *pRawNode; @@ -179,7 +179,7 @@ static void forcePort ( ELLLIST *pList, unsigned short port ) /* * configureChannelAccessAddressList () */ -extern "C" void epicsShareAPI configureChannelAccessAddressList +extern "C" void epicsStdCall configureChannelAccessAddressList ( ELLLIST *pList, SOCKET sock, unsigned short port ) { ELLLIST tmpList; @@ -247,7 +247,7 @@ extern "C" void epicsShareAPI configureChannelAccessAddressList /* * printChannelAccessAddressList () */ -extern "C" void epicsShareAPI printChannelAccessAddressList ( const ELLLIST *pList ) +extern "C" void epicsStdCall printChannelAccessAddressList ( const ELLLIST *pList ) { osiSockAddrNode *pNode; diff --git a/modules/ca/src/client/oldAccess.h b/modules/ca/src/client/oldAccess.h index 273b550c5..4fdb89a33 100644 --- a/modules/ca/src/client/oldAccess.h +++ b/modules/ca/src/client/oldAccess.h @@ -48,53 +48,53 @@ public: epicsGuard < epicsMutex > & mutexGuard ); // legacy C API - friend unsigned epicsShareAPI ca_get_host_name ( + friend unsigned epicsStdCall ca_get_host_name ( chid pChan, char * pBuf, unsigned bufLength ); - friend const char * epicsShareAPI ca_host_name ( + friend const char * epicsStdCall ca_host_name ( chid pChan ); - friend const char * epicsShareAPI ca_name ( + friend const char * epicsStdCall ca_name ( chid pChan ); - friend void epicsShareAPI ca_set_puser ( + friend void epicsStdCall ca_set_puser ( chid pChan, void * puser ); - friend void * epicsShareAPI ca_puser ( + friend void * epicsStdCall ca_puser ( chid pChan ); - friend int epicsShareAPI ca_change_connection_event ( + friend int epicsStdCall ca_change_connection_event ( chid pChan, caCh * pfunc ); - friend int epicsShareAPI ca_replace_access_rights_event ( + friend int epicsStdCall ca_replace_access_rights_event ( chid pChan, caArh *pfunc ); - friend int epicsShareAPI ca_array_get ( chtype type, + friend int epicsStdCall ca_array_get ( chtype type, arrayElementCount count, chid pChan, void * pValue ); - friend int epicsShareAPI ca_array_get_callback ( chtype type, + friend int epicsStdCall ca_array_get_callback ( chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pfunc, void *arg ); - friend int epicsShareAPI ca_array_put ( + friend int epicsStdCall ca_array_put ( chtype type, arrayElementCount count, chid pChan, const void * pValue ); - friend int epicsShareAPI ca_array_put_callback ( + friend int epicsStdCall ca_array_put_callback ( chtype type, arrayElementCount count, chid pChan, const void *pValue, caEventCallBackFunc *pfunc, void *usrarg ); - friend double epicsShareAPI ca_beacon_period ( + friend double epicsStdCall ca_beacon_period ( chid pChan ); - friend unsigned epicsShareAPI ca_search_attempts ( + friend unsigned epicsStdCall ca_search_attempts ( chid pChan ); - friend unsigned epicsShareAPI ca_write_access ( + friend unsigned epicsStdCall ca_write_access ( chid pChan ); - friend unsigned epicsShareAPI ca_read_access ( + friend unsigned epicsStdCall ca_read_access ( chid pChan ); - friend short epicsShareAPI ca_field_type ( + friend short epicsStdCall ca_field_type ( chid pChan ); - friend arrayElementCount epicsShareAPI ca_element_count ( + friend arrayElementCount epicsStdCall ca_element_count ( chid pChan ); - friend int epicsShareAPI ca_v42_ok ( + friend int epicsStdCall ca_v42_ok ( chid pChan ); - friend int epicsShareAPI ca_create_subscription ( + friend int epicsStdCall ca_create_subscription ( chtype type, arrayElementCount count, chid pChan, long mask, caEventCallBackFunc * pCallBack, void * pCallBackArg, evid * monixptr ); - friend enum channel_state epicsShareAPI ca_state ( + friend enum channel_state epicsStdCall ca_state ( chid pChan ); - friend double epicsShareAPI ca_receive_watchdog_delay ( + friend double epicsStdCall ca_receive_watchdog_delay ( chid pChan ); unsigned getName ( @@ -340,35 +340,35 @@ public: void whenThereIsAnExceptionDestroySyncGroupIO ( epicsGuard < epicsMutex > &, T & ); // legacy C API - friend int epicsShareAPI ca_create_channel ( + friend int epicsStdCall ca_create_channel ( const char * name_str, caCh * conn_func, void * puser, capri priority, chid * chanptr ); - friend int epicsShareAPI ca_clear_channel ( chid pChan ); - friend int epicsShareAPI ca_array_get ( chtype type, + friend int epicsStdCall ca_clear_channel ( chid pChan ); + friend int epicsStdCall ca_array_get ( chtype type, arrayElementCount count, chid pChan, void * pValue ); - friend int epicsShareAPI ca_array_get_callback ( chtype type, + friend int epicsStdCall ca_array_get_callback ( chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pfunc, void *arg ); - friend int epicsShareAPI ca_array_put ( chtype type, + friend int epicsStdCall ca_array_put ( chtype type, arrayElementCount count, chid pChan, const void * pValue ); - friend int epicsShareAPI ca_array_put_callback ( chtype type, + friend int epicsStdCall ca_array_put_callback ( chtype type, arrayElementCount count, chid pChan, const void * pValue, caEventCallBackFunc *pfunc, void *usrarg ); - friend int epicsShareAPI ca_create_subscription ( + friend int epicsStdCall ca_create_subscription ( chtype type, arrayElementCount count, chid pChan, long mask, caEventCallBackFunc * pCallBack, void * pCallBackArg, evid *monixptr ); - friend int epicsShareAPI ca_flush_io (); - friend int epicsShareAPI ca_clear_subscription ( evid pMon ); - friend int epicsShareAPI ca_sg_create ( CA_SYNC_GID * pgid ); - friend int epicsShareAPI ca_sg_delete ( const CA_SYNC_GID gid ); - friend int epicsShareAPI ca_sg_block ( const CA_SYNC_GID gid, ca_real timeout ); - friend int epicsShareAPI ca_sg_reset ( const CA_SYNC_GID gid ); - friend int epicsShareAPI ca_sg_test ( const CA_SYNC_GID gid ); - friend int epicsShareAPI ca_sg_array_get ( const CA_SYNC_GID gid, + friend int epicsStdCall ca_flush_io (); + friend int epicsStdCall ca_clear_subscription ( evid pMon ); + friend int epicsStdCall ca_sg_create ( CA_SYNC_GID * pgid ); + friend int epicsStdCall ca_sg_delete ( const CA_SYNC_GID gid ); + friend int epicsStdCall ca_sg_block ( const CA_SYNC_GID gid, ca_real timeout ); + friend int epicsStdCall ca_sg_reset ( const CA_SYNC_GID gid ); + friend int epicsStdCall ca_sg_test ( const CA_SYNC_GID gid ); + friend int epicsStdCall ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, arrayElementCount count, chid pChan, void *pValue ); - friend int epicsShareAPI ca_sg_array_put ( const CA_SYNC_GID gid, + friend int epicsStdCall ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, arrayElementCount count, chid pChan, const void *pValue ); friend int ca_sync_group_destroy ( CallbackGuard & cbGuard, diff --git a/modules/ca/src/client/oldChannelNotify.cpp b/modules/ca/src/client/oldChannelNotify.cpp index 1af7a7453..2c546edbb 100644 --- a/modules/ca/src/client/oldChannelNotify.cpp +++ b/modules/ca/src/client/oldChannelNotify.cpp @@ -172,7 +172,7 @@ void oldChannelNotify::operator delete ( void * ) /* * ca_get_host_name () */ -unsigned epicsShareAPI ca_get_host_name ( +unsigned epicsStdCall ca_get_host_name ( chid pChan, char * pBuf, unsigned bufLength ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef() ); @@ -185,7 +185,7 @@ unsigned epicsShareAPI ca_get_host_name ( * !!!! not thread safe !!!! * */ -const char * epicsShareAPI ca_host_name ( +const char * epicsStdCall ca_host_name ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); @@ -195,7 +195,7 @@ const char * epicsShareAPI ca_host_name ( /* * ca_set_puser () */ -void epicsShareAPI ca_set_puser ( +void epicsStdCall ca_set_puser ( chid pChan, void * puser ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); @@ -205,7 +205,7 @@ void epicsShareAPI ca_set_puser ( /* * ca_get_puser () */ -void * epicsShareAPI ca_puser ( +void * epicsStdCall ca_puser ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); @@ -215,7 +215,7 @@ void * epicsShareAPI ca_puser ( /* * Specify an event subroutine to be run for connection events */ -int epicsShareAPI ca_change_connection_event ( chid pChan, caCh * pfunc ) +int epicsStdCall ca_change_connection_event ( chid pChan, caCh * pfunc ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); if ( ! pChan->currentlyConnected ) { @@ -237,7 +237,7 @@ int epicsShareAPI ca_change_connection_event ( chid pChan, caCh * pfunc ) /* * ca_replace_access_rights_event */ -int epicsShareAPI ca_replace_access_rights_event ( +int epicsStdCall ca_replace_access_rights_event ( chid pChan, caArh *pfunc ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); @@ -264,7 +264,7 @@ int epicsShareAPI ca_replace_access_rights_event ( /* * ca_array_get () */ -int epicsShareAPI ca_array_get ( chtype type, +int epicsStdCall ca_array_get ( chtype type, arrayElementCount count, chid pChan, void *pValue ) { int caStatus; @@ -332,7 +332,7 @@ int epicsShareAPI ca_array_get ( chtype type, /* * ca_array_get_callback () */ -int epicsShareAPI ca_array_get_callback ( chtype type, +int epicsStdCall ca_array_get_callback ( chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pfunc, void *arg ) { @@ -409,7 +409,7 @@ void oldChannelNotify::read ( /* * ca_array_put_callback () */ -int epicsShareAPI ca_array_put_callback ( chtype type, arrayElementCount count, +int epicsStdCall ca_array_put_callback ( chtype type, arrayElementCount count, chid pChan, const void *pValue, caEventCallBackFunc *pfunc, void *usrarg ) { int caStatus; @@ -473,7 +473,7 @@ int epicsShareAPI ca_array_put_callback ( chtype type, arrayElementCount count, /* * ca_array_put () */ -int epicsShareAPI ca_array_put ( chtype type, arrayElementCount count, +int epicsStdCall ca_array_put ( chtype type, arrayElementCount count, chid pChan, const void * pValue ) { if ( type < 0 ) { @@ -527,7 +527,7 @@ int epicsShareAPI ca_array_put ( chtype type, arrayElementCount count, return caStatus; } -int epicsShareAPI ca_create_subscription ( +int epicsStdCall ca_create_subscription ( chtype type, arrayElementCount count, chid pChan, long mask, caEventCallBackFunc * pCallBack, void * pCallBackArg, evid * monixptr ) @@ -618,7 +618,7 @@ void oldChannelNotify::write ( /* * ca_field_type() */ -short epicsShareAPI ca_field_type ( chid pChan ) +short epicsStdCall ca_field_type ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.nativeType ( guard ); @@ -627,7 +627,7 @@ short epicsShareAPI ca_field_type ( chid pChan ) /* * ca_element_count () */ -arrayElementCount epicsShareAPI ca_element_count ( chid pChan ) +arrayElementCount epicsStdCall ca_element_count ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.nativeElementCount ( guard ); @@ -636,7 +636,7 @@ arrayElementCount epicsShareAPI ca_element_count ( chid pChan ) /* * ca_state () */ -enum channel_state epicsShareAPI ca_state ( chid pChan ) +enum channel_state epicsStdCall ca_state ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); if ( pChan->io.connected ( guard ) ) { @@ -653,7 +653,7 @@ enum channel_state epicsShareAPI ca_state ( chid pChan ) /* * ca_read_access () */ -unsigned epicsShareAPI ca_read_access ( chid pChan ) +unsigned epicsStdCall ca_read_access ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.accessRights(guard).readPermit(); @@ -662,7 +662,7 @@ unsigned epicsShareAPI ca_read_access ( chid pChan ) /* * ca_write_access () */ -unsigned epicsShareAPI ca_write_access ( chid pChan ) +unsigned epicsStdCall ca_write_access ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.accessRights(guard).writePermit(); @@ -671,25 +671,25 @@ unsigned epicsShareAPI ca_write_access ( chid pChan ) /* * ca_name () */ -const char * epicsShareAPI ca_name ( chid pChan ) +const char * epicsStdCall ca_name ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.pName ( guard ); } -unsigned epicsShareAPI ca_search_attempts ( chid pChan ) +unsigned epicsStdCall ca_search_attempts ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.searchAttempts ( guard ); } -double epicsShareAPI ca_beacon_period ( chid pChan ) +double epicsStdCall ca_beacon_period ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.beaconPeriod ( guard ); } -double epicsShareAPI ca_receive_watchdog_delay ( chid pChan ) +double epicsStdCall ca_receive_watchdog_delay ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.receiveWatchdogDelay ( guard ); @@ -698,7 +698,7 @@ double epicsShareAPI ca_receive_watchdog_delay ( chid pChan ) /* * ca_v42_ok(chid chan) */ -int epicsShareAPI ca_v42_ok ( chid pChan ) +int epicsStdCall ca_v42_ok ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.ca_v42_ok ( guard ); diff --git a/modules/ca/src/client/syncgrp.cpp b/modules/ca/src/client/syncgrp.cpp index 1ba8057d0..e938fa579 100644 --- a/modules/ca/src/client/syncgrp.cpp +++ b/modules/ca/src/client/syncgrp.cpp @@ -21,7 +21,7 @@ /* * ca_sg_create() */ -extern "C" int epicsShareAPI ca_sg_create ( CA_SYNC_GID * pgid ) +extern "C" int epicsStdCall ca_sg_create ( CA_SYNC_GID * pgid ) { ca_client_context * pcac; int caStatus; @@ -65,7 +65,7 @@ int ca_sync_group_destroy ( CallbackGuard & cbGuard, epicsGuard < epicsMutex > & /* * ca_sg_delete() */ -extern "C" int epicsShareAPI ca_sg_delete ( const CA_SYNC_GID gid ) +extern "C" int epicsStdCall ca_sg_delete ( const CA_SYNC_GID gid ) { ca_client_context * pcac; int caStatus = fetchClientContext ( & pcac ); @@ -124,7 +124,7 @@ void sync_group_reset ( ca_client_context & client, CASG & sg ) // !!!! is disabled. This prevents the preemptive callback lock from being released // !!!! by other threads than the one that locked it. // -extern "C" int epicsShareAPI ca_sg_block ( +extern "C" int epicsStdCall ca_sg_block ( const CA_SYNC_GID gid, ca_real timeout ) { ca_client_context *pcac; @@ -152,7 +152,7 @@ extern "C" int epicsShareAPI ca_sg_block ( /* * ca_sg_reset */ -extern "C" int epicsShareAPI ca_sg_reset ( const CA_SYNC_GID gid ) +extern "C" int epicsStdCall ca_sg_reset ( const CA_SYNC_GID gid ) { ca_client_context *pcac; int caStatus = fetchClientContext (&pcac); @@ -176,7 +176,7 @@ extern "C" int epicsShareAPI ca_sg_reset ( const CA_SYNC_GID gid ) /* * ca_sg_stat */ -extern "C" int epicsShareAPI ca_sg_stat ( const CA_SYNC_GID gid ) +extern "C" int epicsStdCall ca_sg_stat ( const CA_SYNC_GID gid ) { ca_client_context * pcac; int caStatus = fetchClientContext ( &pcac ); @@ -199,7 +199,7 @@ extern "C" int epicsShareAPI ca_sg_stat ( const CA_SYNC_GID gid ) /* * ca_sg_test */ -extern "C" int epicsShareAPI ca_sg_test ( const CA_SYNC_GID gid ) +extern "C" int epicsStdCall ca_sg_test ( const CA_SYNC_GID gid ) { ca_client_context * pcac; int caStatus = fetchClientContext ( &pcac ); @@ -243,7 +243,7 @@ extern "C" int epicsShareAPI ca_sg_test ( const CA_SYNC_GID gid ) /* * ca_sg_array_put() */ -extern "C" int epicsShareAPI ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, +extern "C" int epicsStdCall ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, arrayElementCount count, chid pChan, const void *pValue ) { ca_client_context *pcac; @@ -305,7 +305,7 @@ extern "C" int epicsShareAPI ca_sg_array_put ( const CA_SYNC_GID gid, chtype typ /* * ca_sg_array_get() */ -extern "C" int epicsShareAPI ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, +extern "C" int epicsStdCall ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, arrayElementCount count, chid pChan, void *pValue ) { ca_client_context *pcac; diff --git a/modules/ca/src/client/test_event.cpp b/modules/ca/src/client/test_event.cpp index 78179f31e..18469ab3b 100644 --- a/modules/ca/src/client/test_event.cpp +++ b/modules/ca/src/client/test_event.cpp @@ -17,7 +17,7 @@ #include "cadef.h" -extern "C" void epicsShareAPI ca_test_event ( struct event_handler_args args ) +extern "C" void epicsStdCall ca_test_event ( struct event_handler_args args ) { chtype nativeType = ca_field_type ( args.chid ); const char * pNativeTypeName = ""; @@ -47,7 +47,7 @@ extern "C" void epicsShareAPI ca_test_event ( struct event_handler_args args ) * ca_dump_dbr() * dump the specified dbr type to stdout */ -extern "C" void epicsShareAPI ca_dump_dbr ( +extern "C" void epicsStdCall ca_dump_dbr ( chtype type, unsigned count, const void * pbuffer ) { unsigned i; diff --git a/modules/ca/src/client/udpiiu.cpp b/modules/ca/src/client/udpiiu.cpp index de94f1f63..e3879bae2 100644 --- a/modules/ca/src/client/udpiiu.cpp +++ b/modules/ca/src/client/udpiiu.cpp @@ -461,7 +461,7 @@ void udpiiu :: M_repeaterTimerNotify :: repeaterRegistrationMessage ( unsigned a * * register with the repeater */ -void epicsShareAPI caRepeaterRegistrationMessage ( +void epicsStdCall caRepeaterRegistrationMessage ( SOCKET sock, unsigned repeaterPort, unsigned attemptNumber ) { osiSockAddr saddr; @@ -578,7 +578,7 @@ void epicsShareAPI caRepeaterRegistrationMessage ( * * 072392 - problem solved by using SO_REUSEADDR */ -void epicsShareAPI caStartRepeaterIfNotInstalled ( unsigned repeaterPort ) +void epicsStdCall caStartRepeaterIfNotInstalled ( unsigned repeaterPort ) { bool installed = false; int status; diff --git a/modules/ca/src/client/udpiiu.h b/modules/ca/src/client/udpiiu.h index 00e415622..47ad4088d 100644 --- a/modules/ca/src/client/udpiiu.h +++ b/modules/ca/src/client/udpiiu.h @@ -41,9 +41,9 @@ extern "C" void cacRecvThreadUDP ( void *pParam ); -LIBCA_API void epicsShareAPI caStartRepeaterIfNotInstalled ( +LIBCA_API void epicsStdCall caStartRepeaterIfNotInstalled ( unsigned repeaterPort ); -LIBCA_API void epicsShareAPI caRepeaterRegistrationMessage ( +LIBCA_API void epicsStdCall caRepeaterRegistrationMessage ( SOCKET sock, unsigned repeaterPort, unsigned attemptNumber ); extern "C" LIBCA_API void caRepeaterThread ( void * pDummy ); From 809fb88fa28a55fc8798df887ecf8ae5a96a8d9c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 11 Mar 2020 21:19:11 -0500 Subject: [PATCH 08/11] Document _API = for Makefiles --- src/tools/makeAPIheader.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/tools/makeAPIheader.pl b/src/tools/makeAPIheader.pl index cb7fde97d..db118b022 100644 --- a/src/tools/makeAPIheader.pl +++ b/src/tools/makeAPIheader.pl @@ -65,14 +65,15 @@ example the stem used in the example here is C: # Generate our library API header file API_HEADER += libComAPI.h -Lower down in the RULES section of the same Makefile (below the line that -says C), add another line like this: +The Makefile also needs to find the API stem given the name of the library. +These may be different, as shown in our example since the libCom API actually +gets used by a library whose formal name is just "Com". This relationship is +indicated by setting the C variable to the API stem, like this: - # Set the API Building flag while we are building the code - $(LIBNAME) $(SHRLIBNAME): USR_CPPFLAGS += -DBUILDING_libCom_API - -For your library replace the string C in the last word above with -the stem from your header filename. + # Library to build: + LIBRARY = Com + # API stem for the Com library + Com_API = libCom Then in each header file that declares a function, global variable or C++ class or method to be exported by the library, decorate those declarations From d38ede55c5304f3d934cb7049f015f534768792b Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 11 Mar 2020 22:37:02 -0500 Subject: [PATCH 09/11] More generator doc updates --- src/tools/makeAPIheader.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tools/makeAPIheader.pl b/src/tools/makeAPIheader.pl index db118b022..db043d8cb 100644 --- a/src/tools/makeAPIheader.pl +++ b/src/tools/makeAPIheader.pl @@ -53,6 +53,11 @@ library implementation code to define the C macro in between the import and export headers. The order of including header files no longer matters when using this approach. +For libraries that contain EPICS record, device, driver or link support and use +the epicsExport.h macros to publish the associated support entry table for the +IOC to locate, switching from shareLib.h to a generated API header file is not +recommended. The old approach is simpler in these cases. + =head1 USING WITH EPICS In a Makefile that is building a DLL or shared library, set the variable @@ -76,8 +81,9 @@ indicated by setting the C variable to the API stem, like this: Com_API = libCom Then in each header file that declares a function, global variable or C++ -class or method to be exported by the library, decorate those declarations -with the all-uppercase keyword C as in these examples: +class or method to be exported by the library, include the generated header +file and then decorate those declarations with the all-uppercase keyword +C as in these examples: LIBCOM_API void epicsExit(int status); LIBCOM_API int asCheckClientIP; From 5f1b3a541975953f09243c237776077d524b4801 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 20 Mar 2020 11:33:39 -0500 Subject: [PATCH 10/11] Extend RULES_EXPAND to add more features * Use EXPAND_COMMON for architecture-independent templates, generated in the O.Common directory instead of O.$(T_A). * Add EXPAND_ME to name Makefile variables to be added without having to provide a value (permits spaces in value too). * Comments in RULES_EXPAND describe how to use these rules. --- configure/RULES_EXPAND | 57 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/configure/RULES_EXPAND b/configure/RULES_EXPAND index f315a7e9e..2fce30de1 100644 --- a/configure/RULES_EXPAND +++ b/configure/RULES_EXPAND @@ -12,28 +12,72 @@ vpath %@ $(USR_VPATH) $(ALL_SRC_DIRS) #--------------------------------------------------------------- -# Variable expansion +# Template variable expansion + +# This feature allows you to instantiate simple template files at +# build-time, replacing macros spelled @NAME@ with values provided +# by the Makefile. The template filename must end with an @ sign, +# which is removed to create the expanded filename. + +# Makefiles can use this variable expansion as follows: +# +# 1. Add the template filename (with the trailing @ sign) to either +# the EXPAND or EXPAND_COMMON variable, for example: +# EXPAND_COMMON += myVersion.h@ +# Use EXPAND_COMMON for templates that don't depend on the +# target architecture (these will be generated in O.Common). +# 2. There are 2 ways of defining template macros. The simplest +# is to add a NAME=VALUE string to the EXPAND_VARS variable for +# the desired macros, e.g.: +# EXPAND_VARS += MY_MAJOR_VERSION=$(MY_MAJOR_VERSION) +# EXPAND_VARS += MY_MINOR_VERSION=$(MY_MINOR_VERSION) +# These values may not contain spaces, even if inside quotes. +# 3. A better way in the above case is to add the names of any +# Makefile variables that should be provided as macros to the +# variable EXPAND_ME, like this: +# EXPAND_ME += MY_MAJOR_VERSION +# EXPAND_ME += MY_MINOR_VERSION +# The values of these variables may contain spaces. +# 4. The macros TOP and ARCH will be set by the build system. +# TOP is the value of $(INSTALL_LOCATION) for this module. +# ARCH is the target architecture $(T_A), but is only set +# while expanding files in EXPAND +# 5. Add the expanded filename to some other variable that will +# cause it to be created and used, such as INC here: +# INC += myVersion.h # Default settings EXPAND_TOOL ?= $(PERL) $(TOOLS)/expandVars.pl -EXPANDFLAGS += -t $(INSTALL_LOCATION) -a $(T_A) -EXPANDFLAGS += $(addprefix -D ,$(EXPAND_VARS)) +EXPANDARCH = -a $(T_A) +EXPANDFLAGS += -t $(INSTALL_LOCATION) +EXPANDFLAGS += $(addprefix -D ,$(EXPAND_VARS) $($@_EXPAND_VARS)) +EXPANDFLAGS += $(foreach var, $(EXPAND_ME) $($@_EXPAND_ME), \ + -D$(var)="$(strip $($(var)))") # The names of files to be expanded must end with '@' EXPANDED = $(EXPAND:%@=%) +EXPANDED_COM = $(EXPAND_COMMON:%@=%) +EXPANDED_COMMON = $(EXPANDED_COM:%=$(COMMON_DIR)/%) $(EXPANDED): %: %@ $(ECHO) "Expanding $< to $@" @$(RM) $@ - @$(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@ + $(EXPAND_TOOL) $(EXPANDARCH) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@ + +$(EXPANDED_COM): %: %@ + $(ECHO) "Expanding $< to $(COMMON_DIR)/$@" + @$(RM) $@ + $(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@ +$(EXPANDED_COMMON): $(COMMON_DIR)/%: % + @$(MV) $< $@ clean: expand_clean expand_clean: - @$(RM) $(EXPANDED) + @$(RM) $(EXPANDED) $(EXPANDED_COMMON) -.PRECIOUS: $(EXPANDED) +.PRECIOUS: $(EXPANDED) $(EXPANDED_COMMON) .PHONY: expand_clean #--------------------------------------------------------------- @@ -70,4 +114,3 @@ $1$(DEP): endef $(foreach asy, $(sort $(COMMON_ASSEMBLIES) $(ASSEMBLIES)), \ $(eval $(call ASSEMBLY_DEP_template,$(strip $(asy))))) - From 5009f288ae9777484eb62ce3f3be4331e71e6148 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 20 Mar 2020 11:42:44 -0500 Subject: [PATCH 11/11] Generate module version files with new RULES_EXPAND facilities Also removes the separate *VersionNum.h@ templates --- modules/ca/src/client/Makefile | 21 +++++---------- .../src/client/{caVersion.h => caVersion.h@} | 15 +++++------ modules/ca/src/client/caVersionNum.h@ | 7 ----- modules/database/src/ioc/Makefile | 22 +++++---------- .../{databaseVersion.h => databaseVersion.h@} | 26 +++++++----------- .../database/src/ioc/databaseVersionNum.h@ | 7 ----- modules/database/test/std/rec/dbHeaderTest.c | 5 +--- modules/libcom/src/Makefile | 20 +++++--------- .../src/{libComVersion.h => libComVersion.h@} | 27 +++++++------------ modules/libcom/src/libComVersionNum.h@ | 7 ----- 10 files changed, 48 insertions(+), 109 deletions(-) rename modules/ca/src/client/{caVersion.h => caVersion.h@} (68%) delete mode 100644 modules/ca/src/client/caVersionNum.h@ rename modules/database/src/ioc/{databaseVersion.h => databaseVersion.h@} (50%) delete mode 100644 modules/database/src/ioc/databaseVersionNum.h@ rename modules/libcom/src/{libComVersion.h => libComVersion.h@} (50%) delete mode 100644 modules/libcom/src/libComVersionNum.h@ diff --git a/modules/ca/src/client/Makefile b/modules/ca/src/client/Makefile index 57d113e6b..5b5874aee 100644 --- a/modules/ca/src/client/Makefile +++ b/modules/ca/src/client/Makefile @@ -26,7 +26,13 @@ INC += cacIO.h INC += caDiagnostics.h INC += net_convert.h INC += caVersion.h -INC += caVersionNum.h + +EXPAND_COMMON += caVersion.h@ + +EXPAND_ME += EPICS_CA_MAJOR_VERSION +EXPAND_ME += EPICS_CA_MINOR_VERSION +EXPAND_ME += EPICS_CA_MAINTENANCE_VERSION +EXPAND_ME += EPICS_CA_DEVELOPMENT_FLAG LIBSRCS += cac.cpp LIBSRCS += cacChannel.cpp @@ -120,20 +126,7 @@ ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32 OBJS_vxWorks += ca_test -EXPANDVARS += EPICS_CA_MAJOR_VERSION -EXPANDVARS += EPICS_CA_MINOR_VERSION -EXPANDVARS += EPICS_CA_MAINTENANCE_VERSION -EXPANDVARS += EPICS_CA_DEVELOPMENT_FLAG - -EXPANDFLAGS += $(foreach var,$(EXPANDVARS),-D$(var)="$(strip $($(var)))") - # shared library ABI version. SHRLIB_VERSION = $(EPICS_CA_MAJOR_VERSION).$(EPICS_CA_MINOR_VERSION).$(EPICS_CA_MAINTENANCE_VERSION) include $(TOP)/configure/RULES - - -# Can't use EXPAND as generated headers must appear -# in O.Common, but EXPAND emits rules for O.$(T_A) -../O.Common/caVersionNum.h: ../caVersionNum.h@ - $(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@ diff --git a/modules/ca/src/client/caVersion.h b/modules/ca/src/client/caVersion.h@ similarity index 68% rename from modules/ca/src/client/caVersion.h rename to modules/ca/src/client/caVersion.h@ index 9dda32c60..f9225c53a 100644 --- a/modules/ca/src/client/caVersion.h +++ b/modules/ca/src/client/caVersion.h@ @@ -8,17 +8,14 @@ #ifndef INC_caVersion_H #define INC_caVersion_H -#include +#define EPICS_CA_MAJOR_VERSION @EPICS_CA_MAJOR_VERSION@ +#define EPICS_CA_MINOR_VERSION @EPICS_CA_MINOR_VERSION@ +#define EPICS_CA_MAINTENANCE_VERSION @EPICS_CA_MAINTENANCE_VERSION@ +#define EPICS_CA_DEVELOPMENT_FLAG @EPICS_CA_DEVELOPMENT_FLAG@ -/* include generated headers with: - * EPICS_CA_MAJOR_VERSION - * EPICS_CA_MINOR_VERSION - * EPICS_CA_MAINTENANCE_VERSION - * EPICS_CA_DEVELOPMENT_FLAG - */ -#include "caVersionNum.h" +#include #define CA_VERSION_INT VERSION_INT(EPICS_CA_MAJOR_VERSION, \ EPICS_CA_MINOR_VERSION, EPICS_CA_MAINTENANCE_VERSION, 0) -#endif /* ifndef INC_caVersion_H */ +#endif /* INC_caVersion_H */ diff --git a/modules/ca/src/client/caVersionNum.h@ b/modules/ca/src/client/caVersionNum.h@ deleted file mode 100644 index dcd7518c0..000000000 --- a/modules/ca/src/client/caVersionNum.h@ +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef INC_caVersion_H -# error include caVersion.h, not this header -#endif -#define EPICS_CA_MAJOR_VERSION @EPICS_CA_MAJOR_VERSION@ -#define EPICS_CA_MINOR_VERSION @EPICS_CA_MINOR_VERSION@ -#define EPICS_CA_MAINTENANCE_VERSION @EPICS_CA_MAINTENANCE_VERSION@ -#define EPICS_CA_DEVELOPMENT_FLAG @EPICS_CA_DEVELOPMENT_FLAG@ diff --git a/modules/database/src/ioc/Makefile b/modules/database/src/ioc/Makefile index 23c9c02b6..503208862 100644 --- a/modules/database/src/ioc/Makefile +++ b/modules/database/src/ioc/Makefile @@ -23,10 +23,15 @@ dbCore_LIBS += ca Com dbCore_SYS_LIBS_WIN32 += ws2_32 dbCore_RCS += dbCore.rc -dbStaticHost_RCS = dbStaticHost.rc + +EXPAND_COMMON += databaseVersion.h@ + +EXPAND_ME += EPICS_DATABASE_MAJOR_VERSION +EXPAND_ME += EPICS_DATABASE_MINOR_VERSION +EXPAND_ME += EPICS_DATABASE_MAINTENANCE_VERSION +EXPAND_ME += EPICS_DATABASE_DEVELOPMENT_FLAG INC += databaseVersion.h -INC += databaseVersionNum.h PROD_LIBS = Com @@ -42,13 +47,6 @@ include $(IOCDIR)/rsrv/Makefile GENVERSION = epicsVCS.h GENVERSIONMACRO = EPICS_VCS_VERSION -EXPANDVARS += EPICS_DATABASE_MAJOR_VERSION -EXPANDVARS += EPICS_DATABASE_MINOR_VERSION -EXPANDVARS += EPICS_DATABASE_MAINTENANCE_VERSION -EXPANDVARS += EPICS_DATABASE_DEVELOPMENT_FLAG - -EXPANDFLAGS += $(foreach var,$(EXPANDVARS),-D$(var)="$(strip $($(var)))") - include $(TOP)/configure/RULES include $(IOCDIR)/dbStatic/RULES @@ -56,10 +54,4 @@ include $(IOCDIR)/bpt/RULES include $(IOCDIR)/db/RULES include $(IOCDIR)/dbtemplate/RULES -# Can't use EXPAND as generated headers must appear -# in O.Common, but EXPAND emits rules for O.$(T_A) -../O.Common/databaseVersionNum.h: ../databaseVersionNum.h@ - $(MKDIR) $(COMMON_DIR) - $(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@ - epicsRelease$(DEP): $(COMMON_DIR)/$(GENVERSION) diff --git a/modules/database/src/ioc/databaseVersion.h b/modules/database/src/ioc/databaseVersion.h@ similarity index 50% rename from modules/database/src/ioc/databaseVersion.h rename to modules/database/src/ioc/databaseVersion.h@ index eb5e4d732..efd837b26 100644 --- a/modules/database/src/ioc/databaseVersion.h +++ b/modules/database/src/ioc/databaseVersion.h@ @@ -5,23 +5,17 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -#ifndef DATABASEVERSION_H -#define DATABASEVERSION_H +#ifndef INC_databaseVersion_H +#define INC_databaseVersion_H + +#define EPICS_DATABASE_MAJOR_VERSION @EPICS_DATABASE_MAJOR_VERSION@ +#define EPICS_DATABASE_MINOR_VERSION @EPICS_DATABASE_MINOR_VERSION@ +#define EPICS_DATABASE_MAINTENANCE_VERSION @EPICS_DATABASE_MAINTENANCE_VERSION@ +#define EPICS_DATABASE_DEVELOPMENT_FLAG @EPICS_DATABASE_DEVELOPMENT_FLAG@ #include -#ifndef VERSION_INT -# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) -#endif +#define DATABASE_VERSION_INT VERSION_INT(EPICS_DATABASE_MAJOR_VERSION, \ + EPICS_DATABASE_MINOR_VERSION, EPICS_DATABASE_MAINTENANCE_VERSION, 0) -/* include generated headers with: - * EPICS_DATABASE_MAJOR_VERSION - * EPICS_DATABASE_MINOR_VERSION - * EPICS_DATABASE_MAINTENANCE_VERSION - * EPICS_DATABASE_DEVELOPMENT_FLAG - */ -#include "databaseVersionNum.h" - -#define DATABASE_VERSION_INT VERSION_INT(EPICS_DATABASE_MAJOR_VERSION, EPICS_DATABASE_MINOR_VERSION, EPICS_DATABASE_MAINTENANCE_VERSION, 0) - -#endif // DATABASEVERSION_H +#endif /* INC_databaseVersion_H */ diff --git a/modules/database/src/ioc/databaseVersionNum.h@ b/modules/database/src/ioc/databaseVersionNum.h@ deleted file mode 100644 index 02184a81b..000000000 --- a/modules/database/src/ioc/databaseVersionNum.h@ +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef DATABASEVERSION_H -# error include databaseVersion.h, not this header -#endif -#define EPICS_DATABASE_MAJOR_VERSION @EPICS_DATABASE_MAJOR_VERSION@ -#define EPICS_DATABASE_MINOR_VERSION @EPICS_DATABASE_MINOR_VERSION@ -#define EPICS_DATABASE_MAINTENANCE_VERSION @EPICS_DATABASE_MAINTENANCE_VERSION@ -#define EPICS_DATABASE_DEVELOPMENT_FLAG @EPICS_DATABASE_DEVELOPMENT_FLAG@ diff --git a/modules/database/test/std/rec/dbHeaderTest.c b/modules/database/test/std/rec/dbHeaderTest.c index 0e2785a8f..a88e2213b 100644 --- a/modules/database/test/std/rec/dbHeaderTest.c +++ b/modules/database/test/std/rec/dbHeaderTest.c @@ -5,7 +5,7 @@ \*************************************************************************/ /* This test includes all public headers from libCom and database modules - * to ensure they are all syntaxtically correct in C and C++ + * to ensure they are all syntaxtically correct in both C and C++ */ #include @@ -31,14 +31,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -152,7 +150,6 @@ #endif #include #include -#include #include #ifdef __cplusplus # include diff --git a/modules/libcom/src/Makefile b/modules/libcom/src/Makefile index f90fde6a6..ffc36445e 100644 --- a/modules/libcom/src/Makefile +++ b/modules/libcom/src/Makefile @@ -16,8 +16,14 @@ include $(TOP)/configure/CONFIG INC += valgrind/valgrind.h +EXPAND_COMMON = libComVersion.h@ + +EXPAND_ME += EPICS_LIBCOM_MAJOR_VERSION +EXPAND_ME += EPICS_LIBCOM_MINOR_VERSION +EXPAND_ME += EPICS_LIBCOM_MAINTENANCE_VERSION +EXPAND_ME += EPICS_LIBCOM_DEVELOPMENT_FLAG + INC += libComVersion.h -INC += libComVersionNum.h include $(LIBCOM)/as/Makefile include $(LIBCOM)/bucketLib/Makefile @@ -61,13 +67,6 @@ ifeq ($(T_A),$(EPICS_HOST_ARCH)) DELAY_INSTALL_LIBS = YES endif -EXPANDVARS += EPICS_LIBCOM_MAJOR_VERSION -EXPANDVARS += EPICS_LIBCOM_MINOR_VERSION -EXPANDVARS += EPICS_LIBCOM_MAINTENANCE_VERSION -EXPANDVARS += EPICS_LIBCOM_DEVELOPMENT_FLAG - -EXPANDFLAGS += $(foreach var,$(EXPANDVARS),-D$(var)="$(strip $($(var)))") - # shared library ABI version. SHRLIB_VERSION = $(EPICS_LIBCOM_MAJOR_VERSION).$(EPICS_LIBCOM_MINOR_VERSION).$(EPICS_LIBCOM_MAINTENANCE_VERSION) @@ -80,8 +79,3 @@ include $(LIBCOM)/flex/RULES include $(LIBCOM)/misc/RULES include $(LIBCOM)/osi/RULES include $(LIBCOM)/yajl/RULES - -# Can't use EXPAND as generated headers must appear -# in O.Common, but EXPAND emits rules for O.$(T_A) -../O.Common/libComVersionNum.h: ../libComVersionNum.h@ - $(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@ diff --git a/modules/libcom/src/libComVersion.h b/modules/libcom/src/libComVersion.h@ similarity index 50% rename from modules/libcom/src/libComVersion.h rename to modules/libcom/src/libComVersion.h@ index 60537f9c2..0db39b142 100644 --- a/modules/libcom/src/libComVersion.h +++ b/modules/libcom/src/libComVersion.h@ @@ -5,24 +5,17 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -#ifndef LIBCOMVERSION_H -#define LIBCOMVERSION_H +#ifndef INC_libComVersion_H +#define INC_libComVersion_H + +#define EPICS_LIBCOM_MAJOR_VERSION @EPICS_LIBCOM_MAJOR_VERSION@ +#define EPICS_LIBCOM_MINOR_VERSION @EPICS_LIBCOM_MINOR_VERSION@ +#define EPICS_LIBCOM_MAINTENANCE_VERSION @EPICS_LIBCOM_MAINTENANCE_VERSION@ +#define EPICS_LIBCOM_DEVELOPMENT_FLAG @EPICS_LIBCOM_DEVELOPMENT_FLAG@ #include -#include -#ifndef VERSION_INT -# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) -#endif +#define LIBCOM_VERSION_INT VERSION_INT(EPICS_LIBCOM_MAJOR_VERSION, \ + EPICS_LIBCOM_MINOR_VERSION, EPICS_LIBCOM_MAINTENANCE_VERSION, 0) -/* include generated headers with: - * EPICS_LIBCOM_MAJOR_VERSION - * EPICS_LIBCOM_MINOR_VERSION - * EPICS_LIBCOM_MAINTENANCE_VERSION - * EPICS_LIBCOM_DEVELOPMENT_FLAG - */ -#include "libComVersionNum.h" - -#define LIBCOM_VERSION_INT VERSION_INT(EPICS_LIBCOM_MAJOR_VERSION, EPICS_LIBCOM_MINOR_VERSION, EPICS_LIBCOM_MAINTENANCE_VERSION, 0) - -#endif // LIBCOMVERSION_H +#endif /* INC_libComVersion_H */ diff --git a/modules/libcom/src/libComVersionNum.h@ b/modules/libcom/src/libComVersionNum.h@ deleted file mode 100644 index 3b340cc8f..000000000 --- a/modules/libcom/src/libComVersionNum.h@ +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef LIBCOMVERSION_H -# error include libComVersion.h, not this header -#endif -#define EPICS_LIBCOM_MAJOR_VERSION @EPICS_LIBCOM_MAJOR_VERSION@ -#define EPICS_LIBCOM_MINOR_VERSION @EPICS_LIBCOM_MINOR_VERSION@ -#define EPICS_LIBCOM_MAINTENANCE_VERSION @EPICS_LIBCOM_MAINTENANCE_VERSION@ -#define EPICS_LIBCOM_DEVELOPMENT_FLAG @EPICS_LIBCOM_DEVELOPMENT_FLAG@