OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* testsuite/testsuite_performance.h (__FreeBSD__): Add fake mallinfo.
[pf3gnuchains/gcc-fork.git]
/
libstdc++-v3
/
testsuite
/
testsuite_performance.h
diff --git
a/libstdc++-v3/testsuite/testsuite_performance.h
b/libstdc++-v3/testsuite/testsuite_performance.h
index
b55ed91
..
625de57
100644
(file)
--- a/
libstdc++-v3/testsuite/testsuite_performance.h
+++ b/
libstdc++-v3/testsuite/testsuite_performance.h
@@
-28,8
+28,8
@@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBC
PP
_PERFORMANCE_H
-#define _GLIBC
PP
_PERFORMANCE_H
+#ifndef _GLIBC
XX
_PERFORMANCE_H
+#define _GLIBC
XX
_PERFORMANCE_H
#include <sys/times.h>
#include <sys/resource.h>
#include <sys/times.h>
#include <sys/resource.h>
@@
-40,6
+40,13
@@
#ifdef __linux__
#include <malloc.h>
#ifdef __linux__
#include <malloc.h>
+#elif defined (__FreeBSD__)
+extern "C"
+{
+ struct mallinfo { int uordblks; };
+ struct mallinfo mallinfo(void)
+ { struct mallinfo m = { (((size_t) sbrk (0) + 1023) / 1024) }; return m; }
+}
#else
extern "C"
{
#else
extern "C"
{
@@
-49,7
+56,7
@@
extern "C"
}
#endif
}
#endif
-namespace __gnu_
cxx_
test
+namespace __gnu_test
{
class time_counter
{
{
class time_counter
{
@@
-190,7
+197,7
@@
namespace __gnu_cxx_test
out << std::endl;
out.close();
}
out << std::endl;
out.close();
}
-}; // namespace __gnu_
cxx_
test
+}; // namespace __gnu_test
-#endif // _GLIBC
PP
_PERFORMANCE_H
+#endif // _GLIBC
XX
_PERFORMANCE_H