[New-bugs-announce] [issue32399] _uuidmodule.c cannot build on AIX - different typedefs of uuid_t, etc..

Michael Felt report at bugs.python.org
Thu Dec 21 13:49:07 EST 2017


New submission from Michael Felt <michael at felt.demon.nl>:

I was hoping for something simple - as in:

    +1  #define PY_SSIZE_T_CLEAN
    +2
    +3  #include "Python.h"
    +4  #ifndef _AIX
    +5  #include <uuid/uuid.h>
    +6  #else
    +7  #include <uuid.h>
    +8  #endif

However, it dies - instantly.

       11 | static PyObject *
       12 | py_uuid_generate_time_safe(void)
       13 | {
       14 | #ifdef HAVE_UUID_GENERATE_TIME_SAFE
       15 |     uuid_t out;
       16 |     int res;
       17 |
       18 |     res = uuid_generate_time_safe(out);
       19 |     return Py_BuildValue("y#i", (const char *) out, sizeof(out), res);
       20 | #else
       21 |     uuid_t out;
       22 |     uuid_generate_time(out);
       23 |     return Py_BuildValue("y#O", (const char *) out, sizeof(out), Py_None);
       23 +     return _Py_BuildValue_SizeT("y#O", (const char *) out, sizeof(out), (&_Py_NoneStruct));
"/data/prj/python/git/python3-3.7.0.a3/Modules/_uuidmodule.c", line 23.48: 1506-117 (S) Operand must be a scalar type.
       24 | #endif
       25 | }
       26 |

On a linux system I see:

typedef unsigned char uuid_t[16];

while on AIX the typedef is:

/*
 * Universal Unique Identifier (UUID) types.
 */
typedef struct _uuid_t
{
    unsigned32          time_low;
    unsigned16          time_mid;
    unsigned16          time_hi_and_version;
    unsigned8           clock_seq_hi_and_reserved;
    unsigned8           clock_seq_low;
    byte               node[6];
} uuid_t, *uuid_p_t;

So, mentioning this for now - as I do not yet know the module. If someone with intimate knowledge of the current implementation is willing to help me - I'll dabble and learn - and see if we can make it work on AIX as well.

p.s. - guessing on the "Extension Modules" label. If not the right choice, please update.

----------
components: Extension Modules
messages: 308894
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: _uuidmodule.c cannot build on AIX - different typedefs of uuid_t, etc..
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32399>
_______________________________________


More information about the New-bugs-announce mailing list