aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure13
-rw-r--r--src/Bitmap.c2
-rw-r--r--src/Bytes.c1
-rw-r--r--src/Platform/Posix/Timespec.h2
4 files changed, 10 insertions, 8 deletions
diff --git a/configure b/configure
index 5c18963..e6dd643 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/src/Bitmap.c b/src/Bitmap.c
index 50246d6..88a85d2 100644
--- a/src/Bitmap.c
+++ b/src/Bitmap.c
@@ -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},
diff --git a/src/Bytes.c b/src/Bytes.c
index 562a38f..8949380 100644
--- a/src/Bytes.c
+++ b/src/Bytes.c
@@ -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);
diff --git a/src/Platform/Posix/Timespec.h b/src/Platform/Posix/Timespec.h
index ef7f22d..2ed157a 100644
--- a/src/Platform/Posix/Timespec.h
+++ b/src/Platform/Posix/Timespec.h
@@ -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))