File tree Expand file tree Collapse file tree 4 files changed +48
-9
lines changed Expand file tree Collapse file tree 4 files changed +48
-9
lines changed Original file line number Diff line number Diff line change 4
4
#include <uuid/uuid.h>
5
5
6
6
7
- /* bpo-11063: libuuid on macOS doesn't provide uuid_generate_time_safe(),
8
- only uuid_generate_time(). */
9
- #ifndef __APPLE__
10
- # define HAVE_TIME_SAFE
11
- #endif
12
-
13
-
14
7
static PyObject *
15
8
py_uuid_generate_time_safe (void )
16
9
{
17
- #ifdef HAVE_TIME_SAFE
10
+ #ifdef HAVE_UUID_GENERATE_TIME_SAFE
18
11
uuid_t out ;
19
12
int res ;
20
13
@@ -45,7 +38,7 @@ PyInit__uuid(void)
45
38
{
46
39
PyObject * mod ;
47
40
assert (sizeof (uuid_t ) == 16 );
48
- #ifdef HAVE_TIME_SAFE
41
+ #ifdef HAVE_UUID_GENERATE_TIME_SAFE
49
42
int has_uuid_generate_time_safe = 1 ;
50
43
#else
51
44
int has_uuid_generate_time_safe = 0 ;
Original file line number Diff line number Diff line change @@ -9512,6 +9512,37 @@ _ACEOF
9512
9512
fi
9513
9513
# Dynamic linking for HP-UX
9514
9514
9515
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for uuid_generate_time_safe" >&5
9516
+ $as_echo_n " checking for uuid_generate_time_safe... " >&6 ; }
9517
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
9518
+ /* end confdefs.h. */
9519
+ #include <uuid/uuid.h>
9520
+ int
9521
+ main ()
9522
+ {
9523
+
9524
+ #ifndef uuid_generate_time_safe
9525
+ uuid_t out;
9526
+ uuid_generate_time_safe(out);
9527
+ #endif
9528
+
9529
+ ;
9530
+ return 0;
9531
+ }
9532
+ _ACEOF
9533
+ if ac_fn_c_try_compile " $LINENO " ; then :
9534
+
9535
+ $as_echo " #define HAVE_UUID_GENERATE_TIME_SAFE 1" >> confdefs.h
9536
+
9537
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes" >&5
9538
+ $as_echo " yes" >&6 ; }
9539
+ else
9540
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
9541
+ $as_echo " no" >&6 ; }
9542
+
9543
+ fi
9544
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9545
+
9515
9546
{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for library containing sem_init" >&5
9516
9547
$as_echo_n " checking for library containing sem_init... " >&6 ; }
9517
9548
if ${ac_cv_search_sem_init+: } false ; then :
Original file line number Diff line number Diff line change @@ -2677,6 +2677,18 @@ AC_CHECK_LIB(sendfile, sendfile)
2677
2677
AC_CHECK_LIB ( dl , dlopen ) # Dynamic linking for SunOS/Solaris and SYSV
2678
2678
AC_CHECK_LIB ( dld , shl_load ) # Dynamic linking for HP-UX
2679
2679
2680
+ AC_MSG_CHECKING ( for uuid_generate_time_safe )
2681
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <uuid/uuid.h>] ] , [ [
2682
+ #ifndef uuid_generate_time_safe
2683
+ uuid_t out;
2684
+ uuid_generate_time_safe(out);
2685
+ #endif
2686
+ ] ] ) ] ,
2687
+ [ AC_DEFINE ( HAVE_UUID_GENERATE_TIME_SAFE , 1 , Define if uuid_generate_time_safe ( ) exists. )
2688
+ AC_MSG_RESULT ( yes ) ] ,
2689
+ [ AC_MSG_RESULT ( no ) ]
2690
+ )
2691
+
2680
2692
AC_SEARCH_LIBS ( sem_init , pthread rt posix4 ) # 'Real Time' functions on Solaris
2681
2693
# posix4 on Solaris 2.6
2682
2694
# pthread (first!) on Linux
Original file line number Diff line number Diff line change 1187
1187
/* Define to 1 if you have the <utime.h> header file. */
1188
1188
#undef HAVE_UTIME_H
1189
1189
1190
+ /* Define if uuid_generate_time_safe() exists. */
1191
+ #undef HAVE_UUID_GENERATE_TIME_SAFE
1192
+
1190
1193
/* Define to 1 if you have the `wait3' function. */
1191
1194
#undef HAVE_WAIT3
1192
1195
You can’t perform that action at this time.
0 commit comments