summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/mendexk/ChangeLog4
-rw-r--r--Build/source/texk/mendexk/fwrite.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/Build/source/texk/mendexk/ChangeLog b/Build/source/texk/mendexk/ChangeLog
index 0fed09d047f..a3d33df8dbb 100644
--- a/Build/source/texk/mendexk/ChangeLog
+++ b/Build/source/texk/mendexk/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * fwrite.c: OS X build fix.
+
2014-04-30 Norbert Preining <preining@logic.at>
* fwrite.c: Replace sprintf with snprintf.
diff --git a/Build/source/texk/mendexk/fwrite.c b/Build/source/texk/mendexk/fwrite.c
index 7d4851aa816..0255502664a 100644
--- a/Build/source/texk/mendexk/fwrite.c
+++ b/Build/source/texk/mendexk/fwrite.c
@@ -15,6 +15,11 @@ static int range_check(struct index ind, int count, char *lbuff);
static void linecheck(char *lbuff, char *tmpbuff);
static void crcheck(char *lbuff, FILE *fp);
+/* OS X defines snprintf() as macro that chokes on using TAIL_LEN */
+#ifdef __APPLE__
+#undef snprintf
+#endif
+
#define BUFFERLEN 4096
#define TAIL_LEN(x) ((x)+strlen(x)), (BUFFERLEN-strlen(x))