Sorry for the late feedback. Ofc there's a couple of comments here and there but IMO this looks quite nice already. Then let's explore some options to make it even better:
1) What about moving it even further to the PE side? Keeping only p_get_pixel_formats as a unix call, and pre-allocating a large-enough array to hold the pixel formats (or making two calls if it's not large enough), which could even be cached in some of the glReserved1 thread data - with the HDC to invalidate the cache when necessary.
2) Have you checked how these functions behave on Windows? Are they very different across drivers and hardware or can we find a pixels format subset that we could simply fake? How useful / likely is it to have some exotic formats exposed and used by applications?