FS#9878 - Don't let the lamp plugin compile for players without backlight

Attached to Project: Rockbox
Opened by Alexander Levin (fml2) - Saturday, 07 February 2009, 20:28 GMT
Last edited by Nils Wallménius (nls) - Saturday, 28 March 2009, 17:00 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Version 3.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch lets the compiler to issue a compile error when the lamp plugin is built for a player without the backlight feature.

Without this patch, the whole file is #ifdef'ed out so that there will be no plugin entry point. The patch makes the compile process fail with a describing error message.
This task depends upon

Closed by  Nils Wallménius (nls)
Saturday, 28 March 2009, 17:00 GMT
Reason for closing:  Fixed
Additional comments about closing:  deleted the check altogether in r 20563
Comment by Jonas Häggqvist (rasher) - Saturday, 07 February 2009, 21:18 GMT
Surely it would make more sense to not compile it at all (by ifdeffinng it out of apps/plugins/SOURCES)?
Comment by Alexander Levin (fml2) - Saturday, 07 February 2009, 21:22 GMT
It's ifdeff'ed there. This is just an additional security check.
Comment by Thomas Martitz (kugel.) - Monday, 09 February 2009, 19:06 GMT
I don't understand. lamp.c should never be processed...why the "additional security check"?
Comment by Alexander Levin (fml2) - Monday, 16 February 2009, 20:47 GMT
Yes, lamp.c is ifdeffed out in the SOURCES file. So it might be better to remove the check in the .c file itself. But it contained one. This patch just makes the check better. But, as I said, it could/should be removed alltogether.