[BACK]Return to patch-Extras_glui_glui_list_cpp CVS log [TXT][DIR] Up to [local] / ports / devel / bullet / patches

File: [local] / ports / devel / bullet / patches / Attic / patch-Extras_glui_glui_list_cpp (download)

Revision 1.1, Fri Mar 4 19:11:49 2011 UTC (13 years, 3 months ago) by yason
Branch: MAIN

missed patches

$OpenBSD$
$NetBSD: patch-aa,v 1.1.1.1 2010/09/03 23:01:47 wiz Exp $
Avoid using obsolete functions.

--- Extras/glui/glui_list.cpp.orig	Sat Nov 13 07:51:07 2010
+++ Extras/glui/glui_list.cpp	Sat Nov 13 07:53:51 2010
@@ -20,7 +20,7 @@
 
 #include "glui_internal_control.h"
 #include <cmath>
-#include <sys/timeb.h>
+#include <sys/time.h>
 
 /****************************** GLUI_List::GLUI_List() **********/
 
@@ -90,9 +90,9 @@ int    GLUI_List::mouse_down_handler( int local_x, int
 {
   int tmp_line;
   unsigned long int ms;
-  timeb time;
-  ftime(&time);
-  ms = time.millitm + (time.time)*1000;
+  struct timeval now;
+  gettimeofday(&now, NULL);
+  ms = now.tv_usec/1000 + now.tv_sec*1000;
 
   tmp_line = find_line( local_x-x_abs, local_y-y_abs-5 );  
   if ( tmp_line == -1 ) {