]> sjero.net Git - wget/blobdiff - src/cmpt.c
[svn] Treat the "shortcut icon" link as inline.
[wget] / src / cmpt.c
index 7a7add09bd607da57a3b908c5c73b3e1d8ea9d59..81502d779d689988dd3f05640031ea306ff43bf1 100644 (file)
@@ -1209,8 +1209,10 @@ strptime (buf, format, tm)
 
 
 #ifndef HAVE_USLEEP
-/* A simple usleep implementation based on select().  This will
-   probably not work on Windows.  */
+#ifndef WINDOWS
+
+/* A simple usleep implementation based on select().  For Unix and
+   Unix-like systems.  */
 
 int
 usleep (unsigned long usec)
@@ -1221,4 +1223,26 @@ usleep (unsigned long usec)
   select (0, NULL, NULL, NULL, &tm);
   return 0;
 }
+
+#endif /* not WINDOWS */
 #endif /* not HAVE_USLEEP */
+
+
+#ifndef HAVE_MEMMOVE
+void *
+memmove (char *dest, const char *source, unsigned length)
+{
+  char *d0 = dest;
+  if (source < dest)
+    /* Moving from low mem to hi mem; start at end.  */
+    for (source += length, dest += length; length; --length)
+      *--dest = *--source;
+  else if (source != dest)
+    {
+      /* Moving from hi mem to low mem; start at beginning.  */
+      for (; length; --length)
+       *dest++ = *source++;
+    }
+  return (void *) d0;
+}
+#endif /* not HAVE_MEMMOVE */