Mail Archives: djgpp/1994/11/09/15:17:27
>>> I tried to recompile it with gcc but it requires a mem.h file, and this
>>> is due to the TURBO option. I tried other DEFs, but it fails with some
>>mem.h is usually included in Turbo C program to use the far heap
>>memory allocation functions, and these are not required in gcc.
>I think sys/farptr.h does a lot of that--why not make a fake mem.h that does
>nothing but include it?
Attached to this message please find an emulation of mem.h for DJGPP.
I didn't test it, so I can't even say it will pass CPP. Let me know
if it has any errors.
---------------------- mem.h --------------------------------------
/* mem.h
Memory manipulation functions
Emulates Borland memory-related functions for DJGPP.
*/
#if !defined(__MEM_H)
#define __MEM_H
#include <stddef.h>
#include <djgppstd.h>
#define movmem(s,d,l) memmove(d,s,l)
#define setmem(d,l,c) memset(d,c,l)
#define _fmemccpy memccpy
#define _fmemchr memchr
#define _fmemcpy memcpy
#define _fmemicmp memicmp
#define _fmemmove memmove
#define _fmemset memset
#define _fmovmem(s,d,l) memmove(d,s,l)
#define _fsetmem(d,l,c) memset(d,c,l)
#endif /* __MEM_H */
- Raw text -