Skip to content

Commit b4ebaa7

Browse files
David Carlierpitrou
authored andcommitted
bpo-32493: Not only AIX, but FreeBSD has uuid_create support (#5089)
Allow building the _uuid extension module on FreeBSD and OpenBSD.
1 parent 2ab3a8f commit b4ebaa7

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UUID module fixes build for FreeBSD/OpenBSD

Modules/_uuidmodule.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ py_uuid_generate_time_safe(void)
1919
res = uuid_generate_time_safe(uuid);
2020
return Py_BuildValue("y#i", (const char *) uuid, sizeof(uuid), res);
2121
#elif HAVE_UUID_CREATE
22-
/*
23-
* AIX support for uuid - RFC4122
24-
*/
25-
unsigned32 status;
22+
uint32_t status;
2623
uuid_create(&uuid, &status);
2724
return Py_BuildValue("y#i", (const char *) &uuid, sizeof(uuid), (int) status);
2825
#else

configure

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9560,8 +9560,9 @@ fi
95609560
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
95619561

95629562
# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
9563-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RFC4122 - uuid support on AIX" >&5
9564-
$as_echo_n "checking for RFC4122 - uuid support on AIX... " >&6; }
9563+
# FreeBSD and OpenBSD provides support as well
9564+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9565+
$as_echo_n "checking for uuid_create... " >&6; }
95659566
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
95669567
/* end confdefs.h. */
95679568
#include <uuid.h>

configure.ac

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,13 +2696,14 @@ void *x = uuid_generate_time_safe
26962696
)
26972697

26982698
# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
2699-
AC_MSG_CHECKING(for RFC4122 - uuid support on AIX)
2699+
# FreeBSD and OpenBSD provides support as well
2700+
AC_MSG_CHECKING(for uuid_create)
27002701
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <uuid.h>]], [[
27012702
#ifndef uuid_create
27022703
void *x = uuid_create
27032704
#endif
27042705
]])],
2705-
[AC_DEFINE(HAVE_UUID_CREATE, 1, Define if uuid_create() exists. AIX support for uuid:RFC4122)
2706+
[AC_DEFINE(HAVE_UUID_CREATE, 1, Define if uuid_create() exists.)
27062707
AC_MSG_RESULT(yes)],
27072708
[AC_MSG_RESULT(no)]
27082709
)

pyconfig.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@
11911191
/* Define to 1 if you have the <utime.h> header file. */
11921192
#undef HAVE_UTIME_H
11931193

1194-
/* Define if uuid_create() exists. AIX support for uuid:RFC4122 */
1194+
/* Define if uuid_create() exists. */
11951195
#undef HAVE_UUID_CREATE
11961196

11971197
/* Define if uuid_generate_time_safe() exists. */

0 commit comments

Comments
 (0)