Re: -LANG:libc_in_namespace_std=ON problems - SGI

This is a discussion on Re: -LANG:libc_in_namespace_std=ON problems - SGI ; The following header lines retained to effect attribution: >X-Trace: >Date: Thu, 04 Mar 2004 20:23:16 -0600 >From: Albert Chin-A-Young >Subject: -LANG:libc_in_namespace_std=ON problems >To: info-iris-admin@ARL.ARMY.MIL > hepa2.fnal.gov > version=2.61 >In 7.4.1, -LANG:libc_in_namespace_std=ON is the default. That's ok. >However, it doesn't seem ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: -LANG:libc_in_namespace_std=ON problems

  1. Re: -LANG:libc_in_namespace_std=ON problems

    The following header lines retained to effect attribution:
    >X-Trace:
    >Date: Thu, 04 Mar 2004 20:23:16 -0600
    >From: Albert Chin-A-Young
    >Subject: -LANG:libc_in_namespace_std=ON problems
    >To: info-iris-admin@ARL.ARMY.MIL
    > hepa2.fnal.gov
    > version=2.61


    >In 7.4.1, -LANG:libc_in_namespace_std=ON is the default. That's ok.
    >However, it doesn't seem that all of /usr/include is prepared for this:
    > $ uname -R
    > 6.5 6.5.19m
    > $ CC -v
    > MIPSpro Compilers: Version 7.41
    > $ cat a.cc
    > #include
    > $ CC -c a.cc
    > cc-1132 CC: ERROR File = /usr/include/sys/types.h, Line = 532
    > The namespace "std" has no member "time_t".


    > __SGI_LIBC_USING_FROM_STD(time_t)
    > ^


    > cc-1132 CC: ERROR File = /usr/include/sys/types.h, Line = 533
    > The namespace "std" has no member "clock_t".


    > __SGI_LIBC_USING_FROM_STD(clock_t)
    > ^
    > ..


    >Should /usr/include/sys/time.h include ?


    >albert chin


    No.

    time.h includes sys/timespec.h. Please, examine the comments there.

    Randolph J. Herber, herber@fnal.gov, +1 630 840 2966, CD/CDFTF PK-149F,
    Mail Stop 318, Fermilab, Kirk & Pine Rds., PO Box 500, Batavia, IL 60510-0500,
    USA. (Speaking for myself and not for US, US DOE, FNAL nor URA.) (Product,
    trade, or service marks herein belong to their respective owners.)

  2. Re: -LANG:libc_in_namespace_std=ON problems

    Randolph J. Herber wrote:
    > The following header lines retained to effect attribution:
    >>X-Trace:
    >>Date: Thu, 04 Mar 2004 20:23:16 -0600
    >>From: Albert Chin-A-Young
    >>Subject: -LANG:libc_in_namespace_std=ON problems
    >>To: info-iris-admin@ARL.ARMY.MIL
    >> hepa2.fnal.gov
    >> version=2.61

    >
    >>In 7.4.1, -LANG:libc_in_namespace_std=ON is the default. That's ok.
    >>However, it doesn't seem that all of /usr/include is prepared for this:
    >> $ uname -R
    >> 6.5 6.5.19m
    >> $ CC -v
    >> MIPSpro Compilers: Version 7.41
    >> $ cat a.cc
    >> #include
    >> $ CC -c a.cc
    >> cc-1132 CC: ERROR File = /usr/include/sys/types.h, Line = 532
    >> The namespace "std" has no member "time_t".

    >
    >> __SGI_LIBC_USING_FROM_STD(time_t)
    >> ^

    >
    >> cc-1132 CC: ERROR File = /usr/include/sys/types.h, Line = 533
    >> The namespace "std" has no member "clock_t".

    >
    >> __SGI_LIBC_USING_FROM_STD(clock_t)
    >> ^
    >> ..

    >
    >>Should /usr/include/sys/time.h include ?

    >
    >>albert chin

    >
    > No.
    >
    > time.h includes sys/timespec.h. Please, examine the comments there.


    Looks like 6.5.22 fixes this. The diff below fixes it on 6.5.19 for me
    (this is the 6.5.22 file). Thanks to Frank Campana at SGI
    for the fix.

    --
    albert chin

    -- snip snip
    --- sys/time.h.orig Fri Feb 14 12:34:31 2003
    +++ sys/time.h Fri Mar 5 23:42:56 2004
    @@ -24,18 +24,21 @@

    #ifndef _SYS_TIME_H
    #define _SYS_TIME_H
    -#ident "$Revision: 3.58 $"
    +#ident "$Revision: 3.59 $"

    #ifdef __cplusplus
    extern "C" {
    #endif
    #include
    #include
    +#include

    /*
    * NOTE: this is a POSIX/XPG header - watch for name space pollution
    */

    +__SGI_LIBC_BEGIN_NAMESPACE_STD
    +
    #ifndef _CLOCK_T
    #define _CLOCK_T
    #if _MIPS_SZLONG == 32
    @@ -56,6 +59,10 @@
    typedef int time_t; /*

+ Reply to Thread