]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils-gcc34.patch
- stage 4...
[packages/elfutils.git] / elfutils-gcc34.patch
1 --- elfutils-0.94/libelf/dl-hash.h.orig 2003-12-25 19:31:59.000000000 +0100
2 +++ elfutils-0.94/libelf/dl-hash.h      2004-04-01 17:29:43.935109336 +0200
3 @@ -26,28 +26,28 @@
4  __attribute__ ((__pure__))
5  _dl_elf_hash (const char *name)
6  {
7 -  unsigned int hash = (unsigned int) *((const unsigned char *) name)++;
8 +  unsigned int hash = (unsigned int) *(const unsigned char *)name++;
9    if (*name != '\0')
10      {
11        hash = ((hash << 4)
12 -             + (unsigned int) *((const unsigned char *) name)++);
13 +             + (unsigned int) *(const unsigned char *)name++);
14        if (*name != '\0')
15         {
16           hash = ((hash << 4)
17 -                 + (unsigned int) *((const unsigned char *) name)++);
18 +                 + (unsigned int) *(const unsigned char *)name++);
19           if (*name != '\0')
20             {
21               hash = ((hash << 4)
22 -                     + (unsigned int) *((const unsigned char *) name)++);
23 +                     + (unsigned int) *(const unsigned char *)name++);
24               if (*name != '\0')
25                 {
26                   hash = ((hash << 4)
27 -                         + (unsigned int) *((const unsigned char *) name)++);
28 +                         + (unsigned int) *(const unsigned char *)name++);
29                   while (*name != '\0')
30                     {
31                       unsigned int hi;
32                       hash = ((hash << 4)
33 -                             + (unsigned int) *((const unsigned char *) name)++);
34 +                             + (unsigned int) *(const unsigned char *)name++);
35                       hi = hash & 0xf0000000;
36  
37                       /* The algorithm specified in the ELF ABI is as
38 --- elfutils-0.94/libelf/gelf_xlate.c.orig      2003-12-25 19:42:38.000000000 +0100
39 +++ elfutils-0.94/libelf/gelf_xlate.c   2004-04-01 22:22:51.450400608 +0200
40 @@ -71,12 +71,15 @@
41    {                                                                          \
42      size_t n = len / sizeof (TName);                                         \
43      if (dest < ptr)                                                          \
44 -      while (n-- > 0)                                                        \
45 +      {                                                                              \
46 +       word##Bytes##_t *tdest = (word##Bytes##_t *)dest,                     \
47 +                       *tptr = (word##Bytes##_t *)ptr;                       \
48 +       while (n-- > 0)                                                       \
49         {                                                                     \
50 -          *((word##Bytes##_t *) dest)++ =                                    \
51 -           LEN##Bytes##_SWAP ((word##Bytes##_t *) ptr);                      \
52 -         ((word##Bytes##_t *) ptr)++;                                        \
53 +          *tdest++ = LEN##Bytes##_SWAP (tptr);                               \
54 +         ++tptr;                                                             \
55         }                                                                     \
56 +      }                                                                              \
57      else                                                                     \
58        {                                                                              \
59         word##Bytes##_t *tdest = (word##Bytes##_t *) dest + n;                \
This page took 0.116284 seconds and 3 git commands to generate.