From 1e0429e5f39ec219cbef3af2752528b8a29bc1be Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 7 Jul 2015 17:44:41 +0200 Subject: Fix build with -O0 * linux/src/include/linux/string.h (strcpy, strncpy, strcat, strncat, strchr, strrchr, strlen, strnlen, strcmp, strncmp, memmove, memscan): Comment out extern declarations. * linux/dev/include/asm-i386/string.h (strcpy, strncpy, strcat, strncat, strcmp, strncmp, strchr, strrchr, strlen, __memcpy, __constant_memcpy, memmove, memchr, __memset_generic, __constant_c_memset, strnlen, __constant_c_and_count_memset, memscan): Turn extern inline into static inline. * linux/dev/include/linux/fs.h (mark_buffer_uptodate): Likewise. * linux/src/include/asm-i386/bitops.h (set_bit, clear_bit, change_bit, test_and_set_bit, test_and_clear_bit, test_and_change_bit, test_bit, find_first_zero_bit, find_next_zero_bit, ffz, ffs): Likewise. * linux/src/include/asm-i386/io.h (virt_to_phys, phys_to_virt, __out##s, __in##s, ins##s, outs##s): Likewise. * linux/src/include/asm-i386/semaphore.h (down, down_interruptible, up): Likewise. * linux/src/include/asm-i386/segment.h [!__OPTIMIZE]: Emit an ud2 instruction instead of an undefined reference. --- linux/dev/include/asm-i386/string.h | 36 ++++++++++++++++++------------------ linux/dev/include/linux/fs.h | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'linux/dev') diff --git a/linux/dev/include/asm-i386/string.h b/linux/dev/include/asm-i386/string.h index bdb7545..f41ca5c 100644 --- a/linux/dev/include/asm-i386/string.h +++ b/linux/dev/include/asm-i386/string.h @@ -28,7 +28,7 @@ */ #define __HAVE_ARCH_STRCPY -extern inline char * strcpy(char * dest,const char *src) +static inline char * strcpy(char * dest,const char *src) { int d0, d1, d2; __asm__ __volatile__( @@ -43,7 +43,7 @@ return dest; } #define __HAVE_ARCH_STRNCPY -extern inline char * strncpy(char * dest,const char *src,size_t count) +static inline char * strncpy(char * dest,const char *src,size_t count) { int d0, d1, d2, d3; __asm__ __volatile__( @@ -63,7 +63,7 @@ return dest; } #define __HAVE_ARCH_STRCAT -extern inline char * strcat(char * dest,const char * src) +static inline char * strcat(char * dest,const char * src) { int d0, d1, d2, d3; __asm__ __volatile__( @@ -81,7 +81,7 @@ return dest; } #define __HAVE_ARCH_STRNCAT -extern inline char * strncat(char * dest,const char * src,size_t count) +static inline char * strncat(char * dest,const char * src,size_t count) { int d0, d1, d2, d3; __asm__ __volatile__( @@ -105,7 +105,7 @@ return dest; } #define __HAVE_ARCH_STRCMP -extern inline int strcmp(const char * cs,const char * ct) +static inline int strcmp(const char * cs,const char * ct) { int d0, d1; register int __res; @@ -127,7 +127,7 @@ return __res; } #define __HAVE_ARCH_STRNCMP -extern inline int strncmp(const char * cs,const char * ct,size_t count) +static inline int strncmp(const char * cs,const char * ct,size_t count) { register int __res; int d0, d1, d2; @@ -151,7 +151,7 @@ return __res; } #define __HAVE_ARCH_STRCHR -extern inline char * strchr(const char * s, int c) +static inline char * strchr(const char * s, int c) { int d0; register char * __res; @@ -171,7 +171,7 @@ return __res; } #define __HAVE_ARCH_STRRCHR -extern inline char * strrchr(const char * s, int c) +static inline char * strrchr(const char * s, int c) { int d0, d1; register char * __res; @@ -189,7 +189,7 @@ return __res; } #define __HAVE_ARCH_STRLEN -extern inline size_t strlen(const char * s) +static inline size_t strlen(const char * s) { int d0; register int __res; @@ -203,7 +203,7 @@ __asm__ __volatile__( return __res; } -extern inline void * __memcpy(void * to, const void * from, size_t n) +static inline void * __memcpy(void * to, const void * from, size_t n) { int d0, d1, d2; __asm__ __volatile__( @@ -226,7 +226,7 @@ return (to); * This looks horribly ugly, but the compiler can optimize it totally, * as the count is constant. */ -extern inline void * __constant_memcpy(void * to, const void * from, size_t n) +static inline void * __constant_memcpy(void * to, const void * from, size_t n) { switch (n) { case 0: @@ -299,7 +299,7 @@ __asm__ __volatile__( \ __memcpy((t),(f),(n))) #define __HAVE_ARCH_MEMMOVE -extern inline void * memmove(void * dest,const void * src, size_t n) +static inline void * memmove(void * dest,const void * src, size_t n) { int d0, d1, d2; if (dest