bug-gnulib
[Top][All Lists]
Advanced

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

Re: Fix a linker error when used by a C++ program


From: Giuseppe Scrivano
Subject: Re: Fix a linker error when used by a C++ program
Date: Mon, 19 Oct 2009 09:56:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Giuseppe Scrivano wrote:
>> I am going to use gnulib in a C++ program.  This is the first problem I
>> encountered.
>
>> diff --git a/lib/nproc.h b/lib/nproc.h
>> index fe5b57e..4a8b4d4 100644
>> --- a/lib/nproc.h
>> +++ b/lib/nproc.h
>> @@ -18,4 +18,13 @@
>>  
>>  /* Written by Glen Lenker.  */
>>  
>> +/* Allow the use in C++ code.  */
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>>  unsigned long int num_processors (void);
>> +
>> +#ifdef __cplusplus
>> +}
>> +#endif      /* C++ */
>
> You are right, of course. I committed your patch for you.

Thanks.

Giuseppe




reply via email to

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