You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Eric Lemings <Er...@roguewave.com> on 2008/06/03 19:16:02 UTC
RE: svn commit: r662614 - /stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
I just saw this while compiling with Sun C++ 5.9 on Solaris 10:
CC -c -D_RWSTDDEBUG -mt -I/work/stdcxx/branches/4.2.x/include
-I/build/stdcxx-4.2.x-15D/include
-I/work/stdcxx/branches/4.2.x/tests/include -library=%none -g -m64 +w
-errtags -erroff=hidef
/work/stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
"/work/stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp",
line 57: Error, undefidenterr: _RWSTD_MBSTATE_T_SIZE is not defined.
1 Error(s) detected.
FYI.
Brad.
> -----Original Message-----
> From: sebor@apache.org [mailto:sebor@apache.org]
> Sent: Monday, June 02, 2008 7:08 PM
> To: commits@stdcxx.apache.org
> Subject: svn commit: r662614 -
> /stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
>
> Author: sebor
> Date: Mon Jun 2 18:08:15 2008
> New Revision: 662614
>
> URL: http://svn.apache.org/viewvc?rev=662614&view=rev
> Log:
> 2008-06-02 Martin Sebor <se...@roguewave.com>
>
> * tests/regress/21.c.strings.stdcxx-843.cpp: Added a
> regression test
> for STDCXX-843.
>
> Added:
>
> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cp
> p (with props)
>
> Added: stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
> URL:
> http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/regre
> ss/21.c.strings.stdcxx-843.cpp?rev=662614&view=auto
> ==============================================================
> ================
> ---
> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cp
> p (added)
> +++
> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cp
> p Mon Jun 2 18:08:15 2008
> @@ -0,0 +1,68 @@
> +/************************************************************
> ************
> + *
> + * 21.c.strings.stdcxx-843.cpp - regression test for STDCXX-843
> + *
> + * http://issues.apache.org/jira/browse/STDCXX-843
> + *
> + * $Id$
> + *
> +
> **************************************************************
> *************
> + *
> + * Licensed to the Apache Software Foundation (ASF) under
> one or more
> + * contributor license agreements. See the NOTICE file
> distributed
> + * with this work for additional information regarding
> copyright
> + * ownership. The ASF licenses this file to you under
> the Apache
> + * License, Version 2.0 (the "License"); you may not use
> this file
> + * except in compliance with the License. You may obtain
> a copy of
> + * the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in
> writing, software
> + * distributed under the License is distributed on an "AS
> IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
> express or
> + * implied. See the License for the specific language
> governing
> + * permissions and limitations under the License.
> + *
> +
> **************************************************************
> ************/
> +
> +#include <cassert>
> +#include <cwchar>
> +
> +
> +// known mbstate_t sizes on major platforms
> +#ifdef _RWSTD_OS_AIX
> +# define KNOWN_SIZE sizeof(long)
> +#elif defined _RWSTD_OS_HP_UX
> +# define KNOWN_SIZE 8
> +#elif defined _RWSTD_OS_FREEBSD
> +# define KNOWN_SIZE 128
> +#elif defined _RWSTD_OS_IRIX64
> +# define KNOWN_SIZE 1
> +#elif defined _RWSTD_OS_LINUX
> +# define KNOWN_SIZE 8
> +#elif defined _RWSTD_OS_OSF1
> +# define KNOWN_SIZE 24
> +#elif defined _RWSTD_OS_SUNOS
> +# define KNOWN_SIZE (sizeof(long) == 8 ? 32 : 24)
> +#elif defined _RWSTD_OS_WINDOWS
> +# define KNOWN_SIZE 4
> +#endif
> +
> +
> +int main ()
> +{
> + // verify that the size is the same as what was detectected
> + // during configuration
> + assert (sizeof (std::mbstate_t) == _RWSTD_MBSTATE_T_SIZE);
> +
> +#ifdef KNOWN_SIZE
> +
> + // on known platforms verify that the actual size matches
> + // the size known on that platform
> + assert (sizeof (std::mbstate_t) == KNOWN_SIZE);
> +
> +#endif // KNOWN_SIZE
> +
> + return 0;
> +}
>
> Propchange:
> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
> --------------------------------------------------------------
> ----------------
> svn:eol-style = native
>
> Propchange:
> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
> --------------------------------------------------------------
> ----------------
> svn:keywords = Id
>
>
>
Re: svn commit: r662614 - /stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
Posted by Martin Sebor <se...@roguewave.com>.
Eric Lemings wrote:
>
> I just saw this while compiling with Sun C++ 5.9 on Solaris 10:
Thanks. I forgot that we don't use our <cxxx> headers with this
compiler (or with HP aCC). I need to #include one of our headers.
Martin
>
> CC -c -D_RWSTDDEBUG -mt -I/work/stdcxx/branches/4.2.x/include
> -I/build/stdcxx-4.2.x-15D/include
> -I/work/stdcxx/branches/4.2.x/tests/include -library=%none -g -m64 +w
> -errtags -erroff=hidef
> /work/stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
> "/work/stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp",
> line 57: Error, undefidenterr: _RWSTD_MBSTATE_T_SIZE is not defined.
> 1 Error(s) detected.
>
> FYI.
>
> Brad.
>
>> -----Original Message-----
>> From: sebor@apache.org [mailto:sebor@apache.org]
>> Sent: Monday, June 02, 2008 7:08 PM
>> To: commits@stdcxx.apache.org
>> Subject: svn commit: r662614 -
>> /stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
>>
>> Author: sebor
>> Date: Mon Jun 2 18:08:15 2008
>> New Revision: 662614
>>
>> URL: http://svn.apache.org/viewvc?rev=662614&view=rev
>> Log:
>> 2008-06-02 Martin Sebor <se...@roguewave.com>
>>
>> * tests/regress/21.c.strings.stdcxx-843.cpp: Added a
>> regression test
>> for STDCXX-843.
>>
>> Added:
>>
>> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cp
>> p (with props)
>>
>> Added: stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
>> URL:
>> http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/regre
>> ss/21.c.strings.stdcxx-843.cpp?rev=662614&view=auto
>> ==============================================================
>> ================
>> ---
>> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cp
>> p (added)
>> +++
>> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cp
>> p Mon Jun 2 18:08:15 2008
>> @@ -0,0 +1,68 @@
>> +/************************************************************
>> ************
>> + *
>> + * 21.c.strings.stdcxx-843.cpp - regression test for STDCXX-843
>> + *
>> + * http://issues.apache.org/jira/browse/STDCXX-843
>> + *
>> + * $Id$
>> + *
>> +
>> **************************************************************
>> *************
>> + *
>> + * Licensed to the Apache Software Foundation (ASF) under
>> one or more
>> + * contributor license agreements. See the NOTICE file
>> distributed
>> + * with this work for additional information regarding
>> copyright
>> + * ownership. The ASF licenses this file to you under
>> the Apache
>> + * License, Version 2.0 (the "License"); you may not use
>> this file
>> + * except in compliance with the License. You may obtain
>> a copy of
>> + * the License at
>> + *
>> + * http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in
>> writing, software
>> + * distributed under the License is distributed on an "AS
>> IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>> express or
>> + * implied. See the License for the specific language
>> governing
>> + * permissions and limitations under the License.
>> + *
>> +
>> **************************************************************
>> ************/
>> +
>> +#include <cassert>
>> +#include <cwchar>
>> +
>> +
>> +// known mbstate_t sizes on major platforms
>> +#ifdef _RWSTD_OS_AIX
>> +# define KNOWN_SIZE sizeof(long)
>> +#elif defined _RWSTD_OS_HP_UX
>> +# define KNOWN_SIZE 8
>> +#elif defined _RWSTD_OS_FREEBSD
>> +# define KNOWN_SIZE 128
>> +#elif defined _RWSTD_OS_IRIX64
>> +# define KNOWN_SIZE 1
>> +#elif defined _RWSTD_OS_LINUX
>> +# define KNOWN_SIZE 8
>> +#elif defined _RWSTD_OS_OSF1
>> +# define KNOWN_SIZE 24
>> +#elif defined _RWSTD_OS_SUNOS
>> +# define KNOWN_SIZE (sizeof(long) == 8 ? 32 : 24)
>> +#elif defined _RWSTD_OS_WINDOWS
>> +# define KNOWN_SIZE 4
>> +#endif
>> +
>> +
>> +int main ()
>> +{
>> + // verify that the size is the same as what was detectected
>> + // during configuration
>> + assert (sizeof (std::mbstate_t) == _RWSTD_MBSTATE_T_SIZE);
>> +
>> +#ifdef KNOWN_SIZE
>> +
>> + // on known platforms verify that the actual size matches
>> + // the size known on that platform
>> + assert (sizeof (std::mbstate_t) == KNOWN_SIZE);
>> +
>> +#endif // KNOWN_SIZE
>> +
>> + return 0;
>> +}
>>
>> Propchange:
>> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
>> --------------------------------------------------------------
>> ----------------
>> svn:eol-style = native
>>
>> Propchange:
>> stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
>> --------------------------------------------------------------
>> ----------------
>> svn:keywords = Id
>>
>>
>>