summaryrefslogtreecommitdiff
path: root/catgets
diff options
context:
space:
mode:
Diffstat (limited to 'catgets')
-rw-r--r--catgets/Makefile5
-rw-r--r--catgets/catgets.c6
-rw-r--r--catgets/catgetsinfo.h12
-rw-r--r--catgets/gencat.c4
-rw-r--r--catgets/nl_types.h2
-rw-r--r--catgets/open_catalog.c10
-rwxr-xr-xcatgets/test-gencat.sh2
-rw-r--r--catgets/tst-catgets.c2
-rw-r--r--catgets/xopen-msg.awk7
9 files changed, 28 insertions, 22 deletions
diff --git a/catgets/Makefile b/catgets/Makefile
index 0c6ac79923..36f6a226c3 100644
--- a/catgets/Makefile
+++ b/catgets/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2016 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -38,6 +38,7 @@ tests-special += $(objpfx)tst-catgets-mem.out
endif
gencat-modules = xmalloc
+others-extras = $(gencat-modules)
# To find xmalloc.c
vpath %.c ../locale/programs
@@ -47,7 +48,7 @@ include ../Rules
$(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o)
-catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"'
+catgets-CPPFLAGS := -DNLSPATH='"$(localedir)/%L/%N:$(localedir)/%L/LC_MESSAGES/%N:$(localedir)/%l/%N:$(localedir)/%l/LC_MESSAGES/%N:"'
generated += de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
test-gencat.h
diff --git a/catgets/catgets.c b/catgets/catgets.c
index 6b208c3d42..ab203517b8 100644
--- a/catgets/catgets.c
+++ b/catgets/catgets.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.org>.
@@ -102,8 +102,8 @@ catgets (nl_catd catalog_desc, int set, int message, const char *string)
cnt = 0;
do
{
- if (catalog->name_ptr[idx + 0] == (u_int32_t) set
- && catalog->name_ptr[idx + 1] == (u_int32_t) message)
+ if (catalog->name_ptr[idx + 0] == (uint32_t) set
+ && catalog->name_ptr[idx + 1] == (uint32_t) message)
return (char *) &catalog->strings[catalog->name_ptr[idx + 2]];
idx += catalog->plane_size * 3;
diff --git a/catgets/catgetsinfo.h b/catgets/catgetsinfo.h
index e48692750b..648042e783 100644
--- a/catgets/catgetsinfo.h
+++ b/catgets/catgetsinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -21,12 +21,12 @@
struct catalog_obj
{
- u_int32_t magic;
- u_int32_t plane_size;
- u_int32_t plane_depth;
+ uint32_t magic;
+ uint32_t plane_size;
+ uint32_t plane_depth;
/* This is in fact two arrays in one: always a pair of name and
pointer into the data area. */
- u_int32_t name_ptr[0];
+ uint32_t name_ptr[0];
};
@@ -37,7 +37,7 @@ typedef struct catalog_info
size_t plane_size;
size_t plane_depth;
- u_int32_t *name_ptr;
+ uint32_t *name_ptr;
const char *strings;
struct catalog_obj *file_ptr;
diff --git a/catgets/gencat.c b/catgets/gencat.c
index 73c94b7570..3dd6858b31 100644
--- a/catgets/gencat.c
+++ b/catgets/gencat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1996.
@@ -246,7 +246,7 @@ print_version (FILE *stream, struct argp_state *state)
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2016");
+"), "2018");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
diff --git a/catgets/nl_types.h b/catgets/nl_types.h
index 202603f6b0..41f0c626cf 100644
--- a/catgets/nl_types.h
+++ b/catgets/nl_types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/catgets/open_catalog.c b/catgets/open_catalog.c
index aaabc45fa3..4ffd75933f 100644
--- a/catgets/open_catalog.c
+++ b/catgets/open_catalog.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.org>.
@@ -50,7 +50,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
char *buf = NULL;
if (strchr (cat_name, '/') != NULL || nlspath == NULL)
- fd = open_not_cancel_2 (cat_name, O_RDONLY);
+ fd = __open_nocancel (cat_name, O_RDONLY);
else
{
const char *run_nlspath = nlspath;
@@ -178,7 +178,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
if (bufact != 0)
{
- fd = open_not_cancel_2 (buf, O_RDONLY);
+ fd = __open_nocancel (buf, O_RDONLY);
if (fd >= 0)
break;
}
@@ -237,7 +237,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
/* Save read, handle partial reads. */
do
{
- size_t now = read_not_cancel (fd, (((char *) catalog->file_ptr)
+ size_t now = __read_nocancel (fd, (((char *) catalog->file_ptr)
+ (st.st_size - todo)), todo);
if (now == 0 || now == (size_t) -1)
{
@@ -328,7 +328,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
/* Release the lock again. */
close_unlock_return:
- close_not_cancel_no_status (fd);
+ __close_nocancel_nostatus (fd);
free (buf);
return result;
diff --git a/catgets/test-gencat.sh b/catgets/test-gencat.sh
index 48b21207c9..ad0b75b84d 100755
--- a/catgets/test-gencat.sh
+++ b/catgets/test-gencat.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Test escape character handling in gencat.
-# Copyright (C) 2000-2016 Free Software Foundation, Inc.
+# Copyright (C) 2000-2018 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
diff --git a/catgets/tst-catgets.c b/catgets/tst-catgets.c
index 0886938d53..7169ceb841 100644
--- a/catgets/tst-catgets.c
+++ b/catgets/tst-catgets.c
@@ -22,7 +22,7 @@ do_bz17905 (void)
{
char *buf;
struct rlimit rl;
- nl_catd result;
+ nl_catd result __attribute__ ((unused));
const int sz = 1024 * 1024;
diff --git a/catgets/xopen-msg.awk b/catgets/xopen-msg.awk
index 47cff8857c..bab0f6b4ef 100644
--- a/catgets/xopen-msg.awk
+++ b/catgets/xopen-msg.awk
@@ -1,5 +1,5 @@
# xopen-msg.awk - Convert Uniforum style .po file to X/Open style .msg file
-# Copyright (C) 2012-2016 Free Software Foundation, Inc.
+# Copyright (C) 2012-2018 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -58,6 +58,11 @@ $1 ~ "msg(id|str)" {
next
}
+/^"POT-Creation-Date: [0-9-]+ [0-9:+-]+\\n"/ {
+ # Ignore POT-Creation-Date to match what is done in intl/Makefile.
+ next
+}
+
/^".*"/ {
# Append to current message
sub(/^"/, "", $0)