[Click] Minimizing patch size

Joonwoo Park joonwpark81 at gmail.com
Tue Jan 4 21:39:08 EST 2011


Hi,

I don't think 'extern "C"' made any difference.  If you were able to
compile your example you should be able to compile even without
'extern "C"' from your example.
Don't remember exact gcc version but IIRC earlier version of g++
parses '::' as namespace keyword always.  To support old versions,
patching '::' was necessary.

Joonwoo

On Tue, Jan 4, 2011 at 5:35 PM, Philip Prindeville
<philipp_subx at redfish-solutions.com> wrote:
> On 1/4/11 12:25 PM, Joonwoo Park wrote:
>>
>>      1  #include<iostream>
>>      2
>>      3  extern "C"
>>      4  {
>>      5  struct keyword {
>>      6          int new;
>>      7  };
>>      8  }
>>      9
>>     10  int main()
>>     11  {
>>     12          return 0;
>>     13  }
>
> I took that and modified it as:
>
> #include<iostream>
>
> extern "C"
> {
> #include<sys/types.h>
>
> void load_ldt(int32_t ldt)
> {
>        asm volatile("lldt %0"::"m" (ldt));
> }
> }
>
> int main()
> {
>        return 0;
> }
>
>
> and it compiled fine.
>
> So that solves part of the problem.
>
> -Philip
>
>
>



More information about the click mailing list