[cairo-commit] 2 commits - src/cairo-compiler-private.h src/cairo-ps-surface.c src/win32

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Aug 7 07:23:58 UTC 2021


 src/cairo-compiler-private.h            |    4 +++-
 src/cairo-ps-surface.c                  |    6 +++++-
 src/win32/cairo-win32-display-surface.c |    8 +++++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit bb10f069853f1802a5b486182e900ad61bdb2973
Merge: 109113425 76331f654
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Aug 7 07:23:55 2021 +0000

    Merge branch 'mingw-warnings' into 'master'
    
    Fix some mingw warnings and correct the value of R_OK
    
    See merge request cairo/cairo!231

commit 76331f654eef10d3feed2fc335d037416f5b609f
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Aug 7 15:44:21 2021 +0930

    Fix some mingw warnings and correct the value of R_OK

diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h
index e95658105..ffad1cf15 100644
--- a/src/cairo-compiler-private.h
+++ b/src/cairo-compiler-private.h
@@ -195,7 +195,9 @@
 
 #if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER)
 #define access _access
-#define R_OK 0
+#ifndef R_OK
+#define R_OK 4
+#endif
 #define fdopen _fdopen
 #define hypot _hypot
 #define pclose _pclose
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 0e7b77059..c61c2246d 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -102,7 +102,11 @@
 #endif
 
 #ifndef HAVE_CTIME_R
-#define ctime_r(T, BUF) ctime (T)
+static char *ctime_r(const time_t *timep, char *buf)
+{
+    (void)buf;
+    return ctime(timep);
+}
 #endif
 
 /**
diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c
index 304d34aea..93d33b38b 100644
--- a/src/win32/cairo-win32-display-surface.c
+++ b/src/win32/cairo-win32-display-surface.c
@@ -129,6 +129,8 @@ _create_dc_and_bitmap (cairo_win32_display_surface_t *surface,
     case CAIRO_FORMAT_INVALID:
     case CAIRO_FORMAT_RGB16_565:
     case CAIRO_FORMAT_RGB30:
+    case CAIRO_FORMAT_RGB96F:
+    case CAIRO_FORMAT_RGBA128F:
 	return _cairo_error (CAIRO_STATUS_INVALID_FORMAT);
     case CAIRO_FORMAT_ARGB32:
     case CAIRO_FORMAT_RGB24:
@@ -164,7 +166,9 @@ _create_dc_and_bitmap (cairo_win32_display_surface_t *surface,
     case CAIRO_FORMAT_INVALID:
     case CAIRO_FORMAT_RGB16_565:
     case CAIRO_FORMAT_RGB30:
-	ASSERT_NOT_REACHED;
+    case CAIRO_FORMAT_RGB96F:
+    case CAIRO_FORMAT_RGBA128F:
+    ASSERT_NOT_REACHED;
     /* We can't create real RGB24 bitmaps because something seems to
      * break if we do, especially if we don't set up an image
      * fallback.  It could be a bug with using a 24bpp pixman image
@@ -242,6 +246,8 @@ _create_dc_and_bitmap (cairo_win32_display_surface_t *surface,
 	case CAIRO_FORMAT_INVALID:
 	case CAIRO_FORMAT_RGB16_565:
 	case CAIRO_FORMAT_RGB30:
+	case CAIRO_FORMAT_RGB96F:
+	case CAIRO_FORMAT_RGBA128F:
 	    ASSERT_NOT_REACHED;
 	case CAIRO_FORMAT_ARGB32:
 	case CAIRO_FORMAT_RGB24:


More information about the cairo-commit mailing list