Minor fixes and refactors
This commit is contained in:
13
configure
vendored
13
configure
vendored
@@ -113,10 +113,6 @@ cflags="-fPIC -I${source_path}include -I."
|
||||
ldflags=""
|
||||
ldlibs="-lm"
|
||||
|
||||
cflags="$cflags $extra_cflags"
|
||||
ldflags="$ldflags $extra_ldflags"
|
||||
ldlibs="$ldlibs $extra_ldlibs"
|
||||
|
||||
# Make sure that build directories exist
|
||||
mkdir src src/Platform src/Math src/String 2> /dev/null
|
||||
|
||||
@@ -184,6 +180,11 @@ if [ "$enable_tests" = "yes" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Add extra flags
|
||||
cflags="$cflags $extra_cflags"
|
||||
ldflags="$ldflags $extra_ldflags"
|
||||
ldlibs="$ldlibs $extra_ldlibs"
|
||||
|
||||
# Makefile generation
|
||||
{
|
||||
# Generate variables
|
||||
@@ -285,8 +286,8 @@ fi
|
||||
# Generate internal config.h
|
||||
{
|
||||
printf "#ifndef BH_SRC_CONFIG_H\n#define BH_SRC_CONFIG_H\n\n"
|
||||
if [ "$use_clock_gettime" ]; then printf "#define BH_USE_CLOCK_GETTIME\n"; fi
|
||||
if [ "$enable_lfs" ]; then printf "#define BH_ENABLE_LFS\n"; fi
|
||||
if [ "$use_clock_gettime" = "yes" ]; then printf "#define BH_USE_CLOCK_GETTIME\n"; fi
|
||||
if [ "$enable_lfs" = "yes" ]; then printf "#define BH_ENABLE_LFS\n"; fi
|
||||
printf "\n#endif /* BH_SRC_CONFIG_H */\n"
|
||||
} > Config.h
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ struct BH_Bitmap
|
||||
};
|
||||
|
||||
|
||||
const static struct FormatInfo formats[] =
|
||||
static const struct FormatInfo formats[] =
|
||||
{
|
||||
/* BH_BITMAP_INDEX1 */
|
||||
{TYPE_INDEX1, 7, {0x0001}, {7, 6, 5, 4, 3, 2, 1, 0}, 0},
|
||||
|
||||
@@ -76,6 +76,7 @@ static int bytesSeek(BH_Bytes *bytes,
|
||||
|
||||
switch (info->whence)
|
||||
{
|
||||
default:
|
||||
case BH_IO_SEEK_SET:
|
||||
offset = MAX(info->offset, 0);
|
||||
offset = MIN(offset, (int64_t)bytes->size);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
static int convertToTimespec(struct timespec *ts,
|
||||
uint32_t timeout)
|
||||
uint32_t timeout)
|
||||
{
|
||||
#if (_POSIX_TIMERS > 0) || defined(BH_USE_CLOCK_GETTIME)
|
||||
if (clock_gettime(CLOCK_REALTIME, ts))
|
||||
|
||||
Reference in New Issue
Block a user