diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2024-04-01 18:50:20 +0800 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2024-04-01 18:50:20 +0800 |
commit | 0fef2018445b257bf26814e6659bc2ff5b270d77 (patch) | |
tree | 2310ce1fd8781a6203ec56e2f985f6adfcc2278d /src/w32uniscribe.c | |
parent | 3a8546615a38337dc991f6546ade63a372edc2ca (diff) | |
parent | 49f76dcc17055e60569b6096e8ea3c9961ebbf63 (diff) | |
download | emacs-0fef2018445b257bf26814e6659bc2ff5b270d77.tar.gz |
Merge branch 'athena/unstable' into athena/bookworm-backports
Diffstat (limited to 'src/w32uniscribe.c')
-rw-r--r-- | src/w32uniscribe.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index a73c0de06f9..b3112912c76 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -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" @@ -330,8 +325,7 @@ uniscribe_shape (Lisp_Object lgstring, Lisp_Object direction) { /* If that wasn't enough, keep trying with one more run. */ max_items++; - items = (SCRIPT_ITEM *) xrealloc (items, - sizeof (SCRIPT_ITEM) * max_items + 1); + items = xrealloc (items, sizeof (SCRIPT_ITEM) * max_items + 1); } if (FAILED (result)) @@ -1271,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); |