summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2014-02-24 00:54:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-24 17:52:44 (GMT)
commit7d0a9a752b66be76c4027ead98caa1be7bac5349 (patch)
tree5a6331a779afefa0b2165f4be6fd2c5a67bd83c3 /diffcore.h
parentcbfe47b67fc1072998c73e6d43cf6ad061a436f5 (diff)
downloadgit-7d0a9a752b66be76c4027ead98caa1be7bac5349.zip
git-7d0a9a752b66be76c4027ead98caa1be7bac5349.tar.gz
git-7d0a9a752b66be76c4027ead98caa1be7bac5349.tar.bz2
diffcore.h: be explicit about the signedness of is_binary
Bitfields need to specify their signedness explicitly or the compiler is free to default as it sees fit. With compilers that default 'unsigned' (SUNWspro 12 seems to do this) the tri-state nature of is_binary vanishes and all files are treated as binary. Signed-off-by: Richard Lowe <richlowe@richlowe.net> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore.h')
-rw-r--r--diffcore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore.h b/diffcore.h
index 79de8cf..7c6f391 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -46,7 +46,7 @@ struct diff_filespec {
unsigned is_stdin : 1;
unsigned has_more_entries : 1; /* only appear in combined diff */
/* data should be considered "binary"; -1 means "don't know yet" */
- int is_binary : 2;
+ signed int is_binary : 2;
struct userdiff_driver *driver;
};