From c8497bf0e2978081d5b6ef8231f024ab2b7721e8 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Thu, 9 Nov 2006 23:14:24 +0000 Subject: [PATCH] STABLE14-linux-config-h-died-20061109 FIXES 42662 config.h vanished. deal. (cherry picked from commit ee8ae61a4d9610fea16473d87b471cd4fc128804) --- acinclude.m4 | 1 + src/afs/LINUX/osi_probe.c | 2 ++ src/afs/LINUX/osi_sysctl.c | 2 ++ src/cf/linux-test3.m4 | 12 ++++++++++-- src/cf/linux-test4.m4 | 14 ++++++++++++++ src/config/param.alpha_linux_22.h | 1 - src/config/param.alpha_linux_24.h | 1 - src/config/param.alpha_linux_26.h | 2 -- src/config/param.amd64_linux24.h | 4 ---- src/config/param.amd64_linux26.h | 2 -- src/config/param.i386_linux22.h | 1 - src/config/param.i386_linux24.h | 2 -- src/config/param.i386_linux26.h | 2 -- src/config/param.i386_umlinux22.h | 1 - src/config/param.i386_umlinux24.h | 2 -- src/config/param.i386_umlinux26.h | 2 -- src/config/param.ia64_linux24.h | 4 ---- src/config/param.ia64_linux26.h | 4 ---- src/config/param.parisc_linux24.h | 2 -- src/config/param.ppc64_linux24.h | 2 -- src/config/param.ppc64_linux26.h | 2 -- src/config/param.ppc_linux22.h | 1 - src/config/param.ppc_linux24.h | 2 -- src/config/param.ppc_linux26.h | 2 -- src/config/param.s390_linux22.h | 1 - src/config/param.s390_linux24.h | 2 -- src/config/param.s390_linux26.h | 2 -- src/config/param.s390x_linux24.h | 2 -- src/config/param.s390x_linux26.h | 2 -- src/config/param.sparc64_linux22.h | 1 - src/config/param.sparc64_linux24.h | 2 -- src/config/param.sparc64_linux26.h | 2 -- src/config/param.sparc_linux22.h | 1 - src/config/param.sparc_linux24.h | 2 -- 34 files changed, 29 insertions(+), 58 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index fb8001a53..2524afc16 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -573,6 +573,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) [LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)] ) + LINUX_CONFIG_H_EXISTS LINUX_COMPLETION_H_EXISTS LINUX_DEFINES_FOR_EACH_PROCESS LINUX_DEFINES_PREV_TASK diff --git a/src/afs/LINUX/osi_probe.c b/src/afs/LINUX/osi_probe.c index 06364ca68..c2d3ce4a1 100644 --- a/src/afs/LINUX/osi_probe.c +++ b/src/afs/LINUX/osi_probe.c @@ -59,7 +59,9 @@ #include "afsincludes.h" #endif #include +#ifdef CONFIG_H_EXISTS #include +#endif #include #include #include diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c index 1fc7336b0..636cb6dfc 100644 --- a/src/afs/LINUX/osi_sysctl.c +++ b/src/afs/LINUX/osi_sysctl.c @@ -14,7 +14,9 @@ #include "afs/afs_stats.h" /* afs statistics */ #include +#ifdef CONFIG_H_EXISTS #include +#endif /* From afs_analyze.c */ extern afs_int32 hm_retry_RO; diff --git a/src/cf/linux-test3.m4 b/src/cf/linux-test3.m4 index 2c9ea9903..8c3b296f9 100644 --- a/src/cf/linux-test3.m4 +++ b/src/cf/linux-test3.m4 @@ -33,6 +33,9 @@ AC_SUBST(RHCONFIG_SP) AC_SUBST(RHCONFIG_MP) ]) + +dnl This depends on LINUX_CONFIG_H_EXISTS running first! + AC_DEFUN([LINUX_WHICH_MODULES],[ if test "x$enable_redhat_buildsys" = "xyes"; then MPS=Default @@ -40,12 +43,17 @@ else save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS" AC_MSG_CHECKING(which kernel modules to build) + if test "x$ac_cv_linux_config_h_exists" = "xyes"; then + CPPFLAGS="-DCONFIG_H_EXISTS $CPPFLAGS" + fi if test "x$ac_linux_rhconfig" = "xyes"; then MPS="MP SP" else AC_CACHE_VAL(ac_cv_linux_config_smp, [ - AC_TRY_COMPILE( -[#include + AC_TRY_KBUILD( +[#ifdef CONFIG_H_EXISTS +#include +#endif ], [#ifndef CONFIG_SMP lose; diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index d7f627a4f..261c82d4e 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -1,3 +1,17 @@ +AC_DEFUN([LINUX_CONFIG_H_EXISTS], [ + AC_MSG_CHECKING([for linux/config.h existance]) + AC_CACHE_VAL([ac_cv_linux_config_h_exists], [ + AC_TRY_KBUILD( +[#include ], +[return;], + ac_cv_linux_config_h_exists=yes, + ac_cv_linux_config_h_exists=no)]) + AC_MSG_RESULT($ac_cv_linux_config_h_exists) + if test "x$ac_cv_linux_config_h_exists" = "xyes"; then + AC_DEFINE([CONFIG_H_EXISTS], 1, [define if linux/config.h exists]) + fi]) + + AC_DEFUN([LINUX_COMPLETION_H_EXISTS], [ AC_MSG_CHECKING([for linux/completion.h existance]) AC_CACHE_VAL([ac_cv_linux_completion_h_exists], [ diff --git a/src/config/param.alpha_linux_22.h b/src/config/param.alpha_linux_22.h index 481632526..20398953c 100644 --- a/src/config/param.alpha_linux_22.h +++ b/src/config/param.alpha_linux_22.h @@ -30,7 +30,6 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.alpha_linux_24.h b/src/config/param.alpha_linux_24.h index 31da56eee..4a565a6ab 100644 --- a/src/config/param.alpha_linux_24.h +++ b/src/config/param.alpha_linux_24.h @@ -32,7 +32,6 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.alpha_linux_26.h b/src/config/param.alpha_linux_26.h index 1e4e802a9..1d44da6d7 100644 --- a/src/config/param.alpha_linux_26.h +++ b/src/config/param.alpha_linux_26.h @@ -36,9 +36,7 @@ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 diff --git a/src/config/param.amd64_linux24.h b/src/config/param.amd64_linux24.h index 44a9994f6..6e1e8083c 100644 --- a/src/config/param.amd64_linux24.h +++ b/src/config/param.amd64_linux24.h @@ -41,9 +41,7 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif @@ -89,7 +87,6 @@ #endif #endif /* KERNEL */ -#define USE_UCONTEXT /* should be in afsconfig.h */ #endif /* _PARAM_AMD64_LINUX20_H_ */ @@ -160,7 +157,6 @@ #define CMSERVERPREF #endif -#define USE_UCONTEXT /* should be in afsconfig.h */ #endif /* AFS_PARAM_H */ diff --git a/src/config/param.amd64_linux26.h b/src/config/param.amd64_linux26.h index 0eaedbe1e..9d417c0ed 100644 --- a/src/config/param.amd64_linux26.h +++ b/src/config/param.amd64_linux26.h @@ -31,9 +31,7 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 diff --git a/src/config/param.i386_linux22.h b/src/config/param.i386_linux22.h index 24f3183d4..686f9573b 100644 --- a/src/config/param.i386_linux22.h +++ b/src/config/param.i386_linux22.h @@ -32,7 +32,6 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.i386_linux24.h b/src/config/param.i386_linux24.h index a357fa04a..4c31183a7 100644 --- a/src/config/param.i386_linux24.h +++ b/src/config/param.i386_linux24.h @@ -27,9 +27,7 @@ #define AFS_64BIT_CLIENT 1 #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.i386_linux26.h b/src/config/param.i386_linux26.h index 7b363a70a..8495a9522 100644 --- a/src/config/param.i386_linux26.h +++ b/src/config/param.i386_linux26.h @@ -29,9 +29,7 @@ #define AFS_64BIT_CLIENT 1 #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 diff --git a/src/config/param.i386_umlinux22.h b/src/config/param.i386_umlinux22.h index 55c7c70f9..1193b9497 100644 --- a/src/config/param.i386_umlinux22.h +++ b/src/config/param.i386_umlinux22.h @@ -34,7 +34,6 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.i386_umlinux24.h b/src/config/param.i386_umlinux24.h index 7b43b59bf..77e312e9e 100644 --- a/src/config/param.i386_umlinux24.h +++ b/src/config/param.i386_umlinux24.h @@ -35,9 +35,7 @@ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.i386_umlinux26.h b/src/config/param.i386_umlinux26.h index 0885a92b3..3a158eaff 100644 --- a/src/config/param.i386_umlinux26.h +++ b/src/config/param.i386_umlinux26.h @@ -29,9 +29,7 @@ #define AFS_64BIT_CLIENT 1 #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 diff --git a/src/config/param.ia64_linux24.h b/src/config/param.ia64_linux24.h index 74b9d8e25..e5f9a49bb 100644 --- a/src/config/param.ia64_linux24.h +++ b/src/config/param.ia64_linux24.h @@ -41,9 +41,7 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif @@ -89,7 +87,6 @@ #endif #endif /* KERNEL */ -#define USE_UCONTEXT /* should be in afsconfig.h */ #endif /* _PARAM_IA64_LINUX20_H_ */ @@ -160,7 +157,6 @@ #define CMSERVERPREF #endif -#define USE_UCONTEXT /* should be in afsconfig.h */ #endif /* AFS_PARAM_H */ diff --git a/src/config/param.ia64_linux26.h b/src/config/param.ia64_linux26.h index 47decbe53..5f28d47a3 100644 --- a/src/config/param.ia64_linux26.h +++ b/src/config/param.ia64_linux26.h @@ -46,9 +46,7 @@ #include #include #include -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 @@ -98,7 +96,6 @@ #endif #endif /* KERNEL */ -#define USE_UCONTEXT /* should be in afsconfig.h */ #endif /* _PARAM_IA64_LINUX20_H_ */ @@ -170,7 +167,6 @@ #define CMSERVERPREF #endif -#define USE_UCONTEXT /* should be in afsconfig.h */ #endif /* AFS_PARAM_H */ diff --git a/src/config/param.parisc_linux24.h b/src/config/param.parisc_linux24.h index 4a41882dc..ad7506f5e 100644 --- a/src/config/param.parisc_linux24.h +++ b/src/config/param.parisc_linux24.h @@ -25,9 +25,7 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.ppc64_linux24.h b/src/config/param.ppc64_linux24.h index 5ea7a37f5..12dda5e03 100644 --- a/src/config/param.ppc64_linux24.h +++ b/src/config/param.ppc64_linux24.h @@ -29,9 +29,7 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.ppc64_linux26.h b/src/config/param.ppc64_linux26.h index 715646a83..730caf37c 100644 --- a/src/config/param.ppc64_linux26.h +++ b/src/config/param.ppc64_linux26.h @@ -31,9 +31,7 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 diff --git a/src/config/param.ppc_linux22.h b/src/config/param.ppc_linux22.h index 26f3d7fe5..bb0b72f3f 100644 --- a/src/config/param.ppc_linux22.h +++ b/src/config/param.ppc_linux22.h @@ -23,7 +23,6 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.ppc_linux24.h b/src/config/param.ppc_linux24.h index da0f49a2d..dcf062e7f 100644 --- a/src/config/param.ppc_linux24.h +++ b/src/config/param.ppc_linux24.h @@ -27,9 +27,7 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.ppc_linux26.h b/src/config/param.ppc_linux26.h index 49d94c7d2..37abeacb9 100644 --- a/src/config/param.ppc_linux26.h +++ b/src/config/param.ppc_linux26.h @@ -29,9 +29,7 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 diff --git a/src/config/param.s390_linux22.h b/src/config/param.s390_linux22.h index c19b3997b..6d97e6281 100644 --- a/src/config/param.s390_linux22.h +++ b/src/config/param.s390_linux22.h @@ -33,7 +33,6 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.s390_linux24.h b/src/config/param.s390_linux24.h index 738ff2c08..69130a7f4 100644 --- a/src/config/param.s390_linux24.h +++ b/src/config/param.s390_linux24.h @@ -37,9 +37,7 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.s390_linux26.h b/src/config/param.s390_linux26.h index a06c8560b..a941c28c3 100644 --- a/src/config/param.s390_linux26.h +++ b/src/config/param.s390_linux26.h @@ -39,9 +39,7 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.s390x_linux24.h b/src/config/param.s390x_linux24.h index 81d416348..49c7d93af 100644 --- a/src/config/param.s390x_linux24.h +++ b/src/config/param.s390x_linux24.h @@ -42,9 +42,7 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.s390x_linux26.h b/src/config/param.s390x_linux26.h index 5ccaa9d75..5ad1806f4 100644 --- a/src/config/param.s390x_linux26.h +++ b/src/config/param.s390x_linux26.h @@ -45,9 +45,7 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 diff --git a/src/config/param.sparc64_linux22.h b/src/config/param.sparc64_linux22.h index bd5547c8d..b7c081108 100644 --- a/src/config/param.sparc64_linux22.h +++ b/src/config/param.sparc64_linux22.h @@ -38,7 +38,6 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.sparc64_linux24.h b/src/config/param.sparc64_linux24.h index 78193052d..0f5e6044e 100644 --- a/src/config/param.sparc64_linux24.h +++ b/src/config/param.sparc64_linux24.h @@ -41,9 +41,7 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS #include diff --git a/src/config/param.sparc64_linux26.h b/src/config/param.sparc64_linux26.h index 3b985d39c..68bd28a24 100644 --- a/src/config/param.sparc64_linux26.h +++ b/src/config/param.sparc64_linux26.h @@ -43,9 +43,7 @@ #define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #ifndef AFS_SMP #define AFS_SMP 1 diff --git a/src/config/param.sparc_linux22.h b/src/config/param.sparc_linux22.h index d2a2eb789..a1f3d97b2 100644 --- a/src/config/param.sparc_linux22.h +++ b/src/config/param.sparc_linux22.h @@ -33,7 +33,6 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif diff --git a/src/config/param.sparc_linux24.h b/src/config/param.sparc_linux24.h index 3834f48a1..3082a524e 100644 --- a/src/config/param.sparc_linux24.h +++ b/src/config/param.sparc_linux24.h @@ -36,9 +36,7 @@ #define AFS_NAMEI_ENV 1 /* User space interface to file system */ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL) -#include -#include #ifdef CONFIG_SMP #undef CONFIG_SMP #endif -- 2.39.5