/*****************************************************************************
 * internal.h:
 *****************************************************************************
 * Copyright (C) 2010-2012 L-SMASH project
 *
 * Authors:  Takashi Hirata <silverfilain@gmail.com>
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *****************************************************************************/

/* This file is available under an ISC license. */

#ifndef INTERNAL_H
#define INTERNAL_H

#include "common/osdep.h" /* must be placed before stdio.h */
#include <stdio.h>
#include <assert.h>

#ifndef lsmash_fseek
#define lsmash_fseek fseek
#define lsmash_ftell ftell
#endif

#include "lsmash.h"

#endif

/*****************************************************************************
 * internal.h:
 *****************************************************************************
 * Copyright (C) 2010-2012 L-SMASH project
 *
 * Authors:  Takashi Hirata <silverfilain@gmail.com>
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *****************************************************************************/

/* This file is available under an ISC license. */

#ifndef INTERNAL_H
#define INTERNAL_H

#include "common/osdep.h" /* must be placed before stdio.h */
#include <stdio.h>
#include <assert.h>

#ifndef lsmash_fseek
#define lsmash_fseek fseeko
#define lsmash_ftell ftello
#endif

#include "lsmash.h"

#endif

Use ftello/fseeko instead of ftell/fseek
Use ftello/fseeko instead of ftell/fseek

On 32-bit systems, fseek returns a long, which is 32-bits, and
fseek takes its offset argument as a long, as well. In order
to return and use 64-bit offsets, use ftello and fseeko, along
which defining _FILE_OFFSET_BITS 64, which is already in osdep.h.
