It checks if you defined USE_MATH_DEFINES and based on that defines the constants.
It also checks if it is already DEFINED, I dont think it has to do this because pragma once and the include guards will prevent it from being included twice in a translation unit.
But here is the code that does that if anyone wants to see for future reference:
#pragma is nonstandard. It is more for individual use.
If you are referring to the code pasted when you stated that they need not to check if _USE_MATH_DEFINES, it is indeed necessary. Note that they don't check for the define to avoid duplication. They are checking for the define to determine whether the following macros should be added to the translation unit. In addition, they include a formal define they use for whatever later purposes.
It also checks if it is already DEFINED, I dont think it has to do this because pragma once and the include guards will prevent it from being included twice in a translation unit.
Who says that is the only header in which these constants may be defined?