Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 470884 | Differences between
and this patch

Collapse All | Expand All

(-)elfutils-0.155.orig/configure.ac (+3 lines)
Lines 278-283 Link Here
278
AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])])
278
AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])])
279
AM_CONDITIONAL(DEMANGLE, test "$ac_cv_lib_stdcpp___cxa_demangle" = yes)
279
AM_CONDITIONAL(DEMANGLE, test "$ac_cv_lib_stdcpp___cxa_demangle" = yes)
280
280
281
dnl Check for __mempcpy
282
AC_CHECK_FUNCS_ONCE([__mempcpy])
283
281
dnl The directories with content.
284
dnl The directories with content.
282
285
283
dnl Documentation.
286
dnl Documentation.
(-)elfutils-0.155.orig/libelf/elf_begin.c (+24 lines)
Lines 801-807 Link Here
801
    }
801
    }
802
802
803
  /* Copy the raw name over to a NUL terminated buffer.  */
803
  /* Copy the raw name over to a NUL terminated buffer.  */
804
#ifdef HAVE___MEMPCPY
804
  *((char *) __mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0';
805
  *((char *) __mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0';
806
#else
807
  *((char *) mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0';
808
#endif
805
809
806
  elf_ar_hdr = &elf->state.ar.elf_ar_hdr;
810
  elf_ar_hdr = &elf->state.ar.elf_ar_hdr;
807
811
Lines 890-895 Link Here
890
     filled in which case we cannot simply use atol/l but instead have
894
     filled in which case we cannot simply use atol/l but instead have
891
     to create a temporary copy.  */
895
     to create a temporary copy.  */
892
896
897
#ifdef HAVE___MEMPCPY
893
#define INT_FIELD(FIELD)						      \
898
#define INT_FIELD(FIELD)						      \
894
  do									      \
899
  do									      \
895
    {									      \
900
    {									      \
Lines 907-912 Link Here
907
	elf_ar_hdr->FIELD = (__typeof (elf_ar_hdr->FIELD)) atoll (string);    \
912
	elf_ar_hdr->FIELD = (__typeof (elf_ar_hdr->FIELD)) atoll (string);    \
908
    }									      \
913
    }									      \
909
  while (0)
914
  while (0)
915
#else
916
#define INT_FIELD(FIELD)						      \
917
  do									      \
918
    {									      \
919
      char buf[sizeof (ar_hdr->FIELD) + 1];				      \
920
      const char *string = ar_hdr->FIELD;				      \
921
      if (ar_hdr->FIELD[sizeof (ar_hdr->FIELD) - 1] != ' ')		      \
922
	{								      \
923
	  *((char *) mempcpy (buf, ar_hdr->FIELD, sizeof (ar_hdr->FIELD)))    \
924
	    = '\0';							      \
925
	  string = buf;							      \
926
	}								      \
927
      if (sizeof (elf_ar_hdr->FIELD) <= sizeof (long int))		      \
928
	elf_ar_hdr->FIELD = (__typeof (elf_ar_hdr->FIELD)) atol (string);     \
929
      else								      \
930
	elf_ar_hdr->FIELD = (__typeof (elf_ar_hdr->FIELD)) atoll (string);    \
931
    }									      \
932
  while (0)
933
#endif
910
934
911
  INT_FIELD (ar_date);
935
  INT_FIELD (ar_date);
912
  INT_FIELD (ar_uid);
936
  INT_FIELD (ar_uid);

Return to bug 470884