[Mesa-dev] [PATCH 2/3] tests, trival, fp, vp: Rename errno with errnum.

jfonseca at vmware.com jfonseca at vmware.com
Wed Nov 19 10:23:56 PST 2014


From: José Fonseca <jfonseca at vmware.com>

Prevents warnings on MinGW due to conflicting linkage types for errno.
---
 src/fp/fp-tri.c                      |  8 ++++----
 src/tests/arbfpspec.c                | 14 +++++++-------
 src/tests/arbfptest1.c               |  8 ++++----
 src/tests/arbvptest1.c               |  8 ++++----
 src/tests/arbvptest3.c               |  8 ++++----
 src/tests/arbvptorus.c               |  8 ++++----
 src/tests/arbvpwarpmesh.c            |  8 ++++----
 src/trivial/draw2arrays.c            |  8 ++++----
 src/trivial/drawarrays.c             |  8 ++++----
 src/trivial/drawelements-large.c     |  8 ++++----
 src/trivial/drawelements.c           |  8 ++++----
 src/trivial/drawrange.c              |  8 ++++----
 src/trivial/lineloop-elts.c          |  8 ++++----
 src/trivial/tri-array-interleaved.c  |  8 ++++----
 src/trivial/tri-fp-const-imm.c       |  8 ++++----
 src/trivial/tri-fp.c                 |  8 ++++----
 src/trivial/vbo-drawarrays-2101010.c |  6 +++---
 src/trivial/vbo-drawarrays.c         |  8 ++++----
 src/trivial/vbo-drawelements.c       |  8 ++++----
 src/trivial/vbo-drawrange.c          |  8 ++++----
 src/trivial/vbo-noninterleaved.c     |  8 ++++----
 src/trivial/vbo-tri.c                |  8 ++++----
 src/trivial/vp-array-hf.c            |  8 ++++----
 src/trivial/vp-array-int.c           |  8 ++++----
 src/trivial/vp-array.c               |  8 ++++----
 src/trivial/vp-clip.c                |  8 ++++----
 src/trivial/vp-line-clip.c           |  8 ++++----
 src/trivial/vp-tri-cb-pos.c          |  8 ++++----
 src/trivial/vp-tri-cb-tex.c          |  8 ++++----
 src/trivial/vp-tri-cb.c              |  8 ++++----
 src/trivial/vp-tri-imm.c             |  8 ++++----
 src/trivial/vp-tri-invariant.c       |  8 ++++----
 src/trivial/vp-tri-swap.c            |  8 ++++----
 src/trivial/vp-tri-tex.c             |  8 ++++----
 src/trivial/vp-tri.c                 |  8 ++++----
 src/trivial/vp-unfilled.c            |  8 ++++----
 src/vp/vp-tris.c                     |  8 ++++----
 37 files changed, 150 insertions(+), 150 deletions(-)

diff --git a/src/fp/fp-tri.c b/src/fp/fp-tri.c
index d063b85..4994d5d 100644
--- a/src/fp/fp-tri.c
+++ b/src/fp/fp-tri.c
@@ -71,7 +71,7 @@ static void args(int argc, char *argv[])
 static void Init( void )
 {
    GLuint Texture;
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    char buf[50000];
    GLuint sz;
@@ -101,9 +101,9 @@ static void Init( void )
    glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
                       sz, (const GLubyte *)buf);
 
-   errno = glGetError();
-   printf("glGetError = 0x%x\n", errno);
-   if (errno != GL_NO_ERROR) {
+   errnum = glGetError();
+   printf("glGetError = 0x%x\n", errnum);
+   if (errnum != GL_NO_ERROR) {
       GLint errorpos;
 
       glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
diff --git a/src/tests/arbfpspec.c b/src/tests/arbfpspec.c
index cfa6f3e..fcc5052 100644
--- a/src/tests/arbfpspec.c
+++ b/src/tests/arbfpspec.c
@@ -105,7 +105,7 @@ static void SpecialKey( int key, int x, int y )
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum, fprognum;
 	
    static const char prog[] = 
@@ -141,9 +141,9 @@ static void Init( void )
                         strlen(prog), (const GLubyte *) prog);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
@@ -155,9 +155,9 @@ static void Init( void )
    glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, fprognum);
    glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
                         strlen(fprog), (const GLubyte *) fprog);
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/tests/arbfptest1.c b/src/tests/arbfptest1.c
index d63e459..40b8aab 100644
--- a/src/tests/arbfptest1.c
+++ b/src/tests/arbfptest1.c
@@ -57,16 +57,16 @@ static void Key( unsigned char key, int x, int y )
 static void load_program(const char *prog, GLuint prognum)
 {
    int a;	
-   GLint errorpos, errno;
+   GLint errorpos, errnum;
    
    glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, prognum);
    glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
                         strlen(prog), (const GLubyte *) prog);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
       printf("errorpos: %d\n", errorpos);
diff --git a/src/tests/arbvptest1.c b/src/tests/arbvptest1.c
index 7dac316..35fd62c 100644
--- a/src/tests/arbvptest1.c
+++ b/src/tests/arbvptest1.c
@@ -53,16 +53,16 @@ static void Key( unsigned char key, int x, int y )
 static void load_program(const char *prog, GLuint prognum)
 {
    int a;	
-   GLint errorpos, errno;
+   GLint errorpos, errnum;
    
    glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
    glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
                         strlen(prog), (const GLubyte *) prog);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
       printf("errorpos: %d\n", errorpos);
diff --git a/src/tests/arbvptest3.c b/src/tests/arbvptest3.c
index b4f584d..d14f2e9 100644
--- a/src/tests/arbvptest3.c
+++ b/src/tests/arbvptest3.c
@@ -78,7 +78,7 @@ static void Key( unsigned char key, int x, int y )
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -98,9 +98,9 @@ static void Init( void )
                         strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/tests/arbvptorus.c b/src/tests/arbvptorus.c
index 0f38556..29bee37 100644
--- a/src/tests/arbvptorus.c
+++ b/src/tests/arbvptorus.c
@@ -104,7 +104,7 @@ static void SpecialKey( int key, int x, int y )
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
 	
    /* borrowed from an nvidia demo:
@@ -145,9 +145,9 @@ static void Init( void )
                         strlen(prog), (const GLubyte *) prog);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/tests/arbvpwarpmesh.c b/src/tests/arbvpwarpmesh.c
index ba9cea3..5a045cc 100644
--- a/src/tests/arbvpwarpmesh.c
+++ b/src/tests/arbvpwarpmesh.c
@@ -158,7 +158,7 @@ static void SpecialKey( int key, int x, int y )
 static void Init( void )
 {
    GLuint prognum;
-   GLint errno;
+   GLint errnum;
 	
    /*
     * c[0..3] = modelview matrix
@@ -200,10 +200,10 @@ static void Init( void )
    glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
    glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
             strlen(prog), (const GLubyte *)prog);
-   errno = glGetError();	
-   printf("glGetError = %d\n", errno);
+   errnum = glGetError();	
+   printf("glGetError = %d\n", errnum);
 
-	if (errno != GL_NO_ERROR) 
+	if (errnum != GL_NO_ERROR) 
 	{
 		GLint errorpos;
 
diff --git a/src/trivial/draw2arrays.c b/src/trivial/draw2arrays.c
index 8ac13a7..fd75270 100644
--- a/src/trivial/draw2arrays.c
+++ b/src/trivial/draw2arrays.c
@@ -22,7 +22,7 @@ GLubyte color[][4] =
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -37,9 +37,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/drawarrays.c b/src/trivial/drawarrays.c
index 305de44..82de446 100644
--- a/src/trivial/drawarrays.c
+++ b/src/trivial/drawarrays.c
@@ -33,7 +33,7 @@ struct {
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -48,9 +48,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/drawelements-large.c b/src/trivial/drawelements-large.c
index f31974c..2c91524 100644
--- a/src/trivial/drawelements-large.c
+++ b/src/trivial/drawelements-large.c
@@ -16,7 +16,7 @@ GLushort indices[NR_VERTS*2];
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    GLint i;
 
@@ -32,9 +32,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/drawelements.c b/src/trivial/drawelements.c
index 2b39d80..328a597 100644
--- a/src/trivial/drawelements.c
+++ b/src/trivial/drawelements.c
@@ -26,7 +26,7 @@ GLuint indices[] = { 1, 2, 3 };
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -41,9 +41,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/drawrange.c b/src/trivial/drawrange.c
index f224edb..cfe17d8 100644
--- a/src/trivial/drawrange.c
+++ b/src/trivial/drawrange.c
@@ -26,7 +26,7 @@ GLuint indices[] = { 1, 2, 3 };
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -41,9 +41,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/lineloop-elts.c b/src/trivial/lineloop-elts.c
index 8b5540d..2f524e0 100644
--- a/src/trivial/lineloop-elts.c
+++ b/src/trivial/lineloop-elts.c
@@ -26,7 +26,7 @@ GLuint indices[] = { 1, 2, 3 };
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -41,9 +41,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/tri-array-interleaved.c b/src/trivial/tri-array-interleaved.c
index 64b718c..25fbb5e 100644
--- a/src/trivial/tri-array-interleaved.c
+++ b/src/trivial/tri-array-interleaved.c
@@ -30,7 +30,7 @@ GLuint indices[] = { 1, 2, 3 };
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -45,9 +45,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/tri-fp-const-imm.c b/src/trivial/tri-fp-const-imm.c
index 1b15520..a9756f0 100644
--- a/src/trivial/tri-fp-const-imm.c
+++ b/src/trivial/tri-fp-const-imm.c
@@ -37,7 +37,7 @@ GLenum doubleBuffer;
 
 static void Init(void)
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    static const char *prog1 =
       "!!ARBfp1.0\n"
@@ -59,9 +59,9 @@ static void Init(void)
    glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
                       strlen(prog1), (const GLubyte *)prog1);
    
-   errno = glGetError();
-   printf("glGetError = 0x%x\n", errno);
-   if (errno != GL_NO_ERROR) {
+   errnum = glGetError();
+   printf("glGetError = 0x%x\n", errnum);
+   if (errnum != GL_NO_ERROR) {
       GLint errorpos;
 
       glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
diff --git a/src/trivial/tri-fp.c b/src/trivial/tri-fp.c
index 745c5c3..3cca779 100644
--- a/src/trivial/tri-fp.c
+++ b/src/trivial/tri-fp.c
@@ -37,7 +37,7 @@ GLenum doubleBuffer;
 
 static void Init(void)
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    static const char *prog1 =
       "!!ARBfp1.0\n"
@@ -57,9 +57,9 @@ static void Init(void)
    glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
                       strlen(prog1), (const GLubyte *)prog1);
    
-   errno = glGetError();
-   printf("glGetError = 0x%x\n", errno);
-   if (errno != GL_NO_ERROR) {
+   errnum = glGetError();
+   printf("glGetError = 0x%x\n", errnum);
+   if (errnum != GL_NO_ERROR) {
       GLint errorpos;
 
       glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
diff --git a/src/trivial/vbo-drawarrays-2101010.c b/src/trivial/vbo-drawarrays-2101010.c
index 4bac1b1..e200b56 100644
--- a/src/trivial/vbo-drawarrays-2101010.c
+++ b/src/trivial/vbo-drawarrays-2101010.c
@@ -53,7 +53,7 @@ GLuint arrayObj, elementObj;
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    int color_size = 4;
 
@@ -83,9 +83,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
+   errnum = glGetError();
 
-   if (errno != GL_NO_ERROR)
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vbo-drawarrays.c b/src/trivial/vbo-drawarrays.c
index c3d987c..815cc7a 100644
--- a/src/trivial/vbo-drawarrays.c
+++ b/src/trivial/vbo-drawarrays.c
@@ -35,7 +35,7 @@ GLuint arrayObj, elementObj;
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -50,9 +50,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vbo-drawelements.c b/src/trivial/vbo-drawelements.c
index b47c9d1..d68d491 100644
--- a/src/trivial/vbo-drawelements.c
+++ b/src/trivial/vbo-drawelements.c
@@ -36,7 +36,7 @@ GLuint arrayObj, elementObj;
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -51,9 +51,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vbo-drawrange.c b/src/trivial/vbo-drawrange.c
index 06257a1..d7ea4c6 100644
--- a/src/trivial/vbo-drawrange.c
+++ b/src/trivial/vbo-drawrange.c
@@ -38,7 +38,7 @@ GLuint arrayObj, elementObj;
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -53,9 +53,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vbo-noninterleaved.c b/src/trivial/vbo-noninterleaved.c
index 012abe9..0ef0529 100644
--- a/src/trivial/vbo-noninterleaved.c
+++ b/src/trivial/vbo-noninterleaved.c
@@ -39,7 +39,7 @@ GLuint arrayObj, elementObj;
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -54,9 +54,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vbo-tri.c b/src/trivial/vbo-tri.c
index 539e555..6fd7553 100644
--- a/src/trivial/vbo-tri.c
+++ b/src/trivial/vbo-tri.c
@@ -33,7 +33,7 @@ GLuint arrayObj;
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -50,9 +50,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-array-hf.c b/src/trivial/vp-array-hf.c
index fbac8a1..d500b98 100644
--- a/src/trivial/vp-array-hf.c
+++ b/src/trivial/vp-array-hf.c
@@ -114,7 +114,7 @@ GLuint indices[] = { 0, 1, 2, 3 };
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    GLuint i, j;
 
@@ -135,9 +135,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-array-int.c b/src/trivial/vp-array-int.c
index 13c4f26..f528e7a 100644
--- a/src/trivial/vp-array-int.c
+++ b/src/trivial/vp-array-int.c
@@ -26,7 +26,7 @@ GLuint indices[] = { 0, 1, 2, 3 };
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -41,9 +41,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-array.c b/src/trivial/vp-array.c
index 673279f..b9e3b84 100644
--- a/src/trivial/vp-array.c
+++ b/src/trivial/vp-array.c
@@ -26,7 +26,7 @@ GLuint indices[] = { 0, 1, 2, 3 };
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -41,9 +41,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-clip.c b/src/trivial/vp-clip.c
index e6af696..cf71dd3 100644
--- a/src/trivial/vp-clip.c
+++ b/src/trivial/vp-clip.c
@@ -10,7 +10,7 @@
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -26,9 +26,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-line-clip.c b/src/trivial/vp-line-clip.c
index 73e3f10..cfa0987 100644
--- a/src/trivial/vp-line-clip.c
+++ b/src/trivial/vp-line-clip.c
@@ -10,7 +10,7 @@
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -26,9 +26,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-tri-cb-pos.c b/src/trivial/vp-tri-cb-pos.c
index 1debe1a..b72c8cf 100644
--- a/src/trivial/vp-tri-cb-pos.c
+++ b/src/trivial/vp-tri-cb-pos.c
@@ -14,7 +14,7 @@ GLenum doubleBuffer;
 
 static void Init(void)
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -47,9 +47,9 @@ static void Init(void)
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-tri-cb-tex.c b/src/trivial/vp-tri-cb-tex.c
index 97ca68a..7745e70 100644
--- a/src/trivial/vp-tri-cb-tex.c
+++ b/src/trivial/vp-tri-cb-tex.c
@@ -14,7 +14,7 @@ GLenum doubleBuffer;
 
 static void Init(void)
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -47,9 +47,9 @@ static void Init(void)
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-tri-cb.c b/src/trivial/vp-tri-cb.c
index 159195f..caf09a8 100644
--- a/src/trivial/vp-tri-cb.c
+++ b/src/trivial/vp-tri-cb.c
@@ -10,7 +10,7 @@
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -31,9 +31,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-tri-imm.c b/src/trivial/vp-tri-imm.c
index cf92a90..97b1c51 100644
--- a/src/trivial/vp-tri-imm.c
+++ b/src/trivial/vp-tri-imm.c
@@ -10,7 +10,7 @@
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -27,9 +27,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-tri-invariant.c b/src/trivial/vp-tri-invariant.c
index d53917a..0924106 100644
--- a/src/trivial/vp-tri-invariant.c
+++ b/src/trivial/vp-tri-invariant.c
@@ -16,7 +16,7 @@ GLenum doubleBuffer;
 
 static void Init(void)
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -32,9 +32,9 @@ static void Init(void)
    glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
 		      strlen(prog1), (const GLubyte *) prog1);
 
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-tri-swap.c b/src/trivial/vp-tri-swap.c
index e34c20c..a59506f 100644
--- a/src/trivial/vp-tri-swap.c
+++ b/src/trivial/vp-tri-swap.c
@@ -10,7 +10,7 @@
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -27,9 +27,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-tri-tex.c b/src/trivial/vp-tri-tex.c
index 91589dc..c2c7dc8 100644
--- a/src/trivial/vp-tri-tex.c
+++ b/src/trivial/vp-tri-tex.c
@@ -10,7 +10,7 @@
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -27,9 +27,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-tri.c b/src/trivial/vp-tri.c
index efcda66..b276497 100644
--- a/src/trivial/vp-tri.c
+++ b/src/trivial/vp-tri.c
@@ -10,7 +10,7 @@
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -28,9 +28,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/trivial/vp-unfilled.c b/src/trivial/vp-unfilled.c
index c222314..79a882a 100644
--- a/src/trivial/vp-unfilled.c
+++ b/src/trivial/vp-unfilled.c
@@ -10,7 +10,7 @@
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    
    static const char *prog1 =
@@ -26,9 +26,9 @@ static void Init( void )
 		      strlen(prog1), (const GLubyte *) prog1);
 
    assert(glIsProgramARB(prognum));
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
diff --git a/src/vp/vp-tris.c b/src/vp/vp-tris.c
index 8840a8f..99e1e57 100644
--- a/src/vp/vp-tris.c
+++ b/src/vp/vp-tris.c
@@ -86,7 +86,7 @@ static void args(int argc, char *argv[])
 
 static void Init( void )
 {
-   GLint errno;
+   GLint errnum;
    GLuint prognum;
    char buf[16 * 1024];
    GLuint sz;
@@ -132,9 +132,9 @@ static void Init( void )
       assert(glIsProgramARB(prognum));
    }
 
-   errno = glGetError();
-   printf("glGetError = %d\n", errno);
-   if (errno != GL_NO_ERROR)
+   errnum = glGetError();
+   printf("glGetError = %d\n", errnum);
+   if (errnum != GL_NO_ERROR)
    {
       GLint errorpos;
 
-- 
1.9.1



More information about the mesa-dev mailing list