Commit Graph

9927 Commits

Author SHA1 Message Date
Andrew Johnson
6fd9fb3066 libCom: Removed epicsSingleton workaround
This undoes commit 11565, "workaround for archaic T202 g++ bug"
which doesn't actually seem to be necessary for T202 compilation.
It also replaces 'typename' with 'class', for another compiler.

Modification provided by Dirk Zimoch.
2012-11-16 16:14:13 -06:00
Andrew Johnson
36be0aa783 rec: Fix minor string in + out issue.
Undo strncmp+strncpy to strcmp+strcpy change in r12048.
The 'n' versions are needed because device support was
never explicitly required to Nil-terminate the string.
The dbAccess routines do enforce termination though.
2012-11-16 12:40:57 -06:00
Andrew Johnson
fc61cc34ce iocLogServer fix for unsigned char arch's
Reported by Guy Jennings
2012-10-31 13:56:12 -05:00
Andrew Johnson
e889336458 db: Undefined alarm limits should return NaN
Where the record doesn't provide get_alarm_double() or for fields
where the default applies, we were still returning 0.
2012-10-17 18:08:39 -05:00
Michael Davidsaver
7cac267a4b db: Fix possible error handling in dbPut 2012-10-11 18:10:00 -05:00
Andrew Johnson
71079ede4b rec/aSub: Fixes from Michael Davidsaver
* Changing the number of elements in a VALx array triggers monitors
* Post monitors on the NEVx fields, following EFLG
* Remove artificial limit on array sizes
2012-10-11 17:51:00 -05:00
Michael Davidsaver
26173c1e0d devLib: add compatibility typedef for VME table type 2012-10-10 15:52:34 -05:00
Andrew Johnson
9c1b8ba952 rec: Fix problem with NAN in MLST/ALST fields
If MLST or ALST became NAN the associated monitor would never trigger.
Now a NAN will cause it to always trigger.
2012-10-06 21:48:01 -05:00
Andrew Johnson
c574722a9b catools: Fix syntax error from vxWorks gcc. 2012-09-11 15:19:29 -05:00
Andrew Johnson
4790578953 tools: Try harder to collapse ../ components in AbsPath
Idea from Angus Gratton, ANU
2012-09-11 12:11:55 -05:00
Ralph Lange
7e6e38060f catools: Change behaviour of camonitor when printing array of chars as string
camonitor was using strlen() to find out the length of the array to print as %s string,
which led to printing old buffer contents when the array-string was not null terminated.
Now uses the minimum of strlen(), elements received, and elements requested.

Suggested by Mark Rivers on tech-talk (11 Sep 2012)
2012-09-11 16:58:43 +02:00
Ralph Lange
709b6ef2f3 catools: Fix off-by-one bug in caput
An internal buffer was allocated one char too short, when caput was used
with the '-S' (send string as array of chars) option.

Reported by J. Lewis Muir (tech-talk on 17-Aug-2012)
2012-09-03 21:25:44 +02:00
Andrew Johnson
169b30081a Fix for vxWorks 6.x LED_ID
Use LED_ID in epicsReadline.c
Provide a typedef for vxWorks 5.x where it doesn't exist.
2012-08-31 16:05:14 -05:00
Andrew Johnson
a19e1d21da libCom: Fix epicsSnprintf() under MinGW
Use the Microsoft _vscprintf() function which was just missing
a prototype in earlier versions of MinGW's stdio.h header.
2012-08-31 15:57:59 -05:00
Andrew Johnson
1ac8ff6378 as: Make asSetFilename() warn on relative paths
Tell the user if they try this.  They'll get an error from
asInit() later, but it gets lost easily in other noise.
2012-08-28 16:35:52 -05:00
Janet Anderson
5c2ef73c4a Fixed X11 include definitions, X11_INC and XPM_INC. 2012-08-20 12:27:39 -05:00
Andrew Johnson
e03d10857c tools: Delete makeDbDepends.pl from Makefile 2012-07-31 14:09:02 -05:00
Andrew Johnson
bdbada28a8 makeBaseApp: Remove bad characters from user names
Also warns about some bad characters in record names, but only
the ones that are known to cause known bad behaviour.
2012-07-31 13:47:23 -05:00
Janet Anderson
4133b666a0 Added die if no target file argument 2012-07-31 10:44:33 -05:00
Andrew Johnson
1864ac41fb Add support for native linux-arm builds. 2012-07-30 17:50:30 -05:00
Janet Anderson
1649ce6f79 Replaced makeDbDepends with mkmf 2012-07-30 17:10:57 -05:00
Andrew Johnson
32f556637d libCom/osi: Fixed all epicsThreadSleep() implementations
All are now robust against overflow, NAN or negative argument.
Passing seconds=0 calls the OS scheduler, offering to yield.
Passing seconds>0 delays at least the requested time, up to a
limit which usually depends on the OS tick rate.
2012-06-18 14:52:03 -05:00
Andrew Johnson
146520d035 dbStatic: Fix dbReportDeviceConfig() overflow.
Reported by Hinko Kocevar.
2012-05-21 15:43:03 -05:00
Kate Feng
ea8d19e727 RTEMS: Make nfsMount() globally visible. 2012-05-16 12:25:27 -05:00
Andrew Johnson
c1cebc89bf rsrv: Add epicsShareFunc to casStatsFetch()
Fixes lp:999167
2012-05-14 11:16:33 -05:00
Andrew Johnson
4982a6308b db: Don't call epicsPrintf() from callbackRequest()
The callbackRequest() routine can be called from an ISR,
so use epicsInterruptContextMessage() to print errors.
2012-05-04 17:34:48 -05:00
Andrew Johnson
243baddbf6 Add an Init stat to all thread control variables
This makes the uninitilized value not the Run state.
2012-05-04 13:38:59 -05:00
Andrew Johnson
dde8c61ad8 registry: Cleanup
Delete spurious global symbols
Remove unnecessary casts
Fix (c) headers
Added missing #include guard
Remove unnecessary #includes
Prettified.
2012-04-30 17:40:43 -05:00
Andrew Johnson
8ed86967d1 Don't build command-line programs for iOS targets. 2012-03-30 15:52:19 -05:00
Andrew Johnson
dffe203856 db: Another modification to fix lp:907761
From Dirk Zimoch.
2012-03-19 12:31:11 -05:00
Andrew Johnson
e48ca8a688 rec: Fix timestamps from calcout and seq records
Update record timestamp before calling db_post_events()
2012-03-08 09:47:38 -06:00
Andrew Johnson
7435a9831b db: Reject trailing space in numeric => enum/menu/device conversion
This is really a workaround for a Win32/MinGW bug in sscanf, which
will only set the %n argument for the format "%u %n" when there is
a space following the unsigned number.

This changes the IOC's behavior very slightly.
2012-03-06 14:14:39 -06:00
Andrew Johnson
10e7bced84 libCom/test: epicsTimeTest reworked a bit
Report throw from first call to epicsTime::getCurrent().
Reorganized test order so a bad time provider doesn't stop
all tests from being run.  Also cleaned up a few extraneous
variables.
2012-03-06 12:54:54 -06:00
Andrew Johnson
df7fa22a15 libCom/test: Add more tests of the CALC engine
Some of the isnan(Inf) tests were failing on mingw.
This change doesn't fix them, it adds related examples.
2012-02-29 17:11:08 -06:00
Andrew Johnson
6f9f5498b4 libCom/test: Add diagnostic to epicsStdioTest on vxWorks
This test fails if the cwd is not writable, but on vxWorks the
fault appears at the fclose() not the fopen() line. The code
now detects this and tells the user what's probably wrong.
2012-02-03 16:12:06 -06:00
Andrew Johnson
f5bc02393e libCom: Increase stack sizes for Windows and Posix
Windows stack sizes were the same as vxWorks - tiny.
The stack sizes are now multiples of sizeof(void*).
On 32-bit systems they give 256KB, 512KB and 1MB;
64-bit systems get twice those numbers.

Fixes lp:903448
2012-02-02 18:14:01 -06:00
Andrew Johnson
f86cf730e9 db: fix dbpf to enum from integer bug 2012-01-27 09:41:37 -06:00
Andrew Johnson
adfa1257f5 makeBaseApp: caMonitor example should use ca_create_subscription()
It was calling ca_add_event(), which is a deprecated API.
2012-01-16 16:40:37 -06:00
Andrew Johnson
7cc8a552a3 db: Allow single-char accesses as long strings
Clients try to use long string support to fetch DBF_STRING
fields use DBF_CTRL_CHAR with a 1-element array, but the IOC
was rejecting that.  This permits it, and also ensures that
the resulting strings are zero-terminated.

Fixes lp:907761
2012-01-11 16:47:37 -06:00
Andrew Johnson
afaebfbeb1 libCom: Fix iocsh comment recognition
Merged J. Lewis Muir's fix for comments introduced by macro.
Added fixes to allow comments to be indented too, which used
to work if the '#' was followed by white-space or any argument
separator character.
2012-01-11 15:12:15 -06:00
J. Lewis Muir
ee2a2dfffc libCom/iocsh: Ignore comment lines after macro expansion
The handling of comment lines is only performed before macro
expansion, thus lines with macros that expand to comment lines will
not be correctly handled as comment lines.

By chance this kind of worked sometimes because a "#" command that
does nothing is internally added to the command registry to make it
show up in the help output.  Relying on this is broken.  Furthermore,
if the line starts with '#' followed by a non-separator character
(e.g. "##", "#whatever", etc.) it will not work (i.e. it will produce
a command-not-found error).

This fix checks to see if the first character of the line after macro
expansion is '#'.  If it is, it considers the line to be a comment.
2012-01-11 11:40:30 -06:00
Andrew Johnson
c32997ffa1 tools: Fix dependency file problem.
Reported by Eric.
2011-12-20 16:30:41 -06:00
Jeff Hill
d8f7c3731d fixed various archaic sun pro build failures repoted by Dirk 2011-12-12 16:10:24 -07:00
Andrew Johnson
4a5b8a37df cap5: Load libCap5.so from lib/perl/<perl-version>/<perl-archname>
This allows the same version of Base to be used from both RHEL5 and RHEL6
for example; they use different Perl versions which are not compatible at
the ABI level.
2011-12-10 23:11:33 -06:00
Andrew Johnson
8cb8ad081b softIoc: Strip single-quote chars from arg
Most shells strip the single-quote chars from arguments, but on
win32-x86 this is not happening so we need to do it ourselves.
The single quotes are important to prevent un-escaping of things
that shouldn't be unescaped.
2011-12-05 12:43:26 -06:00
Andrew Johnson
3fc6a77fb0 libCom/posix: Define finite() for uClibc
The finite() function is provided in glibc but not in uClibc.
C99 requires isfinite() to be a macro, so we can test for it
and define our own finite() macro in osi/os/posix/epicsMath.h
2011-12-02 11:07:04 -06:00
Andrew Johnson
3b268475d3 Fix some warnings reported by Clang. 2011-11-29 16:14:19 -06:00
Andrew Johnson
2010e58c61 libCom/win32: Conditionally define MINLONGLONG
Some version of Visual Studio define MAXLONGLONG but not
MINLONGLONG, so they need separate checks.
2011-11-29 14:07:29 -06:00
Andrew Johnson
b791a3692b libCom: Clean up win32 build warning
Delete CFLAG added for the Borland compiler (no longer supported).
2011-11-28 15:54:49 -06:00
Benjamin Franksen
0e41c03ff2 dbStatic: Fix windows build issue
fixes: lp:894276
2011-11-28 12:55:55 -06:00