Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 72457 invoked from network); 8 Jan 2006 00:17:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Jan 2006 00:17:28 -0000 Received: (qmail 34737 invoked by uid 500); 8 Jan 2006 00:17:28 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 34724 invoked by uid 500); 8 Jan 2006 00:17:28 -0000 Mailing-List: contact stdcxx-commits-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-commits@incubator.apache.org Received: (qmail 34713 invoked by uid 500); 8 Jan 2006 00:17:28 -0000 Delivered-To: apmail-incubator-stdcxx-cvs@incubator.apache.org Received: (qmail 34709 invoked by uid 99); 8 Jan 2006 00:17:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 16:17:28 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 07 Jan 2006 16:17:27 -0800 Received: (qmail 72397 invoked by uid 65534); 8 Jan 2006 00:17:07 -0000 Message-ID: <20060108001707.72396.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r366949 - /incubator/stdcxx/trunk/tests/src/localedef.cpp Date: Sun, 08 Jan 2006 00:17:06 -0000 To: stdcxx-cvs@incubator.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: sebor Date: Sat Jan 7 16:17:03 2006 New Revision: 366949 URL: http://svn.apache.org/viewcvs?rev=366949&view=rev Log: 2006-01-07 Martin Sebor * localedef.cpp (rw_set_locale_root): Removed a gratuitous std:: qualification from strcat. * Avoided accidentally including /usr/include/localedef.h on HP-UX. Modified: incubator/stdcxx/trunk/tests/src/localedef.cpp Modified: incubator/stdcxx/trunk/tests/src/localedef.cpp URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/src/localedef.cpp?rev=366949&r1=366948&r2=366949&view=diff ============================================================================== --- incubator/stdcxx/trunk/tests/src/localedef.cpp (original) +++ incubator/stdcxx/trunk/tests/src/localedef.cpp Sat Jan 7 16:17:03 2006 @@ -16,13 +16,21 @@ * CONDITIONS OF ANY KIND, either express or implied. See the License * for the specific language governing permissions and limitations under * the License. - * + * **************************************************************************/ // expand _TEST_EXPORT macros #define _RWSTD_TEST_SRC -#include + +#ifdef _RWSTD_USE_CONFIG + // FIXME: use one style of #include paths consistently throughout + // the whole test suite (this form prevents #including the HP-UX + // /usr/include/localedef.h header) +# include "../include/localedef.h" +#else +# include +#endif #include // for rw_putenv() #include // for SHELL_RM_RF, rw_tmpnam @@ -292,7 +300,7 @@ char envvar [sizeof LOCALE_ROOT_ENVAR + sizeof rw_locale_root] = LOCALE_ROOT_ENVAR "="; - std::strcat (envvar, locale_root); + strcat (envvar, locale_root); // remove temporary file if mkstemp() rw_tmpnam() called mkstemp() if (rw_system (SHELL_RM_RF " %s", locale_root)) { @@ -326,9 +334,9 @@ { static char* slocname = 0; - static int size = 0; // the number of elements in the array - static int total_size = 5120; // the size of the array - static int last_cat = loc_cat; // last category + static size_t size = 0; // the number of elements in the array + static size_t total_size = 5120; // the size of the array + static int last_cat = loc_cat; // last category // allocate first time through if (!slocname) { @@ -410,7 +418,7 @@ #endif // _RWSTD_OS_SUNOS // if our buffer is full then dynamically allocate a new one - if ((size += (strlen (linebuf) + 1)) > total_size) { + if (total_size < (size += (strlen (linebuf) + 1))) { total_size += 5120; char* tmp =