summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/pixops
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-07-22 23:50:19 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-07-22 23:50:19 +0000
commit67a4b0c3d109a6758b2ba6534f3e62c1ffe77829 (patch)
tree41d535e92712df3e6ac5b520d46e4d7b11bec604 /gdk-pixbuf/pixops
parenta0e5fd24904084388ef0089b3bcb2018a9e2b0f4 (diff)
downloadgdk-pixbuf-67a4b0c3d109a6758b2ba6534f3e62c1ffe77829.tar.gz
Win32 build setup:
2000-07-23 Tor Lillqvist <tml@iki.fi> Win32 build setup: * makefile.mingw.in * pixops/makefile.mingw.in * pixbuf_*.def: New files. * Makefile.am * pixops/Makefile.am: Add them. Add rule to generate makefile.mingw. * gdk-pixbuf-io.c (gtk_win32_get_installation_directory): New function, to get the GTK+ installation directory from the Windows Registry, where the installation program for whatever software includes GTK+ has stored it. Used to avoid having hardcoding the directory where to look for loaders. This function is needed by gtk, too, so it should really be just in one place. Maybe a small static library one level up from here? * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file) * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Open file in binary mode. This *is* standard C. (No-op on Unix, of course.) * io-jpeg.c: If we don't HAVE_SIGSETJMP, use normal setjmp(). * io-tiff.c: Use g_get_tmp_dir(). If we don't HAVE_MKSTEMP, use mktemp() and open(). (gdk_pixbuf__tiff_image_stop_load): g_free() also the tempname. * pixops/*.S: The Gas from mingw32 doesn't like the .type pseudo-op. Conditionalise on __MINGW32__, but probably should conditionalise on Gas version instead? Or could we do without .type on all systems? * pixops/timescale.c: Use g_get_current_time() instead of gettimeofday().
Diffstat (limited to 'gdk-pixbuf/pixops')
-rw-r--r--gdk-pixbuf/pixops/Makefile.am8
-rw-r--r--gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S12
-rw-r--r--gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S13
-rw-r--r--gdk-pixbuf/pixops/have_mmx.S12
-rw-r--r--gdk-pixbuf/pixops/scale_line_22_33_mmx.S13
-rw-r--r--gdk-pixbuf/pixops/timescale.c12
6 files changed, 59 insertions, 11 deletions
diff --git a/gdk-pixbuf/pixops/Makefile.am b/gdk-pixbuf/pixops/Makefile.am
index 5fe5fd546..f799f42ff 100644
--- a/gdk-pixbuf/pixops/Makefile.am
+++ b/gdk-pixbuf/pixops/Makefile.am
@@ -22,4 +22,10 @@ libpixops_la_SOURCES = \
$(mmx_sources)
EXTRA_DIST = \
- DETAILS \ No newline at end of file
+ DETAILS \
+ makefile.mingw \
+ makefile.mingw.in
+
+makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gdk-pixbuf/pixops/makefile.mingw.in
+ cd $(top_builddir) && CONFIG_FILES=gdk-pixbuf/pixops/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
diff --git a/gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S b/gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S
index f3edc8ab0..3b3c2c472 100644
--- a/gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S
+++ b/gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S
@@ -3,8 +3,19 @@
gcc2_compiled.:
.text
.align 16
+
+#ifndef __MINGW32__
+
.globl pixops_composite_line_22_4a4_mmx
.type pixops_composite_line_22_4a4_mmx,@function
+pixops_composite_line_22_4a4_mmx:
+
+#else
+
+.globl _pixops_composite_line_22_4a4_mmx
+_pixops_composite_line_22_4a4_mmx:
+
+#endif
/*
* Arguments
*
@@ -17,7 +28,6 @@ gcc2_compiled.:
* xinit: 32(%ebp)
*
*/
-pixops_composite_line_22_4a4_mmx:
/*
* Function call entry
*/
diff --git a/gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S b/gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S
index e3fd640d6..28d2c8b85 100644
--- a/gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S
+++ b/gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S
@@ -3,8 +3,19 @@
gcc2_compiled.:
.text
.align 16
+
+#ifndef __MINGW32__
+
.globl pixops_composite_line_color_22_4a4_mmx
.type pixops_composite_line_color_22_4a4_mmx,@function
+pixops_composite_line_color_22_4a4_mmx:
+
+#else
+
+.globl _pixops_composite_line_color_22_4a4_mmx
+_pixops_composite_line_color_22_4a4_mmx:
+
+#endif
/*
* Arguments
*
@@ -20,7 +31,7 @@ gcc2_compiled.:
* colors: 44(%ebp)
*
*/
-pixops_composite_line_color_22_4a4_mmx:
+
/*
* Function call entry
*/
diff --git a/gdk-pixbuf/pixops/have_mmx.S b/gdk-pixbuf/pixops/have_mmx.S
index da222500f..f777fb89c 100644
--- a/gdk-pixbuf/pixops/have_mmx.S
+++ b/gdk-pixbuf/pixops/have_mmx.S
@@ -3,10 +3,20 @@
gcc2_compiled.:
.text
.align 16
+
+#ifndef __MINGW32__
+
.globl pixops_have_mmx
.type pixops_have_mmx,@function
-
pixops_have_mmx:
+
+#else
+
+.globl _pixops_have_mmx
+_pixops_have_mmx:
+
+#endif
+
push %ebx
# Check if bit 21 in flags word is writeable
diff --git a/gdk-pixbuf/pixops/scale_line_22_33_mmx.S b/gdk-pixbuf/pixops/scale_line_22_33_mmx.S
index e253fc188..40dec48d3 100644
--- a/gdk-pixbuf/pixops/scale_line_22_33_mmx.S
+++ b/gdk-pixbuf/pixops/scale_line_22_33_mmx.S
@@ -3,8 +3,19 @@
gcc2_compiled.:
.text
.align 16
+
+#ifndef __MINGW32__
+
.globl pixops_scale_line_22_33_mmx
.type pixops_scale_line_22_33_mmx,@function
+pixops_scale_line_22_33_mmx:
+
+#else
+
+.globl _pixops_scale_line_22_33_mmx
+_pixops_scale_line_22_33_mmx:
+
+#endif
/*
* Arguments
*
@@ -17,7 +28,7 @@ gcc2_compiled.:
* xinit: 32(%ebp)
*
*/
-pixops_scale_line_22_33_mmx:
+
/*
* Function call entry
*/
diff --git a/gdk-pixbuf/pixops/timescale.c b/gdk-pixbuf/pixops/timescale.c
index b835ff542..f3c904566 100644
--- a/gdk-pixbuf/pixops/timescale.c
+++ b/gdk-pixbuf/pixops/timescale.c
@@ -1,24 +1,24 @@
-#include <unistd.h>
+#include <glib.h>
#include <string.h>
-#include <sys/time.h>
#include <stdlib.h>
#include <stdio.h>
+
#include "pixops.h"
-struct timeval start_time;
+static GTimeVal start_time;
void start_timing (void)
{
- gettimeofday (&start_time, NULL);
+ g_get_current_time (&start_time);
}
double
stop_timing (const char *test, int iterations, int bytes)
{
- struct timeval stop_time;
+ GTimeVal stop_time;
double msecs;
- gettimeofday (&stop_time, NULL);
+ g_get_current_time (&stop_time);
if (stop_time.tv_usec < start_time.tv_usec)
{
stop_time.tv_usec += 1000000;