Skip to content

Commit

Permalink
Fix build on Windows (MINGW64) with internal debugging enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
chpock committed Aug 5, 2024
1 parent 41345fb commit 55a2e3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-08-05 Konstantin Kushnir <[email protected]>
* Fix build on Windows (MINGW64) with internal debugging enabled

2024-08-04 Konstantin Kushnir <[email protected]>
* Use memory-mapped file for readonly mounts

Expand Down
14 changes: 10 additions & 4 deletions generic/cookfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@
#ifdef COOKFS_INTERNAL_DEBUG

#ifndef __FUNCTION_NAME__
#ifdef _WIN32 // WINDOWS
#define __FUNCTION_NAME__ __FUNCTION__
#else // GCC
#define __FUNCTION_NAME__ __func__
#if defined(__STDC_VERSION__)
#if __STDC_VERSION__ >= 199901L
#define __FUNCTION_NAME__ __func__
#elif defined(__GNUC__) && __GNUC__ >= 2
#define __FUNCTION_NAME__ __FUNCTION__
#endif
#elif defined(_MSC_VER)
#define __FUNCTION_NAME__ __FUNCTION__
#else
#define __FUNCTION_NAME__ "<unknown func>"
#endif
#endif

Expand Down

0 comments on commit 55a2e3e

Please sign in to comment.