r301 - in trunk/code: macosx qcommon unix

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Nov 6 13:22:49 EST 2005


Author: ludwig
Date: 2005-11-06 13:22:49 -0500 (Sun, 06 Nov 2005)
New Revision: 301

Modified:
   trunk/code/macosx/macosx_common.c
   trunk/code/qcommon/common.c
   trunk/code/qcommon/md4.c
   trunk/code/qcommon/q_shared.h
   trunk/code/unix/linux_common.c
Log:
use system memcpy and memset


Modified: trunk/code/macosx/macosx_common.c
===================================================================
--- trunk/code/macosx/macosx_common.c	2005-11-06 17:31:48 UTC (rev 300)
+++ trunk/code/macosx/macosx_common.c	2005-11-06 18:22:49 UTC (rev 301)
@@ -1,3 +1,4 @@
+#if 0 // not used anymore
 /*
 ===========================================================================
 Copyright (C) 1999-2005 Id Software, Inc.
@@ -29,3 +30,4 @@
 void Com_Memset (void* dest, const int val, const size_t count) {
   memset(dest, val, count);
 }
+#endif

Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c	2005-11-06 17:31:48 UTC (rev 300)
+++ trunk/code/qcommon/common.c	2005-11-06 18:22:49 UTC (rev 301)
@@ -2824,9 +2824,7 @@
 
 }
 
-#if !( defined __GNUC__ )  // GNU versions in linux_common.c
-#if !id386
-
+#if I_WANT_A_CUSTOM_MEMCPY && !defined(_WIN32)
 void Com_Memcpy (void* dest, const void* src, const size_t count)
 {
 	memcpy(dest, src, count);
@@ -2837,7 +2835,7 @@
 	memset(dest, val, count);
 }
 
-#else
+#elif I_WANT_A_CUSTOM_MEMCPY && defined(_WIN32)
 
 typedef enum
 {
@@ -3136,7 +3134,6 @@
 	}
 }
 #endif
-#endif 
 //------------------------------------------------------------------------
 
 

Modified: trunk/code/qcommon/md4.c
===================================================================
--- trunk/code/qcommon/md4.c	2005-11-06 17:31:48 UTC (rev 300)
+++ trunk/code/qcommon/md4.c	2005-11-06 18:22:49 UTC (rev 301)
@@ -38,8 +38,13 @@
 void MD4Update (MD4_CTX *, const unsigned char *, unsigned int);
 void MD4Final (unsigned char [16], MD4_CTX *);
 
+#if I_WANT_A_CUSTOM_MEMCPY
 void Com_Memset (void* dest, const int val, const size_t count);
 void Com_Memcpy (void* dest, const void* src, const size_t count);
+#else
+#define Com_Memset memset
+#define Com_Memcpy memcpy
+#endif
 
 /* MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm */
 /* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.

Modified: trunk/code/qcommon/q_shared.h
===================================================================
--- trunk/code/qcommon/q_shared.h	2005-11-06 17:31:48 UTC (rev 300)
+++ trunk/code/qcommon/q_shared.h	2005-11-06 18:22:49 UTC (rev 301)
@@ -237,8 +237,13 @@
 #define Snd_Memset Com_Memset
 #endif
 
+#if I_WANT_A_CUSTOM_MEMCPY
 void Com_Memset (void* dest, const int val, const size_t count);
 void Com_Memcpy (void* dest, const void* src, const size_t count);
+#else
+#define Com_Memset memset
+#define Com_Memcpy memcpy
+#endif
 
 #define CIN_system	1
 #define CIN_loop	2

Modified: trunk/code/unix/linux_common.c
===================================================================
--- trunk/code/unix/linux_common.c	2005-11-06 17:31:48 UTC (rev 300)
+++ trunk/code/unix/linux_common.c	2005-11-06 18:22:49 UTC (rev 301)
@@ -1,3 +1,4 @@
+#if 0 // not used anymore
 /*
 ===========================================================================
 Copyright (C) 1999-2005 Id Software, Inc.
@@ -342,3 +343,4 @@
 }
 
 #endif
+#endif




More information about the quake3-commits mailing list