[collectd] More AIX stuff
Andrés J. Díaz
ajdiaz at connectical.com
Fri Mar 5 21:31:04 CET 2010
Hi again :)
> Here are some minor patches to AIX port of collectd. The first one
> (aix-test-htonll) adds support to check if the htonl and htonll
> functions (which are used in AIX port) are available in
> configure. Until now the AIX port used these functions without
> perform any existence test.
Because of some weird cosmics phenomena, the previous htonll patch contains
an error :). The check function always return true for htonll search,
even if function
was not present in the library. We hope that this patch fix the bug
and apologies
for any troubles caused.
[Mental note: We must prove the AIX patches in Linux too... :P]
> Finally port the multimeter plugin too, which do not compile in AIX
> without an explicit cast for TIOCMBIC (don't ask). May forcing a cast is
> not very elegant for other os... What do you think, Florian?
> Maybe we could use here a per-os #ifdef?
To put more light on this, here are the gcc warning which need to avoid using
a cast:
multimeter.c: In function 'multimeter_init':
multimeter.c:173: warning: overflow in implicit constant conversion
As bonus here are a brief explanation about how to compile for AIX and
the meaning of the gcc options:
OBJECT_MODE=64 ./configure LDFLAGS="-Wl,-brtl" \
CFLAGS="-maix64 -D_THREAD_SAFE_ERRNO"
OBJECT_MODE=64 make
The OBJECT_MODE=64 Switch to development environment in 64 bits
platform. AIX tools uses the
OBJECT_MODE var to determine the object type to be used or created.
The flag "-maix64" configure gcc to create 64bits executable for AIX.
The define '_THREAD_SAFE_ERRNO' is required because aix do not use a
safely thread errno variable.
The flags "-Wl,-brtl" enabling the run-time linking.
Best regards,
Andrés
P.S.: We've used collectd in our AIX systems for months without any
troubles (yet), so IMHO
i could tag the port as "enough stable".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd-aix-test-htonll.patch
Type: application/octet-stream
Size: 917 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100305/473f2b89/attachment.obj
More information about the collectd
mailing list