EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: OK to make function variable in registryFunction.c static?
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: Ru Igarashi <[email protected]>
Date: Mon, 30 Apr 2012 17:01:58 -0500
Hi,

On 2012-04-30 Ru Igarashi wrote:
> I was compiling the synApps areaDetector on Cygwin 1.7 under
> base 3.14.12.2 using the system libs for netCDF and HDF5 for
> fun, but ran into a linker error, complaining that the symbol
> "_function" was multiply defined, once in registryIoc.lib and
> once in libnetcdf.a.  I tracked the EPICS symbol down to the
> "const char *function" variable in BASE/src/registry/registryFunction.c:
> 
> const char *function = "function";
> static void *registryID = (void *)&function;
> 
> Seeing as neither symbols seem to be used outside of that file,
> I prepended "static" to the declaration of "*function", recompiled
> EPICS, and recompiled areaDetector successfully.  I've only tested
> the new base with softIoc, and areaDetector not at all, so by no
> means have I adequately tested this hack.  I cannot find any
> mention of this particular hack in TechTalk or base Release Notes
> or base Known Problems.
> 
> Instead, I thought I should ask, is this hack safe (or otherwise
> appropriate)?

That symbol should not be globally visible, so your change is perfectly safe 
and correct; thanks for pointing it out!  I will fix this for the next 
release.

- Andrew
-- 
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte

References:
OK to make function variable in registryFunction.c static? Ru Igarashi

Navigate by Date:
Prev: OK to make function variable in registryFunction.c static? Ru Igarashi
Next: Re: [Scopes] BMP image record?? Matt Newville
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: OK to make function variable in registryFunction.c static? Ru Igarashi
Next: RE: asynPortDriver callbacks to I/O Intr, how to propagate an error? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·