_mbstate_t.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 1999
  3. * Boris Fomitchev
  4. *
  5. * This material is provided "as is", with absolutely no warranty expressed
  6. * or implied. Any use is at your own risk.
  7. *
  8. * Permission to use or copy this software for any purpose is hereby granted
  9. * without fee, provided the above notices are retained on all copies.
  10. * Permission to modify the code and to distribute modified code is granted,
  11. * provided the above notices are retained, and a notice that the code was
  12. * modified is included with the above copyright notice.
  13. *
  14. */
  15. #ifndef _STLP_INTERNAL_MBSTATE_T
  16. #define _STLP_INTERNAL_MBSTATE_T
  17. #if (defined (__OpenBSD__) || defined (__FreeBSD__) || defined (__hpux)) && defined (__GNUC__) && !defined (_GLIBCPP_HAVE_MBSTATE_T)
  18. # define _STLP_CPP_MBSTATE_T /* mbstate_t defined in native <cwchar>, so not defined in C! */
  19. #endif
  20. #if defined (_STLP_NO_NATIVE_MBSTATE_T) || defined (_STLP_CPP_MBSTATE_T) && !defined (_MBSTATE_T)
  21. # define _STLP_USE_OWN_MBSTATE_T
  22. # define _MBSTATE_T
  23. #endif
  24. #if defined (_STLP_USE_OWN_MBSTATE_T)
  25. # if !defined (_STLP_CPP_MBSTATE_T) || !defined (__cplusplus) || !defined (_STLP_USE_NEW_C_HEADERS)
  26. typedef int mbstate_t;
  27. # endif
  28. # if !defined (_STLP_CPP_MBSTATE_T) && defined (__cplusplus) && defined (_STLP_USE_NAMESPACES)
  29. _STLP_BEGIN_NAMESPACE
  30. using ::mbstate_t;
  31. _STLP_END_NAMESPACE
  32. # endif
  33. #endif /* _STLP_USE_OWN_MBSTATE_T */
  34. #endif /* _STLP_INTERNAL_MBSTATE_T */