Error when including <complex> and <memory.h>

When compiling following 2-line program

[code]#include <complex>

#include <memory.h>[/code]

using following command-line:

[code]CC -c -library=stlport4 -xarch=v9 time_t_problem.cpp[/code]

I get following error from Sun C++ 5.8 2005/10/13

"/usr/include/sys/time.h", line 50: Error: Type name expected instead of "time_t".

1 Error(s) detected.

I suppose this is a bug, right?

[440 byte] By [tknapen] at [2007-11-26 9:09:03]
# 1

> I suppose this is a bug, right?

Yes, for which a patch exists.

Try Help->Check Now for New Updates in sunstudio, or go directly to

http://developers.sun.com/prodtech/cc/downloads/patches/ss11_patches.html

or, thirdly, use a patch automation tool like smpatch (Solaris 10).

Paul

Paul_Floyd at 2007-7-6 23:26:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
Done that. I installed 120760, 121017, 121019, 121021, 121015, 121023, 120761, 111712, 111703 and 111722 but I still suffer the same problem.CC -V now gives me:CC: Sun C++ 5.8 Patch 121017-02 2006/04/19Did I miss soth ? Thanks in advancetoon
toonknapen at 2007-7-6 23:26:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
I believe the problem is bug 4731122 in the Solaris headers, not in the compiler.This bug was fixed in Solaris 9 update 5, and in Solaris 10. I don't think a patch is available for Solaris 8.A workaround is to include <time.h> before including the other headers.
clamage45 at 2007-7-6 23:26:11 > top of Java-index,Development Tools,Solaris and Linux Development Tools...