diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-05-24 23:22:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 23:22:59 (GMT) |
commit | 5734f41a9b46b4fd65b6ba90240b108f8a0b7c57 (patch) | |
tree | 6f3f2aec5631ee53c66d469ac3b3a5ed81c13b45 /configure | |
parent | d9eb22c67c38b45764dd924801c72092770d200f (diff) | |
download | cpython-5734f41a9b46b4fd65b6ba90240b108f8a0b7c57.zip cpython-5734f41a9b46b4fd65b6ba90240b108f8a0b7c57.tar.gz cpython-5734f41a9b46b4fd65b6ba90240b108f8a0b7c57.tar.bz2 |
bpo-32493: Fix uuid.uuid1() on FreeBSD. (GH-7099)
Use uuid_enc_be() if available to encode UUID to bytes as big endian.
(cherry picked from commit 17d8830312d82e7de42ab89739b0771f712645ff)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -9625,6 +9625,40 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet +# stream in big-endian byte-order +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5 +$as_echo_n "checking for uuid_enc_be... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <uuid.h> +int +main () +{ + +#ifndef uuid_enc_be +uuid_t uuid; +unsigned char buf[sizeof(uuid)]; +uuid_enc_be(buf, &uuid); +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # 'Real Time' functions on Solaris # posix4 on Solaris 2.6 # pthread (first!) on Linux |