Platform detection in the external IRMP library works best when either
the WIN32 or the unix identifiers are provided, which the sigrokdecode
build environment derives from other identifiers which are more reliably
available.
It turns out that other external dependencies like glib or Python may
provide some of these identifiers, too. Which results in the compiler
warning about symbols' redefinition. Only define derived identifiers
when they haven't been provided yet.
This amends commit
ab88bae1c7b9.
* upstream project.
*/
#if defined _WIN32
-# define WIN32
+# if !defined WIN32
+# define WIN32
+# endif
#else
-# define unix
+# if !defined unix
+# define unix
+# endif
#endif
#include "irmp.h"
#include "irmp.c"