Go back to just using normal visibility for the locale symbols. Without

an actual specifier like dllimport, protected visibility is unusable.
This commit is contained in:
joerg 2016-04-29 16:26:48 +00:00
parent a114fff726
commit 5d45063308
3 changed files with 4 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: locale.h,v 1.27 2016/03/17 17:36:32 christos Exp $ */
/* $NetBSD: locale.h,v 1.28 2016/04/29 16:26:48 joerg Exp $ */
/*
* Copyright (c) 1991, 1993
@ -106,20 +106,12 @@ void freelocale(locale_t);
struct lconv *localeconv_l(locale_t);
locale_t newlocale(int, const char *, locale_t);
#ifdef __clang__
extern struct _locale _lc_global_locale;
#else
extern __dso_protected struct _locale _lc_global_locale;
#endif
#define LC_GLOBAL_LOCALE (&_lc_global_locale)
#endif /* _POSIX_SOURCE >= 200809 || _NETBSD_SOURCE */
#if defined(_NETBSD_SOURCE)
#ifdef __clang__
extern const struct _locale _lc_C_locale;
#else
extern __dso_protected const struct _locale _lc_C_locale;
#endif
#define LC_C_LOCALE ((locale_t)__UNCONST(&_lc_C_locale))
#endif
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: global_locale.c,v 1.24 2016/03/17 17:38:14 christos Exp $ */
/* $NetBSD: global_locale.c,v 1.25 2016/04/29 16:26:48 joerg Exp $ */
/*-
* Copyright (c)2008 Citrus Project,
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: global_locale.c,v 1.24 2016/03/17 17:38:14 christos Exp $");
__RCSID("$NetBSD: global_locale.c,v 1.25 2016/04/29 16:26:48 joerg Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@ -143,9 +143,6 @@ __dso_hidden const struct _locale_cache_t _C_cache = {
.numeric_name = _lc_C_locale_name,
};
#ifndef __clang__
__dso_protected
#endif
struct _locale _lc_global_locale = {
.cache = &_C_cache,
.query = { _C_LOCALE },
@ -174,9 +171,6 @@ struct _locale _lc_global_locale = {
},
};
#ifndef __clang__
__dso_protected
#endif
const struct _locale _lc_C_locale = {
.cache = &_C_cache,
.query = { _C_LOCALE },

View File

@ -1,4 +1,4 @@
/* $NetBSD: setlocale_local.h,v 1.16 2016/01/29 15:18:08 christos Exp $ */
/* $NetBSD: setlocale_local.h,v 1.17 2016/04/29 16:26:48 joerg Exp $ */
/*-
* Copyright (c)2008 Citrus Project,
@ -85,9 +85,6 @@ int _setlocale_cache(locale_t, struct _locale_cache_t *);
__END_DECLS
#ifdef _LIBC
#if 0
extern __dso_protected struct _locale _lc_global_locale;
#endif
extern __dso_hidden const struct _locale_cache_t _C_cache;
static __inline struct _locale *