Merge pull request #4676 from jmarshallnz/dont_set_scraper_on_tvshow_on_nfo
[vuplus_xbmc] / xbmc / utils / uXstrings.h
1 /*
2  *      Copyright (C) 2013 Team XBMC
3  *      http://xbmc.org
4  *
5  *  This Program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2, or (at your option)
8  *  any later version.
9  *
10  *  This Program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with XBMC; see the file COPYING.  If not, see
17  *  <http://www.gnu.org/licenses/>.
18  *
19  */
20
21 /** @file utils/uXstrings.h
22  *  Declarations of std::u16string and std::u32string for systems without those declarations
23  */
24 #pragma once
25
26 #include <string>
27
28 #ifndef TARGET_WINDOWS
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif // HAVE_CONFIG_H
32
33 #if !defined(HAVE_STD__U16STRING) || !defined(HAVE_STD__U32STRING) 
34 #if defined(HAVE_STDINT_H)
35 #include <stdint.h>
36 #elif defined(HAVE_INTTYPES_H)
37 #include <inttypes.h>
38 #endif // defined(HAVE_INTTYPES_H)
39
40 #ifndef HAVE_STD__U16STRING
41 #ifndef HAVE_CHAR16_T
42 typedef uint_least16_t char16_t;
43 #endif // HAVE_CHAR16_T
44 namespace std
45 {
46   typedef basic_string<char16_t> u16string;
47 }
48 #endif // HAVE_STD__U16STRING
49
50 #ifndef HAVE_STD__U32STRING
51 #ifndef HAVE_CHAR32_T
52 typedef uint_least32_t char32_t;
53 #endif // HAVE_CHAR32_T
54 namespace std
55 {
56   typedef basic_string<char32_t> u32string;
57 }
58 #endif // HAVE_STD__U32STRING
59
60 #endif // !defined(HAVE_STD__U16STRING) || !defined(HAVE_STD__U32STRING) 
61 #endif // TARGET_WINDOWS