unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Linux: Change type of dynamic PTHREAD_STACK_MIN to size_t
@ 2021-07-22 10:58 Florian Weimer via Libc-alpha
  2021-07-22 13:24 ` Florian Weimer via Libc-alpha
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer via Libc-alpha @ 2021-07-22 10:58 UTC (permalink / raw)
  To: libc-alpha

An unsigned type (instead of long int) is closer how to this constant
is usually used.

---
 sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h b/sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h
index 5f5fc5f024..9218269643 100644
--- a/sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h
+++ b/sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h
@@ -23,7 +23,7 @@
 __BEGIN_DECLS
 extern long int __sysconf (int __name) __THROW;
 __END_DECLS
-#   define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE)
+#   define PTHREAD_STACK_MIN ((size_t) __sysconf (__SC_THREAD_STACK_MIN_VALUE))
 #  endif
 # else
 #  include <bits/pthread_stack_min.h>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Linux: Change type of dynamic PTHREAD_STACK_MIN to size_t
  2021-07-22 10:58 [PATCH] Linux: Change type of dynamic PTHREAD_STACK_MIN to size_t Florian Weimer via Libc-alpha
@ 2021-07-22 13:24 ` Florian Weimer via Libc-alpha
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer via Libc-alpha @ 2021-07-22 13:24 UTC (permalink / raw)
  To: libc-alpha

* Florian Weimer:

> An unsigned type (instead of long int) is closer how to this constant
> is usually used.
>
> ---
>  sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h b/sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h
> index 5f5fc5f024..9218269643 100644
> --- a/sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h
> +++ b/sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h
> @@ -23,7 +23,7 @@
>  __BEGIN_DECLS
>  extern long int __sysconf (int __name) __THROW;
>  __END_DECLS
> -#   define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE)
> +#   define PTHREAD_STACK_MIN ((size_t) __sysconf (__SC_THREAD_STACK_MIN_VALUE))
>  #  endif
>  # else
>  #  include <bits/pthread_stack_min.h>

I'm withdrawing this patch.  long int is closer to the original int
type.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-22 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 10:58 [PATCH] Linux: Change type of dynamic PTHREAD_STACK_MIN to size_t Florian Weimer via Libc-alpha
2021-07-22 13:24 ` Florian Weimer via Libc-alpha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).