pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Update of wip/libressl to 2.1.6



Martin Husemann wrote:
> Lost of stuff like this:
> 
>   CC       libcrypto_la-ex_data.lo
> ex_data.c: In function 'int_new_ex_data':
> ex_data.c:427:3: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
>    storage = reallocarray(NULL, mx, sizeof(CRYPTO_EX_DATA_FUNCS*));
>    ^
> ex_data.c:427:11: warning: assignment makes pointer from integer without a cast [enabled by default]
>    storage = reallocarray(NULL, mx, sizeof(CRYPTO_EX_DATA_FUNCS*));
>            ^
> ex_data.c: In function 'int_dup_ex_data':
> ex_data.c:471:11: warning: assignment makes pointer from integer without a cast [enabled by default]
>    storage = reallocarray(NULL, mx, sizeof(CRYPTO_EX_DATA_FUNCS*));
>            ^
> ex_data.c: In function 'int_free_ex_data':
> ex_data.c:508:11: warning: assignment makes pointer from integer without a cast [enabled by default]
>    storage = reallocarray(NULL, mx, sizeof(CRYPTO_EX_DATA_FUNCS*));
>            ^
> 
> Martin
> 

Thank you. I can confirm it here on amd64.

I had a closer look at this issue and it's a problem how GNU Autotools discover libc functions.

./configure produces the following check function (I hacked it to print the content of it to config.log):

/* confdefs.h */
#define PACKAGE_NAME "amhello"
#define PACKAGE_TARNAME "amhello"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "amhello 1.0"
#define PACKAGE_BUGREPORT "bug-automake%gnu.org@localhost"
#define PACKAGE_URL ""
#define PACKAGE "amhello"
#define VERSION "1.0"
/* end confdefs.h.  */
/* Define strtonum to an innocuous variant, in case <limits.h> declares strtonum.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define strtonum innocuous_strtonum

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strtonum (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef strtonum

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char strtonum ();
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined __stub_strtonum || defined __stub___strtonum
choke me
#endif

int
main ()
{
return strtonum ();
  ;
  return 0;
}


And it's compilable without _OPENBSD_SOURCE. At the moment I don't know how to properly fix it.

Probably to rename the compat functions to __FUN_compat() + provide #define FUN __FUN_openbsdcompat in the libc headers?

CC: Christos and Joerg.

Thanks,

BTW. LibreSSL accepted for the future releases that there will be a definition of _OPENBSD_SOURCE in CPPFLAGS. But it's not addressing the root of problems.


Home | Main Index | Thread Index | Old Index