mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-06 22:51:41 +00:00
46 lines
1.0 KiB
Plaintext
46 lines
1.0 KiB
Plaintext
|
--- sh.func.c.orig Sun Dec 28 03:14:21 1997
|
||
|
+++ sh.func.c Sun Dec 28 03:15:00 1997
|
||
|
@@ -1273,6 +1273,9 @@
|
||
|
struct command *c;
|
||
|
{
|
||
|
Char *vp, *lp;
|
||
|
+#ifdef __FreeBSD__
|
||
|
+ static int catclosed = 0;
|
||
|
+#endif
|
||
|
|
||
|
USE(c);
|
||
|
if (*++v == 0) {
|
||
|
@@ -1312,9 +1315,19 @@
|
||
|
# ifdef LC_COLLATE
|
||
|
(void) setlocale(LC_COLLATE, "");
|
||
|
# endif
|
||
|
-# if defined(NLS_CATALOGS) && defined(LC_MESSAGES)
|
||
|
+# ifdef NLS_CATALOGS
|
||
|
+# ifdef LC_MESSAGES
|
||
|
(void) setlocale(LC_MESSAGES, "");
|
||
|
+# endif
|
||
|
+# ifdef __FreeBSD__
|
||
|
+ /* This code is to avoid bug. */
|
||
|
+ if (catclosed)
|
||
|
(void) catclose(catd);
|
||
|
+ else
|
||
|
+ catclosed = 1;
|
||
|
+# else
|
||
|
+ (void) catclose(catd);
|
||
|
+# endif /* __FreeBSD__ */
|
||
|
nlsinit();
|
||
|
# endif /* NLS_CATALOGS && LC_MESSAGES */
|
||
|
# ifdef LC_CTYPE
|
||
|
@@ -1487,8 +1500,10 @@
|
||
|
# ifdef LC_COLLATE
|
||
|
(void) setlocale(LC_COLLATE, "");
|
||
|
# endif
|
||
|
-# if defined(NLS_CATALOGS) && defined(LC_MESSAGES)
|
||
|
+# ifdef NLS_CATALOGS
|
||
|
+# ifdef LC_MESSAGES
|
||
|
(void) setlocale(LC_MESSAGES, "");
|
||
|
+# endif
|
||
|
(void) catclose(catd);
|
||
|
nlsinit();
|
||
|
# endif /* NLS_CATALOGS && LC_MESSAGES */
|