[Rpcemu] CMOS clock in Linux - issue RPCI003

Theo Markettos rpcemu at markettos.org.uk
Sun Dec 14 07:54:01 EST 2008

On Sat, Dec 13, 2008 at 10:39:19PM +0100, Kees Grinwis wrote:
> 2008/12/10 Theo Markettos <rpcemu at markettos.org.uk>:
> The purpose of the flags would be to get rid of the __linux and _WIN32
> || WIN32 (etc) defines.
> The best way to do that seemed to be to introduce a few RPCEmu specific defines.

That would make sense - particularly for Windows where different compilers
may define different things.

> Checking for features is always better, however is the automake
> configuration also supported in a Windows and Mac OS X environment?

People more knowledgeable than me can probably comment, but I think that Mac
OS X uses the autoconf system (or it's easy to install).  For any systems
that don't, you can do:

#ifdef _WIN32
#include "config-win.h"
#elseif (AMIGA)
#include "config-amiga.h"
#include "config.h"

Where config-XXX.h includes a series of macros as output by ./configure:
#define STDC_HEADERS 1
and config.h is the autoconf output.

> Although we could introduce an RPCEMU_WIN32 define which must be set
> in the Windows configuration and use the autoconf option on all other
> platforms.

RPCEmu seems to have this produced by autoconf in any case:
/* OS is Linux */

/* OS is Mac OS X */
/* #undef RPCEMU_MACOSX */

/* OS is Windows */
/* #undef RPCEMU_WIN */

> OK, then above solution would be feasable. (Use autoconf on Linux (and
> Mac OS X?) and use the DNAME=value syntax in a Win32 environment.

Using config.h would seem to be a way to do that without a huge command


More information about the Rpcemu mailing list