summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-14 02:18:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-14 02:18:41 (GMT)
commit18f9fb687f708b568301a4af87194fd72e4010e0 (patch)
treed6558509b0731622ee837aa05318a2ee81301fea /Makefile
parent1db999ce8d369dbf20532f1b2ea8cbbcf6f2cc7b (diff)
parent79444c92943048f9ac62e9311038ebe43f5f0982 (diff)
downloadgit-18f9fb687f708b568301a4af87194fd72e4010e0.zip
git-18f9fb687f708b568301a4af87194fd72e4010e0.tar.gz
git-18f9fb687f708b568301a4af87194fd72e4010e0.tar.bz2
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--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index af7e809..f0b2299 100644
--- a/Makefile
+++ b/Makefile
@@ -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