Aaand I figured it out. For symbols that are not functions (extern const int foobar
, for instance), you have to compare against the address of the symbol, not the symbol itself, so:
if (&UIApplicationWillEnterForegroundNotification != NULL)
etc;
Which in retrospect is kind of obvious, but I still fault the entire universe around me for not ever mentioning the distinction.