Deleted Added
full compact
runetype.h (231682) runetype.h (231714)
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Paul Borman at Krystal Technologies.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)runetype.h 8.1 (Berkeley) 6/2/93
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Paul Borman at Krystal Technologies.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)runetype.h 8.1 (Berkeley) 6/2/93
33 * $FreeBSD: head/include/runetype.h 231682 2012-02-14 14:24:37Z theraven $
33 * $FreeBSD: head/include/runetype.h 231714 2012-02-14 21:48:46Z dim $
34 */
35
36#ifndef _RUNETYPE_H_
37#define _RUNETYPE_H_
38
39#include <sys/cdefs.h>
40#include <sys/_types.h>
41

--- 38 unchanged lines hidden (view full) ---

80
81 void *__variable; /* Data which depends on the encoding */
82 int __variable_len; /* how long that data is */
83} _RuneLocale;
84
85#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */
86__BEGIN_DECLS
87extern const _RuneLocale _DefaultRuneLocale;
34 */
35
36#ifndef _RUNETYPE_H_
37#define _RUNETYPE_H_
38
39#include <sys/cdefs.h>
40#include <sys/_types.h>
41

--- 38 unchanged lines hidden (view full) ---

80
81 void *__variable; /* Data which depends on the encoding */
82 int __variable_len; /* how long that data is */
83} _RuneLocale;
84
85#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */
86__BEGIN_DECLS
87extern const _RuneLocale _DefaultRuneLocale;
88extern const _RuneLocale *_CurrentRuneLocale;
89#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL)
90extern const _RuneLocale *__getCurrentRuneLocale(void);
91#else
92extern const _Thread_local _RuneLocale *_ThreadRuneLocale;
93static inline const _RuneLocale *__getCurrentRuneLocale(void)
94{
95
96 if (_ThreadRuneLocale)
97 return _ThreadRuneLocale;
98 if (_CurrentRuneLocale)
99 return _CurrentRuneLocale;
100 return &_DefaultRuneLocale;
101}
102#endif /* __NO_TLS || __RUNETYPE_INTERNAL */
88__attribute__((deprecated))
89extern _RuneLocale *_CurrentRuneLocale;
90/* TODO: This is called quite a lot, so we should use a __thread variable when
91 * it's available. */
92extern _RuneLocale *__getCurrentRuneLocale(void);
103#define _CurrentRuneLocale (__getCurrentRuneLocale())
104__END_DECLS
105
106#endif /* !_RUNETYPE_H_ */
93#define _CurrentRuneLocale (__getCurrentRuneLocale())
94__END_DECLS
95
96#endif /* !_RUNETYPE_H_ */