diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-07-12 15:27:28 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-07-12 15:27:28 +0400 |
commit | 6902b88b0b628d76fd5997ff138247c23a903064 (patch) | |
tree | 0242d3d1eddb576af51bad51b51e3b1ecc82e89f /winsup/cygwin/winlean.h | |
parent | 568e72f5615151ca372f469780b09006023f13af (diff) |
* winlean.h: Make sure certain Windows macros are undefined again.
Add comment to explain why.
* winsup.h: Include winlean.h from C sources as well.
* libc/minires-os-if.c: Drop including ntdef.h.
Fix previous ChangeLog entry.
Diffstat (limited to 'winsup/cygwin/winlean.h')
-rw-r--r-- | winsup/cygwin/winlean.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h index c65132a3d..950bd1dec 100644 --- a/winsup/cygwin/winlean.h +++ b/winsup/cygwin/winlean.h @@ -35,11 +35,48 @@ details. */ #define WINIMPM #define WINSOCK_API_LINKAGE +/* Windows headers define a couple of annoyingly intrusive macros for the + sole purpose of inline documentation. Since they are defined without + respect for the namespace and not undef'ed anymore, they tend to collide + with otherwise innocent definitions in the application. We check if they + exist and if not, we undef them again after including the Windows headers. */ +#ifndef IN +#define __undef_IN +#endif +#ifndef OUT +#define __undef_OUT +#endif +#ifndef OPTIONAL +#define __undef_OPTIONAL +#endif +#ifndef NOTHING +#define __undef_NOTHING +#endif +#ifndef CRITICAL +#define __undef_CRITICAL +#endif + #include <windows.h> #include <wincrypt.h> #include <lmcons.h> #include <ntdef.h> +#ifdef __undef_IN +#undef IN +#endif +#ifdef __undef_OUT +#undef OUT +#endif +#ifdef __undef_OPTIONAL +#undef OPTIONAL +#endif +#ifdef __undef_NOTHING +#undef NOTHING +#endif +#ifdef __undef_CRITICAL +#undef CRITICAL +#endif + #undef _WINGDI_H #undef _WINUSER_H #undef _WINNLS_H |