Use present autoconf test for asm/ldt.h in set_thread_area* tests to prevent build failures
Quoted 21 lines · On Friday 19 June 2009 10:12:15 Jiri Palecek > wrote:
(quoted diff) +0
-8-#include <stdio.h> -#include <errno.h> -#include <linux/unistd.h> -#include <asm/ldt.h> - /* Harness Specific Include Files. */ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" - -/* Extern Global Variables */ -extern int Tst_count; /* counter for tst_xxx routines.*/ -extern char *TESTDIR; /* temporary dir created by
tst_tmpdir()*/ +#include "config.h"/* Global Variables */
char *TCID = "set_thread_area01"; /* Test program identifier.*/ int testno;
intTST_TOTAL= 2; /* total number of tests in this
file. */
Review
Quoted 5 lines
(quoted diff) +5
-0+#if defined HAVE_ASM_LDT_H +#include <stdio.h> +#include <errno.h> +#include <linux/unistd.h> +#include <asm/ldt.h>
moving asm/ldt.h behind the ifdef makes sense, but none of the others do. there is no point in delaying the other includes and in general, all includes should come first ... there shouldnt be definitions before them. less likely to get bitten in the ass with clashes.
-mike
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 22 lines · Mike Frysinger
Quoted 21 lines · On Friday 19 June 2009 10:12:15 Jiri Palecek > wrote:
(quoted diff) +0
-8-#include <stdio.h> -#include <errno.h> -#include <linux/unistd.h> -#include <asm/ldt.h> - /* Harness Specific Include Files. */ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" - -/* Extern Global Variables */ -extern int Tst_count; /* counter for tst_xxx routines.*/ -extern char *TESTDIR; /* temporary dir created by
tst_tmpdir()*/ +#include "config.h"/* Global Variables */
char *TCID = "set_thread_area01"; /* Test program identifier.*/ int testno;
intTST_TOTAL= 2; /* total number of tests in this
file. */
Quoted 10 lines
Review
Quoted 5 lines
(quoted diff) +5
-0+#if defined HAVE_ASM_LDT_H +#include <stdio.h> +#include <errno.h> +#include <linux/unistd.h> +#include <asm/ldt.h>moving
asm/ldt.hbehind the ifdef makes sense, but none of the others do. there is no point in delaying the other includes and in general, all includes should come first ... there shouldnt be definitions before them. less likely to get bitten in the ass with clashes.
Correct. I did this for Jiri.
Regards--
Subrata
Quoted 6 lines
-mike
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list