I just try the code under Haiku x86_64 hrev51173 with mesa_swpipe 17.0.2-2 as GL renderer, as it does works as expected: I can see a spining smoothed colors gradiants pyramide near a spinning one-color-per-face cube (so, GL_QUAD are still supported):
As I don’t have a gcc2 hybrid Haiku VM at hand, I can’t tell what wrong with your config, but the good news is that this code could works fine.