[evince] [dvi] Let kpathsea use ANSI C str(r)chr() instead of (r)index()



commit 1ff4db77238ee4f3b89c5cd7b94e3178e11fb543
Author: Hib Eris <hib hiberis nl>
Date:   Tue Jan 5 12:58:22 2010 +0100

    [dvi] Let kpathsea use ANSI C str(r)chr() instead of (r)index()

 backend/dvi/mdvi-lib/private.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/backend/dvi/mdvi-lib/private.h b/backend/dvi/mdvi-lib/private.h
index c547cd2..5995f49 100644
--- a/backend/dvi/mdvi-lib/private.h
+++ b/backend/dvi/mdvi-lib/private.h
@@ -19,6 +19,19 @@
 #define _MDVI_PRIVATE_H 1
 
 #define HAVE_PROTOTYPES 1
+
+#if STDC_HEADERS
+#  /* kpathsea's headers (wrongly!) redefine strchr() and strrchr() to
+#     non ANSI C functions if HAVE_STRCHR and HAVE_STRRCHR are not defined.
+#   */
+#  ifndef HAVE_STRCHR
+#     define HAVE_STRCHR
+#   endif
+#  ifndef HAVE_STRRCHR
+#    define HAVE_STRRCHR
+#  endif
+#endif
+
 #include <kpathsea/debug.h>
 #include <kpathsea/tex-file.h>
 #include <kpathsea/tex-glyph.h>



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