1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2010-2015 L-SMASH project
6 * Authors: Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>
7 * Takashi Hirata <silverfilain@gmail.com>
9 * Permission to use, copy, modify, and/or distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies.
13 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 *****************************************************************************/
22 /* This file is available under an ISC license. */
27 #define _FILE_OFFSET_BITS 64
28 #define _LARGEFILE_SOURCE
30 #if defined( _MSC_VER )
31 #define lsmash_fseek _fseeki64
32 #define lsmash_ftell _ftelli64
33 #elif defined( __MINGW32__ )
34 #define lsmash_fseek fseeko64
35 #define lsmash_ftell ftello64
37 #define _POSIX_C_SOURCE 200809L
38 #define lsmash_fseek fseeko
39 #define lsmash_ftell ftello
43 #define inline __inline
44 #define _CRT_SECURE_NO_WARNINGS
49 FILE *lsmash_win32_fopen( const char *name
, const char *mode
);
50 # define lsmash_fopen lsmash_win32_fopen
52 # define lsmash_fopen fopen
57 int lsmash_string_to_wchar( int cp
, const char *from
, wchar_t **to
);
58 int lsmash_string_from_wchar( int cp
, const wchar_t *from
, char **to
);