Switch to unified view

a/src/conf_post.h b/src/conf_post.h
1
2
/* Copyright (C) 2016 J.F.Dockes
1
/* Copyright (C) 2016 J.F.Dockes
3
 *   This program is free software; you can redistribute it and/or modify
2
 *   This program is free software; you can redistribute it and/or modify
4
 *   it under the terms of the GNU General Public License as published by
3
 *   it under the terms of the GNU General Public License as published by
5
 *   the Free Software Foundation; either version 2 of the License, or
4
 *   the Free Software Foundation; either version 2 of the License, or
6
 *   (at your option) any later version.
5
 *   (at your option) any later version.
...
...
14
 *   along with this program; if not, write to the
13
 *   along with this program; if not, write to the
15
 *   Free Software Foundation, Inc.,
14
 *   Free Software Foundation, Inc.,
16
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17
 */
16
 */
18
17
19
// conf_post: manual part included by auto-generated config.h. Avoid
18
/* conf_post: manual part included by auto-generated config.h. Avoid
20
// being clobbered by autoheader, and undefine some problematic
19
 * being clobbered by autoheader, and undefine some problematic
21
// symbols.
20
 * symbols.
21
 */
22
22
23
// Get rid of macro names which could conflict with other package's
23
// Get rid of macro names which could conflict with other package's
24
#if defined(UPMPDCLI_NEED_PACKAGE_VERSION) && \
24
#if defined(UPMPDCLI_NEED_PACKAGE_VERSION) && \
25
    !defined(UPMPDCLI_PACKAGE_VERSION_DEFINED)
25
    !defined(UPMPDCLI_PACKAGE_VERSION_DEFINED)
26
#define UPMPDCLI_PACKAGE_VERSION_DEFINED
26
#define UPMPDCLI_PACKAGE_VERSION_DEFINED
...
...
31
#undef PACKAGE_STRING
31
#undef PACKAGE_STRING
32
#undef PACKAGE_TARNAME
32
#undef PACKAGE_TARNAME
33
#undef PACKAGE_URL
33
#undef PACKAGE_URL
34
#undef PACKAGE_VERSION
34
#undef PACKAGE_VERSION
35
35
36
#define HAVE_CXX0X_UNORDERED
36
#ifdef __cplusplus
37
#define HAVE_SHARED_PTR_STD
38
// upmpdcli: requires c++0x but we still need the defs for c++
39
// versions below because of execmd et al.
40
41
#ifdef  HAVE_CXX0X_UNORDERED
37
#ifdef  HAVE_CXX0X_UNORDERED
42
#  define UNORDERED_MAP_INCLUDE <unordered_map>
38
#  define UNORDERED_MAP_INCLUDE <unordered_map>
43
#  define UNORDERED_SET_INCLUDE <unordered_set>
39
#  define UNORDERED_SET_INCLUDE <unordered_set>
40
#  include <functional>
44
#  define STD_UNORDERED_MAP std::unordered_map
41
#  define STD_UNORDERED_MAP std::unordered_map
45
#  define STD_UNORDERED_SET std::unordered_set
42
#  define STD_UNORDERED_SET std::unordered_set
43
#  define STD_FUNCTION      std::function
44
#  define STD_BIND          std::bind
45
#  define STD_PLACEHOLDERS  std::placeholders
46
#elif defined(HAVE_TR1_UNORDERED)
46
#elif defined(HAVE_TR1_UNORDERED)
47
#  define UNORDERED_MAP_INCLUDE <tr1/unordered_map>
47
#  define UNORDERED_MAP_INCLUDE <tr1/unordered_map>
48
#  define UNORDERED_SET_INCLUDE <tr1/unordered_set>
48
#  define UNORDERED_SET_INCLUDE <tr1/unordered_set>
49
#  include <tr1/functional>
49
#  define STD_UNORDERED_MAP std::tr1::unordered_map
50
#  define STD_UNORDERED_MAP std::tr1::unordered_map
50
#  define STD_UNORDERED_SET std::tr1::unordered_set
51
#  define STD_UNORDERED_SET std::tr1::unordered_set
52
#  define STD_FUNCTION      std::tr1::function
53
#  define STD_BIND          std::tr1::bind
54
#  define STD_PLACEHOLDERS  std::tr1::placeholders
51
#else
55
#else
52
#  define UNORDERED_MAP_INCLUDE <map>
56
#  define UNORDERED_MAP_INCLUDE <map>
53
#  define UNORDERED_SET_INCLUDE <set>
57
#  define UNORDERED_SET_INCLUDE <set>
54
#  define STD_UNORDERED_MAP std::map
58
#  define STD_UNORDERED_MAP std::map
55
#  define STD_UNORDERED_SET std::set
59
#  define STD_UNORDERED_SET std::set
60
/* Yeah we're cooked if the code uses these features */
61
#  define STD_FUNCTION 
62
#  define STD_BIND
63
#  define STD_PLACEHOLDERS
56
#endif
64
#endif
57
65
58
#ifdef HAVE_SHARED_PTR_STD
66
#ifdef HAVE_SHARED_PTR_STD
59
#  define MEMORY_INCLUDE <memory>
67
#  define MEMORY_INCLUDE <memory>
60
#  define STD_SHARED_PTR    std::shared_ptr
68
#  define STD_SHARED_PTR    std::shared_ptr
69
#  define STD_WEAK_PTR      std::weak_ptr
61
#elif defined(HAVE_SHARED_PTR_TR1)
70
#elif defined(HAVE_SHARED_PTR_TR1)
62
#  define MEMORY_INCLUDE <tr1/memory>
71
#  define MEMORY_INCLUDE <tr1/memory>
63
#  define STD_SHARED_PTR    std::tr1::shared_ptr
72
#  define STD_SHARED_PTR    std::tr1::shared_ptr
73
#  define STD_WEAK_PTR      std::tr1::weak_ptr
64
#else
74
#else
65
#  define MEMORY_INCLUDE "refcntr.h"
75
#  define MEMORY_INCLUDE "refcntr.h"
66
#  define STD_SHARED_PTR    RefCntr
76
#  define STD_SHARED_PTR    RefCntr
67
#endif
77
#endif
78
79
#endif /* c++ */