summaryrefslogtreecommitdiff
path: root/Build/source/texk/chktex/chktex-1.7.1-PATCHES/patch-08-stpcpy
blob: bb4904e941125760a603d44854f03659dfbc385e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff -ur chktex-1.7.1.orig/FindErrs.c chktex-1.7.1/FindErrs.c
--- chktex-1.7.1.orig/FindErrs.c	2012-08-08 22:27:57.000000000 +0200
+++ chktex-1.7.1/FindErrs.c	2012-10-10 11:24:26.000000000 +0200
@@ -33,6 +33,14 @@
 #include "Utility.h"
 #include "Resource.h"
 
+#if !(defined HAVE_DECL_STPCPY && HAVE_DECL_STPCPY)
+static inline char *
+stpcpy(char *dest, const char *src)
+{
+    return strcpy(dest, src) + strlen(src);
+}
+#endif
+
 #if HAVE_PCRE || HAVE_POSIX_ERE
 
 #if HAVE_PCRE
diff -ur chktex-1.7.1.orig/configure.in chktex-1.7.1/configure.in
--- chktex-1.7.1.orig/configure.in	2012-08-22 16:27:32.000000000 +0200
+++ chktex-1.7.1/configure.in	2012-10-10 11:24:37.000000000 +0200
@@ -164,6 +164,8 @@
 AC_CHECK_FUNCS(access closedir fileno isatty opendir readdir stat dnl
 strcasecmp strdup strlwr strtol)
 
+dnl Checks for declarations.
+AC_CHECK_DECLS([stpcpy])
 
 dnl Check for PCRE regular expression support
 AC_MSG_CHECKING(whether PCRE regular expressions are enabled)