]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix last change in inclusion of byteswap.h header
authorEli Zaretskii <eliz@gnu.org>
Sat, 30 Mar 2024 07:52:00 +0000 (10:52 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 30 Mar 2024 19:36:51 +0000 (20:36 +0100)
* src/w32uniscribe.c (w32hb_get_font_table): Avoid warning due to
redefinition of 'bswap_32'.

(cherry picked from commit 06882a2d768241a814d7f9da24e1e5436207c0d8)

src/w32uniscribe.c

index 84d0d95b2ab0d85496c77880b6728ad3a8937f11..b3112912c767c31c16beda66a4f66afa19c00973 100644 (file)
@@ -33,11 +33,6 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 #ifdef HAVE_HARFBUZZ
 # include <hb.h>
 # include <hb-ot.h>    /* for hb_ot_font_set_funcs */
-# if GNUC_PREREQ (4, 3, 0)
-#  define bswap_32(v)  __builtin_bswap32(v)
-# else
-#  include <byteswap.h>
-# endif
 #endif
 
 #include "lisp.h"
@@ -1270,7 +1265,11 @@ w32hb_get_font_table (hb_face_t *face, hb_tag_t tag, void *data)
   HFONT old_font = SelectObject (context, (HFONT) data);
   char *font_data = NULL;
   DWORD font_data_size = 0, val;
+#if GNUC_PREREQ (4, 3, 0)
+  DWORD table = __builtin_bswap32 (tag);
+#else
   DWORD table = bswap_32 (tag);
+#endif
   hb_blob_t *blob = NULL;
 
   val = GetFontData (context, table, 0, font_data, font_data_size);