summaryrefslogtreecommitdiff
path: root/libgps.h
Commit message (Collapse)AuthorAgeFilesLines
* gps_read(): fix some nasty buffer overruns and corruptions.Gary E. Miller2018-07-141-1/+1
| | | | | | | Now pass an optional message buffer to gps_read(). Finally the JSON display in cgps works. Thanks to Virgin Orbit for their support fixing this bug.
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* Move declarations of libgps_debug related functions and definitions.Rob Norris2016-03-081-0/+17
| | | | | | | | | Move from gpsd.h to libgps.h This is the more logical place for this code and removes the dependency of test_libgps.c on gpsd.h Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-7/+7
| | | | | | | | | | | | | | | | | | | 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.
* Implement POSIX clock_gettime(3) for systems that lack it (like Mac OS X).Eric S. Raymond2015-03-011-0/+2
| | | | | | | On Mac OS X it will get proper nanosecond precision; elsewhere, only microseconds. Hides the conformance failure from the rest of the code. All regression tests pass.
* libgps.h: Fix linkage problemMichal Privoznik2015-01-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | When building with libQgpsmm=1 enabled I see this failure: g++ -o libgps_core-qt.os -c -D_GNU_SOURCE -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -pthread -Wmissing-declarations -O2 -pthread -fPIC -DUSE_QT -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtCore libgps_core.c cc1plus: warning: command line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++ In file included from libgps_core.c:19:0: gps_json.h:41:28: error: conflicting declaration of 'int json_ais_read(const char*, char*, size_t, ais_t*, const char**)' with 'C' linkage /*@null@*/const char **); ^ In file included from libgps_core.c:18:0: libgps.h:34:12: note: previous declaration with 'C++' linkage extern int json_ais_read(const char *, char *, size_t, struct ais_t *, ^ scons: *** [libgps_core-qt.os] Error 1 scons: building terminated because of errors. Digging more into the problem shows, libgps.h doesn't have the functions enclosed within 'extern "C"' mark. Therefore, g++ mangled the function names and hence the error. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Jon Schlueter <jschlueter@navigationsolutions.com>
* GNU libc timegm() turns out to be buggy when DST is on (glibc-2.19).Eric S. Raymond2014-09-281-7/+0
| | | | | | Fortunately, there's a much simpler way to do the computation correctly. All regression tests pass,
* Add scons check for gmtimeMatt2014-09-271-3/+5
| | | | | | | | | | | | | | | | | | | | | | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The recent addition of a prototype for gmtime in gpsd.h breaks the cygwin compile. Cygwin has gmtime, so the declarations conflict. Handle this by adding an scons check for gmtime, and make declaration of the bundled version conditional on absence of the system-supplied version. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUJvXAAAoJECH/phKUbjXCdgwH/RrMznXe51HHR5eLD3Y/vor8 h514XtvlzB/ghWQcAuiWX8mGy/J7k8OJFb8HmUXPAhSuzeiRooZXLz7uk3UvfeGv 4p5MfND3E7FCZVBu9/o9n5gf27wddXKChHVfAZ1MsnusRmwfjAiPoTr0iVoarWLw s/8tjvnHJg4A3i08nu4Y+Z9rwyDqkmB2YPQ0Zs+deCsbK4AA4Lx3oVkgDkVCk7zz vBZPueS6ylAMb1hbEthW3l7St3S2ESLG7nIxwv1lQ0mmAi70pknHeLYbiBLU0QqT A2ZsOOajespqq9/pmxP6ZJcwy8DtNXcj8LvRcNAOrjiV52MQUwTZGLLwVP5WMxk= =PoQy -----END PGP SIGNATURE-----
* Do the right thing if we're not using glibc - use local timegm().Eric S. Raymond2014-09-251-0/+5
| | | | All regression tests pass.
* Clean up another FIXME.Eric S. Raymond2014-08-241-0/+3
|
* punt export_tMike Frysinger2013-04-101-17/+0
| | | | | | | | Nothing is actually following the convention laid out by this enum, so punt it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Nuke trailing whitespace in C source.Eric S. Raymond2012-09-071-6/+6
|
* Typo fix.Eric S. Raymond2012-01-151-1/+1
|
* First cut at implementing waiting test for shm export.Eric S. Raymond2011-10-031-3/+3
| | | | Timeout argument is presently ignored.
* Remove duplicate code.Michael Tatarinov2011-09-301-0/+1
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Magic-number elimination.Eric S. Raymond2011-09-301-0/+3
| | | | All three exports work.
* Canned mainloop function for socket export...Eric S. Raymond2011-09-281-3/+3
| | | | ...also, dispatch to open for the DBUS transport.
* Runtime dispatch to methods is working in the client library.Eric S. Raymond2011-09-281-1/+12
|
* Avoid a name collision.Eric S. Raymond2011-09-281-1/+1
|
* First step in runtime export dispatch for the client library.Eric S. Raymond2011-09-281-0/+7
|
* Break out prototypes for client library export methgods into a new heasder.Eric S. Raymond2011-09-281-0/+31
All regression tests pass. All three exports work in gpxlogger.