The entropy and the attractor equations for static extremal black hole solutions follow from a variational principle based on an entropy function. In the general case such an entropy function can be derived from the reduced action evaluated in a near-horizon geometry. BPS black holes constitute special solutions of this variational principle, but they can also be derived directly from a different entropy function based on supersymmetry enhancement at the horizon. Both functions are consistent with electric/magnetic duality and for BPS black holes their corresponding OSV-type integrals give identical results at the semi-classical level. We clarify the relation between the two entropy functions and the corresponding attractor equations for N=2 supergravity theories with higher-derivative couplings in four space-time dimensions. We discuss how non-holomorphic corrections will modify these entropy functions.