Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2014 23:28:33 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Julio Merino <julio@meroh.net>
Cc:        freebsd-testing@FreeBSD.org, Dimitry Andric <dim@FreeBSD.org>
Subject:   Re: Compile error with gcc
Message-ID:  <A8EF2DCC-5F11-4405-88D1-05A193AB7BAF@gmail.com>
In-Reply-To: <695E42A3-2009-4DD7-B10E-BF8465C89D39@gmail.com>
References:  <695E42A3-2009-4DD7-B10E-BF8465C89D39@gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Feb 15, 2014, at 9:25 PM, Garrett Cooper <yaneurabeya@gmail.com> wrote:

> Hi Julio,
> 	I ran into this error when trying to compile ATF with gcc on code based off of r261958:
> 
> --- application.So ---
> /usr/src/contrib/atf/atf-c++/detail/application.cpp: In constructor 'atf::application::usage_error::usage_error(const char*, ...)':
> /usr/src/contrib/atf/atf-c++/detail/application.cpp:71: error: 'vsnprintf' is not a member of 'std'
> *** [application.So] Error code 1
> 
> 	I haven’t dug into why this is occurring yet, but I assume it’s because of the ATF 0.20 upgrade.
> 	I’m compiling with gcc/g++ of course, and not clang/libcxxrt.

	This patch seems to work with gcc and clang/libcxxrt. I didn’t try it without clang/libcxxrt though...
Thanks!
-Garrett


[-- Attachment #2 --]
From 40e316948a2e9c01f972ce8bae8580191bfd6163 Mon Sep 17 00:00:00 2001
From: Garrett Cooper <yanegomi@gmail.com>
Date: Sat, 15 Feb 2014 06:45:48 -0800
Subject: [PATCH] Unbreak compiling ATF after the 0.20 upgrade with gcc

---
 contrib/atf/bconfig.h                    | 2 +-
 lib/atf/libatf-c++/tests/detail/Makefile | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/atf/bconfig.h b/contrib/atf/bconfig.h
index 2993f22..822d934 100644
--- a/contrib/atf/bconfig.h
+++ b/contrib/atf/bconfig.h
@@ -56,7 +56,7 @@
 #define HAVE_UNSETENV 1
 
 /* Define to 1 if vsnprintf is in std */
-#define HAVE_VSNPRINTF_IN_STD 1
+/* #undef HAVE_VSNPRINTF_IN_STD */
 
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    */
diff --git a/lib/atf/libatf-c++/tests/detail/Makefile b/lib/atf/libatf-c++/tests/detail/Makefile
index 4e2e9cf..55576fe 100644
--- a/lib/atf/libatf-c++/tests/detail/Makefile
+++ b/lib/atf/libatf-c++/tests/detail/Makefile
@@ -9,6 +9,10 @@ ATF=		${.CURDIR:H:H:H:H:H}/contrib/atf
 
 CFLAGS+=	-I${ATF}
 
+.if ${MK_LIBCPLUSPLUS} == "yes"
+CFLAGS+=	-DHAVE_VSNPRINTF_IN_STD
+.endif
+
 .for _T in	application_test \
 		env_test \
 		exceptions_test \
-- 
1.8.5.2

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A8EF2DCC-5F11-4405-88D1-05A193AB7BAF>