WinUAE builds the imported PCem graphics sources as C++ files.
The MGA source includes C atomics directly, and the BT482 RAMDAC
source uses C allocation declarations through C++ headers.
Use C++ atomics when compiling MGA as C++, and include the C++
cstdlib wrapper where the BT482 RAMDAC needs those declarations.
/* BT482 RAMDAC (based on 86box BT484) */
#include <memory>
+#include <cstdlib>
#include "ibm.h"
#include "mem.h"
#include "device.h"
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
+#ifdef __cplusplus
+#include <atomic>
+using std::atomic_bool;
+using std::atomic_int;
+using std::atomic_uint;
+#else
#include <stdatomic.h>
+#endif
#include "ibm.h"
#include "device.h"
#include "io.h"