Clean up x86_64/multiarch/memmove.c include order.

This commit is contained in:
Roland McGrath 2012-08-15 11:26:02 -07:00
parent 67cc348d55
commit 9a0a54864b
2 changed files with 24 additions and 20 deletions

View File

@ -1,5 +1,11 @@
2012-08-15 Roland McGrath <roland@hack.frob.com>
* sysdeps/x86_64/multiarch/memmove.c: Don't include <stddef.h>.
[!NOT_IN_libc]: Move #define and #undef of memmove to just before
and after including <string.h>. 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

View File

@ -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,12 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <stddef.h>
#ifndef NOT_IN_libc
#include <shlib-compat.h>
#include "init-arch.h"
# define MEMMOVE __memmove_sse2
# ifdef SHARED
# undef libc_hidden_builtin_def
@ -34,14 +28,19 @@
mismatch with the IFUNC selector in strong_alias, below. */
# undef memmove
# define memmove __redirect_memmove
# include <string.h>
# 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 <shlib-compat.h>
# include "init-arch.h"
/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
ifunc symbol properly. */
@ -52,7 +51,6 @@ 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)