string_.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Copyright (C) 1989, 1992, 1993, 1994, 1998, 1999 Aladdin Enterprises. All rights reserved.
  2. This software is provided AS-IS with no warranty, either express or
  3. implied.
  4. This software is distributed under license and may not be copied,
  5. modified or distributed except as expressly authorized under the terms
  6. of the license contained in the file LICENSE in this distribution.
  7. For more information about licensing, please refer to
  8. http://www.ghostscript.com/licensing/. For information on
  9. commercial licensing, go to http://www.artifex.com/licensing/ or
  10. contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  11. San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  12. */
  13. /* $Id: string_.h,v 1.4 2002/02/21 22:24:54 giles Exp $ */
  14. /* Generic substitute for Unix string.h */
  15. #ifndef string__INCLUDED
  16. # define string__INCLUDED
  17. /* We must include std.h before any file that includes sys/types.h. */
  18. #include "std.h"
  19. #ifdef BSD4_2
  20. # include <strings.h>
  21. # define strchr index
  22. #else
  23. # ifdef MEMORY__NEED_MEMMOVE
  24. # undef memmove /* This is disgusting, but so is GCC */
  25. # endif
  26. # include <string.h>
  27. # if defined(THINK_C)
  28. /* Patch strlen to return a uint rather than a size_t. */
  29. # define strlen (uint)strlen
  30. # endif
  31. # ifdef MEMORY__NEED_MEMMOVE
  32. # define memmove(dest,src,len) gs_memmove(dest,src,len)
  33. # endif
  34. #endif
  35. #endif /* string__INCLUDED */