/[pcre]/code/tags/pcre-3.5/internal.h
ViewVC logotype

Diff of /code/tags/pcre-3.5/internal.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 46 by nigel, Sat Feb 24 21:39:21 2007 UTC revision 47 by nigel, Sat Feb 24 21:39:29 2007 UTC
# Line 40  modules, but which are not relevant to t Line 40  modules, but which are not relevant to t
40  #include "config.h"  #include "config.h"
41    
42  /* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),  /* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),
43  define a macro for memmove() if HAVE_MEMMOVE is false. */  define a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY
44    is set. Otherwise, include an emulating function for those systems that have
45    neither (there some non-Unix environments where this is the case). This assumes
46    that all calls to memmove are moving strings upwards in store, which is the
47    case in PCRE. */
48    
49  #if ! HAVE_MEMMOVE  #if ! HAVE_MEMMOVE
50  #undef  memmove        /* some systems may have a macro */  #undef  memmove        /* some systems may have a macro */
51    #if HAVE_BCOPY
52  #define memmove(a, b, c) bcopy(b, a, c)  #define memmove(a, b, c) bcopy(b, a, c)
53    #else
54    void *
55    pcre_memmove(unsigned char *dest, const unsigned char *src, size_t n)
56    {
57    int i;
58    dest += n;
59    src += n;
60    for (i = 0; i < n; ++i) *(--dest) =  *(--src);
61    }
62    #define memmove(a, b, c) pcre_memmove(a, b, c)
63    #endif
64  #endif  #endif
65    
66  /* Standard C headers plus the external interface definition */  /* Standard C headers plus the external interface definition */

Legend:
Removed from v.46  
changed lines
  Added in v.47

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12