summaryrefslogtreecommitdiffstats
path: root/build-aux/osx/build/modulesets/patches/gettext-runtime/gettext-bug33999-stpncpy.patch
blob: eda2932b431c5b72d6168f12eb3f4ec398cab765 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- a/gettext-tools/libgettextpo/string.in.h	Sun Apr 25 02:22:40 2010
+++ b/gettext-tools/libgettextpo/string.in.h	Tue Oct  4 14:36:31 2011
@@ -229,6 +229,7 @@
 #if @GNULIB_STPNCPY@
 # if @REPLACE_STPNCPY@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef stpncpy
 #   define stpncpy rpl_stpncpy
 #  endif
 _GL_FUNCDECL_RPL (stpncpy, char *,
 
 	Rename module 'memxfrm' to 'amemxfrm'.
--- a/gettext-tools/gnulib-lib/string.in.h	Mon May 24 02:42:47 2010
+++ b/gettext-tools/gnulib-lib/string.in.h	Tue Oct  4 14:35:46 2011
@@ -229,6 +229,7 @@
 #if @GNULIB_STPNCPY@
 # if @REPLACE_STPNCPY@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef stpncpy
 #   define stpncpy rpl_stpncpy
 #  endif
 _GL_FUNCDECL_RPL (stpncpy, char *,

--- a/gettext-runtime/gnulib-lib/string.in.h	Sun Apr 25 02:20:42 2010
+++ b/gettext-runtime/gnulib-lib/string.in.h	Tue Oct  4 14:34:57 2011
@@ -229,6 +229,7 @@
 #if @GNULIB_STPNCPY@
 # if @REPLACE_STPNCPY@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef stpncpy
 #   define stpncpy rpl_stpncpy
 #  endif
 _GL_FUNCDECL_RPL (stpncpy, char *,
--- a/gettext-tools/configure	Sun Jun  6 13:12:20 2010
+++ b/gettext-tools/configure	Tue Oct  4 16:29:27 2011
@@ -40562,6 +40562,16 @@
 
 
 
+      ac_fn_c_check_decl "$LINENO" "stpncpy" "ac_cv_have_decl_stpncpy" "$ac_includes_default"
+if test "x$ac_cv_have_decl_stpncpy" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STPNCPY $ac_have_decl
+_ACEOF
 
 
 
@@ -40606,7 +40616,9 @@
 #include <stdlib.h>
 #include <string.h> /* for strcpy */
 /* The stpncpy prototype is missing in <string.h> on AIX 4.  */
+#if !HAVE_DECL_STPNCPY
 extern char *stpncpy (char *dest, const char *src, size_t n);
+#endif
 int main () {
   const char *src = "Hello";
   char dest[10];