]> git.proxmox.com Git - mirror_ovs.git/blame - lib/stdio.h.in
ovsdb-idl: Fix *_is_new() IDL functions.
[mirror_ovs.git] / lib / stdio.h.in
CommitLineData
cde1c287
BP
1/*
2 * Copyright (c) 2013 Nicira, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#@INCLUDE_NEXT@ @NEXT_STDIO_H@
18
19#if !defined STDIO_H_WRAPPER
20#define STDIO_H_WRAPPER 1
21
22#ifdef _WIN32
23
24#include <stdarg.h>
25#include <stddef.h>
f69aa256 26#include <sys/types.h>
cde1c287
BP
27
28/* Windows libc has defective snprintf() and vsnprintf():
29 *
30 * - They return -1 if the output won't fit.
31 *
32 * - They don't null-terminate the output if it won't fit.
33 *
34 * We need working versions so here we define substitutes. */
35#undef snprintf
36#define snprintf ovs_snprintf
37int ovs_snprintf(char *, size_t, const char *, ...);
38
39#undef vsnprintf
40#define vsnprintf ovs_vsnprintf
41int ovs_vsnprintf(char *, size_t, const char *, va_list);
f69aa256
GS
42
43int fseeko(FILE *stream, off_t offset, int whence);
cde1c287
BP
44#endif /* _WIN32 */
45
46#endif /* stdio.h wrapper */