[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gpsd-dev
Subject:    [gpsd-dev] [PATCH] Ensure all functions of the client API are available at all times.
From:       Robert Norris <rw_norris () hotmail ! com>
Date:       2016-07-30 18:08:50
Message-ID: DB6PR0601MB21685BED26D5A9D1B45689AA8E020 () DB6PR0601MB2168 ! eurprd06 ! prod ! outlook ! com
[Download RAW message or body]

Thus client programs won't fail to build or run due to missing functions.
Although when clientdebug is turned off in building libgps, then these functions \
                won't do anything.
---
 libgps_core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libgps_core.c b/libgps_core.c
index 582e210..ca580bd 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -49,6 +49,10 @@ void libgps_trace(int errlevel, const char *fmt, ...)
 	(void)fputs(buf, debugfp);
     }
 }
+#else
+// Functions defined as so to furfil the API but otherwise do nothing when built \
with debug capability turned off +void gps_enable_debug(int level UNUSED, FILE * fp \
UNUSED) {} +void libgps_trace(int errlevel UNUSED, const char *fmt UNUSED, ...){}
 #endif /* LIBGPS_DEBUG */
 
 #ifdef SOCKET_EXPORT_ENABLE
-- 
2.8.1


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic