stdint.h-related mess in system.h

Issue #11 new
Dmitrii Pasechnik created an issue

with GAP 4.8.1, I get the following nonsense in system.h; the prefix libGAP_ must not be appended to the 1st parameter of these typedefs.

#if HAVE_STDINT_H
#include <stdint.h>
typedef char              libGAP_Char;

typedef libGAP_int8_t   libGAP_Int1;
typedef libGAP_int16_t  libGAP_Int2;
typedef libGAP_int32_t  libGAP_Int4;
typedef libGAP_int64_t  libGAP_Int8;

typedef libGAP_uint8_t  libGAP_UChar;
typedef libGAP_uint8_t  libGAP_UInt1;
typedef libGAP_uint16_t libGAP_UInt2;

how should this be fixed?

Comments (4)

  1. Dmitrii Pasechnik reporter

    similar story happens in intfuncs.c, where one sees libGAP_int8_t and libGAP_uint8_t...

  2. Volker Braun repo owner

    The quick fix is to add the C99 int types to the reserved keywords at the beginning of libGAPify.py

    Next week we should probably think about how and which symbols libgap should expose....

  3. Dmitrii Pasechnik reporter

    I must say I never understood the need for this renaming (probably only needed in an event of calling libGAP from GAP, no?)

    What's on agenda for the next week in this regard is how to merge with GAP; putting in a lot of ifdefs isn't too great IMHO, perhaps one should think how to refactor the stuff a bit...

  4. Volker Braun repo owner

    There is a single flat namespace, and GAP has symbols like "In" and "True". What do you think is the chance for a collision if you start linking that with dozens of other libraries?

  5. Log in to comment