This and the following function need to be in the #ifdef.