Darwin compile fixes from bugzilla



Found here:

http://bugzilla.gnome.org/show_bug.cgi?id=122856

Cheers
Kjartan

Index: configure.in
===================================================================
RCS file: /cvs/gnome/eel/configure.in,v
retrieving revision 1.138
diff -u -r1.138 configure.in
--- configure.in	6 Oct 2003 16:44:43 -0000	1.138
+++ configure.in	11 Oct 2003 15:23:31 -0000
@@ -164,6 +164,11 @@
 
 AC_CHECK_FUNCS(setenv unsetenv putenv)
 
+dnl Need to check these on for Darwin
+AC_CHECK_HEADERS(crt_externs.h)
+AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1,
+	[Define if your system needs _NSGetEnviron to set up the environment])])
+
 dnl ===========================================================================
 
 
Index: eel/egg-screen-exec.c
===================================================================
RCS file: /cvs/gnome/eel/eel/egg-screen-exec.c,v
retrieving revision 1.4
diff -u -r1.4 egg-screen-exec.c
--- eel/egg-screen-exec.c	2 Oct 2002 05:17:57 -0000	1.4
+++ eel/egg-screen-exec.c	11 Oct 2003 15:24:19 -0000
@@ -31,6 +31,11 @@
 #include <gdk/gdkx.h>
 #endif
 
+#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif
+
 extern char **environ;
 
 /**
Index: test/test-eel-pixbuf-scale.c
===================================================================
RCS file: /cvs/gnome/eel/test/test-eel-pixbuf-scale.c,v
retrieving revision 1.2
diff -u -r1.2 test-eel-pixbuf-scale.c
--- test/test-eel-pixbuf-scale.c	30 Mar 2002 15:35:18 -0000	1.2
+++ test/test-eel-pixbuf-scale.c	11 Oct 2003 15:24:34 -0000
@@ -44,7 +44,7 @@
 	}
 	gettimeofday(&t2, NULL);
 	g_print ("Time for eel_gdk_pixbuf_scale_down: %ld msecs\n",
-		 (t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
+		 (long int)((t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000));
 	
 		
 	
@@ -55,7 +55,7 @@
 	}
 	gettimeofday(&t2, NULL);
 	g_print ("Time for INTERP_NEAREST: %ld msecs\n",
-		 (t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
+		 (long int)((t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000));
 
 	
 	gettimeofday(&t1, NULL);
@@ -65,7 +65,7 @@
 	}
 	gettimeofday(&t2, NULL);
 	g_print ("Time for INTERP_BILINEAR: %ld msecs\n",
-		 (t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
+		 (long int)((t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000));
 	
 	scaled = eel_gdk_pixbuf_scale_down (pixbuf, DEST_WIDTH, DEST_HEIGHT);
 	gdk_pixbuf_save (scaled, "eel_scaled.png", "png", NULL, NULL); 
Index: test/test-eel-pixbuf-tile.c
===================================================================
RCS file: /cvs/gnome/eel/test/test-eel-pixbuf-tile.c,v
retrieving revision 1.10
diff -u -r1.10 test-eel-pixbuf-tile.c
--- test/test-eel-pixbuf-tile.c	10 Jul 2002 08:20:12 -0000	1.10
+++ test/test-eel-pixbuf-tile.c	11 Oct 2003 15:24:34 -0000
@@ -2,7 +2,9 @@
 
 #include <eel/eel-debug-drawing.h>
 
+/*
 static const char pixbuf_name[] = DATADIR "/pixmaps/gnome-globe.png";
+*/
 static const char tile_name[] = DATADIR "/nautilus/patterns/camouflage.png";
 
 static GdkPixbuf *global_buffer = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]