I read manual already:
The contents of definition are tokenized and processed as if they appeared during translation phase three in a ‘#define’ directive. In particular, the definition will be truncated by embedded newline characters. When I compiling my program, I got this error:
-D
name=
definitionIf you are invoking the preprocessor from a shell or shell-like program you may need to use the shell's quoting syntax to protect characters such as spaces that have a meaning in the shell syntax.
If you wish to define a function-like macro on the command line, write its argument list with surrounding parentheses before the equals sign (if any). Parentheses are meaningful to most shells, so you will need to quote the option. With sh and csh, -D'name(args...)=definition' works.
I wrote this in my makefile:
def_dpf = 'dpf(a...)=printk(KERN_ALERT a)'
My code uses `dpf` macro like this:
dpf("current value=%d\n",var);
Even manual says sh and csh can works with that definition, bash should support that machanism, I guess. How should I do? Any suggestion?error: ‘Da’ undeclared (first use in this function)
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies