[Nut-upsdev] nut on Solaris8 compilation problem

Arjen de Korte nut+devel at de-korte.org
Sat Dec 1 20:43:12 UTC 2007


Arjen de Korte wrote:

> We probably need to include <sys/types.h> for older versions of Solaris in
> this test. Earlier versions are notorious for not following the POSIX
> standards in this regard (it should be defined in <stdint.h> and that's
> where we look for it). We include both in "common.h", so this shouldn't be
> a problem.

In retrospect, I think we should remove NUT_TYPE_UINT8_T and
NUT_TYPE_UINT16_T from 'configure.in'.

First of all, they currently only consider the <stdint.h>, where we
could expect the definitions in <inittypes.h> or something useable in
<sys/types.h>. So we would need to consider those too. However, we also
use int16_t, int32_t and uint32_t in NUT without providing possible
replacements at the moment. Nobody has complained about any problems in
that area, so I very much doubt that we will need them for uint8_t and
uint16_t either.

In order to fix the above omissions, might include the following

	http://autoconf-archive.cryp.to/ax_create_stdint_h.html

This will create everything in one go.

Lastly, we could use the (newer) autoconf macros

	AC_TYPE_INT8_T
	AC_TYPE_UINT8_T
	AC_TYPE_INT16_T
	AC_TYPE_UINT16_T
	AC_TYPE_INT32_T
	AC_TYPE_UINT32_T

These have been available only since autoconf 2.60, so using them is
probably creating more problems than it might solve.

Best regards, Arjen



More information about the Nut-upsdev mailing list