~ubuntu-branches/ubuntu/quantal/uclibc/quantal

« back to all changes in this revision

Viewing changes to libc/string/memcpy.c

  • Committer: Bazaar Package Importer
  • Author(s): Hector Oron
  • Date: 2011-06-11 03:06:20 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110611030620-ywjfvyuqvrpsm282
Tags: 0.9.32-1
* New upstream release
* Add myself as maintainer
* Bump standards version 
* Add Vcs-Git, Vcs-Browser and Homepage fields
* Add watch file 

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#ifdef WANT_WIDE
11
11
# define Wmemcpy wmemcpy
12
12
#else
 
13
# undef memcpy
13
14
# define Wmemcpy memcpy
14
15
#endif
15
16
 
16
 
libc_hidden_proto(Wmemcpy)
17
 
 
18
17
Wvoid *Wmemcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
19
18
{
20
19
        register Wchar *r1 = s1;
21
20
        register const Wchar *r2 = s2;
22
21
 
23
 
#ifdef __BCC__
24
 
        while (n--) {
25
 
                *r1++ = *r2++;
26
 
        }
27
 
#else
28
22
        while (n) {
29
23
                *r1++ = *r2++;
30
24
                --n;
31
25
        }
32
 
#endif
33
26
 
34
27
        return s1;
35
28
}