gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH RESEND] libgps.h: Fix linkage problem


From: Jon Schlueter
Subject: Re: [gpsd-dev] [PATCH RESEND] libgps.h: Fix linkage problem
Date: Fri, 5 Dec 2014 21:59:35 -0500

I'll take a look at this and see about merging it in and getting it committed.  Just slow to respond

On Fri, Dec 5, 2014 at 2:57 AM, Michal Privoznik <address@hidden> wrote:
On 26.11.2014 11:59, Michal Privoznik wrote:
On 19.11.2014 16:29, Greg Troxel wrote:

Greg Troxel <address@hidden> writes:

Michal Privoznik <address@hidden> writes:

diff --git a/libgps.h b/libgps.h
index f773188..914c4df 100644
--- a/libgps.h
+++ b/libgps.h
@@ -10,6 +10,9 @@
  #define SHM_PSEUDO_FD    -1
  #define DBUS_PSEUDO_FD    -2

+#ifdef __cplusplus
+extern "C" {
+#endif
  extern int gps_sock_open(/address@hidden@*/const char *, /address@hidden@*/const
char *,
                /address@hidden@*/struct gps_data_t *);

I guess the real question is whether libgps.h should have C++ guards
like that or if it's wrong to include it without extern "C" from a C++
program.

Looking around, it seems that it's common practice to have guards in
headers.  I'm not esr and hence not going to merge this, but I would be
inclined to put the guards around the entire file to mitigate issues
 From other changes.

But either way, this fix is needed.


So can you merge it please? It's a build breaker after all.

Michal



Ping? Or is gpsd dead upstream?

Michal



reply via email to

[Prev in Thread] Current Thread [Next in Thread]