diff options
author | Christian Heimes <christian@python.org> | 2021-11-24 09:20:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 09:20:37 (GMT) |
commit | 8af6481f6b7d43646c47d8fa6cc6d5eb465e2b0f (patch) | |
tree | b0eea88b3769dabc134777ba981a795eff554ac4 /Modules | |
parent | d5cd2effa69551c6bc7edfef8a414d545dea9117 (diff) | |
download | cpython-8af6481f6b7d43646c47d8fa6cc6d5eb465e2b0f.zip cpython-8af6481f6b7d43646c47d8fa6cc6d5eb465e2b0f.tar.gz cpython-8af6481f6b7d43646c47d8fa6cc6d5eb465e2b0f.tar.bz2 |
bpo-45847: Port _uuid to PY_STDLIB_MOD (GH-29741)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Setup.stdlib.in | 2 | ||||
-rw-r--r-- | Modules/_uuidmodule.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in index e999775..eadd161 100644 --- a/Modules/Setup.stdlib.in +++ b/Modules/Setup.stdlib.in @@ -136,6 +136,8 @@ # needs -lcrypt @MODULE__HASHLIB_TRUE@_hashlib _hashopenssl.c +# Linux: -luuid, BSD/AIX: libc's uuid_create() +@MODULE__UUID_TRUE@_uuid _uuidmodule.c ############################################################################ # macOS specific modules diff --git a/Modules/_uuidmodule.c b/Modules/_uuidmodule.c index 3f33e22..eae38f5 100644 --- a/Modules/_uuidmodule.c +++ b/Modules/_uuidmodule.c @@ -6,10 +6,12 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" -#ifdef HAVE_UUID_UUID_H -#include <uuid/uuid.h> -#elif defined(HAVE_UUID_H) -#include <uuid.h> +#if defined(HAVE_UUID_H) + // AIX, FreeBSD, libuuid with pkgconf + #include <uuid.h> +#elif defined(HAVE_UUID_UUID_H) + // libuuid without pkgconf + #include <uuid/uuid.h> #endif #ifdef MS_WINDOWS |