Skip to content

Commit

Permalink
an attempt to fix for msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
Arniiiii committed Oct 2, 2024
1 parent 7ab0a46 commit 672894f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,36 @@ SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: 'true'
SpaceInEmptyBlock: true
Standard: 'Latest'
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 1
SortPriority: 3
CaseSensitive: true
- Regex: '^(<|")(windows.h)'
Priority: 1
SortPriority: 1
- Regex: '^(<|")(processthreadsapi.h)'
Priority: 2
SortPriority: 2
- Regex: '<[[:alnum:].]+>'
Priority: 5
SortPriority: 1
- Regex: '<[[:alnum:].]+_+[[:alnum:].]+>'
Priority: 5
SortPriority: 4
- Regex: '^((<|")(gtest|gmock|isl|json)/)'
Priority: 8
SortPriority: 5
- Regex: '^((<|")(fmt/|fmtlog/))'
Priority: 11
SortPriority: 6
- Regex: '^(<|")(arby)'
Priority: 8
SortPriority: 100
- Regex: '^(<|")./'
Priority: 10
SortPriority: 101
- Regex: '^(<|")(.*)'
Priority: 15
SortPriority: 7
...
4 changes: 1 addition & 3 deletions include/fmtlog/fmtlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ SOFTWARE.
#include <chrono>
#include <memory>
#include <thread>
#include <type_traits>
#include <vector>
#include <type_traits>

#include "fmt/format.h"

Expand All @@ -39,8 +39,6 @@ SOFTWARE.

#ifdef _WIN32
#define FAST_THREAD_LOCAL thread_local
#include <windows.h>
#include <processthreadsapi.h>
#else
#define FAST_THREAD_LOCAL __thread
#endif
Expand Down
6 changes: 4 additions & 2 deletions include/fmtlog/internal/fmtlog-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ SOFTWARE.
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <processthreadsapi.h>
#include <windows.h>

#include <processthreadsapi.h>
#else
#include <sys/syscall.h>
#include <unistd.h>

#include <sys/syscall.h>
#endif

namespace
Expand Down
1 change: 0 additions & 1 deletion test/src/enc_dec_test.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <assert.h>

#include <iostream>

#include "fmt/ranges.h"
Expand Down

0 comments on commit 672894f

Please sign in to comment.