Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: Motor.h file broken for C
From: Doug Murray <drm@slac.stanford.edu>
To: "Ronald L. Sluiter" <sluiter@aps.anl.gov>
Cc: TechTalk EPICS <tech-talk@aps.anl.gov>
Date: Mon, 05 Jun 2006 12:35:35 -0700
Title: Re: Motor.h file broken for C
Excellent, thanks Ron!

-doug



On 6/5/06 11:02 AM, "Ronald L. Sluiter" <sluiter@aps.anl.gov> had this to say:

Hello Doug,

In that case, we are way ahead... OK, we are a couple of months
ahead of you. Mark Rivers removed the C++ comments and
added a typedef to the motor_cmnd enumeration several months
ago. I released these changes with version R5-9 of the motor
record distribution on 04/25/06; so you should not have to make
these local modifications with R5-9 and above.

Hope this helps,
Ron

Doug Murray wrote:

> Hi Ron, I should have been more specific.
>
> We’re using the GNU cross-compiler (for RTEMS) v4.0.2, but we use the
> –ansi (and –Wall) flags, which will make a difference.
> Also, we’ve got version 1.14 of motor.h. The line containing
> #define LSB_First (TRUE) // ...
> Is not giving us a problem, probably because cpp is getting at it
> before the compiler.
>
> Our errors come from some previous lines in the file (lines 117 and
> 118) which are:
> // Define, from top to bottom, how bit fields are packed.
> // This works for VxWorks, SunPro, Linux g++, MS Visual C.
>
> I just added /* ... */ comments.
>
> The typedef problem becomes an issue around line 188, in the following
> declaration within motor_dset:
> RTN_STATUS (*build_trans) (motor_cmnd, double *, struct motorRecord *);
>
> I changed this by adding ‘enum’:
> RTN_STATUS (*build_trans) ( enum motor_cmnd, double *, struct
> motorRecord *);
>
> These changes should be okay with any C or C++ compiler, regardless of
> ANSI flags.
>
> Thanks!
> -doug
>
>
>
>
> On 6/2/06 2:21 PM, "Ronald L. Sluiter" <sluiter@aps.anl.gov> had this to say:
>
>     Hello Doug,
>
>     What compiler are you using?
>
>     I compiled the latest distribution of the motor record (R5-9) using
>     five different compilers without a problem.
>
>     I presume you mean these C++ comments in motor.h;
>
>     "LSB_First (TRUE) // LSB is packed first."
>
>     I have changed these to C comments and committed the changes
>     into CVS. They will appear in the next release.
>
>     Could you be more specific as to the "missing typedef" problem?
>     I don't see that.
>
>     Best regards,
>     Ron
>
>     Doug Murray wrote:
>
>> Hi Ron, the motor.h include file (we’re using 3.14.8.2) seems to be
>> written for inclusion in C++ files. Specifically, there are a couple
>> of ‘//’ comments and a missing typedef for an enum. Can you change
>> this file to accommodate both C and C++?
>>
>> -doug
>>
>> --
>>
>> Doug Murray
>> Stanford Linear Accelerator Center
>> LCLS Controls Department
>> 2575 Sand Hill Road
>> Menlo Park, CA 94025 MS-102
>
>
>
>




References:
Re: Motor.h file broken for C Ronald L. Sluiter

Navigate by Date:
Prev: Re: Motor.h file broken for C Ronald L. Sluiter
Next: CA overload 32 * 9 waveforms etc. Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: Motor.h file broken for C Ronald L. Sluiter
Next: Solution to install MCA on Windows Gan Quan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·