localcharset.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Determine a canonical name for the current locale's character encoding.
  2. Copyright (C) 2000-2003 Free Software Foundation, Inc.
  3. This file is part of the GNU CHARSET Library.
  4. This program is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU Library General Public License as published
  6. by the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this program; if not, see <http://www.gnu.org/licenses/>. */
  14. #ifndef _LOCALCHARSET_H
  15. #define _LOCALCHARSET_H
  16. // #if HAVE_VISIBILITY && BUILDING_LIBCHARSET
  17. // #define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default")))
  18. // #else
  19. // #define LIBCHARSET_DLL_EXPORTED
  20. // #endif
  21. #ifdef BUILDING_LIBCHARSET
  22. #define LIBCHARSET_DLL_EXPORTED __declspec(dllexport)
  23. #elif USING_STATIC_LIBICONV
  24. #define LIBCHARSET_DLL_EXPORTED
  25. #else
  26. #define LIBCHARSET_DLL_EXPORTED __declspec(dllimport)
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. /* Determine the current locale's character encoding, and canonicalize it
  32. into one of the canonical names listed in config.charset.
  33. The result must not be freed; it is statically allocated.
  34. If the canonical name cannot be determined, the result is a non-canonical
  35. name. */
  36. extern LIBCHARSET_DLL_EXPORTED const char * locale_charset (void);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif /* _LOCALCHARSET_H */