summaryrefslogtreecommitdiff
path: root/gps2udp.c
Commit message (Collapse)AuthorAgeFilesLines
* CentOS port fix.Eric S. Raymond2018-12-281-1/+1
|
* Factor most uses of pselect(2) into a new utility function named 'nanowait'.Eric S. Raymond2018-12-271-12/+3
| | | | | Also, remove sime header inclusions discovered to be unnecessary during the change.
* gpspipe: POSIX_C_SOURCE breaks on osX.Gary E. Miller2018-12-261-0/+1
| | | | Very odd. Not obvious why.
* gps2udp: setting POSIX_C_LEVEL breaks strsep() on osX.Gary E. Miller2018-12-261-1/+4
|
* POSIX_C_SOURCE: Not just a linux define. 200112L is a minimum.Gary E. Miller2018-12-261-1/+1
| | | | Don't force _POSIX_C_SOURCE 200112L, just make it a minimum.
* Eliminate effectively all uses of struct timeval.Eric S. Raymond2018-12-261-3/+8
| | | | | Outide of one Mac portability shim, anyway. Associated select(2) calls become pselect(2) calls.
* LICENSE: Update licenses for consistency. No functional changes.Gary E. Miller2018-11-191-1/+1
|
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* Fixes spelling of "daemonization".Fred Wright2017-03-041-1/+1
| | | | | | | | Error messages related to daemonization failures had incorrect spelling. TESTED: Ran "scons build-all" on OSX.
* Whitespace cleanups related to recent changes.Fred Wright2017-02-201-1/+4
|
* Explicit marking of ignoring fprintf() resultRobert Norris2017-02-201-5/+5
| | | | | | | | | Ensure consistent marking of '(void)' for most normal usage of fprintf() TESTED: 'scons build-all check' passes Signed-off-by: Fred Wright <fw@fwright.net>
* Centralizes daemon() calls.Fred Wright2017-01-221-2/+2
| | | | | | | | | | | | | | | | This defines a new function os_daemon() (in os_compat.c), which is either the old replacement daemon() renamed, or a wrapper around the actual daemon() call. This allows any issues related to daemon() (which exist on some platforms) to be dealt with in one place. No such changes are present yet, so platforms giving warnings for the use of daemon() continue to do so, but now only in the compilation of os_compat.c. Unfortunately, the current build procedure typically compiles os_compat.c multiple times, so the warnings still appear multiple times. TESTED: Ran "scons build-all check" on OSX 10.9, OSX 10.12, Ubuntu 14, and FreeBSD 10.3.
* strsep() and daemon() needs _DEFAULT_SOURCE, replace bcopy()Gary E. Miller2016-08-151-1/+4
| | | | bcopy() gone in POSIX 2008.
* oWhoops, don't fix the fix. Plus an off-by one.Gary E. Miller2016-08-091-0/+3
| | | | Eric already fixed this.
* Copy structs using assignment, not memcpy().Zbigniew Chyla2015-05-311-1/+1
|
* A gaggle of whitespace gaffs.Gary E. Miller2015-04-301-22/+22
|
* Revert "Copy structs using assignment, not memcpy()."Gary E. Miller2015-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit d1965788249d7e22cdde4021d452cf0dc6c6b9bd. This breaks my build on Gentoo running gcc 4.9.2 libgps_shm.c: In function 'int gps_shm_read(gps_data_t*)': libgps_shm.c:122:12: error: no match for 'operator=' (operand types are 'gps_data_t' and 'volatile gps_data_t') noclobber = shared->gpsdata; ^ libgps_shm.c:122:12: note: candidate is: In file included from gpsd.h:350:0, from libgps_shm.c:30: gps.h:1918:8: note: gps_data_t& gps_data_t::operator=(const gps_data_t&) struct gps_data_t { ^ gps.h:1918:8: note: no known conversion for argument 1 from 'volatile gps_data_t' to 'const gps_data_t&'
* Copy structs using assignment, not memcpy().Zbigniew Chyla2015-04-281-1/+1
|
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-28/+5
| | | | | | | | | | | | | | | | | | | The proximate cause was that we've been seing emission of error messages that were randomly and disturbingly variable across different environments - notably Raspbian and Gentoo splint gave nontrivially different results than Ubuntu 14.10 splint. And this was *not* due to Ubuntu patches! A pristine splint built from the 3.1.2 tarball on Ubuntu didn't match the Raspbian and Gentoo results either. But this has been coming for a while. Easy access to more modern static analyzers such as coverity, scan-build and cppcheck has been decreasing the utility of splint, which is unmaintained and somewhat buggy and not easy to use. Only file not cleaned is ppsthread.c, because Gary has been working on it during this cleanup. All regression tests pass. PPS observed live on GR601-W.
* OS X needs a lot of time.hGary E. Miller2015-03-081-1/+1
| | | | | | gpsd_config.h needs time_t which is in time.h OS X builds now. Untested.
* Assume POSIX-conformant termios.h.Eric S. Raymond2015-03-011-2/+0
| | | | | | | HAVE_TERMIOS_H was some sort of relic, apparently always on. I don't think the code would have compiled without it. All regression tests pass.
* Guard includes of termios.h with #ifdef HAVE_TERMIOS_HMatt2015-01-231-0/+5
| | | | | | | | | | | | Guard includes of termios.h with #ifdef HAVE_TERMIOS_H. Test for termios.h in scons, and define/undefine HAVE_TERMIOS_H accordingly. Fixes the below error seen on cygwin, which lacks termios.h: In file included from gpsutils.c:22:0: gpsd.h:349:21: fatal error: termios.h: No such file or directory #include <termios.h> ^
* Coverity/splint cleanup.Eric S. Raymond2015-01-211-1/+1
| | | | | Turned up a bug in where a counter was incremented un the Navcom driver; this required one test rebuild.
* Add str_starts_with macro, use it instead of strncmp.Zbigniew Chyla2015-01-211-1/+2
| | | | This change doesn't affect generated binary code.
* Always use sizeof to get array sizeZbigniew Chyla2015-01-131-1/+1
| | | | | | Don't use constant/expression from an array's definition when referring to its size. Eliminates redundancy and avoids problems when array size changes. The change doesn't affect generated code.
* Cleanup of string function and sizeof usage. All regression tests pass.Zbigniew Chyla2015-01-131-1/+1
|
* Fix a minor bug reported by the author.Eric S. Raymond2014-12-091-1/+1
|
* Silence another compiler warning under cygwin/gcc4.9Matt2014-09-061-1/+1
| | | | | | | | | | | | | gps2udp.c: In function 'send_udp': gps2udp.c:117:19: warning: passing argument 5 of 'sendto' from incompatible pointer type ssize_t status = sendto(sock[channel], ^ In file included from gps2udp.c:38:0: /usr/include/sys/socket.h:38:11: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_in *' ssize_t sendto (int, const void *, size_t __len, int __flags, ^
* String fixes in gps2udp pointed out by Reinhard Arlt.Eric S. Raymond2014-08-211-2/+1
|
* splint/cppcheck/coverity cleanup.Eric S. Raymond2014-08-211-3/+5
|
* Include <sys/select.h> everywhere fd_set us used.Eric S. Raymond2014-08-181-3/+4
| | | | | | | | This came up in connection with Android. According to SuS this shouln't be necessary if sys/time.h was included, but oh well. While we;re at it, rearrange some includes for more consistent order. All regression tests pass.
* gps2udp: tighten the test for a valid client port number.Gary E. Miller2014-01-031-1/+1
|
* lastcha2udp: fix test for valid port numberGary E. Miller2014-01-031-2/+4
| | | | | | | Found by: Ferry Huberts <mailings@hupie.com> atoi() never returns errno set, yet errno was tested for. strtol() does set errno, and does other checks.
* gps2udp: do not send out JSON when not configured to do soGary E. Miller2014-01-031-0/+5
| | | | From: Ferry Huberts <mailings@hupie.com>
* Prevent potential overrun errors found by Coverity scanning.Eric S. Raymond2013-12-061-2/+2
|
* splint fixups - no logic changes.Eric S. Raymond2013-11-241-17/+21
|
* Suppress compiler warnings.Eric S. Raymond2013-11-241-2/+3
|
* Updated documentation and fixes gps2udp command line parsingFulup.ArFoll2013-11-231-33/+34
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Fix bug in array bounds and replace exit() with exit(EXIT_{SUCCESS,FAILURE}).Michael Tatarinov2013-11-111-6/+7
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Partial cppcheck and Coverity cleanup.Eric S. Raymond2013-11-061-10/+12
| | | | | | Coverity found a potential overrun bug. All regression tests pass. PPS is live.
* More cppcheck cleanup. All regression tests pass. PPS is live.Eric S. Raymond2013-11-061-7/+7
|
* Egg-on-my-face build and compiler warning fixes.Eric S. Raymond2013-10-171-1/+1
|
* splint and cppcheck cleanup. All regression tests pass.Eric S. Raymond2013-09-291-1/+1
|
* Banish some compiler warnings.Eric S. Raymond2013-09-281-1/+2
|
* Coverity cleanup.Eric S. Raymond2013-09-241-1/+1
|
* Typo fixes.Eric S. Raymond2013-09-241-2/+2
|
* Suppress a compiler warning.Eric S. Raymond2013-05-011-2/+2
|
* Splint cleanup, spelling, and style fixes.Eric S. Raymond2013-05-011-249/+298
|
* Added gps2udp a gpsdclient to dispatch AIS to AISHUB, MarineTraffic, ...Fulup.ArFoll2013-05-011-0/+448
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>