source: azure_iot_hub/trunk/azure_iothub/c-utility/src/gb_stdio.c@ 389

Last change on this file since 389 was 389, checked in by coas-nagasima, 5 years ago

ビルドが通るよう更新

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
File size: 1.4 KB
Line 
1// Copyright (c) Microsoft. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
4/*depending if the symbol GB_STDIO_INTERCEPT is defined, this file does the following
5
6 a) if GB_STDIO_INTERCEPT is NOT defined, then the file shall be empty (almost:)
7 b) if GB_STDIO_INTERCEPT is defined, then the file shall call to the 'real' stdio.h functions from their gb_* synonyms*/
8#ifdef _MSC_VER
9/* compiler warning C4206: nonstandard extension used: translation unit is empty */
10/* linker warning 4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library */
11const int avoid_warnings_B9EB480E_6AE7_43B3_9249_47993776BA7B = 0;
12#endif
13#ifdef GB_STDIO_INTERCEPT
14
15#ifdef __cplusplus
16#include <cstdio>
17#include <cstdarg>
18#else
19#include <stdio.h>
20#include <stdarg.h>
21#endif
22
23#include "azure_c_shared_utility/gb_stdio.h"
24
25/*this is fopen*/
26FILE *gb_fopen(const char * filename, const char * mode)
27{
28 return fopen(filename, mode);
29}
30
31int gb_fclose(FILE *stream)
32{
33 return fclose(stream);
34}
35
36int gb_fseek(FILE *stream, long int offset, int whence)
37{
38 return fseek(stream, offset, whence);
39}
40
41long int gb_ftell(FILE *stream)
42{
43 return ftell(stream);
44}
45
46int fprintf(FILE * stream, const char * format, ...)
47{
48 va_list args;
49 va_start(args, format);
50 vfprintf(stream, format, args);
51 va_end(args);
52}
53
54#endif
Note: See TracBrowser for help on using the repository browser.