changeset 11798:885a3ea92c62

Avoid collision between gnulib wrapper and libintl wrapper.
author Bruno Haible <bruno@clisp.org>
date Mon, 10 Aug 2009 13:29:20 +0200
parents 1bc3a28e8169
children 4956134d1aaf
files ChangeLog lib/stdio-write.c
diffstat 2 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-08-10  Bruno Haible  <bruno@clisp.org>
+
+	Avoid collision between gnulib wrapper and libintl wrapper.
+	* lib/stdio-write.c (printf): Don't define if a printf wrapper is
+	already defined in intl/printf.c.
+	(vprintf): Test REPLACE_VPRINTF_POSIX, not REPLACE_VFPRINTF_POSIX.
+	(vfprintf): Test REPLACE_VFPRINTF_POSIX, not REPLACE_VPRINTF_POSIX.
+
 2009-08-09  Bruno Haible  <bruno@clisp.org>
 
 	Make <sys/select.h> really self-contained, also on Solaris 10.
--- a/lib/stdio-write.c
+++ b/lib/stdio-write.c
@@ -1,5 +1,5 @@
 /* POSIX compatible FILE stream write function.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -63,6 +63,7 @@
     }
 
 #  if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
+#   if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */
 int
 printf (const char *format, ...)
 {
@@ -75,6 +76,7 @@
 
   return retval;
 }
+#   endif
 #  endif
 
 #  if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
@@ -92,7 +94,7 @@
 }
 #  endif
 
-#  if !REPLACE_VFPRINTF_POSIX /* avoid collision with vprintf.c */
+#  if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */
 int
 vprintf (const char *format, va_list args)
 {
@@ -100,7 +102,7 @@
 }
 #  endif
 
-#  if !REPLACE_VPRINTF_POSIX /* avoid collision with vfprintf.c */
+#  if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */
 int
 vfprintf (FILE *stream, const char *format, va_list args)
 #undef vfprintf