File conftest.sh.diff.xen-11.0 of Package nvidia-gfxG02

--- conftest.sh.orig	2009-06-08 06:16:12.000000000 +0000
+++ conftest.sh	2009-06-08 06:23:11.000000000 +0000
@@ -120,62 +120,8 @@
 compile_test() {
     case "$1" in
         remap_page_range)
-            #
-            # Determine if the remap_page_range() function is present
-            # and how many arguments it takes.
-            #
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/mm.h>
-            void conftest_remap_page_range(void) {
-                remap_page_range();
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#undef NV_REMAP_PAGE_RANGE_PRESENT" >> conftest.h
-                rm -f conftest$$.o
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/mm.h>
-            int conftest_remap_page_range(void) {
-                pgprot_t pgprot = __pgprot(0);
-                return remap_page_range(NULL, 0L, 0L, 0L, pgprot);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_REMAP_PAGE_RANGE_PRESENT" >> conftest.h
-                echo "#define NV_REMAP_PAGE_RANGE_ARGUMENT_COUNT 5" >> conftest.h
-                rm -f conftest$$.o
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/mm.h>
-            int conftest_remap_page_range(void) {
-                pgprot_t pgprot = __pgprot(0);
-                return remap_page_range(0L, 0L, 0L, pgprot);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_REMAP_PAGE_RANGE_PRESENT" >> conftest.h
-                echo "#define NV_REMAP_PAGE_RANGE_ARGUMENT_COUNT 4" >> conftest.h
-                rm -f conftest$$.o
-                return
-            else
-                echo "#error remap_page_range() conftest failed!" >> conftest.h
-                return
-            fi
-        ;;
+	    echo "#undef NV_REMAP_PAGE_RANGE_PRESENT" >> conftest.h
+	;;
 
         set_pages_uc)
             #
@@ -345,60 +291,8 @@
         ;;
 
         vmap)
-            #
-            # Determine if the vmap() function is present and how
-            # many arguments it takes.
-            #
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/vmalloc.h>
-            void conftest_vmap(void) {
-                vmap();
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#undef NV_VMAP_PRESENT" >> conftest.h
-                rm -f conftest$$.o
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/vmalloc.h>
-            void *conftest_vmap(struct page **pages, int count) {
-                return vmap(pages, count);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_VMAP_PRESENT" >> conftest.h
-                echo "#define NV_VMAP_ARGUMENT_COUNT 2" >> conftest.h
-                rm -f conftest$$.o
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/vmalloc.h>
-            #include <linux/mm.h>
-            void *conftest_vmap(struct page **pages, int count) {
-                return vmap(pages, count, 0, PAGE_KERNEL);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_VMAP_PRESENT" >> conftest.h
-                echo "#define NV_VMAP_ARGUMENT_COUNT 4" >> conftest.h
-                rm -f conftest$$.o
-                return
-            else
-                echo "#error vmap() conftest failed!" >> conftest.h
-                return
-            fi
+	    echo "#define NV_VMAP_PRESENT" >> conftest.h
+	    echo "#define NV_VMAP_ARGUMENT_COUNT 4" >> conftest.h
         ;;
 
         i2c_adapter)
@@ -663,172 +557,18 @@
         ;;
 
         kmem_cache_create)
-            #
-            # Determine if the kmem_cache_create() function is
-            # present and how many arguments it takes.
-            #
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/slab.h>
-            void conftest_kmem_cache_create(void) {
-                kmem_cache_create();
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#undef NV_KMEM_CACHE_CREATE_PRESENT" >> conftest.h
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/slab.h>
-            void conftest_kmem_cache_create(void) {
-                kmem_cache_create(NULL, 0, 0, 0L, NULL, NULL);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#define NV_KMEM_CACHE_CREATE_PRESENT" >> conftest.h
-                echo "#define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 6 " >> conftest.h
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/slab.h>
-            void conftest_kmem_cache_create(void) {
-                kmem_cache_create(NULL, 0, 0, 0L, NULL);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#define NV_KMEM_CACHE_CREATE_PRESENT" >> conftest.h
-                echo "#define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 5 " >> conftest.h
-                return
-            else
-                echo "#error kmem_cache_create() conftest failed!" >> conftest.h
-            fi
+	    echo "#define NV_KMEM_CACHE_CREATE_PRESENT" >> conftest.h
+	    echo "#define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 5 " >> conftest.h
         ;;
 
         smp_call_function)
-            #
-            # Determine if the smp_call_function() function is
-            # present and how many arguments it takes.
-            #
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/smp.h>
-            void conftest_smp_call_function(void) {
-            #ifdef CONFIG_SMP
-                smp_call_function();
-            #endif
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#undef NV_SMP_CALL_FUNCTION_PRESENT" >> conftest.h
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/smp.h>
-            void conftest_smp_call_function(void) {
-                smp_call_function(NULL, NULL, 0, 0);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#define NV_SMP_CALL_FUNCTION_PRESENT" >> conftest.h
-                echo "#define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 4 " >> conftest.h
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/smp.h>
-            void conftest_smp_call_function(void) {
-                smp_call_function(NULL, NULL, 0);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#define NV_SMP_CALL_FUNCTION_PRESENT" >> conftest.h
-                echo "#define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 3 " >> conftest.h
-                return
-            else
-                echo "#error smp_call_function() conftest failed!" >> conftest.h
-            fi
+	    echo "#define NV_SMP_CALL_FUNCTION_PRESENT" >> conftest.h
+	    echo "#define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 4 " >> conftest.h
         ;;
 
         on_each_cpu)
-            #
-            # Determine if the on_each_cpu() function is present
-            # and how many arguments it takes.
-            #
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/smp.h>
-            void conftest_on_each_cpu(void) {
-            #ifdef CONFIG_SMP
-                on_each_cpu();
-            #endif
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#undef NV_ON_EACH_CPU_PRESENT" >> conftest.h
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/smp.h>
-            void conftest_on_each_cpu(void) {
-                on_each_cpu(NULL, NULL, 0, 0);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#define NV_ON_EACH_CPU_PRESENT" >> conftest.h
-                echo "#define NV_ON_EACH_CPU_ARGUMENT_COUNT 4 " >> conftest.h
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/smp.h>
-            void conftest_on_each_cpu(void) {
-                on_each_cpu(NULL, NULL, 0);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                rm -f conftest$$.o
-                echo "#define NV_ON_EACH_CPU_PRESENT" >> conftest.h
-                echo "#define NV_ON_EACH_CPU_ARGUMENT_COUNT 3 " >> conftest.h
-                return
-            else
-                echo "#error on_each_cpu() conftest failed!" >> conftest.h
-            fi
+	    echo "#define NV_ON_EACH_CPU_PRESENT" >> conftest.h
+	    echo "#define NV_ON_EACH_CPU_ARGUMENT_COUNT 4 " >> conftest.h
         ;;
 
         acpi_evaluate_integer)
openSUSE Build Service is sponsored by