OSDN Git Service

* syscalls.cc (getw): Remove redundant implementation.
authorcorinna <corinna>
Sun, 12 Aug 2007 15:20:15 +0000 (15:20 +0000)
committercorinna <corinna>
Sun, 12 Aug 2007 15:20:15 +0000 (15:20 +0000)
(putw): Ditto.
(wcscmp): Ditto.
(wcslen): Ditto.
(memccpy): Ditto.

winsup/cygwin/ChangeLog
winsup/cygwin/syscalls.cc

index 0aee7f3..24c1704 100644 (file)
@@ -1,5 +1,13 @@
 2007-08-12  Corinna Vinschen  <corinna@vinschen.de>
 
+       * syscalls.cc (getw): Remove redundant implementation.
+       (putw): Ditto.
+       (wcscmp): Ditto.
+       (wcslen): Ditto.
+       (memccpy): Ditto.
+
+2007-08-12  Corinna Vinschen  <corinna@vinschen.de>
+
        * ntdll.h: Add descriptive comments to special Rtl functions.
        (STATUS_OBJECT_PATH_NOT_FOUND): Define.
        (STATUS_BUFFER_OVERFLOW): Define.
index 2ac5f26..342e51e 100644 (file)
@@ -2736,45 +2736,6 @@ __assertfail ()
   exit (99);
 }
 
-extern "C" int
-getw (FILE *fp)
-{
-  int w, ret;
-  ret = fread (&w, sizeof (int), 1, fp);
-  return ret != 1 ? EOF : w;
-}
-
-extern "C" int
-putw (int w, FILE *fp)
-{
-  int ret;
-  ret = fwrite (&w, sizeof (int), 1, fp);
-  if (feof (fp) || ferror (fp))
-    return -1;
-  return 0;
-}
-
-extern "C" int
-wcscmp (const wchar_t *s1, const wchar_t *s2)
-{
-  while (*s1  && *s1 == *s2)
-    {
-      s1++;
-      s2++;
-    }
-
-  return (* (unsigned short *) s1) - (* (unsigned short *) s2);
-}
-
-extern "C" size_t
-wcslen (const wchar_t *s1)
-{
-  int l = 0;
-  while (s1[l])
-    l++;
-  return l;
-}
-
 /* FIXME: to do this right, maybe work out the usoft va_list machine
    and use wsvprintfW instead?
 */
@@ -2797,23 +2758,6 @@ vhangup ()
   return -1;
 }
 
-extern "C" _PTR
-memccpy (_PTR out, const _PTR in, int c, size_t len)
-{
-  const char *inc = (char *) in;
-  char *outc = (char *) out;
-
-  while (len)
-    {
-      char x = *inc++;
-      *outc++ = x;
-      if (x == c)
-       return outc;
-      len --;
-    }
-  return 0;
-}
-
 extern "C" int
 setpriority (int which, id_t who, int value)
 {