1
/*********************************************************
2
* Copyright (C) 2008 VMware, Inc. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License as published
6
* by the Free Software Foundation version 2.1 and no later version.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
* or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
11
* License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program; if not, write to the Free Software Foundation, Inc.,
15
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
*********************************************************/
20
* stub-msgfmt-fbsd.c --
22
* FreeBSD-specific stubs for lib/misc/msgfmt.c. This stubs out two
23
* specific funtions in that file - MsgFmt_Asprintf and MsgFmt_Snprintf,
24
* which don't have FreeBSD implementations in our code base.
26
* Tools don't really use the Msg_* functions for error reporting and etc,
27
* so this is easier than getting all that stuff to compile on FreeBSD.
29
* The stubs won't assert, but they're sort of dumb: they'll just
30
* print the format string with no substitutions to the output.
37
MsgFmt_Snprintf(char *buf, // OUT: formatted string
38
size_t size, // IN: size of buffer
39
const char *format, // IN: format
40
const MsgFmt_Arg *args, // IN: message arguments
41
int numArgs) // IN: number of arguments
43
return Str_Snprintf(buf, size, "%s", format);
48
MsgFmt_Asprintf(size_t *length, // OUT: length of returned string
49
const char *format, // IN: format
50
const MsgFmt_Arg *args, // IN: message arguments
51
int numArgs) // IN: number of arguments
53
return Str_Asprintf(length, "%s", format);