AMR importer: Apply refined bytestream reader.
[L-SMASH.git] / common / osdep.h
blob4305eeb6a33a8088d3d7aa289cb26f1c96e0e520
1 /*****************************************************************************
2 * osdep.h:
3 *****************************************************************************
4 * Copyright (C) 2010-2014 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. */
24 #ifndef OSDEP_H
25 #define OSDEP_H
27 #define _FILE_OFFSET_BITS 64
28 #define _LARGEFILE_SOURCE
30 #ifdef __MINGW32__
31 #define lsmash_fseek fseeko64
32 #define lsmash_ftell ftello64
33 #endif
35 #ifdef _WIN32
36 # include <stdio.h>
37 FILE *lsmash_win32_fopen( const char *name, const char *mode );
38 # define lsmash_fopen lsmash_win32_fopen
39 #else
40 # define lsmash_fopen fopen
41 #endif
43 #ifdef _WIN32
44 # include <wchar.h>
45 int lsmash_string_to_wchar( int cp, const char *from, wchar_t **to );
46 int lsmash_string_from_wchar( int cp, const wchar_t *from, char **to );
47 #endif
49 #endif