diff --git a/common/scaler/scalebit.cpp b/common/scaler/scalebit.cpp index 9c697df7742..4bb5e0a8166 100644 --- a/common/scaler/scalebit.cpp +++ b/common/scaler/scalebit.cpp @@ -33,14 +33,14 @@ * - derivative works of the program are allowed. */ -#if HAVE_CONFIG_H +#if defined(HAVE_CONFIG_H) #include #endif #include "scale2x.h" #include "scale3x.h" -#if HAVE_ALLOCA_H +#if defined(HAVE_ALLOCA_H) #include #endif @@ -256,7 +256,7 @@ static void scale4x(void* void_dst, unsigned dst_slice, const void* void_src, un mid_slice = (mid_slice + 0x7) & ~0x7; /* align to 8 bytes */ -#if HAVE_ALLOCA +#if defined(HAVE_ALLOCA) mid = alloca(6 * mid_slice); /* allocate space for 6 row buffers */ assert(mid != 0); /* alloca should never fails */ @@ -269,7 +269,7 @@ static void scale4x(void* void_dst, unsigned dst_slice, const void* void_src, un scale4x_buf(void_dst, dst_slice, mid, mid_slice, void_src, src_slice, pixel, width, height); -#if !HAVE_ALLOCA +#if !defined(HAVE_ALLOCA) free(mid); #endif }