Red Hat 6.1 version.h modifications

Zack Brown (zbrown@linuxcare.com)
Tue, 5 Oct 1999 17:11:29 -0700 (PDT)


Dave Mandala over here at Linuxcare upgraded to Red Hat 6.1 and his ESS
Maestro 2 soundcard module stopped working. It was only by doing a reinstall
of the module that he discovered Red Hat's changes to version.h (and added
files) -- see below.

It seems like this could break anything that checks version.h; or am I
wrong?

Zack

redhats version of version.h
==================================
/*
* Try to be a little smarter about which kernel are we currently running
*/

#ifndef __rh_kernel_version_h__
#define __rh_kernel_version_h__

/*
* First, get the version string for the running kernel from
* /boot/kernel.h - initscripts should create it for us
*/

#include "/boot/kernel.h"

/*
* Define some nasty macros o we can construct the file names
* we want to include
*/

#if defined(__rh_version_included_file__)
#undef __rh_version_included_file__
#endif /* __rh_version_included_file__ */

#if defined(__BOOT_KERNEL_UP) && (__BOOT_KERNEL_UP == 1)
#include <linux/version-up.h>
#define __rh_version_included_file__ 1
#endif /* __BOOT_KERNEL_UP */

#if defined(__BOOT_KERNEL_SMP) && (__BOOT_KERNEL_SMP == 1)
#include <linux/version-smp.h>
#define __rh_version_included_file__ 1
#endif /* __BOOT_KERNEL_SMP */

#if defined(__BOOT_KERNEL_BOOT) && (__BOOT_KERNEL_BOOT == 1)
#include <linux/version-BOOT.h>
#define __rh_version_included_file__ 1
#endif /* __BOOT_KERNEL_BOOT */

#if defined(__BOOT_KERNEL_BOOTSMP) && (__BOOT_KERNEL_BOOTSMP == 1)
#include <linux/version-BOOTsmp.h>
#define __rh_version_included_file__ 1
#endif /* __BOOT_KERNEL_BOOTSMP */

#if !defined(__rh_version_included_file__)
#include <linux/version-up.h>
#else
#undef __rh_version_included_file__
#endif /* __rh_version_included_file__ */

#endif /* __rh_kernel_version_h__ */
==================================

version-up.h
==================================
#define UTS_RELEASE "2.2.12-20"
#define LINUX_VERSION_CODE 131596
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
==================================

version-smp.h
==================================
#define UTS_RELEASE "2.2.12-20smp"
#define LINUX_VERSION_CODE 131596
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
==================================

version-BOOTsmp.h
==================================
#define UTS_RELEASE "2.2.12-20BOOT"
#define LINUX_VERSION_CODE 131596
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
==================================

-- 
Zack Brown, Developer Services Editor, Linuxcare, Inc.
tel: 1-415-354-4878x284, fax: 1-415-701-7457
zbrown@linuxcare.com, http://www.linuxcare.com/
Linuxcare. At the center of Linux.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/