bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch to CVS OSKIT to Compile CVS oskit-mach.


From: Michael Oberg
Subject: Patch to CVS OSKIT to Compile CVS oskit-mach.
Date: Fri, 13 Jun 2003 12:39:43 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030527 Debian/1.3.1-2

This patch adds oskit/libc/string/stpcpy.c to the OSKIT source. This adds this function to the minimal oskit c library liboskit_c.a, so that the call to stpcpy from gnumach/oskit/ds_bus.c line 46 succeeds on linking.



diff -Nrup oskit.orig/libc/string/stpcpy.c oskit/libc/string/stpcpy.c
--- oskit.orig/libc/string/stpcpy.c     1969-12-31 17:00:00.000000000 -0700
+++ oskit/libc/string/stpcpy.c  2003-06-12 16:42:26.000000000 -0700
@@ -0,0 +1,45 @@
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <oskit/c/string.h>
+
+#undef __stpcpy
+#undef stpcpy
+
+#ifndef weak_alias
+# define __stpcpy stpcpy
+#endif
+
+/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
+char *
+__stpcpy (dest, src)
+     char *dest;
+     const char *src;
+{
+  register char *d = dest;
+  register const char *s = src;
+
+  do
+    *d++ = *s;
+  while (*s++ != '\0');
+
+  return d - 1;
+}
+#ifdef weak_alias
+weak_alias (__stpcpy, stpcpy)
+#endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]