Nonlinear delay dynamics have found during the last thirty years a prolific area of research in the field of photonic devices. The popular external cavity laser diode set-ups and electro-optic feedback loops generate pulsating intensity light sources for diverse applications. Here, we concentrate on time-periodic square-wave oscillations. We consider the case of a semiconductor laser subject to a polarization rotated feedback and the case of an electro-optic oscillator. Stable square-waves have been observed experimentally in both systems which are described mathematically by nonlinear delay-differential equations. By taking advantage of the relatively large delay of the feedback loop, we determine bifurcation conditions for these square-waves. Square-wave oscillations may have the same or different plateau lengths. The period usually equals twice the delay but a period equal to one delay has also been found. Moreover, stable square-waves may compete in the bifurcation diagram with another form of stable oscillations. High-frequency sustained relaxation oscillations appear before the square-waves in the case of the laser subject to polarization rotated feedback while low-frequency oscillations coexist with the square-waves in the case of the electro-optic oscillator. (Work done in collaboration with Gaetan Friart and Lionel Weicker)