This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: tst-pthread-getattr changes break sparc
On Fri, 27 Jul 2012 10:36:03 -0700 (PDT), Roland wrote:
> > +static long pagesize;
>
> We always write 'long int', never 'long'.
> But for this, I'd use size_t.
I kept this signed because I am checking it for < 0 later. Would you
prefer size_t here and then a cast to ssize_t during the check? I don't
really have a preference either way.
> > + stack_limit.rlim_cur = _MIN(stacksize - pagesize + 1,
> > MAX_STACK_SIZE);
>
> Space before paren. Where does _MIN come from?
I have defined _MIN earlier in the test case.
> > + if (pagesize < 0)
> > + {
> > + perror ("could not get page size");
> > + return 1;
>
> Tests should write to stdout, not stderr.
> So make it:
> printf ("sysconf (_SC_PAGESIZE): %m");
>
Funny that I wrote this exact thing in a document a couple of hours ago
and was too lazy to implement it myself :(
Thanks for the review.
Regards,
Siddhesh