Skip to content

Commit

Permalink
WinCon: define all of PDC_WIDE, UNICODE, _UNICODE if one of those are…
Browse files Browse the repository at this point in the history
… defined

Per MSDN one should always define both macros, as they are used in different contexts, but must match.
The definition of `UNICODE` can also be provided by the build environment, especially with MSVC, in which case PDC_WIDE must be defined as well.
  • Loading branch information
GitMensch authored Sep 19, 2024
1 parent d2f479a commit e30b2b7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions wincon/pdcwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@
#define PDC_WIDE
#endif

#if defined(PDC_WIDE) && !defined(UNICODE)
# define UNICODE
#if defined( PDC_WIDE) || defined( UNICODE) || defined( _UNICODE)
#if !defined( PDC_WIDE)
# define PDC_WIDE
#endif
#if !defined( UNICODE)
# define UNICODE
#endif
#if !defined( _UNICODE)
# define _UNICODE
#endif
#endif

#define WIN32_LEAN_AND_MEAN
Expand Down

0 comments on commit e30b2b7

Please sign in to comment.