Provide memcpy for compatibility with older versions of gcc
This commit is contained in:
		
							parent
							
								
									77a9aa55cd
								
							
						
					
					
						commit
						6639ce56d9
					
				
					 3 changed files with 8 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								defs.h
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								defs.h
									
										
									
									
									
								
							|  | @ -124,6 +124,7 @@ void            popcli(); | ||||||
| // string.c
 | // string.c
 | ||||||
| int             memcmp(const void*, const void*, uint); | int             memcmp(const void*, const void*, uint); | ||||||
| void*           memmove(void*, const void*, uint); | void*           memmove(void*, const void*, uint); | ||||||
|  | void*           memcpy(void*, const void*, uint); | ||||||
| void*           memset(void*, int, uint); | void*           memset(void*, int, uint); | ||||||
| char*           safestrcpy(char*, const char*, int); | char*           safestrcpy(char*, const char*, int); | ||||||
| int             strlen(const char*); | int             strlen(const char*); | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								string.c
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								string.c
									
										
									
									
									
								
							|  | @ -44,6 +44,12 @@ memmove(void *dst, const void *src, uint n) | ||||||
|   return dst; |   return dst; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void* | ||||||
|  | memcpy(void *dst, const void *src, uint n) | ||||||
|  | { | ||||||
|  |   return memmove(dst, src, n); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| int | int | ||||||
| strncmp(const char *p, const char *q, uint n) | strncmp(const char *p, const char *q, uint n) | ||||||
| { | { | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								user.h
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								user.h
									
										
									
									
									
								
							|  | @ -26,6 +26,7 @@ int sleep(int); | ||||||
| int stat(char*, struct stat*); | int stat(char*, struct stat*); | ||||||
| char* strcpy(char*, char*); | char* strcpy(char*, char*); | ||||||
| void *memmove(void*, void*, int); | void *memmove(void*, void*, int); | ||||||
|  | void *memcpy(void*, void*, int); | ||||||
| char* strchr(const char*, char c); | char* strchr(const char*, char c); | ||||||
| int strcmp(const char*, const char*); | int strcmp(const char*, const char*); | ||||||
| void printf(int, char*, ...); | void printf(int, char*, ...); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Austin Clements
						Austin Clements