summaryrefslogtreecommitdiffstats
path: root/gettext-tools
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-10-23 11:19:19 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:14:11 +0200
commit9e151bdf8f1be5d4d6643a03bea76e98b79d6d33 (patch)
tree229eb78c4691caf5a7765e54164d821d4e964c52 /gettext-tools
parentf6fb612653067742d0962cb0350bb280be78f188 (diff)
downloadexternal_gettext-9e151bdf8f1be5d4d6643a03bea76e98b79d6d33.zip
external_gettext-9e151bdf8f1be5d4d6643a03bea76e98b79d6d33.tar.gz
external_gettext-9e151bdf8f1be5d4d6643a03bea76e98b79d6d33.tar.bz2
Fix use of gl_lock_t for platforms without any threading.
Diffstat (limited to 'gettext-tools')
-rw-r--r--gettext-tools/src/ChangeLog7
-rw-r--r--gettext-tools/src/msgmerge.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog
index b4707ac..362decd 100644
--- a/gettext-tools/src/ChangeLog
+++ b/gettext-tools/src/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-21 Bruno Haible <bruno@clisp.org>
+
+ * msgmerge.c (struct definitions_ty): Use gl_lock_define to declare
+ the findex_init_lock field.
+ (definitions_init): Use gl_lock_init to initialize it, instead of
+ memcpy hack.
+
2006-10-16 Bruno Haible <bruno@clisp.org>
Work around automake-1.10 problem described in
diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c
index 1cf3fb4..ec4848f 100644
--- a/gettext-tools/src/msgmerge.c
+++ b/gettext-tools/src/msgmerge.c
@@ -619,7 +619,7 @@ struct definitions_ty
message_fuzzy_index_ty *findex;
/* A once-only execution guard for the initialization of the fuzzy index.
Needed for OpenMP. */
- gl_lock_t findex_init_lock;
+ gl_lock_define(, findex_init_lock);
/* The canonical encoding of the compendiums. */
const char *canon_charset;
};
@@ -627,14 +627,12 @@ struct definitions_ty
static inline void
definitions_init (definitions_ty *definitions, const char *canon_charset)
{
- gl_lock_define_initialized (static, fresh_lock)
-
definitions->lists = message_list_list_alloc ();
message_list_list_append (definitions->lists, NULL);
if (compendiums != NULL)
message_list_list_append_list (definitions->lists, compendiums);
definitions->findex = NULL;
- memcpy (&definitions->findex_init_lock, &fresh_lock, sizeof (gl_lock_t));
+ gl_lock_init (definitions->findex_init_lock);
definitions->canon_charset = canon_charset;
}