From: Roland McGrath Date: Wed, 15 Aug 2012 18:26:02 +0000 (-0700) Subject: Clean up x86_64/multiarch/memmove.c include order. X-Git-Tag: upstream/2.30~10439 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a0a54864bc015efbbbd15dcf365bcb2c147fb90;p=external%2Fglibc.git Clean up x86_64/multiarch/memmove.c include order. --- diff --git a/ChangeLog b/ChangeLog index 7ab9bc3..6b5f6c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2012-08-15 Roland McGrath + * sysdeps/x86_64/multiarch/memmove.c: Don't include . + [!NOT_IN_libc]: Move #define and #undef of memmove to just before + and after including . Move declarations of + __memmove_sse2, __memmove_ssse3, and __memmove_ssse3_back + to before #include "string/memmove.c". + * include/dirent.h: Declare __getdirentries. * sysdeps/posix/system.c (do_system): Cast SUB_REF () to void when not diff --git a/sysdeps/x86_64/multiarch/memmove.c b/sysdeps/x86_64/multiarch/memmove.c index 6e91025..d6bdab4 100644 --- a/sysdeps/x86_64/multiarch/memmove.c +++ b/sysdeps/x86_64/multiarch/memmove.c @@ -1,6 +1,5 @@ /* Multiple versions of memmove. - Copyright (C) 2010, 2011 - Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,31 +16,31 @@ License along with the GNU C Library; if not, see . */ -#include - #ifndef NOT_IN_libc -#include -#include "init-arch.h" - -#define MEMMOVE __memmove_sse2 -#ifdef SHARED -# undef libc_hidden_builtin_def -# define libc_hidden_builtin_def(name) \ +# define MEMMOVE __memmove_sse2 +# ifdef SHARED +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(name) \ __hidden_ver1 (__memmove_sse2, __GI_memmove, __memmove_sse2); -#endif +# endif /* Redefine memmove so that the compiler won't complain about the type mismatch with the IFUNC selector in strong_alias, below. */ -#undef memmove -#define memmove __redirect_memmove +# undef memmove +# define memmove __redirect_memmove +# include +# undef memmove + +extern __typeof (__redirect_memmove) __memmove_sse2 attribute_hidden; +extern __typeof (__redirect_memmove) __memmove_ssse3 attribute_hidden; +extern __typeof (__redirect_memmove) __memmove_ssse3_back attribute_hidden; #endif #include "string/memmove.c" #ifndef NOT_IN_libc -extern __typeof (__redirect_memmove) __memmove_sse2 attribute_hidden; -extern __typeof (__redirect_memmove) __memmove_ssse3 attribute_hidden; -extern __typeof (__redirect_memmove) __memmove_ssse3_back attribute_hidden; +# include +# include "init-arch.h" /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ @@ -52,10 +51,9 @@ libc_ifunc (__libc_memmove, ? __memmove_ssse3_back : __memmove_ssse3) : __memmove_sse2) -#undef memmove strong_alias (__libc_memmove, memmove) -#if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14) +# if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14) compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5); -#endif +# endif #endif