We discuss the structure of infrared and ultraviolet singularities in on-shell QCD and supersymmetric QCD amplitudes at one-loop order. Previous results, valid for massless partons, are extended to the case of massive partons. Using dimensional regularization, we present a general factorization formula that controls both the singular ǫ-poles and the logarithmic contributions that become singular for vanishing masses. We introduce generalized Altarelli-Parisi splitting functions and discuss their relations with the singular terms in the amplitudes. The dependence on the regularization scheme is also considered.