[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freeipmi-devel] Minor portability fixes in freeipmi-1.2.8
From: |
John Gilmore |
Subject: |
[Freeipmi-devel] Minor portability fixes in freeipmi-1.2.8 |
Date: |
Wed, 03 Jul 2013 00:38:04 -0700 |
I built 1.2.8 on an old Red Hat 7.3 system and noticed three minor
problems, all easily remedied. Two are executable statements intermixed
with declarations, which gcc-2.96 complained about. (One of the
executable statements is a null statement, caused by an extra semicolon
in a macro definition.)
The third is a bizarre use of the C preprocessor to do inclusion in
man pages. cpp-2.96 needs --traditional in order to not choke on
stray single and double quotes in the man pages. I didn't provide a
diff for this because the real fix is to not use a C language
preprocessor for non-C text (and because the --traditional
circumvention would be buried deep in some non-scrutable autoconf glop).
If you're interested, I'm happy to build the 1.3.0-beta0 release and
see if it has any similar portability problems.
John Gilmore
diff -ru freeipmi-1.2.8/ipmiseld/ipmiseld-common.c
freeipmi-1.2.8-rh73fixes/ipmiseld/ipmiseld-common.c
--- freeipmi-1.2.8/ipmiseld/ipmiseld-common.c Fri Jun 21 13:50:30 2013
+++ freeipmi-1.2.8-rh73fixes/ipmiseld/ipmiseld-common.c Wed Jul 3 00:11:17 2013
@@ -212,11 +212,11 @@
...)
{
char buf[IPMISELD_ERR_BUFLEN + 1];
- memset (buf, '\0', IPMISELD_ERR_BUFLEN + 1);
va_list ap;
assert (host_data);
assert (message);
+ memset (buf, '\0', IPMISELD_ERR_BUFLEN + 1);
va_start (ap, message);
vsnprintf(buf, IPMISELD_ERR_BUFLEN, message, ap);
diff -ru freeipmi-1.2.8/libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h
freeipmi-1.2.8-rh73fixes/libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h
--- freeipmi-1.2.8/libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h Fri Jun
21 13:47:33 2013
+++ freeipmi-1.2.8-rh73fixes/libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h
Tue Jul 2 23:48:03 2013
@@ -320,7 +320,7 @@
|
IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_MAX_CONNECTIONS_FIELD_MASK \
|
IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_ACTIVE_CONNECTIONS_FIELD_MASK \
| IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_IDLE_TIMEOUT_FIELD_MASK \
- | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_PORT_NUMBER_FIELD_MASK);
+ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_PORT_NUMBER_FIELD_MASK)
/* w/ IPMI_OEM_DELL_TOKEN_ID_TELNET_CONFIGURATION
*
- [Freeipmi-devel] Minor portability fixes in freeipmi-1.2.8,
John Gilmore <=