std C/C++ patch #9

David Scott Page page at cs.utexas.edu
Sat Apr 27 11:06:28 EDT 2002


Hi,

Actually, the extern "C" {} specification is in the linux module code
(a comment on the closing brace would be helpful).  The "__inline__"
should still be replaced in the C++ userspace code.  I'm don't know if
"__inline__" means anything special in the linux kernel compilation,
but if not, you might consider converting it to plain "inline" for the
reasons given in the original post.

I'm sorry for any confusion.

--
Scott Page

> 
> Hi,
> 
> In glue.hh, there is a __GNUC__ "__inline__" directive in an extern
> "C" {} linkage specification.  Since extern "C" is still C++ code
> (with C naming and linkage at namespace level), "inline" is
> appropriate for both gcc and strict compilers.
> 
> --
> Scott Page
> 
> ------------------------------------- 8< ----------------------------------
> diff -Naur click-stdC++.8/include/click/glue.hh click-stdC++.9/include/click/glue.hh
> --- click-stdC++.8/include/click/glue.hh	Sun Dec  2 19:37:15 2001
> +++ click-stdC++.9/include/click/glue.hh	Fri Apr 26 19:40:19 2002
> @@ -176,7 +176,7 @@
>  # include <netinet/in.h>
>  # include <sys/time.h>
>  
> -__inline__ unsigned long long
> +inline unsigned long long
>  click_get_cycles()
>  {
>    return(0);
> 
> 
> 
> 
> 
> 




More information about the click mailing list