removed the #ifdefs in the implementation (and their documentation)
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-repo/configure/CONFIG_SITE new-repo/configure/CONFIG_SITE
--- old-repo/configure/CONFIG_SITE 2022-09-28 11:26:50.030041177 +0200
+++ new-repo/configure/CONFIG_SITE 2022-09-28 11:26:50.030041177 +0200
@@ -31,8 +31,3 @@
# You must rebuild in the iocBoot directory for this to
# take effect.
#IOCS_APPL_TOP = </IOC/path/to/application/top>
-
-# You might want to remove the comment on the next line if you
-# use EPICS base version 3.14.12.3 or older, but have
-# applied add_errlogRemoveSingleListener.patch to it.
-#USR_CFLAGS += -DBASE_HAS_errlogRemoveSingleListener
diff -rN -u old-repo/docs/index.txt new-repo/docs/index.txt
--- old-repo/docs/index.txt 2022-09-28 11:26:50.030041177 +0200
+++ new-repo/docs/index.txt 2022-09-28 11:26:50.030041177 +0200
@@ -58,21 +58,6 @@
Follow the usual procedure for installing an EPICS support module.
-EPICS base versions 3.14.12.3 and earlier do not have the function
-errlogRemoveSingleListener. If you use such a base version you have two
-possibilities:
-
-1. You can apply ``add_errlogRemoveSingleListener.patch`` to your base
- and (in feller) uncomment the definition of BASE_HAS_errlogRemoveSingleListener
- in ``configure/CONFIG_SITE``.
-
-2. You just compile/install feller as is and leave
- BASE_HAS_errlogRemoveSingleListener undefined. This will cause an
- implementation to be compiled that works around the missing function
- by adding only one errlog listener (and never removing it), and which
- traverses the internal list of fellers itself (rather than letting the
- errlog facility do it).
-
API
===
diff -rN -u old-repo/src/feller.c new-repo/src/feller.c
--- old-repo/src/feller.c 2022-09-28 11:26:50.030041177 +0200
+++ new-repo/src/feller.c 2022-09-28 11:26:50.030041177 +0200
@@ -7,18 +7,9 @@
#include "epicsString.h"
#include "epicsMutex.h"
#include "epicsThread.h"
-#include "epicsVersion.h"
#include "feller.h"
-#define EPICS_COMPLETE_VERSION\
- (EPICS_PATCH_LEVEL + 100*(EPICS_MODIFICATION + 100*(EPICS_REVISION + 100*EPICS_VERSION)))
-
-#ifndef BASE_HAS_errlogRemoveSingleListener
-#define BASE_HAS_errlogRemoveSingleListener (EPICS_COMPLETE_VERSION > 3141203)
-#endif
-
-
#define PREFIX_LENGTH (2 + 2 * sizeof(unsigned int))
struct feller {
@@ -36,7 +27,6 @@
static void fellerListener(void *pvt, const char *message)
{
-#if !BASE_HAS_errlogRemoveSingleListener
struct feller *this;
epicsMutexLockStatus r;
r = epicsMutexLock(mutex);
@@ -46,17 +36,12 @@
}
this = firstFeller; /* ignore pvt */
while (this) {
-#else
- struct feller *this = (struct feller *)pvt;
-#endif
if (strncmp(message, this->prefix, 10)==0) {
fputs(message + PREFIX_LENGTH, this->file);
}
-#if !BASE_HAS_errlogRemoveSingleListener
this = this->next;
}
epicsMutexUnlock(mutex);
-#endif
}
static void fellerInitOnce(void *parm)
@@ -64,9 +49,7 @@
mutex = epicsMutexMustCreate();
seed = epicsStrHash("feller", 0x2099);
firstFeller = NULL;
-#if !BASE_HAS_errlogRemoveSingleListener
errlogAddListener(fellerListener, NULL);
-#endif
}
epicsShareFunc struct feller *fellerCreate(const char *filename)
@@ -103,9 +86,6 @@
}
epicsSnprintf(this->prefix, PREFIX_LENGTH+1, "[%08x]", hash);
this->file = fopen(filename, "a");
-#if BASE_HAS_errlogRemoveSingleListener
- errlogAddListener(fellerListener, this);
-#endif
epicsMutexUnlock(mutex);
return this;
}
@@ -114,11 +94,6 @@
{
epicsMutexLockStatus r;
-#if BASE_HAS_errlogRemoveSingleListener
- errlogFlush();
- errlogRemoveSingleListener(fellerListener, this);
-#endif
-
r = epicsMutexLock(mutex);
if (r != epicsMutexLockOK) {
errlogPrintf("fellerDestroy: mutex unavailable\n");
patch eb112ba37bc77f10c8d99650530a4f335e7c08da
Author: benjamin.franksen@helmholtz-berlin.de
Date: Fri Jun 21 21:24:39 CEST 2013
* removed the #ifdefs in the implementation (and their documentation