[uclibc-ng-devel] [PATCH] valloc declaration in stdlib.h

Waldemar Brodkorb wbx at uclibc-ng.org
Mon Jul 24 22:29:18 CEST 2017


Hi Eugene,
Eugene Yudin wrote,

> Hi,
> 
> Current uClibc-ng have issue with several different valloc declarations.
> 
> malloc.h:
> #ifdef __UCLIBC_SUSV2_LEGACY__
> /* Allocate SIZE bytes on a page boundary.  */
> extern __malloc_ptr_t valloc __MALLOC_P ((size_t __size)) __attribute_malloc__;
> #endif
> 
> stdlib.h:
>  #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
>  /* Allocate SIZE bytes on a page boundary.  The storage cannot be freed.  */
>  extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
>  #endif
> 
> The second declaration doesn't use the define __UCLIBC_SUSV2_LEGACY__.
> That leads to compile time problems.

Can you explain in which situations this leads to compile time
problems?

best regards
 Waldemar


More information about the devel mailing list