Skip to contentSkip to conversation

sound/core/wrappers.c __GENKSYMS__ usage

DISCUSSION Sam Ravnborg 2 participants 2 messages Oct 21, 2002 – Oct 22, 2002

lore
Share & tools
lore
#0 lore raw

Hi Jaroslav

The usage of __GENKSYMS__ in sound/core/wrappers.c looks wrong.

Quoted 1 line

From the file:

#include <linux/version.h>
#include <linux/config.h>
#ifdef ALSA_BUILD
#if defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__) #define MODVERSIONS
#include <linux/modversions.h>
#include "sndversions.h"
#endif
#endif

So __GENKSYMS__ etc is used to protect against inclusion of modversions.h and sndversion.h.
The latter is not present in my tree (2.5.44).
__DEPEND__ is no longer used.

I do not see the purpose of this - please explain.

Sam

#1 lore raw
Quoted 15 lines · Sam Ravnborg

Hi Jaroslav

The usage of __GENKSYMS__ in sound/core/wrappers.c looks wrong.

Quoted 1 line

From the file:

#include <linux/version.h>
#include <linux/config.h>
#ifdef ALSA_BUILD
#if defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__) #define MODVERSIONS
#include <linux/modversions.h>
#include "sndversions.h"
#endif
#endif

Quoted 6 lines

So __GENKSYMS__ etc is used to protect against inclusion of modversions.h and sndversion.h.
The latter is not present in my tree (2.5.44).
__DEPEND__ is no longer used.

I do not see the purpose of this - please explain.

It's for compatibility with older kernels. We use same sources for 2.2 and 2.4 kernels. Also notice that "problematic" #if is after ALSA_BUILD and it's not defined for Linux kernel (we use this definition internally for our build system).

Anyway, I'll move this code outside the kernel tree.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com