aboutsummaryrefslogtreecommitdiff
path: root/elf/tst-audit2.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-10 14:34:15 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-10 14:34:15 -0400
commit3ce1f2959437e952b9db4eaeed2407424f11a4d1 (patch)
treedb47da854c7d3bfc2c3bce4c6fc8381075ac9ec4 /elf/tst-audit2.c
parent1248c1c41508387ff282b208636737e8cdc9b5b0 (diff)
downloadglibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.zip
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.gz
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.bz2
Cleanup of configuration options
Make several tool features mandatory and simplify the code.
Diffstat (limited to 'elf/tst-audit2.c')
-rw-r--r--elf/tst-audit2.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/elf/tst-audit2.c b/elf/tst-audit2.c
index fd089b6..b4fa906 100644
--- a/elf/tst-audit2.c
+++ b/elf/tst-audit2.c
@@ -4,11 +4,9 @@
#include <stdlib.h>
#include <string.h>
-#if HAVE___THREAD
-# define MAGIC1 0xabcdef72
-# define MAGIC2 0xd8675309
+#define MAGIC1 0xabcdef72
+#define MAGIC2 0xd8675309
static __thread unsigned int magic[] = { MAGIC1, MAGIC2 };
-#endif
#undef calloc
@@ -18,7 +16,6 @@ static __thread unsigned int magic[] = { MAGIC1, MAGIC2 };
void *
calloc (size_t n, size_t m)
{
-#if HAVE___THREAD
if (magic[0] != MAGIC1 || magic[1] != MAGIC2)
{
printf ("{%x, %x} != {%x, %x}\n", magic[0], magic[1], MAGIC1, MAGIC2);
@@ -26,7 +23,6 @@ calloc (size_t n, size_t m)
}
magic[0] = MAGIC2;
magic[1] = MAGIC1;
-#endif
n *= m;
void *ptr = malloc (n);
@@ -38,13 +34,11 @@ calloc (size_t n, size_t m)
int
main (void)
{
-#if HAVE___THREAD
if (magic[1] != MAGIC1 || magic[0] != MAGIC2)
{
printf ("{%x, %x} != {%x, %x}\n", magic[0], magic[1], MAGIC2, MAGIC1);
return 1;
}
-#endif
return 0;
}