Ticket #58058: patch-src-need.c.diff

File patch-src-need.c.diff, 754 bytes (added by Crosmatron, 6 years ago)
  • need.c

    old new  
    2626}
    2727#endif /* NEED_STRDUP */
    2828
    29 #ifdef NEED_MEMMOVE
    30 # if USE_PROTOTYPES
    31 void *memmove(void *dest, const void *src, size_t size)
    32 # else /* don't USE_PROTOTYPES */
    33 void *memmove(dest, src, size)
    34         void    *dest;
    35         void    *src;
    36         size_t  size;
    37 # endif /* don't USE_PROTOTYPES */
    38 {
    39         register char   *d, *s;
    40 
    41         d = (char *)dest;
    42         s = (char *)src;
    43         if (d <= s)
    44         {
    45                 for (; size > 0; size--)
    46                         *d++ = *s++;
    47         }
    48         else
    49         {
    50                 for (d += size, s += size; size > 0; size--)
    51                         *--d = *--s;
    52         }
    53         return dest;
    54 }
    55 #endif
    56 
    5729#ifdef NEED_XRMCOMBINEFILEDATABASE
    5830/* The XrmCombineFileDatabase() function is defined in guix11/xmisc.c */
    5931#endif