Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aeedd078 authored by Erwin Jansen's avatar Erwin Jansen
Browse files

Compilation fixes for MSVC

This makes a few changes to compile the libary under clang-cl targeting
windows 10.

- We cannot cast a path to std::string in msvc
- Incorrect function names for generated code, causing linker failures
  under windows.

Bug: 186568522
Test: Can successfully build packet gen as part of android emulator
Change-Id: I0edebc3bf459669998295dfbee08df30d4381ff8
parent 47ee7b32
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ void parse_namespace(
    const std::filesystem::path& input_file_relative_path,
    std::vector<std::string>* token) {
  std::filesystem::path gen_namespace = root_namespace / input_file_relative_path;
  std::string gen_namespace_str = gen_namespace;
  std::string gen_namespace_str = gen_namespace.u8string();
  std::regex path_tokenizer("/");
  auto it = std::sregex_token_iterator(gen_namespace_str.cbegin(), gen_namespace_str.cend(), path_tokenizer, -1);
  std::sregex_token_iterator it_end = {};
+3 −2
Original line number Diff line number Diff line
@@ -31,8 +31,9 @@

#include "language_y.h"

void yylex_init(void**);
void yylex_destroy(void*);

int yylex_init(void**);
int yylex_destroy(void*);
void yyset_debug(int, void*);
void yyset_in(FILE*, void*);