1 // fg_memory.h -- memcpy/bcopy portability declarations
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License as
5 // published by the Free Software Foundation; either version 2 of the
6 // License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 # define fgmemcmp memcmp
34 # define fgmemcpy memcpy
35 # define fgmemzero(dest,len) memset(dest,0,len)
37 #elif defined(HAVE_BCOPY)
39 # define fgmemcmp bcmp
40 # define fgmemcpy(dest,src,n) bcopy(src,dest,n)
41 # define fgmemzero bzero
46 * Neither memcpy() or bcopy() available.
47 * Use substitutes provided be zlib.
50 # include <zlib/zutil.h>
51 # define fgmemcmp zmemcmp
52 # define fgmemcpy zmemcpy
53 # define fgmemzero zmemzero
57 #endif // _FG_MEMORY_H