diff --git a/src/libCom/osi/os/WIN32/osdWireConfig.h b/src/libCom/osi/os/WIN32/osdWireConfig.h new file mode 100644 index 000000000..913ff71a8 --- /dev/null +++ b/src/libCom/osi/os/WIN32/osdWireConfig.h @@ -0,0 +1,16 @@ +// +// WIN32 version of +// osdWireConfig.h +// +// Author Jeffrey O. Hill +// johill@lanl.gov +// + +#ifndef osdWireConfig_h +#define osdWireConfig_h + +// for now, assume that win32 runs only on generic little endian +#define EPICS_BYTE_ORDER EPICS_ENDIAN_LITTLE +#define EPICS_FLOAT_WORD_ORDER EPICS_BYTE_ORDER + +#endif // ifdef osdWireConfig_h \ No newline at end of file diff --git a/src/libCom/osi/os/default/osdWireConfig.h b/src/libCom/osi/os/default/osdWireConfig.h new file mode 100644 index 000000000..a19b12c75 --- /dev/null +++ b/src/libCom/osi/os/default/osdWireConfig.h @@ -0,0 +1,58 @@ +// +// Default version of osdWireConfig.h that might +// work on UNIX like systems that define +// +// Author Jeffrey O. Hill +// johill@lanl.gov +// + +#ifndef osdWireConfig_h +#define osdWireConfig_h + +// if compilation fails because this wasnt found then you may need to define an OS +// specific osdWireConfig.h +#include + +#ifdef __BYTE_ORDER +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define EPICS_BYTE_ORDER EPICS_ENDIAN_LITTLE +# elif __BYTE_ORDER == __BIG_ENDIAN +# define EPICS_BYTE_ORDER EPICS_ENDIAN_BIG +# else +# error EPICS hasn’t been ported to run on the specified __BYTE_ORDER +# endif +#else +# ifdef BYTE_ORDER +# if BYTE_ORDER == LITTLE_ENDIAN +# define EPICS_BYTE_ORDER EPICS_ENDIAN_LITTLE +# elif BYTE_ORDER == BIG_ENDIAN +# define EPICS_BYTE_ORDER EPICS_ENDIAN_BIG +# else +# error EPICS hasn’t been ported to run on the specified BYTE_ORDER +# endif +# else +# error doesnt specify __BYTE_ORDER or BYTE_ORDER - is an OS specific osdWireConfig.h needed? +# endif +#endif + +#ifdef __FLOAT_WORD_ORDER +# if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN +# define EPICS_FLOAT_WORD_ORDER EPICS_ENDIAN_LITTLE +# elif __FLOAT_WORD_ORDER == __BIG_ENDIAN +# define EPICS_FLOAT_WORD_ORDER EPICS_ENDIAN_BIG +# else +# error EPICS hasn’t been ported to specified __FLOAT_WORD_ORDER +# endif +#else +# if FLOAT_WORD_ORDER == LITTLE_ENDIAN +# define EPICS_FLOAT_WORD_ORDER EPICS_ENDIAN_LITTLE +# elif FLOAT_WORD_ORDER == BIG_ENDIAN +# define EPICS_FLOAT_WORD_ORDER EPICS_ENDIAN_BIG +# else + // make the assumption that if __FLOAT_WORD_ORDER and FLOAT_WORD_ORDER + // arent defined then weird fp ordered archs like arm nwfp aren't supported +# define EPICS_FLOAT_WORD_ORDER EPICS_BYTE_ORDER +# endif +#endif + +#endif // ifdef osdWireConfig_h \ No newline at end of file