Skip to content

Commit

Permalink
private/windows.h: guard against _ANONYMOUS_UNION/STRUCT redefinition
Browse files Browse the repository at this point in the history
It's already defined in Cygwin's /usr/include/w32api/_mingw.h

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Jun 29, 2022
1 parent 62e2598 commit c91712e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions include/private/windows.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
/*
* Copyright © 2009 Université Bordeaux
* Copyright © 2020 Inria. All rights reserved.
* Copyright © 2020-2022 Inria. All rights reserved.
*
* See COPYING in top-level directory.
*/

#ifndef HWLOC_PRIVATE_WINDOWS_H
#define HWLOC_PRIVATE_WINDOWS_H

#ifndef _ANONYMOUS_UNION
#ifdef __GNUC__
#define _ANONYMOUS_UNION __extension__
#define _ANONYMOUS_STRUCT __extension__
#else
#define _ANONYMOUS_UNION
#endif /* __GNUC__ */
#endif /* _ANONYMOUS_UNION */

#ifndef _ANONYMOUS_STRUCT
#ifdef __GNUC__
#define _ANONYMOUS_STRUCT __extension__
#else
#define _ANONYMOUS_STRUCT
#endif /* __GNUC__ */
#endif /* _ANONYMOUS_STRUCT */

#define DUMMYUNIONNAME
#define DUMMYSTRUCTNAME

Expand Down

0 comments on commit c91712e

Please sign in to comment.