If they are square, they can't be donuts. Donuts is just the modern version of what used to be called a dough naught, which meant a treat made of dough that resembles a zero, or naught.
The reason donuts have holes is because the middle won't cook without burning the outside edge. It's the same with bagels. But my mother used to make a square pasty in much the same way as a donut, by deep-frying sweet dough and then sprinkling them with powdered sugar.