bpo-11063: Use more reliable way to check if uuid function exists (GH… · python/cpython@0e163d2

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -9522,8 +9522,7 @@ main ()

95229522

{

95239523
95249524

#ifndef uuid_generate_time_safe

9525-

uuid_t out;

9526-

uuid_generate_time_safe(out);

9525+

void *x = uuid_generate_time_safe

95279526

#endif

95289527
95299528

;

Original file line numberDiff line numberDiff line change

@@ -2680,8 +2680,7 @@ AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX

26802680

AC_MSG_CHECKING(for uuid_generate_time_safe)

26812681

AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <uuid/uuid.h>]], [[

26822682

#ifndef uuid_generate_time_safe

2683-

uuid_t out;

2684-

uuid_generate_time_safe(out);

2683+

void *x = uuid_generate_time_safe

26852684

#endif

26862685

]])],

26872686

[AC_DEFINE(HAVE_UUID_GENERATE_TIME_SAFE, 1, Define if uuid_generate_time_safe() exists.)