damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

flatcc.patch (9370B)


      1 diff --git b/nostrdb/bindings/c/flatbuffers_common_reader.h a/nostrdb/bindings/c/flatbuffers_common_reader.h
      2 index c575308689b9..49e479e29980 100644
      3 --- b/nostrdb/bindings/c/flatbuffers_common_reader.h
      4 +++ a/nostrdb/bindings/c/flatbuffers_common_reader.h
      5 @@ -5,8 +5,8 @@
      6  
      7  /* Common FlatBuffers read functionality for C. */
      8  
      9 -#include "flatcc/flatcc_prologue.h"
     10 -#include "flatcc/flatcc_flatbuffers.h"
     11 +#include "flatcc_prologue.h"
     12 +#include "flatcc_flatbuffers.h"
     13  
     14  
     15  #define __flatbuffers_read_scalar_at_byteoffset(N, p, o) N ## _read_from_pe((uint8_t *)(p) + (o))
     16 @@ -574,5 +574,5 @@ static inline N ## _ ## K ## t N ## _as_typed_root(const void *buffer__tmp)\
     17  #define __flatbuffers_struct_as_root(N) __flatbuffers_buffer_as_root(N, struct_)
     18  #define __flatbuffers_table_as_root(N) __flatbuffers_buffer_as_root(N, table_)
     19  
     20 -#include "flatcc/flatcc_epilogue.h"
     21 +#include "flatcc_epilogue.h"
     22  #endif /* FLATBUFFERS_COMMON_H */
     23 diff --git b/nostrdb/bindings/c/profile_json_parser.h a/nostrdb/bindings/c/profile_json_parser.h
     24 index a7caaaec6d37..f404b6679fe0 100644
     25 --- b/nostrdb/bindings/c/profile_json_parser.h
     26 +++ a/nostrdb/bindings/c/profile_json_parser.h
     27 @@ -3,8 +3,8 @@
     28  
     29  /* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */
     30  
     31 -#include "flatcc/flatcc_json_parser.h"
     32 -#include "flatcc/flatcc_prologue.h"
     33 +#include "flatcc_json_parser.h"
     34 +#include "flatcc_prologue.h"
     35  
     36  /*
     37   * Parses the default root table or struct of the schema and constructs a FlatBuffer.
     38 @@ -280,5 +280,5 @@ static int profile_parse_json(flatcc_builder_t *B, flatcc_json_parser_t *ctx,
     39      return 0;
     40  }
     41  
     42 -#include "flatcc/flatcc_epilogue.h"
     43 +#include "flatcc_epilogue.h"
     44  #endif /* PROFILE_JSON_PARSER_H */
     45 diff --git b/nostrdb/flatcc/builder.c a/nostrdb/flatcc/builder.c
     46 index 9f54d884ff53..c5155a85e407 100644
     47 --- b/nostrdb/flatcc/builder.c
     48 +++ a/nostrdb/flatcc/builder.c
     49 @@ -16,8 +16,8 @@
     50  #include <stdlib.h>
     51  #include <string.h>
     52  
     53 -#include "flatcc/flatcc_builder.h"
     54 -#include "flatcc/flatcc_emitter.h"
     55 +#include "flatcc_builder.h"
     56 +#include "flatcc_emitter.h"
     57  
     58  /*
     59   * `check` is designed to handle incorrect use errors that can be
     60 diff --git b/nostrdb/flatcc/emitter.c a/nostrdb/flatcc/emitter.c
     61 index 089ea00b2060..dbeffacd97ed 100644
     62 --- b/nostrdb/flatcc/emitter.c
     63 +++ a/nostrdb/flatcc/emitter.c
     64 @@ -1,7 +1,7 @@
     65  #include <stdlib.h>
     66  
     67 -#include "flatcc/flatcc_rtconfig.h"
     68 -#include "flatcc/flatcc_emitter.h"
     69 +#include "flatcc_rtconfig.h"
     70 +#include "flatcc_emitter.h"
     71  
     72  static int advance_front(flatcc_emitter_t *E)
     73  {
     74 diff --git b/nostrdb/flatcc/flatcc_alloc.h a/nostrdb/flatcc/flatcc_alloc.h
     75 index 155364c1e2ba..c07462d57754 100644
     76 --- b/nostrdb/flatcc/flatcc_alloc.h
     77 +++ a/nostrdb/flatcc/flatcc_alloc.h
     78 @@ -69,7 +69,7 @@ extern "C" {
     79  #ifndef FLATCC_USE_GENERIC_ALIGNED_ALLOC
     80  
     81  #ifndef FLATCC_NO_PALIGNED_ALLOC
     82 -#include "flatcc/portable/paligned_alloc.h"
     83 +#include "paligned_alloc.h"
     84  #else
     85  #if !defined(__aligned_free_is_defined) || !__aligned_free_is_defined
     86  #define aligned_free free
     87 diff --git b/nostrdb/flatcc/flatcc_emitter.h a/nostrdb/flatcc/flatcc_emitter.h
     88 index b8c83b94d3de..11756f23f4d0 100644
     89 --- b/nostrdb/flatcc/flatcc_emitter.h
     90 +++ a/nostrdb/flatcc/flatcc_emitter.h
     91 @@ -16,9 +16,9 @@ extern "C" {
     92  #include <stdlib.h>
     93  #include <string.h>
     94  
     95 -#include "flatcc/flatcc_types.h"
     96 -#include "flatcc/flatcc_iov.h"
     97 -#include "flatcc/flatcc_alloc.h"
     98 +#include "flatcc_types.h"
     99 +#include "flatcc_iov.h"
    100 +#include "flatcc_alloc.h"
    101  
    102  /*
    103   * The buffer steadily grows during emission but the design allows for
    104 diff --git b/nostrdb/flatcc/flatcc_endian.h a/nostrdb/flatcc/flatcc_endian.h
    105 index 0592f3132380..d16f72c89a11 100644
    106 --- b/nostrdb/flatcc/flatcc_endian.h
    107 +++ a/nostrdb/flatcc/flatcc_endian.h
    108 @@ -66,7 +66,7 @@ extern "C" {
    109  #define htobe8(n) (n)
    110  #endif
    111  
    112 -#include "flatcc/flatcc_accessors.h"
    113 +#include "flatcc_accessors.h"
    114  
    115  /* This is the binary encoding endianness, usually LE for flatbuffers. */
    116  #if FLATBUFFERS_PROTOCOL_IS_LE
    117 diff --git b/nostrdb/flatcc/flatcc_epilogue.h a/nostrdb/flatcc/flatcc_epilogue.h
    118 index 496857ba1251..dc724f6c98ed 100644
    119 --- b/nostrdb/flatcc/flatcc_epilogue.h
    120 +++ a/nostrdb/flatcc/flatcc_epilogue.h
    121 @@ -4,5 +4,5 @@
    122  }
    123  #endif
    124  
    125 -#include "flatcc/portable/pdiagnostic_pop.h"
    126 +#include "pdiagnostic_pop.h"
    127  
    128 diff --git b/nostrdb/flatcc/flatcc_flatbuffers.h a/nostrdb/flatcc/flatcc_flatbuffers.h
    129 index 4bfc7435251a..210c9f2a420d 100644
    130 --- b/nostrdb/flatcc/flatcc_flatbuffers.h
    131 +++ a/nostrdb/flatcc/flatcc_flatbuffers.h
    132 @@ -4,7 +4,7 @@
    133   *
    134   * Outside include guard to handle scope counter.
    135   */
    136 -#include "flatcc/portable/pstatic_assert.h"
    137 +#include "pstatic_assert.h"
    138  
    139  #ifndef FLATCC_FLATBUFFERS_H
    140  #define FLATCC_FLATBUFFERS_H
    141 @@ -19,15 +19,15 @@ extern "C" {
    142  #ifdef FLATCC_PORTABLE
    143  #include "flatcc/flatcc_portable.h"
    144  #endif
    145 -#include "flatcc/portable/pwarnings.h"
    146 +#include "pwarnings.h"
    147  /* Needed by C99 compilers without FLATCC_PORTABLE. */
    148 -#include "flatcc/portable/pstdalign.h"
    149 +#include "pstdalign.h"
    150  
    151  /* Handle fallthrough attribute in switch statements. */
    152 -#include "flatcc/portable/pattributes.h"
    153 +#include "pattributes.h"
    154  
    155 -#include "flatcc/flatcc_alloc.h"
    156 -#include "flatcc/flatcc_assert.h"
    157 +#include "flatcc_alloc.h"
    158 +#include "flatcc_assert.h"
    159  
    160  #define __FLATBUFFERS_PASTE2(a, b) a ## b
    161  #define __FLATBUFFERS_PASTE3(a, b, c) a ## b ## c
    162 @@ -37,10 +37,10 @@ extern "C" {
    163   * "flatcc_endian.h" requires the preceeding include files,
    164   * or compatible definitions.
    165   */
    166 -#include "flatcc/portable/pendian.h"
    167 -#include "flatcc/flatcc_types.h"
    168 -#include "flatcc/flatcc_endian.h"
    169 -#include "flatcc/flatcc_identifier.h"
    170 +#include "pendian.h"
    171 +#include "flatcc_types.h"
    172 +#include "flatcc_endian.h"
    173 +#include "flatcc_identifier.h"
    174  
    175  #ifndef FLATBUFFERS_WRAP_NAMESPACE
    176  #define FLATBUFFERS_WRAP_NAMESPACE(ns, x) ns ## _ ## x
    177 diff --git b/nostrdb/flatcc/flatcc_json_parser.h a/nostrdb/flatcc/flatcc_json_parser.h
    178 index 1907fc7fc635..ed7151c2fd6b 100644
    179 --- b/nostrdb/flatcc/flatcc_json_parser.h
    180 +++ a/nostrdb/flatcc/flatcc_json_parser.h
    181 @@ -15,12 +15,12 @@ extern "C" {
    182  #include <stdlib.h>
    183  #include <string.h>
    184  
    185 -#include "flatcc/flatcc_rtconfig.h"
    186 -#include "flatcc/flatcc_builder.h"
    187 -#include "flatcc/flatcc_unaligned.h"
    188 +#include "flatcc_rtconfig.h"
    189 +#include "flatcc_builder.h"
    190 +#include "flatcc_unaligned.h"
    191  
    192  #define PDIAGNOSTIC_IGNORE_UNUSED
    193 -#include "flatcc/portable/pdiagnostic_push.h"
    194 +#include "pdiagnostic_push.h"
    195  
    196  enum flatcc_json_parser_flags {
    197      flatcc_json_parser_f_skip_unknown = 1,
    198 @@ -886,7 +886,7 @@ int flatcc_json_parser_struct_as_root(flatcc_builder_t *B, flatcc_json_parser_t
    199          const char *buf, size_t bufsiz, int flags, const char *fid,
    200          flatcc_json_parser_struct_f *parser);
    201  
    202 -#include "flatcc/portable/pdiagnostic_pop.h"
    203 +#include "pdiagnostic_pop.h"
    204  
    205  #ifdef __cplusplus
    206  }
    207 diff --git b/nostrdb/flatcc/flatcc_prologue.h a/nostrdb/flatcc/flatcc_prologue.h
    208 index 3a74ed6040db..36344c4c071f 100644
    209 --- b/nostrdb/flatcc/flatcc_prologue.h
    210 +++ a/nostrdb/flatcc/flatcc_prologue.h
    211 @@ -1,7 +1,7 @@
    212  /* Include guard intentionally left out. */
    213  
    214  #define PDIAGNOSTIC_IGNORE_UNUSED
    215 -#include "flatcc/portable/pdiagnostic_push.h"
    216 +#include "pdiagnostic_push.h"
    217  
    218  #ifdef __cplusplus
    219  extern "C" {
    220 diff --git b/nostrdb/flatcc/flatcc_refmap.h a/nostrdb/flatcc/flatcc_refmap.h
    221 index 062d94f5d35d..beafa301d042 100644
    222 --- b/nostrdb/flatcc/flatcc_refmap.h
    223 +++ a/nostrdb/flatcc/flatcc_refmap.h
    224 @@ -50,7 +50,7 @@
    225  extern "C" {
    226  #endif
    227  
    228 -#include "flatcc/flatcc_types.h"
    229 +#include "flatcc_types.h"
    230  
    231  #ifndef FLATCC_REFMAP_MIN_BUCKETS
    232  /* 8 buckets gives us 5 useful initial entries with a load factor of 0.7 */
    233 diff --git b/nostrdb/flatcc/flatcc_unaligned.h a/nostrdb/flatcc/flatcc_unaligned.h
    234 index a7dc546111cd..5ea26cede6ee 100644
    235 --- b/nostrdb/flatcc/flatcc_unaligned.h
    236 +++ a/nostrdb/flatcc/flatcc_unaligned.h
    237 @@ -5,7 +5,7 @@
    238  extern "C" {
    239  #endif
    240  
    241 -#include "flatcc/portable/punaligned.h"
    242 +#include "punaligned.h"
    243  
    244  #define FLATCC_ALLOW_UNALIGNED_ACCESS PORTABLE_UNALIGNED_ACCESS
    245  
    246 diff --git b/nostrdb/flatcc/json_parser.c a/nostrdb/flatcc/json_parser.c
    247 index 0e3aeea9834c..06f778da33f3 100644
    248 --- b/nostrdb/flatcc/json_parser.c
    249 +++ a/nostrdb/flatcc/json_parser.c
    250 @@ -1,6 +1,6 @@
    251 -#include "flatcc/flatcc_rtconfig.h"
    252 -#include "flatcc/flatcc_json_parser.h"
    253 -#include "flatcc/flatcc_assert.h"
    254 +#include "flatcc_rtconfig.h"
    255 +#include "flatcc_json_parser.h"
    256 +#include "flatcc_assert.h"
    257  
    258  #define uoffset_t flatbuffers_uoffset_t
    259  #define soffset_t flatbuffers_soffset_t
    260 @@ -16,8 +16,8 @@
    261  #if FLATCC_USE_GRISU3 && !defined(PORTABLE_USE_GRISU3)
    262  #define PORTABLE_USE_GRISU3 1
    263  #endif
    264 -#include "flatcc/portable/pparsefp.h"
    265 -#include "flatcc/portable/pbase64.h"
    266 +#include "portable/pparsefp.h"
    267 +#include "portable/pbase64.h"
    268  
    269  #if FLATCC_USE_SSE4_2
    270  #ifdef __SSE4_2__
    271 diff --git b/nostrdb/flatcc/refmap.c a/nostrdb/flatcc/refmap.c
    272 index a2497f02247b..d8c6034fbb12 100644
    273 --- b/nostrdb/flatcc/refmap.c
    274 +++ a/nostrdb/flatcc/refmap.c
    275 @@ -13,10 +13,10 @@
    276  #include <stdlib.h>
    277  #include <string.h>
    278  
    279 -#include "flatcc/flatcc_rtconfig.h"
    280 -#include "flatcc/flatcc_refmap.h"
    281 -#include "flatcc/flatcc_alloc.h"
    282 -#include "flatcc/flatcc_assert.h"
    283 +#include "flatcc_rtconfig.h"
    284 +#include "flatcc_refmap.h"
    285 +#include "flatcc_alloc.h"
    286 +#include "flatcc_assert.h"
    287  
    288  #define _flatcc_refmap_calloc FLATCC_CALLOC
    289  #define _flatcc_refmap_free FLATCC_FREE