public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h.
@ 2012-08-03 22:29 Vinson Lee
  2012-08-06  1:42 ` Wanlong Gao
  2012-10-04 13:02 ` chrubis
  0 siblings, 2 replies; 6+ messages in thread
From: Vinson Lee @ 2012-08-03 22:29 UTC (permalink / raw)
  To: ltp-list

This patch fixes this build error with clang.

testcases/kernel/syscalls/rt_sigaction/../../../../include/ltp_signal.h:85: undefined reference to `handler_h'

Signed-off-by: Vinson Lee <vlee@twitter.com>
---
 include/ltp_signal.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ltp_signal.h b/include/ltp_signal.h
index 1ac6f70..093059f 100644
--- a/include/ltp_signal.h
+++ b/include/ltp_signal.h
@@ -69,7 +69,7 @@ struct kernel_sigaction {
 
 void (*restore_rt) (void);
 
-inline void
+void
 handler_h (int signal)
 {
 	return;
-- 
1.7.9.5


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h.
  2012-08-03 22:29 [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h Vinson Lee
@ 2012-08-06  1:42 ` Wanlong Gao
  2012-08-06 16:55   ` Vinson Lee
  2012-10-04 13:02 ` chrubis
  1 sibling, 1 reply; 6+ messages in thread
From: Wanlong Gao @ 2012-08-06  1:42 UTC (permalink / raw)
  To: Vinson Lee; +Cc: ltp-list

On 08/04/2012 06:29 AM, Vinson Lee wrote:
> This patch fixes this build error with clang.
> 
> testcases/kernel/syscalls/rt_sigaction/../../../../include/ltp_signal.h:85: undefined reference to `handler_h'

If you wanna build LTP with LLVM, why not make out "a path for LLVM building" and send
out it. I think this one line change can't do everything for LLVM building, although
untested. right?

Thanks,
Wanlong Gao

> 
> Signed-off-by: Vinson Lee <vlee@twitter.com>
> ---
>  include/ltp_signal.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/ltp_signal.h b/include/ltp_signal.h
> index 1ac6f70..093059f 100644
> --- a/include/ltp_signal.h
> +++ b/include/ltp_signal.h
> @@ -69,7 +69,7 @@ struct kernel_sigaction {
>  
>  void (*restore_rt) (void);
>  
> -inline void
> +void
>  handler_h (int signal)
>  {
>  	return;
> 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h.
  2012-08-06  1:42 ` Wanlong Gao
@ 2012-08-06 16:55   ` Vinson Lee
  2012-08-07  1:09     ` Wanlong Gao
  0 siblings, 1 reply; 6+ messages in thread
From: Vinson Lee @ 2012-08-06 16:55 UTC (permalink / raw)
  To: gaowanlong; +Cc: ltp-list

On Sun, Aug 5, 2012 at 6:42 PM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
> On 08/04/2012 06:29 AM, Vinson Lee wrote:
>> This patch fixes this build error with clang.
>>
>> testcases/kernel/syscalls/rt_sigaction/../../../../include/ltp_signal.h:85: undefined reference to `handler_h'
>
> If you wanna build LTP with LLVM, why not make out "a path for LLVM building" and send
> out it. I think this one line change can't do everything for LLVM building, although
> untested. right?
>
> Thanks,
> Wanlong Gao
>

This was the only build error with I saw with clang. This one change
fixes the build with clang.

It's a C99 error which would probably occur with gcc -std=c99 as well.
http://clang.llvm.org/compatibility.html#inline


>>
>> Signed-off-by: Vinson Lee <vlee@twitter.com>
>> ---
>>  include/ltp_signal.h |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/ltp_signal.h b/include/ltp_signal.h
>> index 1ac6f70..093059f 100644
>> --- a/include/ltp_signal.h
>> +++ b/include/ltp_signal.h
>> @@ -69,7 +69,7 @@ struct kernel_sigaction {
>>
>>  void (*restore_rt) (void);
>>
>> -inline void
>> +void
>>  handler_h (int signal)
>>  {
>>       return;
>>
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h.
  2012-08-06 16:55   ` Vinson Lee
@ 2012-08-07  1:09     ` Wanlong Gao
  2012-10-04 13:00       ` chrubis
  0 siblings, 1 reply; 6+ messages in thread
From: Wanlong Gao @ 2012-08-07  1:09 UTC (permalink / raw)
  To: Vinson Lee; +Cc: ltp-list

On 08/07/2012 12:55 AM, Vinson Lee wrote:
> On Sun, Aug 5, 2012 at 6:42 PM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
>> On 08/04/2012 06:29 AM, Vinson Lee wrote:
>>> This patch fixes this build error with clang.
>>>
>>> testcases/kernel/syscalls/rt_sigaction/../../../../include/ltp_signal.h:85: undefined reference to `handler_h'
>>
>> If you wanna build LTP with LLVM, why not make out "a path for LLVM building" and send
>> out it. I think this one line change can't do everything for LLVM building, although
>> untested. right?
>>
>> Thanks,
>> Wanlong Gao
>>
> 
> This was the only build error with I saw with clang. This one change
> fixes the build with clang.
> 
> It's a C99 error which would probably occur with gcc -std=c99 as well.
> http://clang.llvm.org/compatibility.html#inline

I saw that "Change add to a static inline function. 
This is usually the right solution if only one translation
unit needs to use the function. static inline functions are
always resolved within the translation unit, so you won't have
to add a non-inline definition of the function elsewhere in your program."

So, why not just change it to "static inline" to resolve this?

Thanks,
Wanlong Gao

> 
> 
>>>
>>> Signed-off-by: Vinson Lee <vlee@twitter.com>
>>> ---
>>>  include/ltp_signal.h |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/ltp_signal.h b/include/ltp_signal.h
>>> index 1ac6f70..093059f 100644
>>> --- a/include/ltp_signal.h
>>> +++ b/include/ltp_signal.h
>>> @@ -69,7 +69,7 @@ struct kernel_sigaction {
>>>
>>>  void (*restore_rt) (void);
>>>
>>> -inline void
>>> +void
>>>  handler_h (int signal)
>>>  {
>>>       return;
>>>
>>
> 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h.
  2012-08-07  1:09     ` Wanlong Gao
@ 2012-10-04 13:00       ` chrubis
  0 siblings, 0 replies; 6+ messages in thread
From: chrubis @ 2012-10-04 13:00 UTC (permalink / raw)
  To: Wanlong Gao; +Cc: ltp-list

Hi!
> I saw that "Change add to a static inline function. 
> This is usually the right solution if only one translation
> unit needs to use the function. static inline functions are
> always resolved within the translation unit, so you won't have
> to add a non-inline definition of the function elsewhere in your program."
> 
> So, why not just change it to "static inline" to resolve this?

Interestingly enough, the function is passed via pointer so compiler
couldn't inline it at all, I wonder why there was the inline in the
first place...

I've removed the inline added static and confirmed that it builds with
clang 3.1 on x86_64.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h.
  2012-08-03 22:29 [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h Vinson Lee
  2012-08-06  1:42 ` Wanlong Gao
@ 2012-10-04 13:02 ` chrubis
  1 sibling, 0 replies; 6+ messages in thread
From: chrubis @ 2012-10-04 13:02 UTC (permalink / raw)
  To: Vinson Lee; +Cc: ltp-list

Hi!
> diff --git a/include/ltp_signal.h b/include/ltp_signal.h
> index 1ac6f70..093059f 100644
> --- a/include/ltp_signal.h
> +++ b/include/ltp_signal.h
> @@ -69,7 +69,7 @@ struct kernel_sigaction {
>  
>  void (*restore_rt) (void);
>  
> -inline void
> +void
>  handler_h (int signal)
>  {
>  	return;

I've just commited similar patch to this and added your signed-of-by.

Thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-04 13:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 22:29 [LTP] [PATCH] ltp_signal.h: Remove inline keyword from handler_h Vinson Lee
2012-08-06  1:42 ` Wanlong Gao
2012-08-06 16:55   ` Vinson Lee
2012-08-07  1:09     ` Wanlong Gao
2012-10-04 13:00       ` chrubis
2012-10-04 13:02 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox