diff options
| -rw-r--r-- | src/glu/mesa/glu.c | 13 | ||||
| -rw-r--r-- | src/glu/mesa/tess.c | 17 | ||||
| -rw-r--r-- | src/glut/glx/glut_cursor.c | 2 | ||||
| -rw-r--r-- | src/glut/glx/win32_menu.c | 23 | ||||
| -rw-r--r-- | src/glut/glx/win32_util.c | 1 | ||||
| -rw-r--r-- | src/mesa/drivers/glide/fxglidew.c | 6 | 
6 files changed, 38 insertions, 24 deletions
| diff --git a/src/glu/mesa/glu.c b/src/glu/mesa/glu.c index 7d2f74cfb2..d649ca86e1 100644 --- a/src/glu/mesa/glu.c +++ b/src/glu/mesa/glu.c @@ -1,4 +1,4 @@ -/* $Id: glu.c,v 1.11 1999/09/17 01:00:38 brianp Exp $ */ +/* $Id: glu.c,v 1.12 1999/09/17 03:07:28 tjump Exp $ */  /*   * Mesa 3-D graphics library @@ -23,6 +23,9 @@  /*   * $Log: glu.c,v $ + * Revision 1.12  1999/09/17 03:07:28  tjump + * Win32 build req't updates + *   * Revision 1.11  1999/09/17 01:00:38  brianp   * fixed typo   * @@ -371,9 +374,13 @@ const GLubyte* GLAPIENTRY gluGetString( GLenum name )  #ifdef __cplusplus  /* for BeOS R4.5 */ -void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))(...) +gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)  #else +<<<<<<< glu.c +gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName) +=======  void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))() +>>>>>>> 1.11  #endif  {     struct proc { @@ -401,7 +408,7 @@ void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))()     for (i = 0; procTable[i].address; i++) {        if (strcmp((const char *) procName, procTable[i].name) == 0) -	 return (void (*)()) procTable[i].address; +	 return (gluProcAddress) procTable[i].address;     }     return NULL; diff --git a/src/glu/mesa/tess.c b/src/glu/mesa/tess.c index 50d9ff2348..de5a4f3cc6 100644 --- a/src/glu/mesa/tess.c +++ b/src/glu/mesa/tess.c @@ -1,4 +1,4 @@ -/* $Id: tess.c,v 1.7 1999/09/16 06:41:42 gareth Exp $ */ +/* $Id: tess.c,v 1.8 1999/09/17 03:07:28 tjump Exp $ */  /*   * Mesa 3-D graphics library @@ -26,6 +26,9 @@  /*   * $Log: tess.c,v $ + * Revision 1.8  1999/09/17 03:07:28  tjump + * Win32 build req't updates + *   * Revision 1.7  1999/09/16 06:41:42  gareth   * Misc winding rule bug fixes.   * @@ -578,20 +581,24 @@ void GLAPIENTRY gluEndPolygon( GLUtesselator *tobj )   *   * Internal error handler.  Call the user-registered error callback.   *****************************************************************************/ -void tess_error_callback( GLUtesselator *tobj, GLenum errno, void *data ) + +/* 2nd arg changed from 'errno' to 'errnum' since MSVC defines errnum as */ +/* a macro (of all things) and thus breaks the build -tjump              */ + +void tess_error_callback( GLUtesselator *tobj, GLenum errnum, void *data )  {      if ( tobj->error == GLU_NO_ERROR )      { -	tobj->error = errno; +	tobj->error = errnum;      }      if ( tobj->callbacks.errorData != NULL )      { -	( tobj->callbacks.errorData )( errno, data ); +	( tobj->callbacks.errorData )( errnum, data );      }      else if ( tobj->callbacks.error != NULL )      { -	( tobj->callbacks.error )( errno ); +	( tobj->callbacks.error )( errnum );      }  } diff --git a/src/glut/glx/glut_cursor.c b/src/glut/glx/glut_cursor.c index 74ecb9cd66..28e95568d6 100644 --- a/src/glut/glx/glut_cursor.c +++ b/src/glut/glx/glut_cursor.c @@ -164,7 +164,7 @@ __glutSetCursor(GLUTwindow *window)        break;      case GLUT_CURSOR_FULL_CROSSHAIR:  #if defined(_WIN32) -      xcursor = IDC_CROSS; +      xcursor = (HICON) IDC_CROSS;  #else        if (fullCrosshairCusor == None) {          fullCrosshairCusor = getFullCrosshairCursor(); diff --git a/src/glut/glx/win32_menu.c b/src/glut/glx/win32_menu.c index 9b330644af..20485eea65 100644 --- a/src/glut/glx/win32_menu.c +++ b/src/glut/glx/win32_menu.c @@ -96,9 +96,8 @@ __glutFinishMenu(Window win, int x, int y)  static void  mapMenu(GLUTmenu * menu, int x, int y)  { -  TrackPopupMenu(menu->win, TPM_LEFTALIGN | -    __glutMenuButton == TPM_RIGHTBUTTON ?  -    TPM_RIGHTBUTTON : TPM_LEFTBUTTON, +  TrackPopupMenu((HMENU) menu->win, TPM_LEFTALIGN | +    (__glutMenuButton == TPM_RIGHTBUTTON) ? TPM_RIGHTBUTTON : TPM_LEFTBUTTON,      x, y, 0, __glutCurrentWindow->win, NULL);  } @@ -254,7 +253,7 @@ glutCreateMenu(GLUTselectCB selectFunc)    menu->cascade = NULL;    menu->highlighted = NULL;    menu->anchor = NULL; -  menu->win = CreatePopupMenu(); +  menu->win = (HWND) CreatePopupMenu();    menuList[menuid] = menu;    __glutSetMenu(menu);    return menuid + 1; @@ -277,7 +276,7 @@ glutDestroyMenu(int menunum)      menuModificationError();    }    assert(menu->id == menunum - 1); -  DestroyMenu(menu->win); +  DestroyMenu( (HMENU) menu->win);    menuList[menunum - 1] = NULL;    /* free all menu entries */    item = menu->list; @@ -337,9 +336,9 @@ setMenuItem(GLUTmenuItem * item, const char *label,    item->value = value;    item->unique = uniqueMenuHandler++;    if (isTrigger) { -    AppendMenu(menu->win, MF_POPUP, (UINT)item->win, label); +    AppendMenu((HMENU) menu->win, MF_POPUP, (UINT)item->win, label);    } else { -    AppendMenu(menu->win, MF_STRING, item->unique, label); +    AppendMenu((HMENU) menu->win, MF_STRING, item->unique, label);    }  } @@ -405,7 +404,7 @@ glutChangeToMenuEntry(int num, const char *label, int value)             need to account for submenus.  */          item->menu->submenus--;  	/* Nuke the Win32 menu. */ -	DestroyMenu(item->win);		 +	DestroyMenu((HMENU) item->win);        }        free(item->label); @@ -416,7 +415,7 @@ glutChangeToMenuEntry(int num, const char *label, int value)        item->len = (int) strlen(label);        item->value = value;        item->unique = uniqueMenuHandler++; -      ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1, +      ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,          MF_BYPOSITION | MFT_STRING, item->unique, label);        return; @@ -445,7 +444,7 @@ glutChangeToSubMenu(int num, const char *label, int menu)          /* If changing a menu entry to as submenu trigger, we             need to account for submenus.  */          item->menu->submenus++; -	item->win = CreatePopupMenu(); +	item->win = (HWND) CreatePopupMenu();        }        free(item->label); @@ -459,7 +458,7 @@ glutChangeToSubMenu(int num, const char *label, int menu)        popupmenu = __glutGetMenuByNum(menu);        if (popupmenu)  	item->win = popupmenu->win; -      ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1, +      ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,          MF_BYPOSITION | MF_POPUP, (UINT) item->win, label);        return;      } @@ -489,7 +488,7 @@ glutRemoveMenuItem(int num)        /* Patch up menu's item list. */        *prev = item->next; -      RemoveMenu(__glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION); +      RemoveMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);        free(item->label);        free(item); diff --git a/src/glut/glx/win32_util.c b/src/glut/glx/win32_util.c index d00a24210b..8dc714c035 100644 --- a/src/glut/glx/win32_util.c +++ b/src/glut/glx/win32_util.c @@ -70,6 +70,7 @@ __glutFont(void *font)    }    __glutFatalError("out of memory.");    /* NOTREACHED */ +  return NULL; /* MSVC compiler complains if there is no return at all */  }  int diff --git a/src/mesa/drivers/glide/fxglidew.c b/src/mesa/drivers/glide/fxglidew.c index 3ced928f49..4892d73612 100644 --- a/src/mesa/drivers/glide/fxglidew.c +++ b/src/mesa/drivers/glide/fxglidew.c @@ -1,4 +1,4 @@ -/* $Id: fxglidew.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */ +/* $Id: fxglidew.c,v 1.2 1999/09/17 03:07:28 tjump Exp $ */  /*   * Mesa 3-D graphics library @@ -53,8 +53,8 @@ FxI32 FX_grGetInteger(FxU32 pname)      default:         if (MESA_VERBOSE&VERBOSE_DRIVER) {            fprintf(stderr,"Wrong parameter in FX_grGetInteger!\n"); -          return -1;         } +       return -1;    }  #else    FxU32 grname; @@ -71,8 +71,8 @@ FxI32 FX_grGetInteger(FxU32 pname)       default:         if (MESA_VERBOSE&VERBOSE_DRIVER) {            fprintf(stderr,"Wrong parameter in FX_grGetInteger!\n"); -          return -1;         } +       return -1;    }    grGet(grname,4,&result); | 
