Don't try to use 'typedef struct foo' if just 'struct foo' makes more sense

and works on all compilers.  This also removes the need for
__CC_SUPPORTS_FORWARD_REFERENCE_CONSTRUCT in <sys/cdefs.h>.

OK'ed by:	marcel, dfr
This commit is contained in:
Stefan Farfeleder 2005-03-07 15:38:37 +00:00
parent e68c6390f4
commit ea8b0ab337
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143250
2 changed files with 1 additions and 25 deletions

View File

@ -231,17 +231,7 @@ typedef uint32_t UINTN;
#endif /* EFI_FW_NT */
/*
* Some compilers don't support the forward reference construct:
* typedef struct XXXXX
*
* The following macro provide a workaround for such cases.
*/
#ifdef NO_INTERFACE_DECL
#define INTERFACE_DECL(x)
#else
#define INTERFACE_DECL(x) typedef struct x
#endif
#define INTERFACE_DECL(x) struct x
#if _MSC_EXTENSIONS
#pragma warning ( disable : 4731 )

View File

@ -131,18 +131,4 @@ void __mf (void);
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
(_if)->LoadInternal(type, name, entry)
/*
* Some compilers don't support the forward reference construct:
* typedef struct XXXXX
*
* The following macro provide a workaround for such cases.
*/
#ifdef NO_INTERFACE_DECL
#define INTERFACE_DECL(x)
#else
#ifdef __CC_SUPPORTS_FORWARD_REFERENCE_CONSTRUCT
#define INTERFACE_DECL(x) struct x
#else
#define INTERFACE_DECL(x) typedef struct x
#endif
#endif