File conftest.sh.diff.xen-11.1-i586 of Package nvidia-gfxG02

--- conftest.sh.orig	2010-10-15 11:38:44.000000000 +0200
+++ conftest.sh	2010-10-15 11:46:47.000000000 +0200
@@ -137,62 +137,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)
             #
@@ -362,60 +308,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)
@@ -681,172 +575,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 3 " >> 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 3 " >> conftest.h
         ;;
 
         vmm_support)
@@ -911,58 +651,8 @@
         ;;
 
         acpi_walk_namespace)
-            #
-            # Determine if the acpi_walk_namespace() function is present
-            # and how many arguments it takes.
-            #
-            echo "$CONFTEST_PREAMBLE
-            #include <acpi/acpi.h>
-            void conftest_acpi_walk_namespace(void) {
-                acpi_walk_namespace();
-            }" > 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_ACPI_WALK_NAMESPACE_PRESENT" >> conftest.h
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <acpi/acpi.h>
-            void conftest_acpi_walk_namespace(void) {
-                acpi_walk_namespace(0, NULL, 0, NULL, NULL, 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_ACPI_WALK_NAMESPACE_PRESENT" >> conftest.h
-                echo "#define NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT 7" >> conftest.h
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <acpi/acpi.h>
-            void conftest_acpi_walk_namespace(void) {
-                acpi_walk_namespace(0, NULL, 0, NULL, 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_ACPI_WALK_NAMESPACE_PRESENT" >> conftest.h
-                echo "#define NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT 6" >> conftest.h
-                return
-            else
-                echo "#error acpi_walk_namespace() conftest failed!" >> conftest.h
-            fi
+	    echo "#define NV_ACPI_WALK_NAMESPACE_PRESENT" >> conftest.h
+	    echo "#define NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT 6 " >> conftest.h
         ;;
 
         ioremap_wc)
--- conftest.sh.old	2010-10-15 12:05:03.000000000 +0200
+++ conftest.sh	2010-10-15 12:06:35.000000000 +0200
@@ -759,45 +759,9 @@
         ;;
 
       pci_dma_mapping_error)
-            #
-            # Determine how many arguments pci_dma_mapping_error()
-            # takes.
-            #
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/pci.h>
-            int conftest_pci_dma_mapping_error(void) {
-                return pci_dma_mapping_error(NULL, 0);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_PCI_DMA_MAPPING_ERROR_PRESENT" >> conftest.h
-                echo "#define NV_PCI_DMA_MAPPING_ERROR_ARGUMENT_COUNT 2" >> conftest.h
-                rm -f conftest$$.o
-                return
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/pci.h>
-            int conftest_pci_dma_mapping_error(void) {
-                return pci_dma_mapping_error(0);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_PCI_DMA_MAPPING_ERROR_PRESENT" >> conftest.h
-                echo "#define NV_PCI_DMA_MAPPING_ERROR_ARGUMENT_COUNT 1" >> conftest.h
-                rm -f conftest$$.o
-                return
-            else
-                echo "#error pci_dma_mapping_error() conftest failed!" >> conftest.h
-                return
-            fi
-        ;;
+	    echo "#define NV_PCI_DMA_MAPPING_ERROR_PRESENT" >> conftest.h
+	    echo "#define NV_PCI_DMA_MAPPING_ERROR_ARGUMENT_COUNT 2" >> conftest.h
+	;;
 
         agp_memory)
             #
--- conftest.sh.old	2010-10-15 12:09:29.000000000 +0200
+++ conftest.sh	2010-10-15 12:12:52.000000000 +0200
@@ -838,57 +838,9 @@
         ;;
 
         file_operations)
-            #
-            # Determine if the 'file_operations' structure has
-            # 'ioctl', 'unlocked_ioctl' and 'compat_ioctl' fields.
-            #
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/fs.h>
-            int conftest_file_operations(void) {
-                return offsetof(struct file_operations, ioctl);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h
-                rm -f conftest$$.o
-            else
-                echo "#undef NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/fs.h>
-            int conftest_file_operations(void) {
-                return offsetof(struct file_operations, unlocked_ioctl);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h
-                rm -f conftest$$.o
-            else
-                echo "#undef NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h
-            fi
-
-            echo "$CONFTEST_PREAMBLE
-            #include <linux/fs.h>
-            int conftest_file_operations(void) {
-                return offsetof(struct file_operations, compat_ioctl);
-            }" > conftest$$.c
-
-            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-            rm -f conftest$$.c
-
-            if [ -f conftest$$.o ]; then
-                echo "#define NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h
-                rm -f conftest$$.o
-            else
-                echo "#undef NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h
-            fi
+	    echo "#define NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h
+	    echo "#define NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h
+	    echo "#define NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h
         ;;
 
         sg_init_table)
openSUSE Build Service is sponsored by