From 6e83b727061857fb640345fb59b1403e27a8dc23 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 17 Mar 2023 21:21:01 +0800 Subject: [PATCH] Fix WINDOWSNT build of fileio.c and image.c * src/fileio.c (emacs_fd_to_int): Don't define on WINDOWSNT. * src/image.c (image_create_bitmap_from_data): Don't abort if !defined HAVE_ANDROID. --- src/fileio.c | 5 +++++ src/image.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 5153aeae248..1e54f583876 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -128,7 +128,12 @@ typedef int emacs_fd; #define emacs_fd_lseek lseek #define emacs_fd_fstat sys_fstat #define emacs_fd_valid_p(fd) ((fd) >= 0) + +/* This is not used on MS Windows. */ + +#ifndef WINDOWSNT #define emacs_fd_to_int(fds) (fds) +#endif /* WINDOWSNT */ #else /* HAVE_ANDROID && !defined ANDROID_STUBIFY */ diff --git a/src/image.c b/src/image.c index dc45a2d2419..dc66b1056db 100644 --- a/src/image.c +++ b/src/image.c @@ -517,10 +517,10 @@ image_create_bitmap_from_data (struct frame *f, char *bits, if (!bitmap) return -1; -#else +#elif defined HAVE_ANDROID ((void) dpyinfo); emacs_abort (); -#endif +#endif /* HAVE_ANDROID && !defined ANDROID_STUBIFY */ #ifdef HAVE_NTGUI Lisp_Object frame UNINIT; /* The value is not used. */ -- 2.39.2