I’d like to be able to ensure I don’t accidentally statically link any proprietary modules into the kernel. I was thinking of making MODULE_LICENSE("Proprietary") fail at compile time if MODULE was not defined. (or even better, fail if MODULE_LICENSE("GPL") was not defined…).
But I can’t find a good way to compare strings within a macro — anyone have any good solutions to this?
I don’t think you can do this.
The way it’s usually done is by defining preprocessor symbols, and comparing their (integer) values: