about summary refs log tree commit diff
path: root/nptl/tst-align2.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-05-07 22:15:16 +0000
committerUlrich Drepper <drepper@redhat.com>2007-05-07 22:15:16 +0000
commit29c113f0db2053fe814c532b93d80f23185f3eb0 (patch)
tree0518e89541eba7f89fd9f4dd344924715e37f08f /nptl/tst-align2.c
parent16105fe0bcf45769d61d5180b670c8c661432748 (diff)
downloadglibc-29c113f0db2053fe814c532b93d80f23185f3eb0.tar.gz
glibc-29c113f0db2053fe814c532b93d80f23185f3eb0.tar.xz
glibc-29c113f0db2053fe814c532b93d80f23185f3eb0.zip
[BZ #4455]
	* tst-align2.c (do_test): Add _STACK_GROWS_UP case.
	* tst-getpid1.c (do_test): Likewise.
Diffstat (limited to 'nptl/tst-align2.c')
-rw-r--r--nptl/tst-align2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nptl/tst-align2.c b/nptl/tst-align2.c
index ec85f435b6..4685c201e4 100644
--- a/nptl/tst-align2.c
+++ b/nptl/tst-align2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -53,8 +53,14 @@ do_test (void)
   char st[256 * 1024];
   pid_t p = __clone2 (f, st, sizeof (st), 0, 0);
 #else
-  char st[128 * 1024];
+  char st[128 * 1024] __attribute__ ((aligned));
+# if _STACK_GROWS_DOWN
   pid_t p = clone (f, st + sizeof (st), 0, 0);
+# elif _STACK_GROWS_UP
+  pid_t p = clone (f, st, 0, 0);
+# else
+#  error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
+# endif
 #endif
   if (p == -1)
     {