diff mbox series

Linux: Change type of dynamic PTHREAD_STACK_MIN to size_t

Message ID 87zgueipir.fsf@oldenburg.str.redhat.com
State Dropped
Headers show
Series Linux: Change type of dynamic PTHREAD_STACK_MIN to size_t | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Florian Weimer July 22, 2021, 10:58 a.m. UTC
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(-)

Comments

Florian Weimer July 22, 2021, 1:24 p.m. UTC | #1
* 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
diff mbox series

Patch

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>