Skip to content

Commit 85cf415

Browse files
asg017claude
andcommitted
Remove dead typedef macros and harmful u_int*_t redefinitions
The UINT32_TYPE/UINT16_TYPE/INT16_TYPE/UINT8_TYPE/INT8_TYPE/LONGDOUBLE_TYPE macros (copied from sqlite3.c) were never used anywhere in sqlite-vec. The u_int8_t/u_int16_t/u_int64_t typedefs redefined standard types using BSD-only types despite <stdint.h> already being included, breaking builds on musl/Alpine, strict C99, and requiring reactive platform guards. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 85973b3 commit 85cf415

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

sqlite-vec.c

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -22,61 +22,10 @@ SQLITE_EXTENSION_INIT1
2222
#include "sqlite3.h"
2323
#endif
2424

25-
#ifndef UINT32_TYPE
26-
#ifdef HAVE_UINT32_T
27-
#define UINT32_TYPE uint32_t
28-
#else
29-
#define UINT32_TYPE unsigned int
30-
#endif
31-
#endif
32-
#ifndef UINT16_TYPE
33-
#ifdef HAVE_UINT16_T
34-
#define UINT16_TYPE uint16_t
35-
#else
36-
#define UINT16_TYPE unsigned short int
37-
#endif
38-
#endif
39-
#ifndef INT16_TYPE
40-
#ifdef HAVE_INT16_T
41-
#define INT16_TYPE int16_t
42-
#else
43-
#define INT16_TYPE short int
44-
#endif
45-
#endif
46-
#ifndef UINT8_TYPE
47-
#ifdef HAVE_UINT8_T
48-
#define UINT8_TYPE uint8_t
49-
#else
50-
#define UINT8_TYPE unsigned char
51-
#endif
52-
#endif
53-
#ifndef INT8_TYPE
54-
#ifdef HAVE_INT8_T
55-
#define INT8_TYPE int8_t
56-
#else
57-
#define INT8_TYPE signed char
58-
#endif
59-
#endif
60-
#ifndef LONGDOUBLE_TYPE
61-
#define LONGDOUBLE_TYPE long double
62-
#endif
63-
6425
#ifndef SQLITE_VEC_ENABLE_DISKANN
6526
#define SQLITE_VEC_ENABLE_DISKANN 1
6627
#endif
6728

68-
#ifndef _WIN32
69-
#ifndef __EMSCRIPTEN__
70-
#ifndef __COSMOPOLITAN__
71-
#ifndef __wasi__
72-
typedef u_int8_t uint8_t;
73-
typedef u_int16_t uint16_t;
74-
typedef u_int64_t uint64_t;
75-
#endif
76-
#endif
77-
#endif
78-
#endif
79-
8029
typedef int8_t i8;
8130
typedef uint8_t u8;
8231
typedef int16_t i16;

0 commit comments

Comments
 (0)