From 2c536bff67ed209b1c5aa3d40e40731813bfcd9a Mon Sep 17 00:00:00 2001
From: Austin Clements <amdragon@mit.edu>
Date: Wed, 7 Oct 2009 13:06:55 -0400
Subject: [PATCH] Remove memcpy prototypes at Russ' request to prevent code
 from calling memcpy directly.

---
 defs.h   | 1 -
 string.c | 1 +
 user.h   | 1 -
 3 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/defs.h b/defs.h
index 525c05b..bcfab55 100644
--- a/defs.h
+++ b/defs.h
@@ -124,7 +124,6 @@ void            popcli();
 // string.c
 int             memcmp(const void*, const void*, uint);
 void*           memmove(void*, const void*, uint);
-void*           memcpy(void*, const void*, uint);
 void*           memset(void*, int, uint);
 char*           safestrcpy(char*, const char*, int);
 int             strlen(const char*);
diff --git a/string.c b/string.c
index b356895..a557dc5 100644
--- a/string.c
+++ b/string.c
@@ -44,6 +44,7 @@ memmove(void *dst, const void *src, uint n)
   return dst;
 }
 
+// memcpy exists to placate GCC.  Use memmove.
 void*
 memcpy(void *dst, const void *src, uint n)
 {
diff --git a/user.h b/user.h
index 18faadb..8280b2e 100644
--- a/user.h
+++ b/user.h
@@ -26,7 +26,6 @@ int sleep(int);
 int stat(char*, struct stat*);
 char* strcpy(char*, char*);
 void *memmove(void*, void*, int);
-void *memcpy(void*, void*, int);
 char* strchr(const char*, char c);
 int strcmp(const char*, const char*);
 void printf(int, char*, ...);
-- 
GitLab