1 /* 2 * $XFree86: mit/include/Xfuncs.h,v 2.1 1993/09/12 07:17:52 dawes Exp $ 3 * $XConsortium: Xfuncs.h,v 1.8 91/04/17 09:27:52 rws Exp $ 4 * 5 * Copyright 1990 by the Massachusetts Institute of Technology 6 * 7 * Permission to use, copy, modify, and distribute this software and its 8 * documentation for any purpose and without fee is hereby granted, provided 9 * that the above copyright notice appear in all copies and that both that 10 * copyright notice and this permission notice appear in supporting 11 * documentation, and that the name of M.I.T. not be used in advertising 12 * or publicity pertaining to distribution of the software without specific, 13 * written prior permission. M.I.T. makes no representations about the 14 * suitability of this software for any purpose. It is provided "as is" 15 * without express or implied warranty. 16 * 17 */ 18 19 #ifndef _XFUNCS_H_ 20 #define _XFUNCS_H_ 21 22 #include <X11/Xosdefs.h> 23 24 #ifdef X_USEBFUNCS 25 void bcopy(); 26 void bzero(); 27 int bcmp(); 28 #else 29 #if (__STDC__ && !defined(X_NOT_STDC_ENV) && !defined(sun) && !defined(macII)) || defined(SVR4) || defined(hpux) || defined(_IBMR2) 30 #include <string.h> 31 #define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len)) 32 #define bzero(b,len) memset(b, 0, (size_t)(len)) 33 #define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len)) 34 #else 35 #ifdef sgi 36 #include <bstring.h> 37 #else 38 #ifdef SYSV 39 #ifndef ISC 40 #include <memory.h> 41 #endif 42 #if defined(_XBCOPYFUNC) && !defined(macII) 43 #define bcopy _XBCOPYFUNC 44 #define _XNEEDBCOPYFUNC 45 #endif 46 void bcopy(); 47 #define bzero(b,len) memset(b, 0, len) 48 #define bcmp(b1,b2,len) memcmp(b1, b2, len) 49 #else /* bsd */ 50 void bcopy(); 51 void bzero(); 52 int bcmp(); 53 #endif /* SYSV */ 54 #endif /* sgi */ 55 #endif /* __STDC__ and relatives */ 56 #endif /* X_USEBFUNCS */ 57 58 #ifdef X_BSDSELECT 59 /* For using BSDselect() from libXbsd.a */ 60 int BSDselect( 61 #ifdef __STDC__ 62 int , fd_set *, fd_set *, fd_set *, struct timeval * 63 #endif 64 ); 65 66 #define select(a,b,c,d,e) BSDselect(a,b,c,d,e) 67 #endif /* X_BSDSELECT */ 68 69 #endif /* _XFUNCS_H_ */ 70