diff options
author | VMware, Inc <> | 2013-09-17 20:31:22 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-09-22 22:13:29 -0700 |
commit | b086090409081a4efdad46f6fba27df1b94f916a (patch) | |
tree | dd03b73a6dbbbef1c01d81d10be58949785685bd | |
parent | e6117c29424490908f1abbbe135cbdaef66258af (diff) |
Changes in shared code that don't affect open-vm-tools functionality.
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
-rw-r--r-- | open-vm-tools/lib/include/util.h | 4 | ||||
-rw-r--r-- | open-vm-tools/lib/misc/msgfmt.c | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/open-vm-tools/lib/include/util.h b/open-vm-tools/lib/include/util.h index d28054d5..f40c6b09 100644 --- a/open-vm-tools/lib/include/util.h +++ b/open-vm-tools/lib/include/util.h @@ -32,7 +32,9 @@ #include <stdarg.h> #include <string.h> +#ifndef VMKBOOT #include <stdlib.h> +#endif #ifdef _WIN32 #ifdef USERLEVEL @@ -470,6 +472,7 @@ Util_ZeroString(char *str) // IN/OUT } +#ifndef VMKBOOT /* *----------------------------------------------------------------------------- * @@ -610,6 +613,7 @@ Util_FreeStringList(char **list, // IN/OUT: the list to free { Util_FreeList((void **) list, length); } +#endif #ifndef _WIN32 /* diff --git a/open-vm-tools/lib/misc/msgfmt.c b/open-vm-tools/lib/misc/msgfmt.c index ab80adb3..f3b7826b 100644 --- a/open-vm-tools/lib/misc/msgfmt.c +++ b/open-vm-tools/lib/misc/msgfmt.c @@ -917,10 +917,12 @@ MsgFmt_GetArgsWithBuf(const char *fmt, // IN: format string a->v.unsigned64 = (uint64) (uintptr_t) va_arg(va, void *); break; +#ifndef NO_FLOATING_POINT case MSGFMT_ARG_FLOAT64: - ASSERT_ON_COMPILE(sizeof (double) == 8); - a->v.float64 = va_arg(va, double); + ASSERT_ON_COMPILE(sizeof (double) == 8); + a->v.float64 = va_arg(va, double); break; +#endif case MSGFMT_ARG_STRING8: { const char *p = va_arg(va, char *); @@ -1197,6 +1199,7 @@ MsgFmtGetArg1(void *clientData, // IN: state case 'G': case 'a': case 'A': +#ifndef NO_FLOATING_POINT switch (lengthMod) { // l h hh t z are not defined by man page, but allowed by glibc case '\0': @@ -1228,6 +1231,13 @@ MsgFmtGetArg1(void *clientData, // IN: state NOT_REACHED(); } break; +#else + MsgFmtError(state, + "MsgFmtGetArg1: %%%c%c not supported, " + "pos \"%.*s\", type \"%.*s\"", + lengthMod, conversion, posSize, pos, typeSize, type); + return -2; +#endif /*! NO_FLOATING_POINT */ case 'c': switch (lengthMod) { |