From 8f13fe33b766c69b10674558003d070aea5da1f2 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 3 Aug 2001 09:38:03 +0000 Subject: [PATCH] * src/complain.c: Adjust strerror_r portability issues. --- ChangeLog | 4 ++++ po/de.gmo | Bin 8417 -> 8417 bytes po/de.po | 14 +++++++------- po/es.po | 14 +++++++------- po/et.gmo | Bin 10791 -> 10791 bytes po/et.po | 14 +++++++------- po/fr.gmo | Bin 8356 -> 8356 bytes po/fr.po | 14 +++++++------- po/ja.gmo | Bin 8255 -> 8255 bytes po/ja.po | 14 +++++++------- po/nl.gmo | Bin 7374 -> 7374 bytes po/nl.po | 14 +++++++------- po/ru.gmo | Bin 11087 -> 11087 bytes po/ru.po | 14 +++++++------- src/complain.c | 46 +++++++++++++++++++++++++++++++++++++++++++++- 15 files changed, 98 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74ce79a1..f3d5f2e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-08-03 Akim Demaille + + * src/complain.c: Adjust strerror_r portability issues. + 2001-08-03 Akim Demaille Version 1.28a. diff --git a/po/de.gmo b/po/de.gmo index bdcfe394f2158fed01bb0bce938980367cc58329..12bba58dbaf4e53a013f44dcc6151032febc6b84 100644 GIT binary patch delta 15 XcmaFp_|S2~A0Z}Vi_QOp9`gbKJ(LF{ delta 15 XcmaFp_|S2~A0Z|K)6M^c9`gbKJ#7aa diff --git a/po/de.po b/po/de.po index 19948f9c..7a0d6adf 100644 --- a/po/de.po +++ b/po/de.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.25\n" -"POT-Creation-Date: 2001-08-03 11:05+0200\n" +"POT-Creation-Date: 2001-08-03 11:38+0200\n" "PO-Revision-Date: 1996-10-10 17:54 MET DST\n" "Last-Translator: Ulrich Drepper \n" "Language-Team: German \n" @@ -18,11 +18,15 @@ msgstr "" msgid "too many states (max %d)" msgstr "" -#: src/complain.c:110 +#: lib/error.c:117 src/complain.c:100 +msgid "Unknown system error" +msgstr "" + +#: src/complain.c:154 msgid "warning: " msgstr "" -#: src/complain.c:198 src/complain.c:239 +#: src/complain.c:242 src/complain.c:283 #, fuzzy msgid "fatal error: " msgstr "fataler Fehler: %s\n" @@ -696,10 +700,6 @@ msgstr "" "Reduzierung von %s definiert %d Terminal, %d Nicht-Terminal und %d " "Produktionen.\n" -#: lib/error.c:117 -msgid "Unknown system error" -msgstr "" - #: lib/getopt.c:675 #, c-format msgid "%s: option `%s' is ambiguous\n" diff --git a/po/es.po b/po/es.po index 3c81b2b6..82ecae09 100644 --- a/po/es.po +++ b/po/es.po @@ -30,7 +30,7 @@ msgid "" msgstr "" "Project-Id-Version: GNU bison 1.25\n" -"POT-Creation-Date: 2001-08-03 11:05+0200\n" +"POT-Creation-Date: 2001-08-03 11:38+0200\n" "PO-Revision-Date: 1998-09-21 10:19+0200\n" "Last-Translator: Nicolás García-Pedrajas \n" "Language-Team: Spanish \n" @@ -43,7 +43,11 @@ msgstr "" msgid "too many states (max %d)" msgstr "" -#: src/complain.c:110 +#: lib/error.c:117 src/complain.c:100 +msgid "Unknown system error" +msgstr "" + +#: src/complain.c:154 msgid "warning: " msgstr "" @@ -54,7 +58,7 @@ msgstr "" # La verdad es que a mi lo de error fatal me suena fatal # ngp # -#: src/complain.c:198 src/complain.c:239 +#: src/complain.c:242 src/complain.c:283 #, fuzzy msgid "fatal error: " msgstr "error grave: %s\n" @@ -807,10 +811,6 @@ msgstr "" "la reducción de %s define %d terminal%s, %d no terminal%s, y %d produccion%" "s.\n" -#: lib/error.c:117 -msgid "Unknown system error" -msgstr "" - #: lib/getopt.c:675 #, c-format msgid "%s: option `%s' is ambiguous\n" diff --git a/po/et.gmo b/po/et.gmo index 67488ebacb657fe578e2737f31ac291d5ef326ad..5154dc3734192e1ab7703af5dd6cedbdb18cb14e 100644 GIT binary patch delta 15 WcmZ1;vOHvis3eoI#b$9y0YLyOIs`@l delta 15 WcmZ1;vOHvis3ent>1J_B0YLyO69hm2 diff --git a/po/et.po b/po/et.po index a4e48c41..0893e5f6 100644 --- a/po/et.po +++ b/po/et.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.25\n" -"POT-Creation-Date: 2001-08-03 11:05+0200\n" +"POT-Creation-Date: 2001-08-03 11:38+0200\n" "PO-Revision-Date: 2000-04-11 22:19+02:00\n" "Last-Translator: Toomas Soome \n" "Language-Team: Estonian \n" @@ -18,11 +18,15 @@ msgstr "" msgid "too many states (max %d)" msgstr "liiga palju olekuid (maks %d)" -#: src/complain.c:110 +#: lib/error.c:117 src/complain.c:100 +msgid "Unknown system error" +msgstr "" + +#: src/complain.c:154 msgid "warning: " msgstr "" -#: src/complain.c:198 src/complain.c:239 +#: src/complain.c:242 src/complain.c:283 #, fuzzy msgid "fatal error: " msgstr "fataalne viga: %s\n" @@ -716,10 +720,6 @@ msgstr "" "redutseeritud %s defineerib %d terminali%s, %d mitteterminali%s ja %d reeglit" "%s.\n" -#: lib/error.c:117 -msgid "Unknown system error" -msgstr "" - #: lib/getopt.c:675 #, c-format msgid "%s: option `%s' is ambiguous\n" diff --git a/po/fr.gmo b/po/fr.gmo index a2c7fdcd5a8ea3d06e35a74277230843ac511670..a6bf261151d8035e959b19d991d3ae8ccc7279e4 100644 GIT binary patch delta 15 XcmZ4DxWsY8A0Z}Vi_QOpmhl1rHf{!N delta 15 XcmZ4DxWsY8A0Z|K)6M^cmhl1rHb(|# diff --git a/po/fr.po b/po/fr.po index 20edbe42..509a0219 100644 --- a/po/fr.po +++ b/po/fr.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.25\n" -"POT-Creation-Date: 2001-08-03 11:05+0200\n" +"POT-Creation-Date: 2001-08-03 11:38+0200\n" "PO-Revision-Date: 1996-03-19 20:05 EST\n" "Last-Translator: Dominique Boucher \n" "Language-Team: French \n" @@ -18,11 +18,15 @@ msgstr "" msgid "too many states (max %d)" msgstr "" -#: src/complain.c:110 +#: lib/error.c:117 src/complain.c:100 +msgid "Unknown system error" +msgstr "" + +#: src/complain.c:154 msgid "warning: " msgstr "" -#: src/complain.c:198 src/complain.c:239 +#: src/complain.c:242 src/complain.c:283 #, fuzzy msgid "fatal error: " msgstr "erreur fatale: %s\n" @@ -700,10 +704,6 @@ msgstr "" "la réduction de %s définit %d terminal%s, %d catégorie%s et %d production%" "s.\n" -#: lib/error.c:117 -msgid "Unknown system error" -msgstr "" - #: lib/getopt.c:675 #, c-format msgid "%s: option `%s' is ambiguous\n" diff --git a/po/ja.gmo b/po/ja.gmo index 7c9810c13649095ee84910edc51a2bc0d3229698..897468942acf27901f4fae14060ee5861e91afe0 100644 GIT binary patch delta 15 Wcmdn*u-{?BdSNDGi_IH_`*;8}?FH`u delta 15 Wcmdn*u-{?BdSNC5)6E-&`*;8}#s%pB diff --git a/po/ja.po b/po/ja.po index b99b93bf..15562288 100644 --- a/po/ja.po +++ b/po/ja.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: GNU bison 1.28\n" -"POT-Creation-Date: 2001-08-03 11:05+0200\n" +"POT-Creation-Date: 2001-08-03 11:38+0200\n" "PO-Revision-Date: 1999-09-28 21:10+0900\n" "Last-Translator: Daisuke Yamashita \n" "Language-Team: Japanese \n" @@ -18,11 +18,15 @@ msgstr "" msgid "too many states (max %d)" msgstr "%s ¤Î¿ô¤¬Â¿¤¹¤®¤Þ¤¹ (ºÇÂç %d)" -#: src/complain.c:110 +#: lib/error.c:117 src/complain.c:100 +msgid "Unknown system error" +msgstr "" + +#: src/complain.c:154 msgid "warning: " msgstr "" -#: src/complain.c:198 src/complain.c:239 +#: src/complain.c:242 src/complain.c:283 #, fuzzy msgid "fatal error: " msgstr "%s: Ã×̿Ū¥¨¥é¡¼: " @@ -698,10 +702,6 @@ msgstr "" "´Ô¸µ¥Õ¥¡¥¤¥ë %s ¤Ç %d ¸Ä¤Î½ªÃ¼»Ò%.0s, %d ¸Ä¤ÎÈó½ªÃ¼»Ò%.0s, %d ¸Ä¤Îµ¬Â§%.0s¤¬" "ÄêµÁ¤µ¤ì¤Þ¤·¤¿\n" -#: lib/error.c:117 -msgid "Unknown system error" -msgstr "" - #: lib/getopt.c:675 #, c-format msgid "%s: option `%s' is ambiguous\n" diff --git a/po/nl.gmo b/po/nl.gmo index 0a5e03584ac99daa4683a34d98001bbc237b433d..7b4444676fd54fd9f985b19863afe35b0e11c6be 100644 GIT binary patch delta 15 WcmX?SdCqc!sUVZF#b$HC>D&M>C1K1m>D&M>0R;&F diff --git a/po/nl.po b/po/nl.po index 94554607..1aec041d 100644 --- a/po/nl.po +++ b/po/nl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.25\n" -"POT-Creation-Date: 2001-08-03 11:05+0200\n" +"POT-Creation-Date: 2001-08-03 11:38+0200\n" "PO-Revision-Date: 1996-08-27 15:34 MET DST\n" "Last-Translator: Erick Branderhorst \n" "Language-Team: Dutch \n" @@ -18,11 +18,15 @@ msgstr "" msgid "too many states (max %d)" msgstr "" -#: src/complain.c:110 +#: lib/error.c:117 src/complain.c:100 +msgid "Unknown system error" +msgstr "" + +#: src/complain.c:154 msgid "warning: " msgstr "" -#: src/complain.c:198 src/complain.c:239 +#: src/complain.c:242 src/complain.c:283 #, fuzzy msgid "fatal error: " msgstr "fatale fout: %s\n" @@ -699,10 +703,6 @@ msgstr "" "gereduceerd %s gedefinieerd %d terminal%s, %d nietterminal%s, en %d productie" "%s.\n" -#: lib/error.c:117 -msgid "Unknown system error" -msgstr "" - #: lib/getopt.c:675 #, c-format msgid "%s: option `%s' is ambiguous\n" diff --git a/po/ru.gmo b/po/ru.gmo index e0732d1acd7f4ef6f784934c4e1935f7c0ee8e81..34d7ee5acc052220ba7630c7c65705d4bae3a879 100644 GIT binary patch delta 15 WcmX>fc0O!_m?V?2#byafb0GjQD+I&< delta 15 WcmX>fc0O!_m?V>d>1GK@b0GjQ1O&bS diff --git a/po/ru.po b/po/ru.po index 58fdea56..27adb29b 100644 --- a/po/ru.po +++ b/po/ru.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: bison 1.28a\n" -"POT-Creation-Date: 2001-08-03 11:05+0200\n" +"POT-Creation-Date: 2001-08-03 11:38+0200\n" "PO-Revision-Date: 2000-04-12 13:16+04:00\n" "Last-Translator: Dmitry S. Sivachenko \n" "Language-Team: Russian \n" @@ -18,11 +18,15 @@ msgstr "" msgid "too many states (max %d)" msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÓÏÓÔÏÑÎÉÊ (ÍÁËÓÉÍÁÌØÎÏ %d)" -#: src/complain.c:110 +#: lib/error.c:117 src/complain.c:100 +msgid "Unknown system error" +msgstr "" + +#: src/complain.c:154 msgid "warning: " msgstr "" -#: src/complain.c:198 src/complain.c:239 +#: src/complain.c:242 src/complain.c:283 #, fuzzy msgid "fatal error: " msgstr "ÏÛÉÂËÁ" @@ -717,10 +721,6 @@ msgstr "" "×Ù×ÅÄÅÎÎÙÊ %s ÏÐÒÅÄÅÌÑÅÔ %d ÔÅÒÍÉÎÁÌÏ×%s, %d ÎÅÔÅÒÍÉÎÁÌÏ×%s, É %d ÐÒÁ×ÉÌ " "×Ù×ÏÄÁ%s.\n" -#: lib/error.c:117 -msgid "Unknown system error" -msgstr "" - #: lib/getopt.c:675 #, c-format msgid "%s: option `%s' is ambiguous\n" diff --git a/src/complain.c b/src/complain.c index 35a784ee..b25f0b29 100644 --- a/src/complain.c +++ b/src/complain.c @@ -47,18 +47,62 @@ void exit (); #include "complain.h" +#ifndef HAVE_DECL_STRERROR_R +"this configure-time declaration test was not run" +#endif +#if !HAVE_DECL_STRERROR_R +char *strerror_r (); +#endif + #ifndef _ # define _(String) String #endif #ifdef _LIBC /* In the GNU C library, there is a predefined variable for this. */ + # define program_name program_invocation_name +# include + +/* In GNU libc we want do not want to use the common name `error' directly. + Instead make it a weak alias. */ +# define error __error +# define error_at_line __error_at_line + +# ifdef USE_IN_LIBIO +# include +# define fflush(s) _IO_fflush (s) +# endif + #else /* not _LIBC */ + /* The calling program should define program_name and set it to the name of the executing program. */ extern char *program_name; -#endif + +# ifdef HAVE_STRERROR_R +# define __strerror_r strerror_r +# else +# if HAVE_STRERROR +# ifndef strerror /* On some systems, strerror is a macro */ +char *strerror (); +# endif +# else +static char * +private_strerror (errnum) + int errnum; +{ + extern char *sys_errlist[]; + extern int sys_nerr; + + if (errnum > 0 && errnum <= sys_nerr) + return _(sys_errlist[errnum]); + return _("Unknown system error"); +} +# define strerror private_strerror +# endif /* HAVE_STRERROR */ +# endif /* HAVE_STRERROR_R */ +#endif /* not _LIBC */ /* This variable is incremented each time `warn' is called. */ unsigned int warn_message_count; -- 2.45.2