Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 56751 invoked from network); 19 May 2007 00:19:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 May 2007 00:19:38 -0000 Received: (qmail 42653 invoked by uid 500); 19 May 2007 00:19:44 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 42641 invoked by uid 500); 19 May 2007 00:19:44 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 42629 invoked by uid 99); 19 May 2007 00:19:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2007 17:19:44 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2007 17:19:37 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4820271406C for ; Fri, 18 May 2007 17:19:16 -0700 (PDT) Message-ID: <2407336.1179533956292.JavaMail.jira@brutus> Date: Fri, 18 May 2007 17:19:16 -0700 (PDT) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Closed: (STDCXX-358) [gcc/Mac OS X 10.4.8 Tiger] The unsetenv() function may be defined without a return value. In-Reply-To: <15691037.1173890109496.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor closed STDCXX-358. ------------------------------- Resolution: Fixed Fixed as per Brad's patch. > [gcc/Mac OS X 10.4.8 Tiger] The unsetenv() function may be defined without a return value. > ------------------------------------------------------------------------------------------ > > Key: STDCXX-358 > URL: https://issues.apache.org/jira/browse/STDCXX-358 > Project: C++ Standard Library > Issue Type: Bug > Components: Build > Affects Versions: 4.1.3, 4.1.2 > Environment: Darwin host.local 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386 > Reporter: Eric Lemings > Assigned To: Martin Sebor > Fix For: 4.2 > > > On Mac OS X/Darwin platforms, the unsetenv() function may be defined without a return value depending on the value of the __DARWIN_UNIX03 macro. Here's the declaration of unsetenv() from /usr/include/stdlib.h: > 240 #if __DARWIN_UNIX03 > 241 int unsetenv(const char *) __DARWIN_ALIAS(unsetenv); > 242 #else /* !__DARWIN_UNIX03 */ > 243 void unsetenv(const char *); > 244 #endif /* __DARWIN_UNIX03 */ > The __DARWIN_UNIX03 macro is defined in the /usr/include/sys/cdefs.h header file. It may be defined as 1 or 0. This causes compilation of the tests/src/environ.cpp source file to fail. Here's a patch for it. > Index: tests/src/environ.cpp > =================================================================== > --- tests/src/environ.cpp (revision 517771) > +++ tests/src/environ.cpp (working copy) > @@ -134,7 +134,10 @@ > // try to remove variable from the environment > > #ifndef _RWSTD_NO_UNSETENV > - ret = unsetenv (envvar); > +# if !defined __DARWIN_UNIX03 || __DARWIN_UNIX03 > + ret = > +# endif > + unsetenv (envvar); > #else > ret = putenv (envvar); > #endif -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.