diff options
Diffstat (limited to 'code')
| -rw-r--r-- | code/macosx/macosx_common.c | 2 | ||||
| -rw-r--r-- | code/qcommon/common.c | 7 | ||||
| -rw-r--r-- | code/qcommon/md4.c | 5 | ||||
| -rw-r--r-- | code/qcommon/q_shared.h | 5 | ||||
| -rw-r--r-- | code/unix/linux_common.c | 2 | 
5 files changed, 16 insertions, 5 deletions
| diff --git a/code/macosx/macosx_common.c b/code/macosx/macosx_common.c index ab7d3be..1d42d90 100644 --- a/code/macosx/macosx_common.c +++ b/code/macosx/macosx_common.c @@ -1,3 +1,4 @@ +#if 0 // not used anymore  /*  ===========================================================================  Copyright (C) 1999-2005 Id Software, Inc. @@ -29,3 +30,4 @@ void Com_Memcpy (void* dest, const void* src, const size_t count) {  void Com_Memset (void* dest, const int val, const size_t count) {    memset(dest, val, count);  } +#endif diff --git a/code/qcommon/common.c b/code/qcommon/common.c index a2f76b9..3b582fc 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -2824,9 +2824,7 @@ void Com_Shutdown (void) {  } -#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 @@ void Com_Memset (void* dest, const int val, const size_t count)  	memset(dest, val, count);  } -#else +#elif I_WANT_A_CUSTOM_MEMCPY && defined(_WIN32)  typedef enum  { @@ -3136,7 +3134,6 @@ skipClamp:  	}  }  #endif -#endif   //------------------------------------------------------------------------ diff --git a/code/qcommon/md4.c b/code/qcommon/md4.c index 323798b..24b7961 100644 --- a/code/qcommon/md4.c +++ b/code/qcommon/md4.c @@ -38,8 +38,13 @@ void MD4Init (MD4_CTX *);  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. diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 20f15e1..45bd046 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -237,8 +237,13 @@ void Snd_Memset (void* dest, const int val, const size_t count);  #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 diff --git a/code/unix/linux_common.c b/code/unix/linux_common.c index 0321ac2..ab1eafa 100644 --- a/code/unix/linux_common.c +++ b/code/unix/linux_common.c @@ -1,3 +1,4 @@ +#if 0 // not used anymore  /*  ===========================================================================  Copyright (C) 1999-2005 Id Software, Inc. @@ -342,3 +343,4 @@ void Com_Prefetch (const void *s, const unsigned int bytes, e_prefetch type)  }  #endif +#endif | 
