1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2003-02-10  Ulrich Drepper  <drepper@redhat.com>

	* elf/Makefile (check-textrel-CFLAGS): Pass _XOPEN_SOURCE and
	_BSD_SOURCE to compiler.
	* elf/check-textrel.c (SWAP): Add parenthesis to avoid warnings.
	Patches by Alan Modra.
This commit is contained in:
Ulrich Drepper
2003-02-11 06:31:57 +00:00
parent d9dd121ebe
commit e5ffa64a70
16 changed files with 83 additions and 39 deletions

View File

@ -1,5 +1,5 @@
/* Check for text relocations in DSOs.
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contribute by Ulrich Drepper <drepper@redhat.com>. 2002.
@ -38,8 +38,10 @@
# define __E(name, bits) Elf##bits##_##name
# define SWAP(val) \
({ __typeof (val) __res; \
if ((ehdr.e_ident[EI_DATA] == ELFDATA2MSB && BYTE_ORDER == LITTLE_ENDIAN \
|| ehdr.e_ident[EI_DATA] == ELFDATA2LSB && BYTE_ORDER == BIG_ENDIAN)\
if (((ehdr.e_ident[EI_DATA] == ELFDATA2MSB \
&& BYTE_ORDER == LITTLE_ENDIAN) \
|| (ehdr.e_ident[EI_DATA] == ELFDATA2LSB \
&& BYTE_ORDER == BIG_ENDIAN)) \
&& sizeof (val) != 1) \
{ \
if (sizeof (val) == 2) \