Xfuncs.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. *
  3. Copyright 1990, 1998 The Open Group
  4. Permission to use, copy, modify, distribute, and sell this software and its
  5. documentation for any purpose is hereby granted without fee, provided that
  6. the above copyright notice appear in all copies and that both that
  7. copyright notice and this permission notice appear in supporting
  8. documentation.
  9. The above copyright notice and this permission notice shall be included in
  10. all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  15. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  16. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  17. Except as contained in this notice, the name of The Open Group shall not be
  18. used in advertising or otherwise to promote the sale, use or other dealings
  19. in this Software without prior written authorization from The Open Group.
  20. *
  21. */
  22. #ifndef _XFUNCS_H_
  23. # define _XFUNCS_H_
  24. # include <X11/Xosdefs.h>
  25. /* the old Xfuncs.h, for pre-R6 */
  26. # if !(defined(XFree86LOADER) && defined(IN_MODULE))
  27. # ifdef X_USEBFUNCS
  28. void bcopy();
  29. void bzero();
  30. int bcmp();
  31. # else
  32. # if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__) && !defined(_AIX)
  33. # include <memory.h>
  34. void bcopy();
  35. # define bzero(b,len) memset(b, 0, len)
  36. # define bcmp(b1,b2,len) memcmp(b1, b2, len)
  37. # else
  38. # include <string.h>
  39. # if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
  40. # include <strings.h>
  41. # endif
  42. # define _XFUNCS_H_INCLUDED_STRING_H
  43. # endif
  44. # endif /* X_USEBFUNCS */
  45. /* the new Xfuncs.h */
  46. /* the ANSI C way */
  47. # ifndef _XFUNCS_H_INCLUDED_STRING_H
  48. # include <string.h>
  49. # endif
  50. # undef bzero
  51. # define bzero(b,len) memset(b,0,len)
  52. # if defined WIN32 && defined __MINGW32__
  53. # define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
  54. # endif
  55. # endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
  56. #endif /* _XFUNCS_H_ */