[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
#define problem
Dear List,
I have a #define statement somewhere in the kernel code. I'd like to
redefine it, but use the original value. I did something like this:
#define VAR 12345
...
...
#define VAR_ORIG VAR
#undef VAR
#define VAR 23456
The problem is very trivial. If I use VAR_ORIG the result will be 23456,
as it will be replaced by VAR which will be replaced by 23456. How can I
inform the compiler to evaluate the macro definition in depth during the
compilation? So I'd like to get the following result:
#define VAR_ORIG 12345
#define VAR 23456
w/o getting macro redeclaration warinig during compilation.
Can I solve this somehow?
TIA && Good byte!
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/