1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
/* Copyright (c) 1992, 1998, 2000, 2005, 2006 John E. Davis
* This file is part of JED editor library source.
*
* You may distribute this file under the terms the GNU General Public
* License. See the file COPYING for more information.
*/
#ifndef _JD_MACROS_H_
#define _JD_MACROS_H_
/* This file defines some macros that I use with programs that link to
* the slang library.
*/
#ifdef HAVE_MALLOC_H
# if !defined(__FreeBSD__)
# include <malloc.h>
# endif
#endif
#ifdef HAVE_MEMORY_H
# include <memory.h>
#endif
#ifndef SLMEMSET
# ifdef HAVE_MEMSET
# define SLMEMSET memset
# else
# define SLMEMSET SLmemset
# endif
#endif
#ifndef SLMEMCHR
# ifdef HAVE_MEMCHR
# define SLMEMCHR memchr
# else
# define SLMEMCHR SLmemchr
# endif
#endif
#ifndef SLMEMCPY
# ifdef HAVE_MEMCPY
# define SLMEMCPY memcpy
# else
# define SLMEMCPY SLmemcpy
# endif
#endif
/* Note: HAVE_MEMCMP requires an unsigned memory comparison!!! */
#ifndef SLMEMCMP
# ifdef HAVE_MEMCMP
# define SLMEMCMP memcmp
# else
# define SLMEMCMP SLmemcmp
# endif
#endif
#if defined(__QNX__) && defined(__WATCOMC__)
# include <unix.h>
#endif
#ifndef SLFUTURE_CONST
# define SLFUTURE_CONST
#endif
#endif /* _JD_MACROS_H_ */
|