Fixing Microsoft compatibility with the new "vsnprintf" by putting an underscore in front of it if WIN32 is defined but __CYGWIN__ is not

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@792 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2009-03-01 21:23:24 +00:00
parent d324e5489c
commit 53c3b78463
3 changed files with 12 additions and 0 deletions

View File

@ -37,7 +37,11 @@ bitmapPrintf (const char *fmt, ...)
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
#if defined(WIN32) && !defined(__CYGWIN__)
(void) _vsnprintf (buf, sizeof(buf), fmt, args);
#else
(void) vsnprintf (buf, sizeof(buf), fmt, args); (void) vsnprintf (buf, sizeof(buf), fmt, args);
#endif
va_end(args); va_end(args);
glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ; glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ;
} }

View File

@ -249,7 +249,11 @@ void bitmapPrintf (const char *fmt, ...)
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
#if defined(WIN32) && !defined(__CYGWIN__)
(void) _vsnprintf (buf, sizeof(buf), fmt, args);
#else
(void) vsnprintf (buf, sizeof(buf), fmt, args); (void) vsnprintf (buf, sizeof(buf), fmt, args);
#endif
va_end(args); va_end(args);
glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ; glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ;
} }

View File

@ -189,7 +189,11 @@ static void shapesPrintf (int row, int col, const char *fmt, ...)
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
#if defined(WIN32) && !defined(__CYGWIN__)
(void) _vsnprintf (buf, sizeof(buf), fmt, args);
#else
(void) vsnprintf (buf, sizeof(buf), fmt, args); (void) vsnprintf (buf, sizeof(buf), fmt, args);
#endif
va_end(args); va_end(args);
glGetIntegerv(GL_VIEWPORT,viewport); glGetIntegerv(GL_VIEWPORT,viewport);