From e8a5cd43ab1ddc50ca68d43ba9202fdb8ef32fff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 27 Dec 2000 08:05:00 +0000 Subject: [PATCH] (__pthread_attr_setstack): Fix setting of __stackaddr element. Add warnings for using pthread_attr_getstackaddr and pthread_attr_setstackaddr. --- linuxthreads/attr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c index 1aeac54ff1..9f7a191ec6 100644 --- a/linuxthreads/attr.c +++ b/linuxthreads/attr.c @@ -169,6 +169,9 @@ int __pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) } weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr) +link_warning (pthread_attr_setstackaddr, + "the use of `pthread_attr_setstackaddr' is deprecated, use `pthread_attr_setstack'") + int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) { /* XXX This function has a stupid definition. The standard specifies @@ -179,6 +182,10 @@ int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) } weak_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr) +link_warning (pthread_attr_getstackaddr, + "the use of `pthread_attr_getstackaddr' is deprecated, use `pthread_attr_getstack'") + + int __pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) { #ifdef FLOATING_STACKS @@ -233,7 +240,7 @@ int __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, err = __pthread_attr_setstacksize (attr, stacksize); if (err == 0) { -#ifdef _STACK_GROWS_UP +#ifndef _STACK_GROWS_UP attr->__stackaddr = (char *) stackaddr + stacksize; #else attr->__stackaddr = stackaddr;