[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-52.7.3esr-8.0-1] Bug 25980 - Define __libcpp_feof when we redefine feof



commit d51742d0dd8364c20bb33a15cec5c2ae6d81f9b5
Author: Matthew Finkel <Matthew.Finkel@xxxxxxxxx>
Date:   Mon Apr 30 19:02:54 2018 +0000

    Bug 25980 - Define __libcpp_feof when we redefine feof
    
    On Android, NDK r11b declares __libcpp_feof(FILE*) as a wrapper around
    feof(FILE*). This is semanticly incorrect when feof is redefined
    and the function signature changes, therefore causing a
    type-incompatibility. In this case, within the hyphenation code
    feof(FILE*) is redefined as feof(hnjFile*), but |struct hnjFile| does
    not have a converting constructor for FILE. The easy solution is simply
    redefining __libcpp_feof, as well.
    
    Bugfix on 0e1e49d4971bb891152c93b8b62665f24bd8a0c2
---
 intl/hyphenation/glue/hnjalloc.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/intl/hyphenation/glue/hnjalloc.h b/intl/hyphenation/glue/hnjalloc.h
index 5cee1be1b6d7..78e9d8cbee13 100644
--- a/intl/hyphenation/glue/hnjalloc.h
+++ b/intl/hyphenation/glue/hnjalloc.h
@@ -31,6 +31,11 @@
 #define fopen(path,mode)      hnjFopen(path,mode)
 #define fclose(file)          hnjFclose(file)
 #define fgets(buf,count,file) hnjFgets(buf,count,file)
+#ifdef __ANDROID__
+#ifdef feof
+#define __libcpp_feof(file)            hnjFeof(file)
+#endif // feof
+#endif // __ANDROID__
 #define feof(file)            hnjFeof(file)
 #define fgetc(file)           hnjFgetc(file)
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits