summaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-05-23 23:37:00 +0200
committerThomas Schwinge <thomas@codesourcery.com>2013-05-23 23:37:00 +0200
commitf9e888643115b4b2f28853ebd1733f4410fb8839 (patch)
tree58c69f6cef623679080e8933b6c79880bfbd7cb8 /locale
parentd78eef6ebc008f784f501ce208bef12c6eafda27 (diff)
parentb934acf0e93c5a220551ed6e686bb9d45a24a8cc (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'locale')
-rw-r--r--locale/elem-hash.h2
-rw-r--r--locale/programs/locale.c5
-rw-r--r--locale/programs/localedef.c11
-rw-r--r--locale/programs/localedef.h8
-rw-r--r--locale/programs/locarchive.c2
-rw-r--r--locale/programs/simple-hash.c5
-rw-r--r--locale/setlocale.c2
7 files changed, 12 insertions, 23 deletions
diff --git a/locale/elem-hash.h b/locale/elem-hash.h
index 4343ef561c..eb53c1ee38 100644
--- a/locale/elem-hash.h
+++ b/locale/elem-hash.h
@@ -18,7 +18,7 @@
/* The hashing function used for the table with collation symbols. */
-static inline int32_t
+static int32_t __attribute__ ((pure, unused))
elem_hash (const char *str, int_fast32_t n)
{
int32_t result = n;
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 13e5234954..8dc528c115 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -42,10 +42,7 @@
#include "localeinfo.h"
#include "charmap-dir.h"
#include "../locarchive.h"
-
-extern void *xmalloc (size_t n)
- __attribute_malloc__ __attribute_alloc_size (1);
-extern char *xstrdup (const char *) __attribute_malloc__;
+#include <programs/xmalloc.h>
#define ARCHIVE_NAME LOCALEDIR "/locale-archive"
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 16129bb8f7..5a14f2ce32 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -117,17 +117,18 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
static const struct argp_option options[] =
{
{ NULL, 0, NULL, 0, N_("Input Files:") },
- { "charmap", 'f', "FILE", 0,
+ { "charmap", 'f', N_("FILE"), 0,
N_("Symbolic character names defined in FILE") },
- { "inputfile", 'i', "FILE", 0, N_("Source definitions are found in FILE") },
- { "repertoire-map", 'u', "FILE", 0,
+ { "inputfile", 'i', N_("FILE"), 0,
+ N_("Source definitions are found in FILE") },
+ { "repertoire-map", 'u', N_("FILE"), 0,
N_("FILE contains mapping from symbolic names to UCS4 values") },
{ NULL, 0, NULL, 0, N_("Output control:") },
{ "force", 'c', NULL, 0,
N_("Create output even if warning messages were issued") },
{ "old-style", OPT_OLDSTYLE, NULL, 0, N_("Create old-style tables") },
- { "prefix", OPT_PREFIX, "PATH", 0, N_("Optional output file prefix") },
+ { "prefix", OPT_PREFIX, N_("PATH"), 0, N_("Optional output file prefix") },
{ "posix", OPT_POSIX, NULL, 0, N_("Strictly conform to POSIX") },
{ "quiet", OPT_QUIET, NULL, 0,
N_("Suppress warnings and information messages") },
@@ -141,7 +142,7 @@ static const struct argp_option options[] =
{ "delete-from-archive", OPT_DELETE_FROM_ARCHIVE, NULL, 0,
N_("Remove locales named by parameters from archive") },
{ "list-archive", OPT_LIST_ARCHIVE, NULL, 0, N_("List content of archive") },
- { "alias-file", 'A', "FILE", 0,
+ { "alias-file", 'A', N_("FILE"), 0,
N_("locale.alias file to consult when making archive")},
{ NULL, 0, NULL, 0, NULL }
};
diff --git a/locale/programs/localedef.h b/locale/programs/localedef.h
index 7ca65c6639..e010c72983 100644
--- a/locale/programs/localedef.h
+++ b/locale/programs/localedef.h
@@ -120,13 +120,7 @@ extern const char *alias_file;
/* Prototypes for a few program-wide used functions. */
-extern void *xmalloc (size_t n)
- __attribute_malloc__ __attribute_alloc_size (1);
-extern void *xcalloc (size_t n, size_t s)
- __attribute_malloc__ __attribute_alloc_size (1, 2);
-extern void *xrealloc (void *o, size_t n)
- __attribute_malloc__ __attribute_alloc_size (2);
-extern char *xstrdup (const char *) __attribute_malloc__;
+#include <programs/xmalloc.h>
/* Wrapper to switch LC_CTYPE back to the locale specified in the
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index f020afd7a2..edd109a849 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -45,7 +45,7 @@
/* Define the hash function. We define the function as static inline.
We must change the name so as not to conflict with simple-hash.h. */
-#define compute_hashval static inline archive_hashval
+#define compute_hashval static archive_hashval
#define hashval_t uint32_t
#include "hashval.h"
#undef compute_hashval
diff --git a/locale/programs/simple-hash.c b/locale/programs/simple-hash.c
index 530ba724e8..d65b6fb3f0 100644
--- a/locale/programs/simple-hash.c
+++ b/locale/programs/simple-hash.c
@@ -52,10 +52,7 @@
#define hashval_t uint32_t
#include "hashval.h"
-extern void *xmalloc (size_t n)
- __attribute_malloc__ __attribute_alloc_size (1);
-extern void *xcalloc (size_t n, size_t s)
- __attribute_malloc__ __attribute_alloc_size (1, 2);
+#include <programs/xmalloc.h>
typedef struct hash_entry
{
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 31f6585272..be95519e9f 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -204,7 +204,7 @@ setname (int category, const char *name)
}
/* Put DATA in *_nl_current[CATEGORY]. */
-static inline void
+static void
setdata (int category, struct __locale_data *data)
{
if (CATEGORY_USED (category))