mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-19 01:10:57 -08:00
Controlling use of memcpy (change.dylan.cottonwood.170468)
Copied from Perforce Change: 19061 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
9e13b9d47c
commit
fd6d7dfd4e
3 changed files with 31 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/* impl.h.config: MPS CONFIGURATION
|
||||
*
|
||||
* Copyright (C) 1997 Harlequin Group, all rights reserved.
|
||||
* $HopeName: MMsrc!config.h(trunk.16) $
|
||||
* $HopeName: MMsrc!config.h(trunk.17) $
|
||||
*
|
||||
* .readership: MPS developers.
|
||||
*/
|
||||
|
|
@ -189,4 +189,26 @@
|
|||
#define EVENT_HEADER_SIZE ((Count)3)
|
||||
|
||||
|
||||
/* memcpy configuration
|
||||
*
|
||||
* PoolClass AMC requires an efficient memcpy routine.
|
||||
* In general we cannot use the ANSI memcpy function as that
|
||||
* would not be freestanding. However, on some platforms
|
||||
* memcpy is inlined by the compiler and so does not actually
|
||||
* create a dependence on an external library.
|
||||
*
|
||||
* Code here selects a memcpy function to use depending on
|
||||
* various platform and variety configurations.
|
||||
*/
|
||||
|
||||
#if defined(MPS_PF_W3I3MV) && defined(MPS_HOT)
|
||||
/* MSVC on Intel inlines memcpy when optimizing */
|
||||
#define MPS_MEMCPY memcpy
|
||||
/* prototype ANSI memcpy */
|
||||
#include <string.h>
|
||||
#else
|
||||
#define MPS_MEMCPY mps_lib_memcpy
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* config_h */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* impl.h.mpslib: HARLEQUIN MEMORY POOL SYSTEM LIBRARY INTERFACE
|
||||
*
|
||||
* $HopeName: MMsrc!mpslib.h(trunk.3) $
|
||||
* $HopeName: MMsrc!mpslib.h(trunk.4) $
|
||||
* Copyright (C) 1996,1997 Harlequin Group, all rights reserved.
|
||||
*
|
||||
* .readership: MPS client application developers, MPS developers.
|
||||
|
|
@ -39,6 +39,7 @@ extern int mps_lib_fputs(const char *, mps_lib_FILE *);
|
|||
extern void mps_lib_abort(void);
|
||||
|
||||
extern void *mps_lib_memset(void *, int, size_t);
|
||||
extern void *mps_lib_memcpy(void *, const void *, size_t);
|
||||
|
||||
/*@@@@*/
|
||||
typedef unsigned long mps_clock_t;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* impl.c.mpsliban: HARLEQUIN MEMORY POOL SYSTEM LIBRARY INTERFACE (ANSI)
|
||||
*
|
||||
* $HopeName: MMsrc!mpsliban.c(trunk.4) $
|
||||
* $HopeName: MMsrc!mpsliban.c(trunk.5) $
|
||||
* Copyright (C) 1996,1997 Harlequin Group, all rights reserved.
|
||||
*
|
||||
* PURPOSE
|
||||
|
|
@ -78,6 +78,11 @@ void *mps_lib_memset(void *s, int c, size_t n)
|
|||
return memset(s, c, n);
|
||||
}
|
||||
|
||||
void *mps_lib_memcpy(void *s1, const void *s2, size_t n)
|
||||
{
|
||||
return memcpy(s1, s2, n);
|
||||
}
|
||||
|
||||
/* @@@@ Platform specific conversion? */
|
||||
/* See http://devworld.apple.com/dev/techsupport/insidemac/OSUtilities/OSUtilities-94.html#MARKER-9-32 */
|
||||
mps_clock_t mps_clock(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue