Skip to contentSkip to conversation

Fix a building error.

PATCH In review Peng Haitao 4 participants 7 messages Jan 14, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix a building error.

Hi Garrett,

A build error is caught after applied commit bacc849720ec4efda5a0a8a9ea6a0e93a1415541.

---
 testcases/kernel/syscalls/mallopt/mallopt01.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/mallopt/mallopt01.c +1 -0
index d356cb2..26307a6 100644
@@ -37,6 +37,7 @@
 #ifdef CONFIG_COLDFIRE
 #define __MALLOC_STANDARD__
 #endif
+#include <malloc.h>
 #include <stdlib.h>
 #include <errno.h>
 
Signature · 17 lines
1.7.0.4

-- 
Best Regards,
Peng Haitao


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Acked-by on v1 1/1
#1 lore raw

Hi!

Quoted 3 lines

A build error is caught after applied commit bacc849720ec4efda5a0a8a9ea6a0e93a1415541.

You were faster than me ;).

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw
In reply to Peng Haitao
Quoted 1 line · On Friday, January 14, 2011 04:48:33 Peng Haitao wrote:
 testcases/kernel/syscalls/mallopt/mallopt01.c |    1 +

please use descriptive subjects in your patches. this really should be something like:
mallopt01: fix build error due to xxxx

testcases/kernel/syscalls/mallopt/mallopt01.c line 40

Quoted 7 lines
testcases/kernel/syscalls/mallopt/mallopt01.c +1 -0
@@ -37,6 +37,7 @@
 #ifdef CONFIG_COLDFIRE
 #define __MALLOC_STANDARD__
 #endif
+#include <malloc.h>

umm, no. malloc.h is a dead header file and nothing should be including it. -mike

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 7 lines · Mike Frysinger
Quoted 1 line · On Friday, January 14, 2011 04:48:33 Peng Haitao wrote:

 testcases/kernel/syscalls/mallopt/mallopt01.c |    1 +

please use descriptive subjects in your patches.  this really should be something like:
       mallopt01: fix build error due to xxxx

Quoted 9 lines

testcases/kernel/syscalls/mallopt/mallopt01.c line 40

Quoted 7 lines
testcases/kernel/syscalls/mallopt/mallopt01.c +1 -0
@@ -37,6 +37,7 @@
  #ifdef CONFIG_COLDFIRE
  #define __MALLOC_STANDARD__
  #endif
+#include <malloc.h>

umm, no.  malloc.h is a dead header file and nothing should be including it.

It is exposing extra junk in this case that isn't available from
stdlib.h, which unfortunately the test uses. I fixed the build error for now, but maybe someone upstream should be informed that this header needs to die a painful death, because all contemporary documentation says that you need to include stdlib.h, not malloc.h when working with malloc(3). I was reminded of this recently because I built some stuff on FreeBSD and FreeBSD has a nice #warning about this deprecation.
Thanks,
-Garrett

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 19 lines · On Friday, January 14, 2011 16:33:38 Garrett Cooper wrote:
Quoted 7 lines · Mike Frysinger
Quoted 1 line · On Friday, January 14, 2011 04:48:33 Peng Haitao wrote:
 testcases/kernel/syscalls/mallopt/mallopt01.c |    1 +

please use descriptive subjects in your patches. this really should be something like:
mallopt01: fix build error due to xxxx

Quoted 10 lines

testcases/kernel/syscalls/mallopt/mallopt01.c line 40

Quoted 7 lines
testcases/kernel/syscalls/mallopt/mallopt01.c +1 -0
@@ -37,6 +37,7 @@
 #ifdef CONFIG_COLDFIRE
 #define __MALLOC_STANDARD__
 #endif
+#include <malloc.h>

umm, no. malloc.h is a dead header file and nothing should be including it.

Quoted 8 lines

It is exposing extra junk in this case that isn't available from
stdlib.h, which unfortunately the test uses. I fixed the build error for now, but maybe someone upstream should be informed that this header needs to die a painful death, because all contemporary documentation says that you need to include stdlib.h, not malloc.h when working with malloc(3). I was reminded of this recently because I built some stuff on FreeBSD and FreeBSD has a nice #warning about this deprecation.

err, right. we're using mallopt() here and not malloc(). the former is not part of POSIX which means it should not be in stdlib.h. i dont believe it is being deprecated on the GNU side, so we dont want to go killing off the tests. -mike

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#5 lore raw
Quoted 29 lines · Mike Frysinger
Quoted 19 lines · On Friday, January 14, 2011 16:33:38 Garrett Cooper wrote:
Quoted 7 lines · Mike Frysinger
Quoted 1 line · On Friday, January 14, 2011 04:48:33 Peng Haitao wrote:

 testcases/kernel/syscalls/mallopt/mallopt01.c |    1 +

please use descriptive subjects in your patches.  this really should be something like:
       mallopt01: fix build error due to xxxx

Quoted 10 lines

testcases/kernel/syscalls/mallopt/mallopt01.c line 40

Quoted 7 lines
testcases/kernel/syscalls/mallopt/mallopt01.c +1 -0
@@ -37,6 +37,7 @@
  #ifdef CONFIG_COLDFIRE
  #define __MALLOC_STANDARD__
  #endif
+#include <malloc.h>

umm, no.  malloc.h is a dead header file and nothing should be including it.

Quoted 8 lines

    It is exposing extra junk in this case that isn't available from stdlib.h, which unfortunately the test uses. I fixed the build error for now, but maybe someone upstream should be informed that this header needs to die a painful death, because all contemporary documentation says that you need to include stdlib.h, not malloc.h when working with malloc(3). I was reminded of this recently because I built some stuff on FreeBSD and FreeBSD has a nice #warning about this deprecation.

Quoted 3 lines

err, right.  we're using mallopt() here and not malloc().  the former is not part of POSIX which means it should not be in stdlib.h.  i dont believe it is being deprecated on the GNU side, so we dont want to go killing off the tests.

Should these tests live with glibc then and not ltp? Thanks,
-Garrett

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#6 lore raw
Quoted 30 lines · On Friday, January 14, 2011 16:52:15 Garrett Cooper wrote:
Quoted 29 lines · Mike Frysinger
Quoted 27 lines · On Friday, January 14, 2011 16:33:38 Garrett Cooper wrote:
Quoted 7 lines · Mike Frysinger
Quoted 1 line · On Friday, January 14, 2011 04:48:33 Peng Haitao wrote:
 testcases/kernel/syscalls/mallopt/mallopt01.c |    1 +

please use descriptive subjects in your patches. this really should be something like:
mallopt01: fix build error due to xxxx

Quoted 10 lines

testcases/kernel/syscalls/mallopt/mallopt01.c line 40

Quoted 7 lines
testcases/kernel/syscalls/mallopt/mallopt01.c +1 -0
@@ -37,6 +37,7 @@
 #ifdef CONFIG_COLDFIRE
 #define __MALLOC_STANDARD__
 #endif
+#include <malloc.h>

umm, no. malloc.h is a dead header file and nothing should be including it.

It is exposing extra junk in this case that isn't available from
stdlib.h, which unfortunately the test uses. I fixed the build error for now, but maybe someone upstream should be informed that this header needs to die a painful death, because all contemporary documentation says that you need to include stdlib.h, not malloc.h when working with malloc(3). I was reminded of this recently because I built some stuff on FreeBSD and FreeBSD has a nice #warning about this deprecation.

Quoted 6 lines
Quoted 4 lines

err, right. we're using mallopt() here and not malloc(). the former is not part of POSIX which means it should not be in stdlib.h. i dont believe it is being deprecated on the GNU side, so we dont want to go killing off the tests.

Should these tests live with glibc then and not ltp?

not really. you might be able to get glibc to accept these, but you'll most likely need to rewrite them considerably. plus, other C library implementations also support mallopt, not just glibc. while it isnt part of POSIX, i do believe it is part of older standards. glibc seems to quote SVID/XPG/ANSI.
-mike

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list