nigels-com / glew

The OpenGL Extension Wrangler Library
Other
2.58k stars 609 forks source link

Duplicated #define in `glew_head.h`? #349

Closed bertie-wheen closed 2 years ago

bertie-wheen commented 2 years ago

In auto/src/glew_head.h, it seems like a MinGW/Cygwin define has been unnecessarily duplicated:

Lines 66-70:

#ifndef GLAPI
#  if defined(__MINGW32__) || defined(__CYGWIN__)
#    define GLAPI extern
#  endif
#endif

Lines 110-116:

#ifndef GLAPI
#  if defined(__MINGW32__) || defined(__CYGWIN__)
#    define GLAPI extern
#  else
#    define GLAPI WINGDIAPI
#  endif
#endif

I don't think there's anything in lines 71-109 that needs GLAPI defined; maybe lines 66-70 could be deleted? If I'm missing something, then maybe the:

#  else
#    define GLAPI WINGDIAPI

could be added after line 68, and lines 110-116 removed?

Either way, I realise it's harmless (but for simplicity's sake I think it ought to be unified).