]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils-gcc34.patch
- stage 3...
[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 18:28:55.347212632 +0200
40 @@ -67,20 +67,19 @@
41  #define INLINE2(Bytes, FName, TName) \
42    INLINE3 (Bytes, FName, TName)
43  #define INLINE3(Bytes, FName, TName) \
44 -  static void FName (void *dest, const void *ptr, size_t len, int encode)     \
45 +  static void FName (word##Bytes##_t *dest, const word##Bytes##_t *ptr, size_t len, int encode)     \
46    {                                                                          \
47      size_t n = len / sizeof (TName);                                         \
48      if (dest < ptr)                                                          \
49        while (n-- > 0)                                                        \
50 -       {                                                                     \
51 -          *((word##Bytes##_t *) dest)++ =                                    \
52 -           LEN##Bytes##_SWAP ((word##Bytes##_t *) ptr);                      \
53 -         ((word##Bytes##_t *) ptr)++;                                        \
54 -       }                                                                     \
55 +      {                                                                              \
56 +       *dest++ = LEN##Bytes##_SWAP(ptr);                                     \
57 +        ++ptr;                                                               \
58 +      }                                                                              \
59      else                                                                     \
60        {                                                                              \
61 -       word##Bytes##_t *tdest = (word##Bytes##_t *) dest + n;                \
62 -       const word##Bytes##_t *tptr = (const word##Bytes##_t *) ptr + n;      \
63 +       word##Bytes##_t *tdest = dest + n;                                    \
64 +       const word##Bytes##_t *tptr = ptr + n;                                \
65         while (n-- > 0)                                                       \
66           {                                                                   \
67             --tptr;                                                           \
This page took 0.036993 seconds and 4 git commands to generate.