Skip to content

Commit

Permalink
Avoid pascal macro conflict when working on mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
Raghunandan Netrapalli Madhusudhan authored and nholthaus committed Dec 9, 2024
1 parent baeecac commit 02d8db7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/units.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
# endif // _MSC_VER < 1800
#endif // _MSC_VER

#if defined(__MINGW64__) || defined(__MINGW32__)
# pragma push_macro("pascal")
# undef pascal
#endif // __MINGW64__ or __MINGW32__

#if !defined(_MSC_VER) || _MSC_VER > 1800
# define UNIT_HAS_LITERAL_SUPPORT
# define UNIT_HAS_VARIADIC_TEMPLATE_SUPPORT
Expand Down Expand Up @@ -4925,6 +4930,10 @@ namespace std
# pragma pop_macro("pascal")
#endif // _MSC_VER

#if defined(__MINGW64__) || defined(__MINGW32__)
# pragma pop_macro("pascal")
#endif // __MINGW64__ or __MINGW32__

#endif // units_h__

// For Emacs
Expand Down

0 comments on commit 02d8db7

Please sign in to comment.