in reply to [OT] "conflicting types" in C headers.
That's the problem with C's flat namespace. C++ namespaces address that, but at significant cost.
One possibility is to add something like:
#if defined( _WINREG_H ) && !defined( _PROJECT_H ) typedef PVALUEA PVALUE; #elif defined( _PROJECT_H ) && !defined( _WINREG_H ) typedef union { double f; int i; char *s; } PVALUE; #else assert( "File " __FILE__ "requires PVALUE defined from both winreg.h a +nd project.h" == NULL ); #endif
That probably doesn't compile anywhere, but you get the idea.
|
|---|