diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-02-13 18:18:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-02-13 18:18:41 -0800 |
commit | 18f9fb687f708b568301a4af87194fd72e4010e0 (patch) | |
tree | d6558509b0731622ee837aa05318a2ee81301fea /Makefile | |
parent | Merge branch 'nd/fileno-may-be-macro' (diff) | |
parent | utf8: handle systems that don't write BOM for UTF-16 (diff) | |
download | tgif-18f9fb687f708b568301a4af87194fd72e4010e0.tar.xz |
Merge branch 'bc/utf16-portability-fix'
The code and tests assume that the system supplied iconv() would
always use BOM in its output when asked to encode to UTF-16 (or
UTF-32), but apparently some implementations output big-endian
without BOM. A compile-time knob has been added to help such
systems (e.g. NonStop) to add BOM to the output to increase
portability.
* bc/utf16-portability-fix:
utf8: handle systems that don't write BOM for UTF-16
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -259,6 +259,10 @@ all:: # Define OLD_ICONV if your library has an old iconv(), where the second # (input buffer pointer) parameter is declared with type (const char **). # +# Define ICONV_OMITS_BOM if your iconv implementation does not write a +# byte-order mark (BOM) when writing UTF-16 or UTF-32 and always writes in +# big-endian format. +# # Define NO_DEFLATE_BOUND if your zlib does not have deflateBound. # # Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib" @@ -1417,6 +1421,9 @@ ifndef NO_ICONV EXTLIBS += $(ICONV_LINK) -liconv endif endif +ifdef ICONV_OMITS_BOM + BASIC_CFLAGS += -DICONV_OMITS_BOM +endif ifdef NEEDS_LIBGEN EXTLIBS += -lgen endif |