WINVER define. The default is set in windef.h if you don't define one in your app (or build command line).
I used mingw64 just go get a newer gcc at one point, still targeting 32-bit windows only.
You should take a look at MXE:
It always uses the latest GCC version.
Originally Posted by curaga
From Fedora's mingw:
#define WINVER 0x0502
As far as I remember 0502 is 2003 and XPSP2.
You're right, I initially went by wikipedia, which didn't mention SP changes.