Skip to content
Snippets Groups Projects
Commit 63c8c409 authored by Johann Lombardi's avatar Johann Lombardi
Browse files

Branch b1_6

b=15517
i=johann
i=umka

Fix compile warnings on i686.
parent c58fe145
No related branches found
No related tags found
No related merge requests found
...@@ -1058,11 +1058,11 @@ AC_DEFINE(HAVE_SHOW_TASK, 1, [show_task is exported]) ...@@ -1058,11 +1058,11 @@ AC_DEFINE(HAVE_SHOW_TASK, 1, [show_task is exported])
# check userland __u64 type # check userland __u64 type
AC_DEFUN([LN_U64_LONG_LONG], AC_DEFUN([LN_U64_LONG_LONG],
[AC_MSG_CHECKING([check u64 is long long type]) [AC_MSG_CHECKING([u64 is long long type])
tmp_flags="$CFLAGS" tmp_flags="$CFLAGS"
CFLAGS="$CFLAGS -Werror" CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
#include <asm/types.h> #include <linux/types.h>
int main(void) { int main(void) {
unsigned long long *data1; unsigned long long *data1;
__u64 *data2; __u64 *data2;
...@@ -1075,10 +1075,59 @@ AC_COMPILE_IFELSE([ ...@@ -1075,10 +1075,59 @@ AC_COMPILE_IFELSE([
AC_DEFINE(HAVE_U64_LONG_LONG, 1, AC_DEFINE(HAVE_U64_LONG_LONG, 1,
[__u64 is long long type]) [__u64 is long long type])
],[ ],[
AC_MSG_RESULT([no])
])
CFLAGS="$tmp_flags"
])
# check userland size_t type
AC_DEFUN([LN_SIZE_T_LONG],
[AC_MSG_CHECKING([size_t is unsigned long type])
tmp_flags="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE([
#include <linux/types.h>
int main(void) {
unsigned long *data1;
size_t *data2;
data1 = data2;
return 0;
}
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_SIZE_T_LONG, 1,
[size_t is long type])
],[
AC_MSG_RESULT([no])
]) ])
CFLAGS="$tmp_flags" CFLAGS="$tmp_flags"
]) ])
AC_DEFUN([LN_SSIZE_T_LONG],
[AC_MSG_CHECKING([ssize_t is signed long type])
tmp_flags="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE([
#include <linux/types.h>
int main(void) {
long *data1;
ssize_t *data2;
data1 = data2;
return 0;
}
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_SSIZE_T_LONG, 1,
[ssize_t is long type])
],[
AC_MSG_RESULT([no])
])
CFLAGS="$tmp_flags"
])
# LN_TASKLIST_LOCK # LN_TASKLIST_LOCK
# 2.6.18 remove tasklist_lock export # 2.6.18 remove tasklist_lock export
AC_DEFUN([LN_TASKLIST_LOCK], AC_DEFUN([LN_TASKLIST_LOCK],
...@@ -1229,6 +1278,8 @@ LN_STRUCT_PAGE_LIST ...@@ -1229,6 +1278,8 @@ LN_STRUCT_PAGE_LIST
LN_STRUCT_SIGHAND LN_STRUCT_SIGHAND
LN_FUNC_SHOW_TASK LN_FUNC_SHOW_TASK
LN_U64_LONG_LONG LN_U64_LONG_LONG
LN_SSIZE_T_LONG
LN_SIZE_T_LONG
# 2.6.18 # 2.6.18
LN_TASKLIST_LOCK LN_TASKLIST_LOCK
# 2.6.19 # 2.6.19
......
...@@ -346,23 +346,30 @@ extern int lwt_snapshot (cycles_t *now, int *ncpu, int *total_size, ...@@ -346,23 +346,30 @@ extern int lwt_snapshot (cycles_t *now, int *ncpu, int *total_size,
# define LPD64 "%Ld" # define LPD64 "%Ld"
# define LPX64 "%#Lx" # define LPX64 "%#Lx"
# define LPF64 "L" # define LPF64 "L"
# define LPSZ "%lu"
# define LPSSZ "%ld"
#elif (_LWORDSIZE == 32) #elif (_LWORDSIZE == 32)
# define LPU64 "%Lu" # define LPU64 "%Lu"
# define LPD64 "%Ld" # define LPD64 "%Ld"
# define LPX64 "%#Lx" # define LPX64 "%#Lx"
# define LPF64 "L" # define LPF64 "L"
# define LPSZ "%u"
# define LPSSZ "%d"
#elif (_LWORDSIZE == 64) #elif (_LWORDSIZE == 64)
# define LPU64 "%lu" # define LPU64 "%lu"
# define LPD64 "%ld" # define LPD64 "%ld"
# define LPX64 "%#lx" # define LPX64 "%#lx"
# define LPF64 "l" # define LPF64 "l"
#endif
#ifdef HAVE_SIZE_T_LONG
# define LPSZ "%lu" # define LPSZ "%lu"
#else
# define LPSZ "%u"
#endif
#ifdef HAVE_SSIZE_T_LONG
# define LPSSZ "%ld" # define LPSSZ "%ld"
#else
# define LPSSZ "%d"
#endif #endif
#ifndef LPU64 #ifndef LPU64
# error "No word size defined" # error "No word size defined"
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment