A spectrum-sharing communication system where the secondary user is aware of the instantaneous channel state information (CSI) of the secondary link, but knows only the statistics of the secondary transmitter-primary receiver link, is investigated. The optimum power profile and the ergodic capacity of the secondary link are derived for general fading channels (with continuous probability density function) under average and peak transmit-power constraints and with respect to two different interference constraints: an interference outage constraint and a signal-to-interference (SI) outage constraint. When applied to Rayleigh fading channels, our results show that the interference constraint is harmful at high-power regime, whereas at low-power regime, it has a marginal impact and no-interference performance may be achieved.