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: Greg Troxel
Subject: Re: [gpsd-dev] [PATCH RESEND] libgps.h: Fix linkage problem
Date: Wed, 19 Nov 2014 10:18:17 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix)

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.

Attachment: pgpwNuZZXUU8X.pgp
Description: PGP signature


reply via email to

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