diff options
author | Tor Lillqvist <tml@iki.fi> | 2011-09-27 15:59:48 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2011-09-27 16:04:27 +0300 |
commit | 41bc308973c8567aaa368949a02f1cf420c1ee8a (patch) | |
tree | 30dbcd451b5a46db835ab2bac8fb83007527934d /idlc | |
parent | 28cf0a3cf30c81d8e0120ed13147f1a71b5b46d5 (diff) |
Let's rely on memmove() being sane on all our platforms
Defining an own memmove() here is silly. It breaks compilation against
MacOSX 10.6 SDK where memmove is a macro. If we really wanted to avoid
the system memmove() here, surely we should then use
rtl_moveMemory(). But since when is idlcpp performance critical?
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/source/preproc/unix.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/idlc/source/preproc/unix.c b/idlc/source/preproc/unix.c index b0a8f478ace3..461f1d5db34d 100644 --- a/idlc/source/preproc/unix.c +++ b/idlc/source/preproc/unix.c @@ -212,40 +212,4 @@ void setsource(fp, -1, fd, NULL, 0); } - -/* memmove is defined here because some vendors don't provide it at - all and others do a terrible job (like calling malloc) */ - -#if !defined(__IBMC__) && !defined(WNT) && !defined(__GLIBC__) - -void * - memmove(void *dp, const void *sp, size_t n) -{ - unsigned char *cdp, *csp; - - if (n <= 0) - return 0; - cdp = dp; - csp = (unsigned char *) sp; - if (cdp < csp) - { - do - { - *cdp++ = *csp++; - } while (--n); - } - else - { - cdp += n; - csp += n; - do - { - *--cdp = *--csp; - } while (--n); - } - return 0; -} - -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |