This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, siddhesh/getattr, updated. glibc-2.16-ports-merge-90-g356668f


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, siddhesh/getattr has been updated
       via  356668ff5680f2983021e6437d0aa6dd7bbe06ce (commit)
      from  463961c8994ccc0627660d875de7f2859661e170 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=356668ff5680f2983021e6437d0aa6dd7bbe06ce

commit 356668ff5680f2983021e6437d0aa6dd7bbe06ce
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Sat Jul 28 08:07:20 2012 +0530

    More fixes based on Roland's review

diff --git a/nptl/tst-pthread-getattr.c b/nptl/tst-pthread-getattr.c
index 371c6c5..3f4534c 100644
--- a/nptl/tst-pthread-getattr.c
+++ b/nptl/tst-pthread-getattr.c
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/resource.h>
+#include <sys/param.h>
 #include <pthread.h>
 #include <alloca.h>
 #include <assert.h>
@@ -38,20 +39,18 @@
    <http://sourceware.org/ml/libc-alpha/2012-06/msg00713.html>.  */
 #define MAX_STACK_SIZE (8192 * 1024 - 1)
 
-#define _MIN(l,o) ((l) < (o) ? (l) : (o))
-
 static size_t pagesize;
 
 /* Check if the page in which TARGET lies is accessible.  This will segfault
    if it fails.  */
-static volatile void *
-allocate_and_test (void *target)
+static volatile char *
+allocate_and_test (char *target)
 {
-  volatile void *mem = &mem;
+  volatile char *mem = (char *) &mem;
   /* FIXME:  mem >= target for _STACK_GROWSUP.  */
   mem = alloca ((size_t) (mem - target));
 
-  *(int *) mem = 42;
+  *mem = 42;
   return mem;
 }
 
@@ -99,7 +98,7 @@ check_stack_top (void)
       return 1;
     }
 
-  printf ("current rlimit_stack is %zu\n", stack_limit.rlim_cur);
+  printf ("current rlimit_stack is %zu\n", (size_t) stack_limit.rlim_cur);
 
   if (get_self_pthread_attr ("check_stack_top", &stackaddr, &stacksize))
     return 1;
@@ -112,7 +111,7 @@ check_stack_top (void)
      stack is limited by the vma below it and not by the rlimit because the
      stacksize returned in that case is computed from the end of that vma and is
      hence safe.  */
-  stack_limit.rlim_cur = _MIN (stacksize - pagesize + 1, MAX_STACK_SIZE);
+  stack_limit.rlim_cur = MIN (stacksize - pagesize + 1, MAX_STACK_SIZE);
   printf ("Adjusting RLIMIT_STACK to %zu\n", stack_limit.rlim_cur);
   if ((ret = setrlimit (RLIMIT_STACK, &stack_limit)))
     {
@@ -154,12 +153,6 @@ static int
 do_test (void)
 {
   pagesize = sysconf (_SC_PAGESIZE);
-
-  if ((ssize_t) pagesize < 0)
-    {
-      printf ("sysconf (_SC_PAGESIZE): %m\n");
-      return 1;
-    }
   return check_stack_top ();
 }
 

-----------------------------------------------------------------------

Summary of changes:
 nptl/tst-pthread-getattr.c |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]