It's going to vary by country, as no country ever had any hard rules on this matter, and each country had different terms for lengths of rifle.
There are also going to be numerous exceptions to any trend you may find. One that comes to mind is the case of the Gewehr 98 and the Kar98b, both of which had 29 inch barrels, the latter being a renamed and slightly modified Gewehr 98, to comply with Versailles treaty regulations, but one is a rifle, the other a carbine.
Thanks for the reply... That's kind of what I had though, that each country may have had their own ideas about the classifications. Yeah too funny about the kar98b.