From 2b996f62ac23e6f77d24f6d5809262fd2d00c726 Mon Sep 17 00:00:00 2001 From: synergydev Date: Sun, 20 Oct 2013 16:34:58 -0700 Subject: jni: fix C99 inline linking Clang builds C code according to the C99 standard, which provides different semantics for the inline keyword than GCC's default behavior. This is the correct behavior without any gnu extensions. See here: http://clang.llvm.org/compatibility.html#inline Change-Id: I831a5189e027a2f0cb3c7d9cda56bd3701502863 --- jni/filters/geometry.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'jni') diff --git a/jni/filters/geometry.c b/jni/filters/geometry.c index a0b5aaacf..b308213c6 100644 --- a/jni/filters/geometry.c +++ b/jni/filters/geometry.c @@ -17,7 +17,7 @@ #include "filters.h" #include -__inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ +static __inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ //Vertical size_t cpy_bytes = sizeof(char) * 4; int width = cpy_bytes * srcWidth; @@ -31,7 +31,7 @@ __inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char * } } -__inline__ void flipHorizontal(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ +static __inline__ void flipHorizontal(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ //Horizontal size_t cpy_bytes = sizeof(char) * 4; int width = cpy_bytes * srcWidth; @@ -48,7 +48,7 @@ __inline__ void flipHorizontal(char * source, int srcWidth, int srcHeight, char } } -__inline__ void flip_fun(int flip, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ +static __inline__ void flip_fun(int flip, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ int horiz = (flip & 1) != 0; int vert = (flip & 2) != 0; if (horiz && vert){ @@ -70,7 +70,7 @@ __inline__ void flip_fun(int flip, char * source, int srcWidth, int srcHeight, c } //90 CCW (opposite of what's used in UI?) -__inline__ void rotate90(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ +static __inline__ void rotate90(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ size_t cpy_bytes = sizeof(char) * 4; int width = cpy_bytes * srcWidth; int length = srcHeight; @@ -86,17 +86,17 @@ __inline__ void rotate90(char * source, int srcWidth, int srcHeight, char * dest } } -__inline__ void rotate180(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ +static __inline__ void rotate180(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ flip_fun(3, source, srcWidth, srcHeight, destination, dstWidth, dstHeight); } -__inline__ void rotate270(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ +static __inline__ void rotate270(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ rotate90(source, srcWidth, srcHeight, destination, dstWidth, dstHeight); flip_fun(3, destination, dstWidth, dstHeight, destination, dstWidth, dstHeight); } // rotate == 1 is 90 degrees, 2 is 180, 3 is 270 (positive is CCW). -__inline__ void rotate_fun(int rotate, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ +static __inline__ void rotate_fun(int rotate, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){ switch( rotate ) { case 1: @@ -113,7 +113,7 @@ __inline__ void rotate_fun(int rotate, char * source, int srcWidth, int srcHeigh } } -__inline__ void crop(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight, int offsetWidth, int offsetHeight){ +static __inline__ void crop(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight, int offsetWidth, int offsetHeight){ size_t cpy_bytes = sizeof(char) * 4; int row_width = cpy_bytes * srcWidth; int new_row_width = cpy_bytes * dstWidth; -- cgit v1.2.3