1 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/ABOUT-NLS psmisc-20.2.works.clean/ABOUT-NLS
2 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/ABOUT-NLS 2001-04-13 23:00:47.000000000 -0500
3 +++ psmisc-20.2.works.clean/ABOUT-NLS 2004-10-13 15:18:41.000000000 -0500
5 Notes on the Free Translation Project
6 *************************************
8 - Free software is going international! The Free Translation Project
9 -is a way to get maintainers of free software, translators, and users all
10 +Free software is going international! The Free Translation Project is
11 +a way to get maintainers of free software, translators, and users all
12 together, so that will gradually become able to speak many languages.
13 A few packages already provide translations for their messages.
16 Quick configuration advice
17 ==========================
19 - If you want to exploit the full power of internationalization, you
20 +If you want to exploit the full power of internationalization, you
21 should configure it using
23 ./configure --with-included-gettext
28 - Some packages are "localizable" when properly installed; the
29 -programs they contain can be made to speak your own native language.
30 -Most such packages use GNU `gettext'. Other packages have their own
31 -ways to internationalization, predating GNU `gettext'.
32 +Some packages are "localizable" when properly installed; the programs
33 +they contain can be made to speak your own native language. Most such
34 +packages use GNU `gettext'. Other packages have their own ways to
35 +internationalization, predating GNU `gettext'.
37 By default, this package will be installed to allow translation of
38 messages. It will automatically detect whether the system already
43 - As a user, if your language has been installed for this package, you
44 +As a user, if your language has been installed for this package, you
45 only have to set the `LANG' environment variable to the appropriate
46 -ISO 639 `LL' two-letter code prior to using the programs in the
47 -package. For example, let's suppose that you speak German. At the
48 -shell prompt, merely execute `setenv LANG de' (in `csh'),
49 -`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
50 -can be done from your `.login' or `.profile' file, once and for all.
51 +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
52 +and `CC' is an ISO 3166 two-letter country code. For example, let's
53 +suppose that you speak German and live in Germany. At the shell
54 +prompt, merely execute `setenv LANG de_DE' (in `csh'),
55 +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
56 +This can be done from your `.login' or `.profile' file, once and for
59 - Some languages have dialects in different countries. To specify
60 -such a dialect, the notation `LL_CC' can be used, which combines an
61 -ISO 639 language code `LL' and an ISO 3166 two-letter country code
62 -`CC'. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil.
63 + You might think that the country code specification is redundant.
64 +But in fact, some languages have dialects in different countries. For
65 +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
66 +country code serves to distinguish the dialects.
68 + The locale naming convention of `LL_CC', with `LL' denoting the
69 +language and `CC' denoting the country, is the one use on systems based
70 +on GNU libc. On other systems, some variations of this scheme are
71 +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
72 +locales supported by your system for your country by running the command
73 +`locale -a | grep '^LL''.
75 Not all programs have translations for all languages. By default, an
76 English message is shown in place of a nonexistent translation. If you
78 set to the primary language; this is required by other parts of the
79 system libraries. For example, some Swedish users who would rather
80 read translations in German than English for when Swedish is not
81 -available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
82 +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
84 + Special advice for Norwegian users: The language code for Norwegian
85 +bokma*l changed from `no' to `nb' recently (in 2003). During the
86 +transition period, while some message catalogs for this language are
87 +installed under `nb' and some older ones under `no', it's recommended
88 +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
89 +older translations are used.
91 + In the `LANGUAGE' environment variable, but not in the `LANG'
92 +environment variable, `LL_CC' combinations can be abbreviated as `LL'
93 +to denote the language's main dialect. For example, `de' is equivalent
94 +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
95 +(Portuguese as spoken in Portugal) in this context.
100 - For the Free Translation Project to be a success, we need interested
101 +For the Free Translation Project to be a success, we need interested
102 people who like their own language and write it well, and who are also
103 able to synergize with other translators speaking the same language.
104 Each translation team has its own mailing list. The up-to-date list of
105 @@ -155,99 +177,559 @@
109 - Languages are not equally supported in all packages. The following
110 -matrix shows the current state of internationalization, as of July
111 -2000. The matrix shows, in regard of each package, for which languages
112 +Languages are not equally supported in all packages. The following
113 +matrix shows the current state of internationalization, as of January
114 +2004. The matrix shows, in regard of each package, for which languages
115 PO files have been submitted to translation coordination, with a
116 translation percentage of at least 50%.
118 - Ready PO files bg cs da de el en eo es et fi fr gl hr id it
119 - .----------------------------------------------.
122 - bison | [] [] [] [] |
123 - clisp | [] [] [] [] |
125 - diffutils | [] [] [] [] [] |
128 - fileutils | [] [] [] [] [] [] [] [] |
129 - findutils | [] [] [] [] [] [] |
133 - gettext | [] [] [] [] [] [] [] [] [] |
134 - gnupg | [] [] [] [] |
135 - grep | [] [] [] [] [] [] [] [] [] [] |
136 - hello | [] [] [] [] [] [] [] |
138 - indent | [] [] [] [] [] |
139 - libc | [] [] [] [] [] [] [] [] |
142 - m4 | [] [] [] [] [] [] |
143 - make | [] [] [] [] |
146 - ptx | [] [] [] [] [] [] [] |
148 - recode | [] [] [] [] [] [] [] |
149 - sed | [] [] [] [] [] [] [] |
150 - sh-utils | [] [] [] [] [] [] [] [] [] |
151 - sharutils | [] [] [] [] [] [] |
152 - tar | [] [] [] [] [] [] [] |
153 - texinfo | [] [] [] [] |
154 - textutils | [] [] [] [] [] [] [] |
156 - wdiff | [] [] [] [] [] |
157 - wget | [] [] [] [] [] [] [] [] |
158 - `----------------------------------------------'
159 - bg cs da de el en eo es et fi fr gl hr id it
160 - 1 14 15 28 11 1 4 19 12 1 30 16 0 3 12
161 + Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
162 + +----------------------------------------------------+
163 + a2ps | [] [] [] [] |
169 + bash | [] [] [] [] |
174 + bluez-pin | [] [] [] |
177 + console-tools | [] [] |
178 + coreutils | [] [] [] [] |
180 + darkstat | [] () [] |
181 + diffutils | [] [] [] [] [] [] [] |
182 + e2fsprogs | [] [] [] |
183 + enscript | [] [] [] [] |
184 + error | [] [] [] [] [] |
185 + fetchmail | [] () [] [] [] [] |
186 + fileutils | [] [] [] |
187 + findutils | [] [] [] [] [] [] [] |
188 + flex | [] [] [] [] |
191 + gawk | [] [] [] [] |
195 + gettext | [] [] [] [] [] |
196 + gettext-examples | [] [] [] [] |
197 + gettext-runtime | [] [] [] [] [] |
198 + gettext-tools | [] [] [] |
199 + gimp-print | [] [] [] [] [] |
201 + glunarclock | [] [] |
203 + gnucash | [] () [] [] |
204 + gnucash-glossary | [] () [] |
205 + gnupg | [] () [] [] [] [] |
208 + gpe-calendar | [] [] |
209 + gpe-clock | [] [] |
211 + gpe-contacts | [] [] |
214 + gpe-login | [] [] |
215 + gpe-ownerinfo | [] [] |
216 + gpe-sketchbook | [] [] |
218 + gpe-taskmanager | [] [] |
219 + gpe-timesheet | [] |
220 + gpe-today | [] [] |
222 + gphoto2 | [] [] [] [] |
224 + gpsdrive | () () () |
226 + grep | [] [] [] [] [] [] |
229 + hello | [] [] [] [] [] [] |
231 + indent | [] [] [] [] |
232 + iso_3166 | [] [] [] [] [] [] [] [] [] [] |
233 + iso_3166_1 | [] [] [] [] [] [] |
236 + iso_4217 | [] [] [] [] |
238 + jpilot | [] [] [] |
241 + kbd | [] [] [] [] [] |
244 + libc | [] [] [] [] [] [] |
245 + libgpewidget | [] [] |
246 + libiconv | [] [] [] [] [] |
247 + lifelines | [] () |
250 + lingoteach_lessons | () () |
251 + lynx | [] [] [] [] |
253 + mailutils | [] [] |
255 + man-db | [] () [] [] () |
256 + minicom | [] [] [] |
257 + mysecretdiary | [] [] [] |
258 + nano | [] () [] [] [] |
259 + nano_1_0 | [] () [] [] [] |
261 + parted | [] [] [] [] [] |
262 + ptx | [] [] [] [] [] |
265 + recode | [] [] [] [] [] [] [] |
268 + scrollkeeper | [] [] [] [] [] [] |
269 + sed | [] [] [] [] [] [] |
270 + sh-utils | [] [] [] |
271 + shared-mime-info | |
272 + sharutils | [] [] [] [] [] [] |
274 + skencil | [] () [] |
275 + sketch | [] () [] |
276 + soundtracker | [] [] [] |
278 + tar | [] [] [] [] |
279 + texinfo | [] [] [] |
280 + textutils | [] [] [] [] |
283 + tuxpaint | [] [] [] [] [] [] [] |
284 + unicode-han-tra... | |
285 + unicode-transla... | |
286 + util-linux | [] [] [] [] [] |
287 + vorbis-tools | [] [] [] [] |
289 + wdiff | [] [] [] [] |
290 + wget | [] [] [] [] [] [] |
291 + xchat | [] [] [] [] |
292 + xfree86_xkb_xml | [] [] |
294 + +----------------------------------------------------+
295 + af am ar az be bg bs ca cs da de el en en_GB eo es
296 + 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
298 - ja ko lv nl no pl pt pt_BR ru sk sl sv zh
299 - .-------------------------------------------.
300 - a2ps | [] [] [] | 5
302 - bison | [] [] [] | 7
304 - cpio | [] [] [] [] [] | 8
305 - diffutils | [] [] [] | 8
306 - enscript | [] [] | 4
308 - fileutils | [] [] [] [] [] [] [] [] [] | 17
309 - findutils | [] [] [] [] [] [] | 12
310 - flex | [] [] [] | 5
313 - gettext | [] [] [] [] [] [] [] [] [] | 18
314 - gnupg | [] [] [] | 7
315 - grep | [] [] [] [] [] [] [] | 17
316 - hello | [] [] [] [] [] [] [] [] | 15
317 - id-utils | [] [] [] | 4
318 - indent | [] [] [] [] [] | 10
319 - libc | [] [] [] [] [] [] [] [] | 16
320 - lilypond | [] [] | 2
321 - lynx | [] [] [] [] | 7
322 - m4 | [] [] [] [] [] | 11
323 - make | [] [] [] [] [] | 9
325 - parted | [] [] [] [] | 6
326 - ptx | [] [] [] [] [] [] | 13
328 - recode | [] [] [] | 10
329 - sed | [] [] [] [] [] [] [] | 14
330 - sh-utils | [] [] [] [] [] [] [] [] [] [] | 19
331 - sharutils | [] [] [] [] | 10
332 - tar | [] [] [] [] [] [] [] [] | 15
333 - texinfo | [] [] | 6
334 - textutils | [] [] [] [] [] [] [] [] | 15
335 - util-linux | [] | 1
336 - wdiff | [] [] [] [] [] | 10
337 - wget | [] [] [] [] [] [] [] [] [] | 17
338 - `-------------------------------------------'
339 - 28 teams ja ko lv nl no pl pt pt_BR ru sk sl sv zh
340 - 38 domains 20 8 0 25 6 18 1 16 27 9 10 20 3 330
341 + et eu fa fi fr ga gl he hr hu id is it ja ko lg
342 + +-------------------------------------------------+
343 + a2ps | [] [] [] () () |
350 + batchelor | [] [] |
353 + bison | [] [] [] [] |
354 + bluez-pin | [] [] [] [] [] |
358 + coreutils | [] [] [] [] [] [] |
359 + cpio | [] [] [] [] |
360 + darkstat | () [] [] [] |
361 + diffutils | [] [] [] [] [] [] [] |
364 + error | [] [] [] [] |
366 + fileutils | [] [] [] [] [] [] |
367 + findutils | [] [] [] [] [] [] [] [] [] [] [] |
375 + gettext | [] [] [] |
376 + gettext-examples | [] [] |
377 + gettext-runtime | [] [] [] [] [] |
378 + gettext-tools | [] [] [] |
379 + gimp-print | [] [] |
381 + glunarclock | [] [] [] [] |
384 + gnucash-glossary | [] |
385 + gnupg | [] [] [] [] [] [] [] |
388 + gpe-calendar | [] [] [] |
391 + gpe-contacts | [] [] |
394 + gpe-login | [] [] |
395 + gpe-ownerinfo | [] [] [] |
396 + gpe-sketchbook | [] |
398 + gpe-taskmanager | [] |
399 + gpe-timesheet | [] [] [] |
400 + gpe-today | [] [] |
402 + gphoto2 | [] [] [] |
404 + gpsdrive | () () () |
405 + gramadoir | [] [] |
406 + grep | [] [] [] [] [] [] [] [] [] [] [] |
409 + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
410 + id-utils | [] [] [] [] |
411 + indent | [] [] [] [] [] [] [] [] [] |
412 + iso_3166 | [] [] [] [] [] [] [] |
413 + iso_3166_1 | [] [] [] [] [] |
416 + iso_4217 | [] [] [] [] [] [] |
420 + jwhois | [] [] [] [] |
424 + libc | [] [] [] [] [] [] |
425 + libgpewidget | [] [] [] [] |
426 + libiconv | [] [] [] [] [] [] [] [] [] |
429 + lingoteach | [] [] |
430 + lingoteach_lessons | |
431 + lynx | [] [] [] [] |
434 + make | [] [] [] [] [] [] |
436 + minicom | [] [] [] [] |
437 + mysecretdiary | [] [] |
438 + nano | [] [] [] [] |
439 + nano_1_0 | [] [] [] [] |
441 + parted | [] [] [] |
442 + ptx | [] [] [] [] [] [] [] |
445 + recode | [] [] [] [] [] [] |
448 + scrollkeeper | [] |
449 + sed | [] [] [] [] [] [] [] [] [] |
450 + sh-utils | [] [] [] [] [] [] [] |
451 + shared-mime-info | [] [] [] |
452 + sharutils | [] [] [] [] [] |
453 + silky | () [] () () |
456 + soundtracker | [] [] |
458 + tar | [] [] [] [] [] [] [] [] [] |
459 + texinfo | [] [] [] [] |
460 + textutils | [] [] [] [] [] [] |
463 + tuxpaint | [] [] [] [] [] [] [] [] [] |
464 + unicode-han-tra... | |
465 + unicode-transla... | [] [] |
466 + util-linux | [] [] [] [] () [] |
467 + vorbis-tools | [] |
469 + wdiff | [] [] [] [] [] [] |
470 + wget | [] [] [] [] [] [] [] |
472 + xfree86_xkb_xml | [] [] |
474 + +-------------------------------------------------+
475 + et eu fa fi fr ga gl he hr hu id is it ja ko lg
476 + 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
478 + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
479 + +-----------------------------------------------------+
480 + a2ps | [] [] () () [] [] [] |
482 + ant-phone | [] [] |
483 + anubis | [] [] [] [] [] [] |
484 + ap-utils | [] () [] |
490 + bison | [] [] [] [] [] |
491 + bluez-pin | [] [] [] |
494 + console-tools | [] |
495 + coreutils | [] [] |
496 + cpio | [] [] [] [] [] |
497 + darkstat | [] [] [] [] |
498 + diffutils | [] [] [] [] [] [] |
500 + enscript | [] [] [] [] |
502 + fetchmail | [] [] () [] |
503 + fileutils | [] [] [] |
504 + findutils | [] [] [] [] [] |
505 + flex | [] [] [] [] |
512 + gettext | [] [] [] |
513 + gettext-examples | [] [] [] |
514 + gettext-runtime | [] [] [] [] |
515 + gettext-tools | [] [] |
518 + glunarclock | [] [] [] [] |
520 + gnucash | [] [] () [] |
521 + gnucash-glossary | [] [] |
523 + gpe-aerial | [] [] [] [] |
524 + gpe-beam | [] [] [] [] |
525 + gpe-calendar | [] [] [] [] |
526 + gpe-clock | [] [] [] [] |
527 + gpe-conf | [] [] [] [] |
528 + gpe-contacts | [] [] [] [] |
529 + gpe-edit | [] [] [] [] |
530 + gpe-go | [] [] [] |
531 + gpe-login | [] [] [] [] |
532 + gpe-ownerinfo | [] [] [] [] |
533 + gpe-sketchbook | [] [] [] [] |
534 + gpe-su | [] [] [] [] |
535 + gpe-taskmanager | [] [] [] [] |
536 + gpe-timesheet | [] [] [] [] |
537 + gpe-today | [] [] [] [] |
538 + gpe-todo | [] [] [] [] |
541 + gpsdrive | () () [] |
542 + gramadoir | () [] |
543 + grep | [] [] [] [] [] |
546 + hello | [] [] [] [] [] [] [] [] [] [] |
547 + id-utils | [] [] [] [] |
548 + indent | [] [] [] [] |
549 + iso_3166 | [] [] [] |
550 + iso_3166_1 | [] [] |
553 + iso_4217 | [] [] [] [] [] [] [] [] |
557 + jwhois | [] [] [] [] () |
561 + libc | [] [] [] [] |
562 + libgpewidget | [] [] [] |
563 + libiconv | [] [] [] [] [] |
567 + lingoteach_lessons | |
569 + m4 | [] [] [] [] [] |
570 + mailutils | [] [] [] |
571 + make | [] [] [] [] |
573 + minicom | [] [] [] [] |
574 + mysecretdiary | [] [] [] |
575 + nano | [] [] [] [] [] |
576 + nano_1_0 | [] [] [] [] [] [] |
578 + parted | [] [] [] [] |
579 + ptx | [] [] [] [] [] [] [] [] |
582 + recode | [] [] [] [] |
585 + scrollkeeper | [] [] [] [] [] |
588 + shared-mime-info | [] [] |
589 + sharutils | [] [] |
595 + tar | [] [] [] [] [] [] |
596 + texinfo | [] [] [] [] |
597 + textutils | [] [] |
600 + tuxpaint | [] [] [] [] [] [] [] [] |
601 + unicode-han-tra... | |
602 + unicode-transla... | |
603 + util-linux | [] [] [] |
604 + vorbis-tools | [] [] [] |
606 + wdiff | [] [] [] [] [] |
609 + xfree86_xkb_xml | [] [] |
611 + +-----------------------------------------------------+
612 + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
613 + 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
615 + sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
616 + +-----------------------------------------------------+
617 + a2ps | [] [] [] [] | 16
626 + binutils | [] [] [] | 8
628 + bluez-pin | [] [] [] | 14
631 + console-tools | | 3
632 + coreutils | [] [] [] [] | 16
634 + darkstat | [] [] [] () () | 12
635 + diffutils | [] [] [] | 23
636 + e2fsprogs | [] [] | 6
637 + enscript | [] [] | 12
638 + error | [] [] [] | 15
639 + fetchmail | [] [] | 11
640 + fileutils | [] [] [] [] [] | 17
641 + findutils | [] [] [] [] [] [] | 29
649 + gettext | [] [] [] [] [] | 16
650 + gettext-examples | [] [] [] [] [] | 14
651 + gettext-runtime | [] [] [] [] [] [] [] [] | 22
652 + gettext-tools | [] [] [] [] [] [] | 14
653 + gimp-print | [] [] | 10
655 + glunarclock | [] [] [] | 13
657 + gnucash | [] [] | 9
658 + gnucash-glossary | [] [] [] | 8
659 + gnupg | [] [] [] [] | 17
660 + gpe-aerial | [] | 7
662 + gpe-calendar | [] [] [] [] | 13
663 + gpe-clock | [] [] [] | 10
664 + gpe-conf | [] [] | 9
665 + gpe-contacts | [] [] [] | 11
666 + gpe-edit | [] [] [] [] [] | 12
668 + gpe-login | [] [] [] [] [] | 13
669 + gpe-ownerinfo | [] [] [] [] | 13
670 + gpe-sketchbook | [] [] | 9
671 + gpe-su | [] [] [] | 10
672 + gpe-taskmanager | [] [] [] | 10
673 + gpe-timesheet | [] [] [] [] | 12
674 + gpe-today | [] [] [] [] [] | 13
675 + gpe-todo | [] [] [] [] | 12
676 + gphoto2 | [] [] [] | 11
678 + gpsdrive | [] [] | 3
680 + grep | [] [] [] [] | 26
683 + hello | [] [] [] [] [] | 34
684 + id-utils | [] [] | 12
685 + indent | [] [] [] [] | 21
686 + iso_3166 | [] [] [] [] [] [] [] | 27
687 + iso_3166_1 | [] [] [] | 16
690 + iso_4217 | [] [] [] [] [] [] | 24
692 + jpilot | [] [] [] [] [] | 9
694 + jwhois | () [] [] | 11
698 + libc | [] [] [] [] | 20
699 + libgpewidget | [] [] [] [] | 13
700 + libiconv | [] [] [] [] [] [] [] [] | 27
704 + lingoteach_lessons | () | 0
705 + lynx | [] [] [] | 14
708 + make | [] [] [] | 16
711 + mysecretdiary | [] [] | 10
712 + nano | [] [] [] [] | 17
713 + nano_1_0 | [] [] [] | 17
714 + opcodes | [] [] | 6
715 + parted | [] [] [] | 15
719 + recode | [] [] [] | 20
722 + scrollkeeper | [] [] [] | 15
723 + sed | [] [] [] [] [] [] | 24
724 + sh-utils | [] [] | 14
725 + shared-mime-info | [] [] | 7
726 + sharutils | [] [] [] [] | 17
730 + soundtracker | [] [] | 7
732 + tar | [] [] [] [] [] | 24
733 + texinfo | [] [] [] | 14
734 + textutils | [] [] [] [] | 16
737 + tuxpaint | [] [] [] [] [] | 29
738 + unicode-han-tra... | | 0
739 + unicode-transla... | | 2
740 + util-linux | [] [] | 15
743 + wdiff | [] [] [] | 18
744 + wget | [] [] [] [] [] [] [] [] | 24
745 + xchat | [] [] [] [] [] | 15
746 + xfree86_xkb_xml | [] [] [] [] [] | 11
748 + +-----------------------------------------------------+
749 + 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
750 + 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
752 Some counters in the preceding matrix are higher than the number of
753 visible blocks let us expect. This is because a few extra PO files are
755 lag between the mere existence a PO file and its wide availability in a
758 - If July 2000 seems to be old, you may fetch a more recent copy of
759 + If January 2004 seems to be old, you may fetch a more recent copy of
760 this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
761 matrix with full percentage details can be found at
762 `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
763 @@ -268,15 +750,17 @@
764 Using `gettext' in new packages
765 ===============================
767 - If you are writing a freely available program and want to
768 +If you are writing a freely available program and want to
769 internationalize it you are welcome to use GNU `gettext' in your
770 -package. Of course the GNU Public License applies to your sources from
771 -then if you include `gettext' directly in your distribution on but
772 -since you are writing free software anyway this is no restriction.
773 +package. Of course you have to respect the GNU Library General Public
774 +License which covers the use of the GNU `gettext' library. This means
775 +in particular that even non-free programs can use `libintl' as a shared
776 +library, whereas only free software can use `libintl' as a static
777 +library or use modified versions of `libintl'.
779 - Once the sources are change appropriately and the setup can handle to
780 -use of `gettext' the only thing missing are the translations. The Free
781 -Translation Project is also available for packages which are not
782 + Once the sources are changed appropriately and the setup can handle
783 +the use of `gettext' the only thing missing are the translations. The
784 +Free Translation Project is also available for packages which are not
785 developed inside the GNU project. Therefore the information given above
786 applies also for every other Free Software Project. Contact
787 `translation@iro.umontreal.ca' to make the `.pot' files available to
788 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/ChangeLog psmisc-20.2.works.clean/ChangeLog
789 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/ChangeLog 2001-10-17 17:43:07.000000000 -0500
790 +++ psmisc-20.2.works.clean/ChangeLog 2004-10-13 15:18:42.000000000 -0500
792 +2004-10-13 gettextize <bug-gnu-gettext@gnu.org>
794 + * Makefile.am (SUBDIRS): Add intl.
795 + (EXTRA_DIST): Add config.rpath.
796 + * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
798 +2004-10-13 gettextize <bug-gnu-gettext@gnu.org>
800 + * Makefile.am (SUBDIRS): Add intl.
801 + * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
803 +2004-10-13 gettextize <bug-gnu-gettext@gnu.org>
805 + * Makefile.am (SUBDIRS): Add intl.
806 + * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
808 +2004-10-13 gettextize <bug-gnu-gettext@gnu.org>
810 + * configure.in (AC_CONFIG_FILES): Add po/Makefile.in.
812 +2004-10-13 gettextize <bug-gnu-gettext@gnu.org>
814 + * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
816 +2004-10-13 gettextize <bug-gnu-gettext@gnu.org>
818 + * Makefile.am (SUBDIRS): Remove intl.
819 + (ACLOCAL_AMFLAGS): New variable.
820 + (EXTRA_DIST): Add config.rpath.
821 + * configure.in (AC_CONFIG_FILES): Add m4/Makefile.
822 + (AC_CONFIG_FILES): Remove intl/Makefile.
824 Changes in 20.2 (18-OCT-2001)
825 =============================
827 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/ChangeLog~ psmisc-20.2.works.clean/ChangeLog~
828 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/Makefile.am psmisc-20.2.works.clean/Makefile.am
829 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/Makefile.am 2001-06-12 19:49:47.000000000 -0500
830 +++ psmisc-20.2.works.clean/Makefile.am 2004-10-13 15:19:08.000000000 -0500
832 +SUBDIRS = intl po doc src
834 -SUBDIRS = doc intl src po
835 +EXTRA_DIST= config.rpath config.rpath ABOUT-NLS
837 -EXTRA_DIST=ABOUT-NLS
838 +ACLOCAL_AMFLAGS = -I m4
839 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/Makefile.am~ psmisc-20.2.works.clean/Makefile.am~
840 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/Makefile.in psmisc-20.2.works.clean/Makefile.in
841 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/aclocal.m4 psmisc-20.2.works.clean/aclocal.m4
842 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/autom4te.cache/output.0 psmisc-20.2.works.clean/autom4te.cache/output.0
843 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/autom4te.cache/output.1 psmisc-20.2.works.clean/autom4te.cache/output.1
844 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/autom4te.cache/output.2 psmisc-20.2.works.clean/autom4te.cache/output.2
845 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/autom4te.cache/requests psmisc-20.2.works.clean/autom4te.cache/requests
846 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/autom4te.cache/traces.0 psmisc-20.2.works.clean/autom4te.cache/traces.0
847 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/autom4te.cache/traces.1 psmisc-20.2.works.clean/autom4te.cache/traces.1
848 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/autom4te.cache/traces.2 psmisc-20.2.works.clean/autom4te.cache/traces.2
849 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/config.guess psmisc-20.2.works.clean/config.guess
850 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/config.h.in psmisc-20.2.works.clean/config.h.in
851 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/config.rpath psmisc-20.2.works.clean/config.rpath
852 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/config.sub psmisc-20.2.works.clean/config.sub
853 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/configure psmisc-20.2.works.clean/configure
854 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/configure.in psmisc-20.2.works.clean/configure.in
855 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/configure.in 2001-06-15 07:21:07.000000000 -0500
856 +++ psmisc-20.2.works.clean/configure.in 2004-10-13 15:19:18.000000000 -0500
858 dnl Process this file with autoconf to produce a configure script.
861 +AC_CONFIG_SRCDIR([src/comm.h])
862 AM_CONFIG_HEADER(config.h)
863 AM_INIT_AUTOMAKE(psmisc,20.2)
870 +AC_DIAGNOSE([obsolete],[AC_STRUCT_ST_RDEV:
871 + your code should no longer depend upon `HAVE_ST_RDEV', but
872 + `HAVE_STRUCT_STAT_ST_RDEV'. Remove this warning and
873 + the `AC_DEFINE' when you adjust the code.])
874 +AC_CHECK_MEMBERS([struct stat.st_rdev],[AC_DEFINE(HAVE_ST_RDEV, 1,
875 + [Define to 1 if your `struct stat' has `st_rdev'.
876 + Deprecated, use `HAVE_STRUCT_STAT_ST_RDEV'
881 dnl Check for language stuff
883 dnl Checks for library functions.
884 AC_CHECK_FUNCS(strdup strerror strtoul)
886 -AC_OUTPUT(Makefile doc/Makefile src/Makefile intl/Makefile po/Makefile.in)
887 +AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile po/Makefile.in m4/Makefile intl/Makefile intl/libgnuintl.h ])
889 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/configure.in~ psmisc-20.2.works.clean/configure.in~
890 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/depcomp psmisc-20.2.works.clean/depcomp
891 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/doc/Makefile.in psmisc-20.2.works.clean/doc/Makefile.in
892 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/doc/Makefile.in 2001-10-17 17:49:50.000000000 -0500
893 +++ psmisc-20.2.works.clean/doc/Makefile.in 2004-10-13 15:20:17.000000000 -0500
895 -# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
896 +# Makefile.in generated by automake 1.8.4 from Makefile.am.
899 -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
900 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
901 +# 2003, 2004 Free Software Foundation, Inc.
902 # This Makefile.in is free software; the Free Software Foundation
903 # gives unlimited permission to copy and/or distribute it,
904 # with or without modifications, as long as this notice is preserved.
905 @@ -10,111 +12,192 @@
906 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
907 # PARTICULAR PURPOSE.
914 top_srcdir = @top_srcdir@
917 -exec_prefix = @exec_prefix@
921 -libexecdir = @libexecdir@
923 -sysconfdir = @sysconfdir@
924 -sharedstatedir = @sharedstatedir@
925 -localstatedir = @localstatedir@
929 -includedir = @includedir@
930 -oldincludedir = /usr/include
934 pkgdatadir = $(datadir)/@PACKAGE@
935 pkglibdir = $(libdir)/@PACKAGE@
936 pkgincludedir = $(includedir)/@PACKAGE@
941 -AUTOCONF = @AUTOCONF@
942 -AUTOMAKE = @AUTOMAKE@
943 -AUTOHEADER = @AUTOHEADER@
945 +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
947 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
948 -INSTALL_DATA = @INSTALL_DATA@
949 -INSTALL_SCRIPT = @INSTALL_SCRIPT@
950 -transform = @program_transform_name@
952 +install_sh_DATA = $(install_sh) -c -m 644
953 +install_sh_PROGRAM = $(install_sh) -c
954 +install_sh_SCRIPT = $(install_sh) -c
955 +INSTALL_HEADER = $(INSTALL_DATA)
956 +transform = $(program_transform_name)
963 -host_alias = @host_alias@
964 host_triplet = @host@
966 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
967 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
968 +am__aclocal_m4_deps = $(top_srcdir)/configure.in
969 +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
971 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
972 +CONFIG_HEADER = $(top_builddir)/config.h
973 +CONFIG_CLEAN_FILES =
976 +man1dir = $(mandir)/man1
977 +am__installdirs = "$(DESTDIR)$(man1dir)"
980 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
983 +AMDEP_FALSE = @AMDEP_FALSE@
984 +AMDEP_TRUE = @AMDEP_TRUE@
986 +AUTOCONF = @AUTOCONF@
987 +AUTOHEADER = @AUTOHEADER@
988 +AUTOMAKE = @AUTOMAKE@
990 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
991 -CATALOGS = @CATALOGS@
992 CATOBJEXT = @CATOBJEXT@
994 +CCDEPMODE = @CCDEPMODE@
997 +CPPFLAGS = @CPPFLAGS@
998 +CYGPATH_W = @CYGPATH_W@
999 DATADIRNAME = @DATADIRNAME@
1000 -GMOFILES = @GMOFILES@
1009 +GLIBC21 = @GLIBC21@
1011 +HAVE_ASPRINTF = @HAVE_ASPRINTF@
1012 +HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
1013 +HAVE_SNPRINTF = @HAVE_SNPRINTF@
1014 +HAVE_WPRINTF = @HAVE_WPRINTF@
1015 +INSTALL_DATA = @INSTALL_DATA@
1016 +INSTALL_PROGRAM = @INSTALL_PROGRAM@
1017 +INSTALL_SCRIPT = @INSTALL_SCRIPT@
1018 +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1019 +INSTOBJEXT = @INSTOBJEXT@
1020 INTLBISON = @INTLBISON@
1021 INTLLIBS = @INTLLIBS@
1022 INTLOBJS = @INTLOBJS@
1023 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
1024 +LDFLAGS = @LDFLAGS@
1025 LIBICONV = @LIBICONV@
1026 +LIBINTL = @LIBINTL@
1027 +LIBOBJS = @LIBOBJS@
1029 +LTLIBICONV = @LTLIBICONV@
1030 +LTLIBINTL = @LTLIBINTL@
1031 +LTLIBOBJS = @LTLIBOBJS@
1032 MAKEINFO = @MAKEINFO@
1033 MKINSTALLDIRS = @MKINSTALLDIRS@
1035 +MSGMERGE = @MSGMERGE@
1038 -POFILES = @POFILES@
1039 +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
1040 +PACKAGE_NAME = @PACKAGE_NAME@
1041 +PACKAGE_STRING = @PACKAGE_STRING@
1042 +PACKAGE_TARNAME = @PACKAGE_TARNAME@
1043 +PACKAGE_VERSION = @PACKAGE_VERSION@
1044 +PATH_SEPARATOR = @PATH_SEPARATOR@
1047 +SET_MAKE = @SET_MAKE@
1050 TERMCAP_LIB = @TERMCAP_LIB@
1051 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
1055 +XGETTEXT = @XGETTEXT@
1056 +ac_ct_CC = @ac_ct_CC@
1057 +ac_ct_RANLIB = @ac_ct_RANLIB@
1058 +ac_ct_STRIP = @ac_ct_STRIP@
1059 +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
1060 +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
1061 +am__include = @am__include@
1062 +am__leading_dot = @am__leading_dot@
1063 +am__quote = @am__quote@
1066 +build_alias = @build_alias@
1067 +build_cpu = @build_cpu@
1068 +build_os = @build_os@
1069 +build_vendor = @build_vendor@
1070 +datadir = @datadir@
1071 +exec_prefix = @exec_prefix@
1073 +host_alias = @host_alias@
1074 +host_cpu = @host_cpu@
1075 +host_os = @host_os@
1076 +host_vendor = @host_vendor@
1077 +includedir = @includedir@
1078 +infodir = @infodir@
1079 +install_sh = @install_sh@
1081 +libexecdir = @libexecdir@
1082 +localstatedir = @localstatedir@
1084 +mkdir_p = @mkdir_p@
1085 +oldincludedir = @oldincludedir@
1087 +program_transform_name = @program_transform_name@
1088 +sbindir = @sbindir@
1089 +sharedstatedir = @sharedstatedir@
1090 +sysconfdir = @sysconfdir@
1091 +target_alias = @target_alias@
1092 man_MANS = fuser.1 killall.1 pidof.1 pstree.1
1094 EXTRA_DIST = $(man_MANS)
1095 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
1096 -CONFIG_HEADER = ../config.h
1097 -CONFIG_CLEAN_FILES =
1098 -man1dir = $(mandir)/man1
1102 -DIST_COMMON = Makefile.am Makefile.in
1105 -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
1112 -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
1113 - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
1115 -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
1116 - cd $(top_builddir) \
1117 - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
1118 +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
1119 + @for dep in $?; do \
1120 + case '$(am__configure_deps)' in \
1122 + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
1127 + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
1128 + cd $(top_srcdir) && \
1129 + $(AUTOMAKE) --foreign doc/Makefile
1130 +.PRECIOUS: Makefile
1131 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
1133 + *config.status*) \
1134 + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
1136 + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
1137 + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
1140 +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
1141 + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1144 - $(mkinstalldirs) $(DESTDIR)$(man1dir)
1145 - @list='$(man1_MANS)'; \
1146 - l2='$(man_MANS)'; for i in $$l2; do \
1147 +$(top_srcdir)/configure: $(am__configure_deps)
1148 + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1149 +$(ACLOCAL_M4): $(am__aclocal_m4_deps)
1150 + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1152 +install-man1: $(man1_MANS) $(man_MANS)
1153 + @$(NORMAL_INSTALL)
1154 + test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
1155 + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
1156 + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
1157 + for i in $$l2; do \
1159 *.1*) list="$$list $$i" ;; \
1161 @@ -123,112 +206,158 @@
1162 if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
1163 else file=$$i; fi; \
1164 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
1169 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
1170 + inst=`echo $$inst | sed -e 's/^.*\///'`; \
1171 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
1172 - echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
1173 - $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
1174 + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
1175 + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
1179 - @list='$(man1_MANS)'; \
1180 - l2='$(man_MANS)'; for i in $$l2; do \
1181 + @$(NORMAL_UNINSTALL)
1182 + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
1183 + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
1184 + for i in $$l2; do \
1186 *.1*) list="$$list $$i" ;; \
1189 for i in $$list; do \
1190 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
1195 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
1196 + inst=`echo $$inst | sed -e 's/^.*\///'`; \
1197 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
1198 - echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
1199 - rm -f $(DESTDIR)$(man1dir)/$$inst; \
1200 + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
1201 + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
1203 -install-man: $(MANS)
1204 - @$(NORMAL_INSTALL)
1205 - $(MAKE) $(AM_MAKEFLAGS) install-man1
1207 - @$(NORMAL_UNINSTALL)
1208 - $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
1215 -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
1219 distdir: $(DISTFILES)
1220 - @for file in $(DISTFILES); do \
1222 + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
1223 + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
1224 + list='$(DISTFILES)'; for file in $$list; do \
1226 + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
1227 + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
1229 + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
1230 + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
1231 + if test "$$dir" != "$$file" && test "$$dir" != "."; then \
1233 + $(mkdir_p) "$(distdir)$$dir"; \
1237 if test -d $$d/$$file; then \
1238 - cp -pr $$d/$$file $(distdir)/$$file; \
1239 + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
1240 + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
1242 + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
1244 test -f $(distdir)/$$file \
1245 - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
1246 - || cp -p $$d/$$file $(distdir)/$$file || :; \
1247 + || cp -p $$d/$$file $(distdir)/$$file \
1258 -installcheck: installcheck-am
1260 +all-am: Makefile $(MANS)
1262 + for dir in "$(DESTDIR)$(man1dir)"; do \
1263 + test -z "$$dir" || $(mkdir_p) "$$dir"; \
1265 +install: install-am
1266 install-exec: install-exec-am
1268 -install-data-am: install-man
1269 install-data: install-data-am
1270 +uninstall: uninstall-am
1273 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1274 -install: install-am
1275 -uninstall-am: uninstall-man
1276 -uninstall: uninstall-am
1277 -all-am: Makefile $(MANS)
1278 -all-redirect: all-am
1280 - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
1282 - $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
1285 +installcheck: installcheck-am
1287 + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1288 + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1289 + `test -z '$(STRIP)' || \
1290 + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
1291 mostlyclean-generic:
1296 - -rm -f Makefile $(CONFIG_CLEAN_FILES)
1297 - -rm -f config.cache config.log stamp-h stamp-h[0-9]*
1298 + -rm -f $(CONFIG_CLEAN_FILES)
1300 maintainer-clean-generic:
1301 -mostlyclean-am: mostlyclean-generic
1302 + @echo "This command is intended for maintainers to use"
1303 + @echo "it deletes files that may require special tools to rebuild."
1306 -mostlyclean: mostlyclean-am
1307 +clean-am: clean-generic mostlyclean-am
1309 -clean-am: clean-generic mostlyclean-am
1310 +distclean: distclean-am
1312 +distclean-am: clean-am distclean-generic
1317 -distclean-am: distclean-generic clean-am
1320 -distclean: distclean-am
1323 -maintainer-clean-am: maintainer-clean-generic distclean-am
1324 - @echo "This command is intended for maintainers to use;"
1325 - @echo "it deletes files that may require special tools to rebuild."
1330 +install-data-am: install-man
1334 +install-info: install-info-am
1336 +install-man: install-man1
1340 maintainer-clean: maintainer-clean-am
1342 +maintainer-clean-am: distclean-am maintainer-clean-generic
1344 -.PHONY: install-man1 uninstall-man1 install-man uninstall-man tags \
1345 -distdir info-am info dvi-am dvi check check-am installcheck-am \
1346 -installcheck install-exec-am install-exec install-data-am install-data \
1347 -install-am install uninstall-am uninstall all-redirect all-am all \
1348 -installdirs mostlyclean-generic distclean-generic clean-generic \
1349 -maintainer-clean-generic clean mostlyclean distclean maintainer-clean
1350 +mostlyclean: mostlyclean-am
1352 +mostlyclean-am: mostlyclean-generic
1362 +uninstall-am: uninstall-info-am uninstall-man
1364 +uninstall-man: uninstall-man1
1366 +.PHONY: all all-am check check-am clean clean-generic distclean \
1367 + distclean-generic distdir dvi dvi-am html html-am info info-am \
1368 + install install-am install-data install-data-am install-exec \
1369 + install-exec-am install-info install-info-am install-man \
1370 + install-man1 install-strip installcheck installcheck-am \
1371 + installdirs maintainer-clean maintainer-clean-generic \
1372 + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
1373 + uninstall-am uninstall-info-am uninstall-man uninstall-man1
1375 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1376 # Otherwise a system limit (for SysV at least) may be exceeded.
1377 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/install-sh psmisc-20.2.works.clean/install-sh
1378 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/ChangeLog psmisc-20.2.works.clean/intl/ChangeLog
1379 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/ChangeLog 2001-04-13 23:00:42.000000000 -0500
1380 +++ psmisc-20.2.works.clean/intl/ChangeLog 2004-10-13 15:18:41.000000000 -0500
1382 -2001-03-09 GNU <bug-gnu-utils@gnu.org>
1383 +2004-01-29 GNU <bug-gnu-gettext@gnu.org>
1385 - * Version 0.10.36 released.
1386 + * Version 0.14.1 released.
1388 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/Makefile.in psmisc-20.2.works.clean/intl/Makefile.in
1389 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/Makefile.in 2001-04-13 23:00:42.000000000 -0500
1390 +++ psmisc-20.2.works.clean/intl/Makefile.in 2004-10-13 15:18:41.000000000 -0500
1392 -# Makefile for directory with message catalog handling in GNU NLS Utilities.
1393 -# Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
1394 +# Makefile for directory with message catalog handling library of GNU gettext
1395 +# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
1397 -# This program is free software; you can redistribute it and/or modify
1398 -# it under the terms of the GNU General Public License as published by
1399 -# the Free Software Foundation; either version 2, or (at your option)
1400 +# This program is free software; you can redistribute it and/or modify it
1401 +# under the terms of the GNU Library General Public License as published
1402 +# by the Free Software Foundation; either version 2, or (at your option)
1403 # any later version.
1405 # This program is distributed in the hope that it will be useful,
1406 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1407 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1408 -# GNU General Public License for more details.
1409 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1410 +# Library General Public License for more details.
1412 -# You should have received a copy of the GNU General Public License
1413 -# along with this program; if not, write to the Free Software
1414 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1415 +# You should have received a copy of the GNU Library General Public
1416 +# License along with this program; if not, write to the Free Software
1417 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1424 top_srcdir = @top_srcdir@
1430 exec_prefix = @exec_prefix@
1431 transform = @program_transform_name@
1432 -libdir = $(exec_prefix)/lib
1433 -includedir = $(prefix)/include
1434 -datadir = $(prefix)/share
1436 +includedir = @includedir@
1437 +datadir = @datadir@
1438 localedir = $(datadir)/locale
1439 -gettextsrcdir = @datadir@/gettext/intl
1440 +gettextsrcdir = $(datadir)/gettext/intl
1441 aliaspath = $(localedir)
1445 INSTALL_DATA = @INSTALL_DATA@
1446 MKINSTALLDIRS = @MKINSTALLDIRS@
1447 -mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
1448 +mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
1450 l = @INTL_LIBTOOL_SUFFIX_PREFIX@
1452 @@ -51,89 +52,202 @@
1453 YFLAGS = --name-prefix=__gettext
1455 DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
1456 --DLIBDIR=\"$(libdir)\" @DEFS@
1457 +-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
1458 +-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
1459 +-Dset_relocation_prefix=libintl_set_relocation_prefix \
1460 +-Drelocate=libintl_relocate \
1461 +-DDEPENDS_ON_LIBICONV=1 @DEFS@
1462 CPPFLAGS = @CPPFLAGS@
1467 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
1469 -HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
1470 -COMHDRS = gettext.h gettextP.h hash-string.h
1471 -SOURCES = $(COMSRCS) intl-compat.c
1472 -COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
1473 -finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
1474 -explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
1476 -OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
1477 -finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
1478 -explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
1479 -plural.$lo localcharset.$lo
1480 -GETTOBJS = intl-compat.$lo
1491 + printf-args.h printf-args.c \
1492 + printf-parse.h wprintf-parse.h printf-parse.c \
1493 + vasnprintf.h vasnwprintf.h vasnprintf.c \
1538 + localcharset.$lo \
1545 DISTFILES.common = Makefile.in \
1546 config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
1547 DISTFILES.generated = plural.c
1548 DISTFILES.normal = VERSION
1549 -DISTFILES.gettext = libintl.glibc
1550 -DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
1551 +DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
1552 +libgnuintl.h_vms Makefile.vms \
1553 +libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
1554 +DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
1555 +COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
1557 +all: all-@USE_INCLUDED_LIBINTL@
1558 +all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
1559 +all-no: all-no-@BUILD_INCLUDED_LIBINTL@
1560 +all-no-yes: libgnuintl.$la
1563 +libintl.a libgnuintl.a: $(OBJECTS)
1565 + $(AR) cru $@ $(OBJECTS)
1568 +libintl.la libgnuintl.la: $(OBJECTS)
1569 + $(LIBTOOL) --mode=link \
1570 + $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
1571 + $(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \
1572 + -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
1573 + -rpath $(libdir) \
1576 # Libtool's library version information for libintl.
1577 # Before making a gettext release, the gettext maintainer must change this
1578 # according to the libtool documentation, section "Library interface versions".
1579 # Maintainers of other packages that include the intl directory must *not*
1580 # change these values.
1588 .SUFFIXES: .c .y .o .lo .sin .sed
1593 - $(LIBTOOL) --mode=compile $(COMPILE) $<
1596 $(YACC) $(YFLAGS) --output $@ $<
1600 - sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
1603 -INCLUDES = -I.. -I. -I$(top_srcdir)/intl
1604 +bindtextdom.lo: $(srcdir)/bindtextdom.c
1605 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
1606 +dcgettext.lo: $(srcdir)/dcgettext.c
1607 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
1608 +dgettext.lo: $(srcdir)/dgettext.c
1609 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
1610 +gettext.lo: $(srcdir)/gettext.c
1611 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
1612 +finddomain.lo: $(srcdir)/finddomain.c
1613 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
1614 +loadmsgcat.lo: $(srcdir)/loadmsgcat.c
1615 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
1616 +localealias.lo: $(srcdir)/localealias.c
1617 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
1618 +textdomain.lo: $(srcdir)/textdomain.c
1619 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
1620 +l10nflist.lo: $(srcdir)/l10nflist.c
1621 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
1622 +explodename.lo: $(srcdir)/explodename.c
1623 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
1624 +dcigettext.lo: $(srcdir)/dcigettext.c
1625 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
1626 +dcngettext.lo: $(srcdir)/dcngettext.c
1627 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
1628 +dngettext.lo: $(srcdir)/dngettext.c
1629 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
1630 +ngettext.lo: $(srcdir)/ngettext.c
1631 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
1632 +plural.lo: $(srcdir)/plural.c
1633 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
1634 +plural-exp.lo: $(srcdir)/plural-exp.c
1635 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
1636 +localcharset.lo: $(srcdir)/localcharset.c
1637 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
1638 +relocatable.lo: $(srcdir)/relocatable.c
1639 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
1640 +localename.lo: $(srcdir)/localename.c
1641 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
1642 +log.lo: $(srcdir)/log.c
1643 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
1644 +printf.lo: $(srcdir)/printf.c
1645 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
1646 +osdep.lo: $(srcdir)/osdep.c
1647 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
1648 +intl-compat.lo: $(srcdir)/intl-compat.c
1649 + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
1651 -all: all-@USE_INCLUDED_LIBINTL@
1652 -all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
1653 -all-no: all-no-@BUILD_INCLUDED_LIBINTL@
1654 -all-no-yes: libgnuintl.$la
1656 +ref-add.sed: $(srcdir)/ref-add.sin
1657 + sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
1658 + mv t-ref-add.sed ref-add.sed
1659 +ref-del.sed: $(srcdir)/ref-del.sin
1660 + sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
1661 + mv t-ref-del.sed ref-del.sed
1663 -libintl.a libgnuintl.a: $(OBJECTS)
1665 - $(AR) cru $@ $(OBJECTS)
1667 +INCLUDES = -I. -I$(srcdir) -I..
1669 -libintl.la libgnuintl.la: $(OBJECTS)
1670 - $(LIBTOOL) --mode=link \
1671 - $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
1672 - $(OBJECTS) @LIBICONV@ \
1673 - -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
1674 - -rpath $(libdir) \
1676 +libgnuintl.h: $(srcdir)/libgnuintl.h.in
1677 + sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
1678 + -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
1679 + -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
1680 + -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
1681 + < $(srcdir)/libgnuintl.h.in > libgnuintl.h
1683 libintl.h: libgnuintl.h
1684 - cp $(srcdir)/libgnuintl.h libintl.h
1685 + cp libgnuintl.h libintl.h
1687 -charset.alias: config.charset
1688 +charset.alias: $(srcdir)/config.charset
1689 $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
1694 -# This installation goal is only used in GNU gettext. Packages which
1695 -# only use the library should use install instead.
1697 # We must not install the libintl.h/libintl.a files if we are on a
1698 # system which has the GNU gettext() function in its C library or in a
1700 @@ -141,25 +255,50 @@
1701 # package, you have to use `configure --with-included-gettext'.
1702 install: install-exec install-data
1704 - if test "$(PACKAGE)" = "gettext" \
1705 - && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
1706 + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
1707 + && test '@USE_INCLUDED_LIBINTL@' = yes; then \
1708 $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
1709 $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
1710 $(LIBTOOL) --mode=install \
1711 $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
1712 + if test "@RELOCATABLE@" = yes; then \
1713 + dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
1714 + if test -n "$$dependencies"; then \
1715 + rm -f $(DESTDIR)$(libdir)/libintl.la; \
1721 - if test '@USE_INCLUDED_LIBINTL@' = yes; then \
1722 + if test "$(PACKAGE)" = "gettext-tools" \
1723 + && test '@USE_INCLUDED_LIBINTL@' = no; then \
1724 $(mkinstalldirs) $(DESTDIR)$(libdir); \
1725 - test -f $(DESTDIR)$(libdir)/charset.alias \
1726 - && orig=$(DESTDIR)$(libdir)/charset.alias \
1727 - || orig=charset.alias; \
1728 + $(LIBTOOL) --mode=install \
1729 + $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
1730 + rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
1731 + $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
1732 + $(LIBTOOL) --mode=uninstall \
1733 + rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
1737 + if test '@USE_INCLUDED_LIBINTL@' = yes; then \
1738 + test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
1739 temp=$(DESTDIR)$(libdir)/t-charset.alias; \
1740 dest=$(DESTDIR)$(libdir)/charset.alias; \
1741 - sed -f ref-add.sed $$orig > $$temp; \
1742 - $(INSTALL_DATA) $$temp $$dest; \
1744 + if test -f $(DESTDIR)$(libdir)/charset.alias; then \
1745 + orig=$(DESTDIR)$(libdir)/charset.alias; \
1746 + sed -f ref-add.sed $$orig > $$temp; \
1747 + $(INSTALL_DATA) $$temp $$dest; \
1750 + if test @GLIBC21@ = no; then \
1751 + orig=charset.alias; \
1752 + sed -f ref-add.sed $$orig > $$temp; \
1753 + $(INSTALL_DATA) $$temp $$dest; \
1757 $(mkinstalldirs) $(DESTDIR)$(localedir); \
1758 test -f $(DESTDIR)$(localedir)/locale.alias \
1759 && orig=$(DESTDIR)$(localedir)/locale.alias \
1760 @@ -173,16 +312,22 @@
1764 - if test "$(PACKAGE)" = "gettext"; then \
1765 + if test "$(PACKAGE)" = "gettext-tools"; then \
1766 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
1767 $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
1768 $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
1769 - dists="$(DISTFILES.common)"; \
1770 + dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
1771 for file in $$dists; do \
1772 $(INSTALL_DATA) $(srcdir)/$$file \
1773 $(DESTDIR)$(gettextsrcdir)/$$file; \
1775 chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
1776 + dists="$(DISTFILES.generated)"; \
1777 + for file in $$dists; do \
1778 + if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
1779 + $(INSTALL_DATA) $$dir/$$file \
1780 + $(DESTDIR)$(gettextsrcdir)/$$file; \
1782 dists="$(DISTFILES.obsolete)"; \
1783 for file in $$dists; do \
1784 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
1785 @@ -191,18 +336,51 @@
1789 +install-strip: install
1792 + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
1793 + && test '@USE_INCLUDED_LIBINTL@' = yes; then \
1794 + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
1798 + if test "$(PACKAGE)" = "gettext-tools" \
1799 + && test '@USE_INCLUDED_LIBINTL@' = no; then \
1800 + $(mkinstalldirs) $(DESTDIR)$(libdir); \
1804 + if test '@USE_INCLUDED_LIBINTL@' = yes; then \
1805 + test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
1806 + $(mkinstalldirs) $(DESTDIR)$(localedir); \
1810 + if test "$(PACKAGE)" = "gettext-tools"; then \
1811 + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
1816 # Define this as empty until I found a useful application.
1820 - if test "$(PACKAGE)" = "gettext" \
1821 - && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
1822 + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
1823 + && test '@USE_INCLUDED_LIBINTL@' = yes; then \
1824 rm -f $(DESTDIR)$(includedir)/libintl.h; \
1825 $(LIBTOOL) --mode=uninstall \
1826 rm -f $(DESTDIR)$(libdir)/libintl.$la; \
1830 + if test "$(PACKAGE)" = "gettext-tools" \
1831 + && test '@USE_INCLUDED_LIBINTL@' = no; then \
1832 + rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
1836 if test '@USE_INCLUDED_LIBINTL@' = yes; then \
1837 if test -f $(DESTDIR)$(libdir)/charset.alias; then \
1838 temp=$(DESTDIR)$(libdir)/t-charset.alias; \
1839 @@ -229,25 +407,36 @@
1843 - if test "$(PACKAGE)" = "gettext"; then \
1844 - for file in VERSION ChangeLog $(DISTFILES.common); do \
1845 + if test "$(PACKAGE)" = "gettext-tools"; then \
1846 + for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
1847 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
1854 +info dvi ps pdf html:
1856 $(OBJECTS): ../config.h libgnuintl.h
1857 -bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
1858 -dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
1859 +bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
1860 +dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
1861 +explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
1862 +dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
1863 +dcigettext.$lo: $(srcdir)/eval-plural.h
1864 +localcharset.$lo: $(srcdir)/localcharset.h
1865 +localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
1866 +printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c
1870 TAGS: $(HEADERS) $(SOURCES)
1871 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
1875 +CTAGS: $(HEADERS) $(SOURCES)
1876 + here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
1880 ID: $(HEADERS) $(SOURCES)
1881 @@ -255,15 +444,15 @@
1885 - rm -f *.a *.la *.o *.lo core core.*
1886 - rm -f libintl.h charset.alias ref-add.sed ref-del.sed
1887 + rm -f *.a *.la *.o *.obj *.lo core core.*
1888 + rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
1889 rm -f -r .libs _libs
1894 rm -f Makefile ID TAGS
1895 - if test "$(PACKAGE)" = gettext; then \
1896 + if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
1897 rm -f ChangeLog.inst $(DISTFILES.normal); \
1900 @@ -278,20 +467,26 @@
1901 # other files which should not be distributed in other packages.
1902 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
1903 dist distdir: Makefile
1904 - if test "$(PACKAGE)" = gettext; then \
1905 - additional="$(DISTFILES.gettext)"; \
1906 + if test "$(PACKAGE)" = "gettext-tools"; then \
1909 - additional="$(DISTFILES.normal)"; \
1911 - $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
1912 - for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
1913 - ln $(srcdir)/$$file $(distdir) 2> /dev/null \
1914 - || cp -p $(srcdir)/$$file $(distdir); \
1916 + if test "$(PACKAGE)" = "gettext-runtime"; then \
1917 + additional="$(DISTFILES.gettext)"; \
1919 + additional="$(DISTFILES.normal)"; \
1921 + $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
1922 + for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
1923 + if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
1924 + cp -p $$dir/$$file $(distdir); \
1928 -Makefile: Makefile.in ../config.status
1930 - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
1931 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
1932 + cd $(top_builddir) && $(SHELL) ./config.status
1933 +# This would be more efficient, but doesn't work any more with autoconf-2.57,
1934 +# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
1935 +# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
1937 # Tell versions [3.59,3.63) of GNU make not to export all variables.
1938 # Otherwise a system limit (for SysV at least) may be exceeded.
1939 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/VERSION psmisc-20.2.works.clean/intl/VERSION
1940 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/VERSION 2001-04-13 23:00:42.000000000 -0500
1941 +++ psmisc-20.2.works.clean/intl/VERSION 2004-10-13 15:18:41.000000000 -0500
1943 -GNU gettext library from gettext-0.10.36
1944 +GNU gettext library from gettext-0.14.1
1945 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/bindtextdom.c psmisc-20.2.works.clean/intl/bindtextdom.c
1946 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/bindtextdom.c 2001-04-13 23:00:42.000000000 -0500
1947 +++ psmisc-20.2.works.clean/intl/bindtextdom.c 2004-10-13 15:18:41.000000000 -0500
1949 /* Implementation of the bindtextdomain(3) function
1950 - Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
1951 + Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
1953 - This program is free software; you can redistribute it and/or modify
1954 - it under the terms of the GNU General Public License as published by
1955 - the Free Software Foundation; either version 2, or (at your option)
1956 + This program is free software; you can redistribute it and/or modify it
1957 + under the terms of the GNU Library General Public License as published
1958 + by the Free Software Foundation; either version 2, or (at your option)
1961 This program is distributed in the hope that it will be useful,
1962 but WITHOUT ANY WARRANTY; without even the implied warranty of
1963 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1964 - GNU General Public License for more details.
1965 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1966 + Library General Public License for more details.
1968 - You should have received a copy of the GNU General Public License
1969 - along with this program; if not, write to the Free Software Foundation,
1970 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1971 + You should have received a copy of the GNU Library General Public
1972 + License along with this program; if not, write to the Free Software
1973 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1976 #ifdef HAVE_CONFIG_H
1977 # include <config.h>
1979 names than the internal variables in GNU libc, otherwise programs
1980 using libintl.a cannot be linked statically. */
1982 -# define _nl_default_dirname _nl_default_dirname__
1983 -# define _nl_domain_bindings _nl_domain_bindings__
1984 +# define _nl_default_dirname libintl_nl_default_dirname
1985 +# define _nl_domain_bindings libintl_nl_domain_bindings
1988 /* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
1991 /* Contains the default location of the message catalogs. */
1992 extern const char _nl_default_dirname[];
1994 +extern const char _nl_default_dirname_internal[] attribute_hidden;
1996 +# define INTUSE(name) name
1999 /* List with bindings of specific domains. */
2000 extern struct binding *_nl_domain_bindings;
2002 /* Lock variable to protect the global data in the gettext implementation. */
2003 -__libc_rwlock_define (extern, _nl_state_lock)
2004 +__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
2007 /* Names for the libintl functions are a problem. They must not clash
2009 # define strdup(str) __strdup (str)
2012 -# define BINDTEXTDOMAIN bindtextdomain__
2013 -# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
2014 +# define BINDTEXTDOMAIN libintl_bindtextdomain
2015 +# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
2018 -/* Prototypes for local functions. */
2019 -static void set_binding_values PARAMS ((const char *domainname,
2020 - const char **dirnamep,
2021 - const char **codesetp));
2023 /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
2024 to be used for the DOMAINNAME message catalog.
2025 If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
2027 If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
2028 modified nor returned. */
2030 -set_binding_values (domainname, dirnamep, codesetp)
2031 - const char *domainname;
2032 - const char **dirnamep;
2033 - const char **codesetp;
2034 +set_binding_values (const char *domainname,
2035 + const char **dirnamep, const char **codesetp)
2037 struct binding *binding;
2040 char *result = binding->dirname;
2041 if (strcmp (dirname, result) != 0)
2043 - if (strcmp (dirname, _nl_default_dirname) == 0)
2044 - result = (char *) _nl_default_dirname;
2045 + if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
2046 + result = (char *) INTUSE(_nl_default_dirname);
2049 #if defined _LIBC || defined HAVE_STRDUP
2052 if (__builtin_expect (result != NULL, 1))
2054 - if (binding->dirname != _nl_default_dirname)
2055 + if (binding->dirname != INTUSE(_nl_default_dirname))
2056 free (binding->dirname);
2058 binding->dirname = result;
2060 free (binding->codeset);
2062 binding->codeset = result;
2063 + binding->codeset_cntr++;
2069 /* Simply return the default values. */
2071 - *dirnamep = _nl_default_dirname;
2072 + *dirnamep = INTUSE(_nl_default_dirname);
2076 @@ -236,11 +236,11 @@
2078 if (dirname == NULL)
2079 /* The default value. */
2080 - dirname = _nl_default_dirname;
2081 + dirname = INTUSE(_nl_default_dirname);
2084 - if (strcmp (dirname, _nl_default_dirname) == 0)
2085 - dirname = _nl_default_dirname;
2086 + if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
2087 + dirname = INTUSE(_nl_default_dirname);
2094 /* The default value. */
2095 - new_binding->dirname = (char *) _nl_default_dirname;
2096 + new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
2098 + new_binding->codeset_cntr = 0;
2103 memcpy (result, codeset, len);
2106 + new_binding->codeset_cntr++;
2108 *codesetp = codeset;
2109 new_binding->codeset = (char *) codeset;
2114 - if (new_binding->dirname != _nl_default_dirname)
2115 + if (new_binding->dirname != INTUSE(_nl_default_dirname))
2116 free (new_binding->dirname);
2120 /* Specify that the DOMAINNAME message catalog will be found
2121 in DIRNAME rather than in the system locale data base. */
2123 -BINDTEXTDOMAIN (domainname, dirname)
2124 - const char *domainname;
2125 - const char *dirname;
2126 +BINDTEXTDOMAIN (const char *domainname, const char *dirname)
2128 set_binding_values (domainname, &dirname, NULL);
2129 return (char *) dirname;
2131 /* Specify the character encoding in which the messages from the
2132 DOMAINNAME message catalog will be returned. */
2134 -BIND_TEXTDOMAIN_CODESET (domainname, codeset)
2135 - const char *domainname;
2136 - const char *codeset;
2137 +BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
2139 set_binding_values (domainname, NULL, &codeset);
2140 return (char *) codeset;
2141 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/config.charset psmisc-20.2.works.clean/intl/config.charset
2142 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dcgettext.c psmisc-20.2.works.clean/intl/dcgettext.c
2143 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dcgettext.c 2001-04-13 23:00:42.000000000 -0500
2144 +++ psmisc-20.2.works.clean/intl/dcgettext.c 2004-10-13 15:18:41.000000000 -0500
2146 /* Implementation of the dcgettext(3) function.
2147 - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2148 + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
2150 - This program is free software; you can redistribute it and/or modify
2151 - it under the terms of the GNU General Public License as published by
2152 - the Free Software Foundation; either version 2, or (at your option)
2153 + This program is free software; you can redistribute it and/or modify it
2154 + under the terms of the GNU Library General Public License as published
2155 + by the Free Software Foundation; either version 2, or (at your option)
2158 This program is distributed in the hope that it will be useful,
2159 but WITHOUT ANY WARRANTY; without even the implied warranty of
2160 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2161 - GNU General Public License for more details.
2162 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2163 + Library General Public License for more details.
2165 - You should have received a copy of the GNU General Public License
2166 - along with this program; if not, write to the Free Software Foundation,
2167 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2168 + You should have received a copy of the GNU Library General Public
2169 + License along with this program; if not, write to the Free Software
2170 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2173 #ifdef HAVE_CONFIG_H
2174 # include <config.h>
2176 # define DCGETTEXT __dcgettext
2177 # define DCIGETTEXT __dcigettext
2179 -# define DCGETTEXT dcgettext__
2180 -# define DCIGETTEXT dcigettext__
2181 +# define DCGETTEXT libintl_dcgettext
2182 +# define DCIGETTEXT libintl_dcigettext
2185 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
2188 -DCGETTEXT (domainname, msgid, category)
2189 - const char *domainname;
2190 - const char *msgid;
2192 +DCGETTEXT (const char *domainname, const char *msgid, int category)
2194 return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
2198 /* Alias for function name in GNU C Library. */
2199 +INTDEF(__dcgettext)
2200 weak_alias (__dcgettext, dcgettext);
2202 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dcigettext.c psmisc-20.2.works.clean/intl/dcigettext.c
2203 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dcigettext.c 2001-04-13 23:00:43.000000000 -0500
2204 +++ psmisc-20.2.works.clean/intl/dcigettext.c 2004-10-13 15:18:41.000000000 -0500
2206 /* Implementation of the internal dcigettext function.
2207 - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2208 + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
2210 - This program is free software; you can redistribute it and/or modify
2211 - it under the terms of the GNU General Public License as published by
2212 - the Free Software Foundation; either version 2, or (at your option)
2213 + This program is free software; you can redistribute it and/or modify it
2214 + under the terms of the GNU Library General Public License as published
2215 + by the Free Software Foundation; either version 2, or (at your option)
2218 This program is distributed in the hope that it will be useful,
2219 but WITHOUT ANY WARRANTY; without even the implied warranty of
2220 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2221 - GNU General Public License for more details.
2222 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2223 + Library General Public License for more details.
2225 - You should have received a copy of the GNU General Public License
2226 - along with this program; if not, write to the Free Software Foundation,
2227 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2228 + You should have received a copy of the GNU Library General Public
2229 + License along with this program; if not, write to the Free Software
2230 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2233 /* Tell glibc's <string.h> to provide a prototype for mempcpy().
2234 This must come before <config.h> because <config.h> may include
2236 # define alloca __builtin_alloca
2237 # define HAVE_ALLOCA 1
2239 -# if defined HAVE_ALLOCA_H || defined _LIBC
2240 -# include <alloca.h>
2242 +# include <malloc.h>
2243 +# define alloca _alloca
2247 +# if defined HAVE_ALLOCA_H || defined _LIBC
2248 +# include <alloca.h>
2266 -#if !HAVE_STRCHR && !defined _LIBC
2268 -# define strchr index
2272 #if defined HAVE_UNISTD_H || defined _LIBC
2273 # include <unistd.h>
2279 + /* Guess whether integer division by zero raises signal SIGFPE.
2280 + Set to 1 only if you know for sure. In case of doubt, set to 0. */
2281 +# if defined __alpha__ || defined __arm__ || defined __i386__ \
2282 + || defined __m68k__ || defined __s390__
2283 +# define INTDIV0_RAISES_SIGFPE 1
2285 +# define INTDIV0_RAISES_SIGFPE 0
2288 +#if !INTDIV0_RAISES_SIGFPE
2289 +# include <signal.h>
2292 #if defined HAVE_SYS_PARAM_H || defined _LIBC
2293 # include <sys/param.h>
2296 #include "gettextP.h"
2297 +#include "plural-exp.h"
2299 # include <libintl.h>
2301 @@ -106,10 +121,10 @@
2302 names than the internal variables in GNU libc, otherwise programs
2303 using libintl.a cannot be linked statically. */
2305 -# define _nl_default_default_domain _nl_default_default_domain__
2306 -# define _nl_current_default_domain _nl_current_default_domain__
2307 -# define _nl_default_dirname _nl_default_dirname__
2308 -# define _nl_domain_bindings _nl_domain_bindings__
2309 +# define _nl_default_default_domain libintl_nl_default_default_domain
2310 +# define _nl_current_default_domain libintl_nl_current_default_domain
2311 +# define _nl_default_dirname libintl_nl_default_dirname
2312 +# define _nl_domain_bindings libintl_nl_domain_bindings
2315 /* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
2316 @@ -133,13 +148,17 @@
2318 # define getcwd(buf, max) getwd (buf)
2321 +# define getcwd(buf, max) (getcwd) (buf, max, 0)
2326 # ifndef HAVE_STPCPY
2327 -static char *stpcpy PARAMS ((char *dest, const char *src));
2328 +static char *stpcpy (char *dest, const char *src);
2330 # ifndef HAVE_MEMPCPY
2331 -static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
2332 +static void *mempcpy (void *dest, const void *src, size_t n);
2336 @@ -197,16 +216,6 @@
2337 # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
2340 -/* XPG3 defines the result of `setlocale (category, NULL)' as:
2341 - ``Directs `setlocale()' to query `category' and return the current
2342 - setting of `local'.''
2343 - However it does not specify the exact format. Neither do SUSV2 and
2344 - ISO C 99. So we can use this feature only on selected systems (e.g.
2345 - those using GNU C Library). */
2347 -# define HAVE_LOCALE_NULL
2350 /* This is the type used for the search tree where known translations
2352 struct known_translation_t
2353 @@ -243,11 +252,8 @@
2356 /* Function to compare two entries in the table of known translations. */
2357 -static int transcmp PARAMS ((const void *p1, const void *p2));
2362 +transcmp (const void *p1, const void *p2)
2364 const struct known_translation_t *s1;
2365 const struct known_translation_t *s2;
2366 @@ -271,39 +277,54 @@
2371 +# define INTVARDEF(name)
2374 +# define INTUSE(name) name
2377 /* Name of the default domain used for gettext(3) prior any call to
2378 textdomain(3). The default value for this is "messages". */
2379 -const char _nl_default_default_domain[] = "messages";
2380 +const char _nl_default_default_domain[] attribute_hidden = "messages";
2382 /* Value used as the default domain for gettext(3). */
2383 -const char *_nl_current_default_domain = _nl_default_default_domain;
2384 +const char *_nl_current_default_domain attribute_hidden
2385 + = _nl_default_default_domain;
2387 /* Contains the default location of the message catalogs. */
2388 +#if defined __EMX__
2389 +extern const char _nl_default_dirname[];
2391 const char _nl_default_dirname[] = LOCALEDIR;
2392 +INTVARDEF (_nl_default_dirname)
2395 /* List with bindings of specific domains created by bindtextdomain()
2397 struct binding *_nl_domain_bindings;
2399 /* Prototypes for local functions. */
2400 -static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain,
2401 - unsigned long int n,
2402 - const char *translation,
2403 - size_t translation_len))
2404 - internal_function;
2405 -static unsigned long int plural_eval PARAMS ((struct expression *pexp,
2406 - unsigned long int n))
2407 +static char *plural_lookup (struct loaded_l10nfile *domain,
2408 + unsigned long int n,
2409 + const char *translation, size_t translation_len)
2411 -static const char *category_to_name PARAMS ((int category)) internal_function;
2412 -static const char *guess_category_value PARAMS ((int category,
2413 - const char *categoryname))
2414 +static const char *guess_category_value (int category,
2415 + const char *categoryname)
2418 +# include "../locale/localeinfo.h"
2419 +# define category_to_name(category) _nl_category_names[category]
2421 +static const char *category_to_name (int category) internal_function;
2425 /* For those loosing systems which don't have `alloca' we have to add
2426 some additional code emulating it. */
2428 /* Nothing has to be done. */
2429 +# define freea(p) /* nothing */
2430 # define ADD_BLOCK(list, address) /* nothing */
2431 # define FREE_BLOCKS(list) /* nothing */
2433 @@ -328,11 +349,13 @@
2434 while (list != NULL) { \
2435 struct block_list *old = list; \
2436 list = list->next; \
2437 + free (old->address); \
2442 # define alloca(size) (malloc (size))
2443 +# define freea(p) free (p)
2444 #endif /* have alloca */
2447 @@ -356,12 +379,12 @@
2449 # define DCIGETTEXT __dcigettext
2451 -# define DCIGETTEXT dcigettext__
2452 +# define DCIGETTEXT libintl_dcigettext
2455 /* Lock variable to protect the global data in the gettext implementation. */
2457 -__libc_rwlock_define_initialized (, _nl_state_lock)
2458 +__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
2461 /* Checking whether the binaries runs SUID must be done and glibc provides
2462 @@ -370,6 +393,18 @@
2463 # define ENABLE_SECURE __libc_enable_secure
2464 # define DETERMINE_SECURE
2466 +# ifndef HAVE_GETUID
2467 +# define getuid() 0
2469 +# ifndef HAVE_GETGID
2470 +# define getgid() 0
2472 +# ifndef HAVE_GETEUID
2473 +# define geteuid() getuid()
2475 +# ifndef HAVE_GETEGID
2476 +# define getegid() getgid()
2478 static int enable_secure;
2479 # define ENABLE_SECURE (enable_secure == 1)
2480 # define DETERMINE_SECURE \
2481 @@ -382,17 +417,15 @@
2485 +/* Get the function to evaluate the plural expression. */
2486 +#include "eval-plural.h"
2488 /* Look up MSGID in the DOMAINNAME message catalog for the current
2489 CATEGORY locale and, if PLURAL is nonzero, search over string
2490 depending on the plural form determined by N. */
2492 -DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
2493 - const char *domainname;
2494 - const char *msgid1;
2495 - const char *msgid2;
2497 - unsigned long int n;
2499 +DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
2500 + int plural, unsigned long int n, int category)
2503 struct block_list *block_list = NULL;
2504 @@ -417,6 +450,15 @@
2509 + if (category < 0 || category >= __LC_LAST || category == LC_ALL)
2511 + return (plural == 0
2513 + /* Use the Germanic plural rule. */
2514 + : n == 1 ? (char *) msgid1 : (char *) msgid2);
2517 __libc_rwlock_rdlock (_nl_state_lock);
2519 /* If DOMAINNAME is NULL, we are interested in the default domain. If
2520 @@ -425,6 +467,12 @@
2521 if (domainname == NULL)
2522 domainname = _nl_current_default_domain;
2524 + /* OS/2 specific: backward compatibility with older libintl versions */
2525 +#ifdef LC_MESSAGES_COMPAT
2526 + if (category == LC_MESSAGES_COMPAT)
2527 + category = LC_MESSAGES;
2530 #if defined HAVE_TSEARCH || defined _LIBC
2531 msgid_len = strlen (msgid1) + 1;
2534 search->category = category;
2536 foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
2538 if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
2540 /* Now deal with plural. */
2544 if (binding == NULL)
2545 - dirname = (char *) _nl_default_dirname;
2546 + dirname = (char *) INTUSE(_nl_default_dirname);
2547 else if (IS_ABSOLUTE_PATH (binding->dirname))
2548 dirname = binding->dirname;
2550 @@ -501,16 +550,9 @@
2555 - /* We cannot get the current working directory. Don't signal an
2556 - error but simply return the default string. */
2557 - FREE_BLOCKS (block_list);
2558 - __set_errno (saved_errno);
2559 - return (plural == 0
2561 - /* Use the Germanic plural rule. */
2562 - : n == 1 ? (char *) msgid1 : (char *) msgid2);
2564 + /* We cannot get the current working directory. Don't signal an
2565 + error but simply return the default string. */
2566 + goto return_untranslated;
2568 stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
2570 @@ -567,16 +609,7 @@
2571 domain. Return the MSGID. */
2572 if (strcmp (single_locale, "C") == 0
2573 || strcmp (single_locale, "POSIX") == 0)
2575 - FREE_BLOCKS (block_list);
2576 - __libc_rwlock_unlock (_nl_state_lock);
2577 - __set_errno (saved_errno);
2578 - return (plural == 0
2580 - /* Use the Germanic plural rule. */
2581 - : n == 1 ? (char *) msgid1 : (char *) msgid2);
2586 /* Find structure describing the message catalog matching the
2587 DOMAINNAME and CATEGORY. */
2592 - retval = _nl_find_msg (domain, msgid1, &retlen);
2593 + retval = _nl_find_msg (domain, binding, msgid1, &retlen);
2599 for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
2601 - retval = _nl_find_msg (domain->successor[cnt], msgid1,
2603 + retval = _nl_find_msg (domain->successor[cnt], binding,
2609 /* Found the translation of MSGID1 in domain DOMAIN:
2610 starting at RETVAL, RETLEN bytes. */
2611 FREE_BLOCKS (block_list);
2612 - __set_errno (saved_errno);
2613 #if defined HAVE_TSEARCH || defined _LIBC
2617 (*foundp)->translation_length = retlen;
2620 + __set_errno (saved_errno);
2622 /* Now deal with plural. */
2624 retval = plural_lookup (domain, n, retval, retlen);
2625 @@ -656,32 +690,56 @@
2631 + return_untranslated:
2632 + /* Return the untranslated MSGID. */
2633 + FREE_BLOCKS (block_list);
2634 + __libc_rwlock_unlock (_nl_state_lock);
2636 + if (!ENABLE_SECURE)
2638 + extern void _nl_log_untranslated (const char *logfilename,
2639 + const char *domainname,
2640 + const char *msgid1, const char *msgid2,
2642 + const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
2644 + if (logfilename != NULL && logfilename[0] != '\0')
2645 + _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
2648 + __set_errno (saved_errno);
2649 + return (plural == 0
2651 + /* Use the Germanic plural rule. */
2652 + : n == 1 ? (char *) msgid1 : (char *) msgid2);
2658 -_nl_find_msg (domain_file, msgid, lengthp)
2659 - struct loaded_l10nfile *domain_file;
2660 - const char *msgid;
2662 +_nl_find_msg (struct loaded_l10nfile *domain_file,
2663 + struct binding *domainbinding, const char *msgid,
2666 struct loaded_domain *domain;
2667 + nls_uint32 nstrings;
2672 if (domain_file->decided == 0)
2673 - _nl_load_domain (domain_file);
2674 + _nl_load_domain (domain_file, domainbinding);
2676 if (domain_file->data == NULL)
2679 domain = (struct loaded_domain *) domain_file->data;
2681 + nstrings = domain->nstrings;
2683 /* Locate the MSGID and its translation. */
2684 - if (domain->hash_size > 2 && domain->hash_tab != NULL)
2685 + if (domain->hash_tab != NULL)
2687 /* Use the hashing table. */
2688 nls_uint32 len = strlen (msgid);
2689 @@ -691,22 +749,30 @@
2693 - nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
2695 + W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
2698 /* Hash table entry is empty. */
2701 - /* Compare msgid with the original string at index nstr-1.
2704 + /* Compare msgid with the original string at index nstr.
2705 We compare the lengths with >=, not ==, because plural entries
2706 are represented by strings with an embedded NUL. */
2707 - if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) >= len
2708 - && (strcmp (msgid,
2709 - domain->data + W (domain->must_swap,
2710 - domain->orig_tab[nstr - 1].offset))
2712 + if (nstr < nstrings
2713 + ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
2714 + && (strcmp (msgid,
2715 + domain->data + W (domain->must_swap,
2716 + domain->orig_tab[nstr].offset))
2718 + : domain->orig_sysdep_tab[nstr - nstrings].length > len
2719 + && (strcmp (msgid,
2720 + domain->orig_sysdep_tab[nstr - nstrings].pointer)
2732 - top = domain->nstrings;
2734 while (bottom < top)
2737 @@ -747,11 +813,29 @@
2739 /* The translation was found at index ACT. If we have to convert the
2740 string to use a different character set, this is the time. */
2741 - result = ((char *) domain->data
2742 - + W (domain->must_swap, domain->trans_tab[act].offset));
2743 - resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
2744 + if (act < nstrings)
2747 + (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
2748 + resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
2752 + result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
2753 + resultlen = domain->trans_sysdep_tab[act - nstrings].length;
2756 #if defined _LIBC || HAVE_ICONV
2757 + if (domain->codeset_cntr
2758 + != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
2760 + /* The domain's codeset has changed through bind_textdomain_codeset()
2761 + since the message catalog was initialized or last accessed. We
2762 + have to reinitialize the converter. */
2763 + _nl_free_domain_conv (domain);
2764 + _nl_init_domain_conv (domain_file, domain, domainbinding);
2769 domain->conv != (__gconv_t) -1
2773 if (domain->conv_tab == NULL
2774 - && ((domain->conv_tab = (char **) calloc (domain->nstrings,
2776 + && ((domain->conv_tab =
2777 + (char **) calloc (nstrings + domain->n_sysdep_strings,
2780 /* Mark that we didn't succeed allocating a table. */
2781 domain->conv_tab = (char **) -1;
2782 @@ -942,11 +1027,8 @@
2783 /* Look up a plural variant. */
2786 -plural_lookup (domain, n, translation, translation_len)
2787 - struct loaded_l10nfile *domain;
2788 - unsigned long int n;
2789 - const char *translation;
2790 - size_t translation_len;
2791 +plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
2792 + const char *translation, size_t translation_len)
2794 struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
2795 unsigned long int index;
2796 @@ -979,93 +1061,11 @@
2801 -/* Function to evaluate the plural expression and return an index value. */
2802 -static unsigned long int
2804 -plural_eval (pexp, n)
2805 - struct expression *pexp;
2806 - unsigned long int n;
2808 - switch (pexp->nargs)
2811 - switch (pexp->operation)
2816 - return pexp->val.num;
2824 - /* pexp->operation must be lnot. */
2825 - unsigned long int arg = plural_eval (pexp->val.args[0], n);
2830 - unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
2831 - if (pexp->operation == lor)
2832 - return leftarg || plural_eval (pexp->val.args[1], n);
2833 - else if (pexp->operation == land)
2834 - return leftarg && plural_eval (pexp->val.args[1], n);
2837 - unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
2839 - switch (pexp->operation)
2842 - return leftarg * rightarg;
2844 - return leftarg / rightarg;
2846 - return leftarg % rightarg;
2848 - return leftarg + rightarg;
2850 - return leftarg - rightarg;
2852 - return leftarg < rightarg;
2853 - case greater_than:
2854 - return leftarg > rightarg;
2855 - case less_or_equal:
2856 - return leftarg <= rightarg;
2857 - case greater_or_equal:
2858 - return leftarg >= rightarg;
2860 - return leftarg == rightarg;
2862 - return leftarg != rightarg;
2872 - /* pexp->operation must be qmop. */
2873 - unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
2874 - return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
2883 /* Return string representation of locale CATEGORY. */
2886 -category_to_name (category)
2888 +category_to_name (int category)
2892 @@ -1120,13 +1120,12 @@
2898 /* Guess value of current locale from value of the environment variables. */
2901 -guess_category_value (category, categoryname)
2903 - const char *categoryname;
2904 +guess_category_value (int category, const char *categoryname)
2906 const char *language;
2908 @@ -1141,27 +1140,21 @@
2909 /* We have to proceed with the POSIX methods of looking to `LC_ALL',
2910 `LC_xxx', and `LANG'. On some systems this can be done by the
2911 `setlocale' function itself. */
2912 -#if defined _LIBC || (defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL)
2913 - retval = setlocale (category, NULL);
2915 + retval = __current_locale_name (category);
2917 - /* Setting of LC_ALL overwrites all other. */
2918 - retval = getenv ("LC_ALL");
2919 - if (retval == NULL || retval[0] == '\0')
2921 - /* Next comes the name of the desired category. */
2922 - retval = getenv (categoryname);
2923 - if (retval == NULL || retval[0] == '\0')
2925 - /* Last possibility is the LANG environment variable. */
2926 - retval = getenv ("LANG");
2927 - if (retval == NULL || retval[0] == '\0')
2928 - /* We use C as the default domain. POSIX says this is
2929 - implementation defined. */
2933 + retval = _nl_locale_name (category, categoryname);
2936 + /* Ignore LANGUAGE if the locale is set to "C" because
2937 + 1. "C" locale usually uses the ASCII encoding, and most international
2938 + messages use non-ASCII characters. These characters get displayed
2939 + as question marks (if using glibc's iconv()) or as invalid 8-bit
2940 + characters (because other iconv()s refuse to convert most non-ASCII
2941 + characters to ASCII). In any case, the output is ugly.
2942 + 2. The precise output of some programs in the "C" locale is specified
2943 + by POSIX and should not depend on environment variables like
2944 + "LANGUAGE". We allow such programs to use gettext(). */
2945 return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
2948 @@ -1173,9 +1166,7 @@
2950 #if !_LIBC && !HAVE_STPCPY
2955 +stpcpy (char *dest, const char *src)
2957 while ((*dest++ = *src++) != '\0')
2959 @@ -1185,10 +1176,7 @@
2961 #if !_LIBC && !HAVE_MEMPCPY
2963 -mempcpy (dest, src, n)
2967 +mempcpy (void *dest, const void *src, size_t n)
2969 return (void *) ((char *) memcpy (dest, src, n) + n);
2971 @@ -1198,8 +1186,7 @@
2973 /* If we want to free all resources we have to do some work at
2975 -static void __attribute__ ((unused))
2977 +libc_freeres_fn (free_mem)
2981 @@ -1207,7 +1194,7 @@
2983 struct binding *oldp = _nl_domain_bindings;
2984 _nl_domain_bindings = _nl_domain_bindings->next;
2985 - if (oldp->dirname != _nl_default_dirname)
2986 + if (oldp->dirname != INTUSE(_nl_default_dirname))
2987 /* Yes, this is a pointer comparison. */
2988 free (oldp->dirname);
2989 free (oldp->codeset);
2990 @@ -1229,6 +1216,4 @@
2995 -text_set_element (__libc_subfreeres, free_mem);
2997 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dcngettext.c psmisc-20.2.works.clean/intl/dcngettext.c
2998 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dcngettext.c 2001-04-13 23:00:43.000000000 -0500
2999 +++ psmisc-20.2.works.clean/intl/dcngettext.c 2004-10-13 15:18:41.000000000 -0500
3001 /* Implementation of the dcngettext(3) function.
3002 - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
3003 + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
3005 - This program is free software; you can redistribute it and/or modify
3006 - it under the terms of the GNU General Public License as published by
3007 - the Free Software Foundation; either version 2, or (at your option)
3008 + This program is free software; you can redistribute it and/or modify it
3009 + under the terms of the GNU Library General Public License as published
3010 + by the Free Software Foundation; either version 2, or (at your option)
3013 This program is distributed in the hope that it will be useful,
3014 but WITHOUT ANY WARRANTY; without even the implied warranty of
3015 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3016 - GNU General Public License for more details.
3017 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3018 + Library General Public License for more details.
3020 - You should have received a copy of the GNU General Public License
3021 - along with this program; if not, write to the Free Software Foundation,
3022 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3023 + You should have received a copy of the GNU Library General Public
3024 + License along with this program; if not, write to the Free Software
3025 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3028 #ifdef HAVE_CONFIG_H
3029 # include <config.h>
3031 # define DCNGETTEXT __dcngettext
3032 # define DCIGETTEXT __dcigettext
3034 -# define DCNGETTEXT dcngettext__
3035 -# define DCIGETTEXT dcigettext__
3036 +# define DCNGETTEXT libintl_dcngettext
3037 +# define DCIGETTEXT libintl_dcigettext
3040 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
3043 -DCNGETTEXT (domainname, msgid1, msgid2, n, category)
3044 - const char *domainname;
3045 - const char *msgid1;
3046 - const char *msgid2;
3047 - unsigned long int n;
3049 +DCNGETTEXT (const char *domainname,
3050 + const char *msgid1, const char *msgid2, unsigned long int n,
3053 return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
3055 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dgettext.c psmisc-20.2.works.clean/intl/dgettext.c
3056 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dgettext.c 2001-04-13 23:00:42.000000000 -0500
3057 +++ psmisc-20.2.works.clean/intl/dgettext.c 2004-10-13 15:18:41.000000000 -0500
3059 /* Implementation of the dgettext(3) function.
3060 - Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
3061 + Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
3063 - This program is free software; you can redistribute it and/or modify
3064 - it under the terms of the GNU General Public License as published by
3065 - the Free Software Foundation; either version 2, or (at your option)
3066 + This program is free software; you can redistribute it and/or modify it
3067 + under the terms of the GNU Library General Public License as published
3068 + by the Free Software Foundation; either version 2, or (at your option)
3071 This program is distributed in the hope that it will be useful,
3072 but WITHOUT ANY WARRANTY; without even the implied warranty of
3073 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3074 - GNU General Public License for more details.
3075 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3076 + Library General Public License for more details.
3078 - You should have received a copy of the GNU General Public License
3079 - along with this program; if not, write to the Free Software Foundation,
3080 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3081 + You should have received a copy of the GNU Library General Public
3082 + License along with this program; if not, write to the Free Software
3083 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3086 #ifdef HAVE_CONFIG_H
3087 # include <config.h>
3090 +#include "gettextP.h"
3094 -#include "gettextP.h"
3096 # include <libintl.h>
3099 prefix. So we have to make a difference here. */
3101 # define DGETTEXT __dgettext
3102 -# define DCGETTEXT __dcgettext
3103 +# define DCGETTEXT INTUSE(__dcgettext)
3105 -# define DGETTEXT dgettext__
3106 -# define DCGETTEXT dcgettext__
3107 +# define DGETTEXT libintl_dgettext
3108 +# define DCGETTEXT libintl_dcgettext
3111 /* Look up MSGID in the DOMAINNAME message catalog of the current
3112 LC_MESSAGES locale. */
3114 -DGETTEXT (domainname, msgid)
3115 - const char *domainname;
3116 - const char *msgid;
3117 +DGETTEXT (const char *domainname, const char *msgid)
3119 return DCGETTEXT (domainname, msgid, LC_MESSAGES);
3121 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dngettext.c psmisc-20.2.works.clean/intl/dngettext.c
3122 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/dngettext.c 2001-04-13 23:00:43.000000000 -0500
3123 +++ psmisc-20.2.works.clean/intl/dngettext.c 2004-10-13 15:18:41.000000000 -0500
3125 /* Implementation of the dngettext(3) function.
3126 - Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
3127 + Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
3129 - This program is free software; you can redistribute it and/or modify
3130 - it under the terms of the GNU General Public License as published by
3131 - the Free Software Foundation; either version 2, or (at your option)
3132 + This program is free software; you can redistribute it and/or modify it
3133 + under the terms of the GNU Library General Public License as published
3134 + by the Free Software Foundation; either version 2, or (at your option)
3137 This program is distributed in the hope that it will be useful,
3138 but WITHOUT ANY WARRANTY; without even the implied warranty of
3139 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3140 - GNU General Public License for more details.
3141 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3142 + Library General Public License for more details.
3144 - You should have received a copy of the GNU General Public License
3145 - along with this program; if not, write to the Free Software Foundation,
3146 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3147 + You should have received a copy of the GNU Library General Public
3148 + License along with this program; if not, write to the Free Software
3149 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3152 #ifdef HAVE_CONFIG_H
3153 # include <config.h>
3156 +#include "gettextP.h"
3160 -#include "gettextP.h"
3162 # include <libintl.h>
3165 # define DNGETTEXT __dngettext
3166 # define DCNGETTEXT __dcngettext
3168 -# define DNGETTEXT dngettext__
3169 -# define DCNGETTEXT dcngettext__
3170 +# define DNGETTEXT libintl_dngettext
3171 +# define DCNGETTEXT libintl_dcngettext
3174 /* Look up MSGID in the DOMAINNAME message catalog of the current
3175 LC_MESSAGES locale and skip message according to the plural form. */
3177 -DNGETTEXT (domainname, msgid1, msgid2, n)
3178 - const char *domainname;
3179 - const char *msgid1;
3180 - const char *msgid2;
3181 - unsigned long int n;
3182 +DNGETTEXT (const char *domainname,
3183 + const char *msgid1, const char *msgid2, unsigned long int n)
3185 return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
3187 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/eval-plural.h psmisc-20.2.works.clean/intl/eval-plural.h
3188 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/eval-plural.h 1969-12-31 18:00:00.000000000 -0600
3189 +++ psmisc-20.2.works.clean/intl/eval-plural.h 2004-10-13 15:18:41.000000000 -0500
3191 +/* Plural expression evaluation.
3192 + Copyright (C) 2000-2003 Free Software Foundation, Inc.
3194 + This program is free software; you can redistribute it and/or modify it
3195 + under the terms of the GNU Library General Public License as published
3196 + by the Free Software Foundation; either version 2, or (at your option)
3197 + any later version.
3199 + This program is distributed in the hope that it will be useful,
3200 + but WITHOUT ANY WARRANTY; without even the implied warranty of
3201 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3202 + Library General Public License for more details.
3204 + You should have received a copy of the GNU Library General Public
3205 + License along with this program; if not, write to the Free Software
3206 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3210 +#define STATIC static
3213 +/* Evaluate the plural expression and return an index value. */
3217 +plural_eval (struct expression *pexp, unsigned long int n)
3219 + switch (pexp->nargs)
3222 + switch (pexp->operation)
3227 + return pexp->val.num;
3235 + /* pexp->operation must be lnot. */
3236 + unsigned long int arg = plural_eval (pexp->val.args[0], n);
3241 + unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
3242 + if (pexp->operation == lor)
3243 + return leftarg || plural_eval (pexp->val.args[1], n);
3244 + else if (pexp->operation == land)
3245 + return leftarg && plural_eval (pexp->val.args[1], n);
3248 + unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
3250 + switch (pexp->operation)
3253 + return leftarg * rightarg;
3255 +#if !INTDIV0_RAISES_SIGFPE
3256 + if (rightarg == 0)
3259 + return leftarg / rightarg;
3261 +#if !INTDIV0_RAISES_SIGFPE
3262 + if (rightarg == 0)
3265 + return leftarg % rightarg;
3267 + return leftarg + rightarg;
3269 + return leftarg - rightarg;
3271 + return leftarg < rightarg;
3272 + case greater_than:
3273 + return leftarg > rightarg;
3274 + case less_or_equal:
3275 + return leftarg <= rightarg;
3276 + case greater_or_equal:
3277 + return leftarg >= rightarg;
3279 + return leftarg == rightarg;
3281 + return leftarg != rightarg;
3291 + /* pexp->operation must be qmop. */
3292 + unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
3293 + return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
3299 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/explodename.c psmisc-20.2.works.clean/intl/explodename.c
3300 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/explodename.c 2001-04-13 23:00:42.000000000 -0500
3301 +++ psmisc-20.2.works.clean/intl/explodename.c 2004-10-13 15:18:41.000000000 -0500
3303 -/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
3304 +/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc.
3305 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
3307 - This program is free software; you can redistribute it and/or modify
3308 - it under the terms of the GNU General Public License as published by
3309 - the Free Software Foundation; either version 2, or (at your option)
3310 + This program is free software; you can redistribute it and/or modify it
3311 + under the terms of the GNU Library General Public License as published
3312 + by the Free Software Foundation; either version 2, or (at your option)
3315 This program is distributed in the hope that it will be useful,
3316 but WITHOUT ANY WARRANTY; without even the implied warranty of
3317 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3318 - GNU General Public License for more details.
3319 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3320 + Library General Public License for more details.
3322 - You should have received a copy of the GNU General Public License
3323 - along with this program; if not, write to the Free Software Foundation,
3324 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3325 + You should have received a copy of the GNU Library General Public
3326 + License along with this program; if not, write to the Free Software
3327 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3330 #ifdef HAVE_CONFIG_H
3331 # include <config.h>
3333 /* @@ end of prolog @@ */
3336 -_nl_find_language (name)
3338 +_nl_find_language (const char *name)
3340 while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
3341 && name[0] != '+' && name[0] != ',')
3346 -_nl_explode_name (name, language, modifier, territory, codeset,
3347 - normalized_codeset, special, sponsor, revision)
3349 - const char **language;
3350 - const char **modifier;
3351 - const char **territory;
3352 - const char **codeset;
3353 - const char **normalized_codeset;
3354 - const char **special;
3355 - const char **sponsor;
3356 - const char **revision;
3357 +_nl_explode_name (char *name,
3358 + const char **language, const char **modifier,
3359 + const char **territory, const char **codeset,
3360 + const char **normalized_codeset, const char **special,
3361 + const char **sponsor, const char **revision)
3363 enum { undecided, xpg, cen } syntax;
3365 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/finddomain.c psmisc-20.2.works.clean/intl/finddomain.c
3366 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/finddomain.c 2001-04-13 23:00:42.000000000 -0500
3367 +++ psmisc-20.2.works.clean/intl/finddomain.c 2004-10-13 15:18:41.000000000 -0500
3369 /* Handle list of needed message catalogs
3370 - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
3371 + Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
3372 Written by Ulrich Drepper <drepper@gnu.org>, 1995.
3374 - This program is free software; you can redistribute it and/or modify
3375 - it under the terms of the GNU General Public License as published by
3376 - the Free Software Foundation; either version 2, or (at your option)
3377 + This program is free software; you can redistribute it and/or modify it
3378 + under the terms of the GNU Library General Public License as published
3379 + by the Free Software Foundation; either version 2, or (at your option)
3382 This program is distributed in the hope that it will be useful,
3383 but WITHOUT ANY WARRANTY; without even the implied warranty of
3384 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3385 - GNU General Public License for more details.
3386 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3387 + Library General Public License for more details.
3389 - You should have received a copy of the GNU General Public License
3390 - along with this program; if not, write to the Free Software Foundation,
3391 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3392 + You should have received a copy of the GNU Library General Public
3393 + License along with this program; if not, write to the Free Software
3394 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3397 #ifdef HAVE_CONFIG_H
3398 # include <config.h>
3400 established bindings. */
3401 struct loaded_l10nfile *
3403 -_nl_find_domain (dirname, locale, domainname, domainbinding)
3404 - const char *dirname;
3406 - const char *domainname;
3407 - struct binding *domainbinding;
3408 +_nl_find_domain (const char *dirname, char *locale,
3409 + const char *domainname, struct binding *domainbinding)
3411 struct loaded_l10nfile *retval;
3412 const char *language;
3414 be one data set in the list of loaded domains. */
3415 retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
3416 strlen (dirname) + 1, 0, locale, NULL, NULL,
3417 - NULL, NULL, NULL, NULL, NULL, domainname,
3418 - domainbinding, 0);
3419 + NULL, NULL, NULL, NULL, NULL, domainname, 0);
3422 /* We know something about this locale. */
3425 if (retval->decided == 0)
3426 - _nl_load_domain (retval);
3427 + _nl_load_domain (retval, domainbinding);
3429 if (retval->data != NULL)
3432 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
3434 if (retval->successor[cnt]->decided == 0)
3435 - _nl_load_domain (retval->successor[cnt]);
3436 + _nl_load_domain (retval->successor[cnt], domainbinding);
3438 if (retval->successor[cnt]->data != NULL)
3440 @@ -146,21 +143,20 @@
3441 retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
3442 strlen (dirname) + 1, mask, language, territory,
3443 codeset, normalized_codeset, modifier, special,
3444 - sponsor, revision, domainname, domainbinding,
3446 + sponsor, revision, domainname, 1);
3448 /* This means we are out of core. */
3451 if (retval->decided == 0)
3452 - _nl_load_domain (retval);
3453 + _nl_load_domain (retval, domainbinding);
3454 if (retval->data == NULL)
3457 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
3459 if (retval->successor[cnt]->decided == 0)
3460 - _nl_load_domain (retval->successor[cnt]);
3461 + _nl_load_domain (retval->successor[cnt], domainbinding);
3462 if (retval->successor[cnt]->data != NULL)
3469 -static void __attribute__ ((unused))
3471 +libc_freeres_fn (free_mem)
3473 struct loaded_l10nfile *runp = _nl_loaded_domains;
3480 -text_set_element (__libc_subfreeres, free_mem);
3482 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/gettext.c psmisc-20.2.works.clean/intl/gettext.c
3483 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/gettext.c 2001-04-13 23:00:42.000000000 -0500
3484 +++ psmisc-20.2.works.clean/intl/gettext.c 2004-10-13 15:18:41.000000000 -0500
3486 /* Implementation of gettext(3) function.
3487 - Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
3488 + Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
3490 - This program is free software; you can redistribute it and/or modify
3491 - it under the terms of the GNU General Public License as published by
3492 - the Free Software Foundation; either version 2, or (at your option)
3493 + This program is free software; you can redistribute it and/or modify it
3494 + under the terms of the GNU Library General Public License as published
3495 + by the Free Software Foundation; either version 2, or (at your option)
3498 This program is distributed in the hope that it will be useful,
3499 but WITHOUT ANY WARRANTY; without even the implied warranty of
3500 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3501 - GNU General Public License for more details.
3502 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3503 + Library General Public License for more details.
3505 - You should have received a copy of the GNU General Public License
3506 - along with this program; if not, write to the Free Software Foundation,
3507 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3508 + You should have received a copy of the GNU Library General Public
3509 + License along with this program; if not, write to the Free Software
3510 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3513 #ifdef HAVE_CONFIG_H
3514 # include <config.h>
3516 prefix. So we have to make a difference here. */
3518 # define GETTEXT __gettext
3519 -# define DCGETTEXT __dcgettext
3520 +# define DCGETTEXT INTUSE(__dcgettext)
3522 -# define GETTEXT gettext__
3523 -# define DCGETTEXT dcgettext__
3524 +# define GETTEXT libintl_gettext
3525 +# define DCGETTEXT libintl_dcgettext
3528 /* Look up MSGID in the current default message catalog for the current
3529 LC_MESSAGES locale. If not found, returns MSGID itself (the default
3533 - const char *msgid;
3534 +GETTEXT (const char *msgid)
3536 return DCGETTEXT (NULL, msgid, LC_MESSAGES);
3538 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/gettext.h psmisc-20.2.works.clean/intl/gettext.h
3539 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/gettext.h 2001-04-13 23:00:42.000000000 -0500
3540 +++ psmisc-20.2.works.clean/intl/gettext.h 2004-10-13 15:19:00.000000000 -0500
3542 -/* Description of GNU message catalog format: general file layout.
3543 - Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
3544 +/* Convenience header for conditional use of GNU <libintl.h>.
3545 + Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
3547 - This program is free software; you can redistribute it and/or modify
3548 - it under the terms of the GNU General Public License as published by
3549 - the Free Software Foundation; either version 2, or (at your option)
3550 + This program is free software; you can redistribute it and/or modify it
3551 + under the terms of the GNU Library General Public License as published
3552 + by the Free Software Foundation; either version 2, or (at your option)
3555 This program is distributed in the hope that it will be useful,
3556 but WITHOUT ANY WARRANTY; without even the implied warranty of
3557 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3558 - GNU General Public License for more details.
3560 - You should have received a copy of the GNU General Public License
3561 - along with this program; if not, write to the Free Software Foundation,
3562 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3565 -#define _GETTEXT_H 1
3567 -#if HAVE_LIMITS_H || _LIBC
3568 -# include <limits.h>
3570 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3571 + Library General Public License for more details.
3573 -/* @@ end of prolog @@ */
3574 + You should have received a copy of the GNU Library General Public
3575 + License along with this program; if not, write to the Free Software
3576 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3579 -/* The magic number of the GNU message catalog format. */
3580 -#define _MAGIC 0x950412de
3581 -#define _MAGIC_SWAPPED 0xde120495
3582 +#ifndef _LIBGETTEXT_H
3583 +#define _LIBGETTEXT_H 1
3585 -/* Revision number of the currently used .mo (binary) file format. */
3586 -#define MO_REVISION_NUMBER 0
3587 +/* NLS can be disabled through the configure --disable-nls option. */
3590 -/* The following contortions are an attempt to use the C preprocessor
3591 - to determine an unsigned integral type that is 32 bits wide. An
3592 - alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
3593 - as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
3594 - when cross-compiling. */
3595 +/* Get declarations of GNU message catalog functions. */
3596 +# include <libintl.h>
3599 -# define UINT_MAX_32_BITS 4294967295U
3601 -# define UINT_MAX_32_BITS 0xFFFFFFFF
3604 -/* If UINT_MAX isn't defined, assume it's a 32-bit type.
3605 - This should be valid for all systems GNU cares about because
3606 - that doesn't include 16-bit systems, and only modern systems
3607 - (that certainly have <limits.h>) have 64+-bit integral types. */
3610 -# define UINT_MAX UINT_MAX_32_BITS
3613 -#if UINT_MAX == UINT_MAX_32_BITS
3614 -typedef unsigned nls_uint32;
3616 -# if USHRT_MAX == UINT_MAX_32_BITS
3617 -typedef unsigned short nls_uint32;
3619 -# if ULONG_MAX == UINT_MAX_32_BITS
3620 -typedef unsigned long nls_uint32;
3622 - /* The following line is intended to throw an error. Using #error is
3623 - not portable enough. */
3624 - "Cannot determine unsigned 32-bit data type."
3627 +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
3628 + chokes if dcgettext is defined as a macro. So include it now, to make
3629 + later inclusions of <locale.h> a NOP. We don't include <libintl.h>
3630 + as well because people using "gettext.h" will not include <libintl.h>,
3631 + and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
3634 +# include <locale.h>
3638 + The casts to 'const char *' serve the purpose of producing warnings
3639 + for invalid uses of the value returned from these functions.
3640 + On pre-ANSI systems without 'const', the config.h file is supposed to
3641 + contain "#define const". */
3642 +# define gettext(Msgid) ((const char *) (Msgid))
3643 +# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
3644 +# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
3645 +# define ngettext(Msgid1, Msgid2, N) \
3646 + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
3647 +# define dngettext(Domainname, Msgid1, Msgid2, N) \
3648 + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
3649 +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
3650 + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
3651 +# define textdomain(Domainname) ((const char *) (Domainname))
3652 +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
3653 +# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
3655 -/* Header for binary .mo file format. */
3656 -struct mo_file_header
3658 - /* The magic number. */
3660 - /* The revision number of the file format. */
3661 - nls_uint32 revision;
3662 - /* The number of strings pairs. */
3663 - nls_uint32 nstrings;
3664 - /* Offset of table with start offsets of original strings. */
3665 - nls_uint32 orig_tab_offset;
3666 - /* Offset of table with start offsets of translation strings. */
3667 - nls_uint32 trans_tab_offset;
3668 - /* Size of hashing table. */
3669 - nls_uint32 hash_tab_size;
3670 - /* Offset of first hashing entry. */
3671 - nls_uint32 hash_tab_offset;
3676 - /* Length of addressed string. */
3677 - nls_uint32 length;
3678 - /* Offset of string in file. */
3679 - nls_uint32 offset;
3683 -/* @@ begin of epilog @@ */
3684 +/* A pseudo function call that serves as a marker for the automated
3685 + extraction of messages, but does not call gettext(). The run-time
3686 + translation is done at a different place in the code.
3687 + The argument, String, should be a literal string. Concatenated strings
3688 + and other string expressions won't work.
3689 + The macro's expansion is not parenthesized, so that it is suitable as
3690 + initializer for static 'char[]' or 'const char[]' variables. */
3691 +#define gettext_noop(String) String
3693 -#endif /* gettext.h */
3694 +#endif /* _LIBGETTEXT_H */
3695 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/gettextP.h psmisc-20.2.works.clean/intl/gettextP.h
3696 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/gettextP.h 2001-04-13 23:00:42.000000000 -0500
3697 +++ psmisc-20.2.works.clean/intl/gettextP.h 2004-10-13 15:18:41.000000000 -0500
3699 /* Header describing internals of libintl library.
3700 - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
3701 + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
3702 Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
3704 - This program is free software; you can redistribute it and/or modify
3705 - it under the terms of the GNU General Public License as published by
3706 - the Free Software Foundation; either version 2, or (at your option)
3707 + This program is free software; you can redistribute it and/or modify it
3708 + under the terms of the GNU Library General Public License as published
3709 + by the Free Software Foundation; either version 2, or (at your option)
3712 This program is distributed in the hope that it will be useful,
3713 but WITHOUT ANY WARRANTY; without even the implied warranty of
3714 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3715 - GNU General Public License for more details.
3716 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3717 + Library General Public License for more details.
3719 - You should have received a copy of the GNU General Public License
3720 - along with this program; if not, write to the Free Software Foundation,
3721 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3722 + You should have received a copy of the GNU Library General Public
3723 + License along with this program; if not, write to the Free Software
3724 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3731 #include "loadinfo.h"
3733 -#include "gettext.h" /* Get nls_uint32. */
3734 +#include "gmo.h" /* Get nls_uint32. */
3736 /* @@ end of prolog @@ */
3740 -# define PARAMS(args) args
3742 -# define PARAMS(args) ()
3746 #ifndef internal_function
3747 # define internal_function
3750 +#ifndef attribute_hidden
3751 +# define attribute_hidden
3754 /* Tell the compiler when a conditional or integer expression is
3755 almost always true or almost always false. */
3756 #ifndef HAVE_BUILTIN_EXPECT
3761 -/* This is the representation of the expressions to determine the
3765 - int nargs; /* Number of arguments. */
3768 - /* Without arguments: */
3769 - var, /* The variable "n". */
3770 - num, /* Decimal number. */
3771 - /* Unary operators: */
3772 - lnot, /* Logical NOT. */
3773 - /* Binary operators: */
3774 - mult, /* Multiplication. */
3775 - divide, /* Division. */
3776 - module, /* Module operation. */
3777 - plus, /* Addition. */
3778 - minus, /* Subtraction. */
3779 - less_than, /* Comparison. */
3780 - greater_than, /* Comparison. */
3781 - less_or_equal, /* Comparison. */
3782 - greater_or_equal, /* Comparison. */
3783 - equal, /* Comparision for equality. */
3784 - not_equal, /* Comparision for inequality. */
3785 - land, /* Logical AND. */
3786 - lor, /* Logical OR. */
3787 - /* Ternary operators: */
3788 - qmop /* Question mark operator. */
3792 - unsigned long int num; /* Number value for `num'. */
3793 - struct expression *args[3]; /* Up to three arguments. */
3797 -/* This is the data structure to pass information to the parser and get
3798 - the result in a thread-safe way. */
3800 +/* In-memory representation of system dependent string. */
3801 +struct sysdep_string_desc
3804 - struct expression *res;
3805 + /* Length of addressed string, including the trailing NUL. */
3807 + /* Pointer to addressed string. */
3808 + const char *pointer;
3812 /* The representation of an opened message catalog. */
3813 struct loaded_domain
3815 + /* Pointer to memory containing the .mo file. */
3817 + /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
3819 + /* Size of mmap()ed memory. */
3821 + /* 1 if the .mo file uses a different endianness than this machine. */
3823 + /* Pointer to additional malloc()ed memory. */
3826 + /* Number of static strings pairs. */
3827 nls_uint32 nstrings;
3828 - struct string_desc *orig_tab;
3829 - struct string_desc *trans_tab;
3830 + /* Pointer to descriptors of original strings in the file. */
3831 + const struct string_desc *orig_tab;
3832 + /* Pointer to descriptors of translated strings in the file. */
3833 + const struct string_desc *trans_tab;
3835 + /* Number of system dependent strings pairs. */
3836 + nls_uint32 n_sysdep_strings;
3837 + /* Pointer to descriptors of original sysdep strings. */
3838 + const struct sysdep_string_desc *orig_sysdep_tab;
3839 + /* Pointer to descriptors of translated sysdep strings. */
3840 + const struct sysdep_string_desc *trans_sysdep_tab;
3842 + /* Size of hash table. */
3843 nls_uint32 hash_size;
3844 - nls_uint32 *hash_tab;
3845 + /* Pointer to hash table. */
3846 + const nls_uint32 *hash_tab;
3847 + /* 1 if the hash table uses a different endianness than this machine. */
3848 + int must_swap_hash_tab;
3856 struct binding *next;
3858 + int codeset_cntr; /* Incremented each time codeset changes. */
3860 char domainname[ZERO];
3862 @@ -164,72 +150,64 @@
3863 This variable is part of the external ABI of the GNU libintl. */
3864 extern int _nl_msg_cat_cntr;
3866 -struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
3868 - const char *__domainname,
3869 - struct binding *__domainbinding))
3871 +const char *_nl_locale_name (int category, const char *categoryname);
3874 +struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale,
3875 + const char *__domainname,
3876 + struct binding *__domainbinding)
3878 -void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
3879 +void _nl_load_domain (struct loaded_l10nfile *__domain,
3880 + struct binding *__domainbinding)
3882 -void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
3883 +void _nl_unload_domain (struct loaded_domain *__domain)
3884 + internal_function;
3885 +const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file,
3886 + struct loaded_domain *__domain,
3887 + struct binding *__domainbinding)
3888 + internal_function;
3889 +void _nl_free_domain_conv (struct loaded_domain *__domain)
3893 -extern char *__gettext PARAMS ((const char *__msgid));
3894 -extern char *__dgettext PARAMS ((const char *__domainname,
3895 - const char *__msgid));
3896 -extern char *__dcgettext PARAMS ((const char *__domainname,
3897 - const char *__msgid, int __category));
3898 -extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
3899 - unsigned long int __n));
3900 -extern char *__dngettext PARAMS ((const char *__domainname,
3901 - const char *__msgid1, const char *__msgid2,
3902 - unsigned long int n));
3903 -extern char *__dcngettext PARAMS ((const char *__domainname,
3904 - const char *__msgid1, const char *__msgid2,
3905 - unsigned long int __n, int __category));
3906 -extern char *__dcigettext PARAMS ((const char *__domainname,
3907 - const char *__msgid1, const char *__msgid2,
3908 - int __plural, unsigned long int __n,
3910 -extern char *__textdomain PARAMS ((const char *__domainname));
3911 -extern char *__bindtextdomain PARAMS ((const char *__domainname,
3912 - const char *__dirname));
3913 -extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
3914 - const char *__codeset));
3916 -extern char *gettext__ PARAMS ((const char *__msgid));
3917 -extern char *dgettext__ PARAMS ((const char *__domainname,
3918 - const char *__msgid));
3919 -extern char *dcgettext__ PARAMS ((const char *__domainname,
3920 - const char *__msgid, int __category));
3921 -extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
3922 - unsigned long int __n));
3923 -extern char *dngettext__ PARAMS ((const char *__domainname,
3924 - const char *__msgid1, const char *__msgid2,
3925 - unsigned long int __n));
3926 -extern char *dcngettext__ PARAMS ((const char *__domainname,
3927 - const char *__msgid1, const char *__msgid2,
3928 - unsigned long int __n, int __category));
3929 -extern char *dcigettext__ PARAMS ((const char *__domainname,
3930 - const char *__msgid1, const char *__msgid2,
3931 - int __plural, unsigned long int __n,
3933 -extern char *textdomain__ PARAMS ((const char *__domainname));
3934 -extern char *bindtextdomain__ PARAMS ((const char *__domainname,
3935 - const char *__dirname));
3936 -extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
3937 - const char *__codeset));
3939 +char *_nl_find_msg (struct loaded_l10nfile *domain_file,
3940 + struct binding *domainbinding, const char *msgid,
3942 + internal_function;
3945 -extern void __gettext_free_exp PARAMS ((struct expression *exp))
3946 - internal_function;
3947 -extern int __gettextparse PARAMS ((void *arg));
3948 +extern char *__gettext (const char *__msgid);
3949 +extern char *__dgettext (const char *__domainname, const char *__msgid);
3950 +extern char *__dcgettext (const char *__domainname, const char *__msgid,
3952 +extern char *__ngettext (const char *__msgid1, const char *__msgid2,
3953 + unsigned long int __n);
3954 +extern char *__dngettext (const char *__domainname,
3955 + const char *__msgid1, const char *__msgid2,
3956 + unsigned long int n);
3957 +extern char *__dcngettext (const char *__domainname,
3958 + const char *__msgid1, const char *__msgid2,
3959 + unsigned long int __n, int __category);
3960 +extern char *__dcigettext (const char *__domainname,
3961 + const char *__msgid1, const char *__msgid2,
3962 + int __plural, unsigned long int __n,
3964 +extern char *__textdomain (const char *__domainname);
3965 +extern char *__bindtextdomain (const char *__domainname,
3966 + const char *__dirname);
3967 +extern char *__bind_textdomain_codeset (const char *__domainname,
3968 + const char *__codeset);
3970 -extern void gettext_free_exp__ PARAMS ((struct expression *exp))
3971 - internal_function;
3972 -extern int gettextparse__ PARAMS ((void *arg));
3973 +/* Declare the exported libintl_* functions, in a way that allows us to
3974 + call them under their real name. */
3975 +# undef _INTL_REDIRECT_INLINE
3976 +# undef _INTL_REDIRECT_MACROS
3977 +# define _INTL_REDIRECT_MACROS
3978 +# include "libgnuintl.h"
3979 +extern char *libintl_dcigettext (const char *__domainname,
3980 + const char *__msgid1, const char *__msgid2,
3981 + int __plural, unsigned long int __n,
3985 /* @@ begin of epilog @@ */
3986 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/gmo.h psmisc-20.2.works.clean/intl/gmo.h
3987 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/gmo.h 1969-12-31 18:00:00.000000000 -0600
3988 +++ psmisc-20.2.works.clean/intl/gmo.h 2004-10-13 15:18:41.000000000 -0500
3990 +/* Description of GNU message catalog format: general file layout.
3991 + Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc.
3993 + This program is free software; you can redistribute it and/or modify it
3994 + under the terms of the GNU Library General Public License as published
3995 + by the Free Software Foundation; either version 2, or (at your option)
3996 + any later version.
3998 + This program is distributed in the hope that it will be useful,
3999 + but WITHOUT ANY WARRANTY; without even the implied warranty of
4000 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4001 + Library General Public License for more details.
4003 + You should have received a copy of the GNU Library General Public
4004 + License along with this program; if not, write to the Free Software
4005 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
4009 +#define _GETTEXT_H 1
4011 +#include <limits.h>
4013 +/* @@ end of prolog @@ */
4015 +/* The magic number of the GNU message catalog format. */
4016 +#define _MAGIC 0x950412de
4017 +#define _MAGIC_SWAPPED 0xde120495
4019 +/* Revision number of the currently used .mo (binary) file format. */
4020 +#define MO_REVISION_NUMBER 0
4021 +#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
4023 +/* The following contortions are an attempt to use the C preprocessor
4024 + to determine an unsigned integral type that is 32 bits wide. An
4025 + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
4026 + as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
4027 + when cross-compiling. */
4030 +# define UINT_MAX_32_BITS 4294967295U
4032 +# define UINT_MAX_32_BITS 0xFFFFFFFF
4035 +/* If UINT_MAX isn't defined, assume it's a 32-bit type.
4036 + This should be valid for all systems GNU cares about because
4037 + that doesn't include 16-bit systems, and only modern systems
4038 + (that certainly have <limits.h>) have 64+-bit integral types. */
4041 +# define UINT_MAX UINT_MAX_32_BITS
4044 +#if UINT_MAX == UINT_MAX_32_BITS
4045 +typedef unsigned nls_uint32;
4047 +# if USHRT_MAX == UINT_MAX_32_BITS
4048 +typedef unsigned short nls_uint32;
4050 +# if ULONG_MAX == UINT_MAX_32_BITS
4051 +typedef unsigned long nls_uint32;
4053 + /* The following line is intended to throw an error. Using #error is
4054 + not portable enough. */
4055 + "Cannot determine unsigned 32-bit data type."
4061 +/* Header for binary .mo file format. */
4062 +struct mo_file_header
4064 + /* The magic number. */
4066 + /* The revision number of the file format. */
4067 + nls_uint32 revision;
4069 + /* The following are only used in .mo files with major revision 0 or 1. */
4071 + /* The number of strings pairs. */
4072 + nls_uint32 nstrings;
4073 + /* Offset of table with start offsets of original strings. */
4074 + nls_uint32 orig_tab_offset;
4075 + /* Offset of table with start offsets of translated strings. */
4076 + nls_uint32 trans_tab_offset;
4077 + /* Size of hash table. */
4078 + nls_uint32 hash_tab_size;
4079 + /* Offset of first hash table entry. */
4080 + nls_uint32 hash_tab_offset;
4082 + /* The following are only used in .mo files with minor revision >= 1. */
4084 + /* The number of system dependent segments. */
4085 + nls_uint32 n_sysdep_segments;
4086 + /* Offset of table describing system dependent segments. */
4087 + nls_uint32 sysdep_segments_offset;
4088 + /* The number of system dependent strings pairs. */
4089 + nls_uint32 n_sysdep_strings;
4090 + /* Offset of table with start offsets of original sysdep strings. */
4091 + nls_uint32 orig_sysdep_tab_offset;
4092 + /* Offset of table with start offsets of translated sysdep strings. */
4093 + nls_uint32 trans_sysdep_tab_offset;
4096 +/* Descriptor for static string contained in the binary .mo file. */
4099 + /* Length of addressed string, not including the trailing NUL. */
4100 + nls_uint32 length;
4101 + /* Offset of string in file. */
4102 + nls_uint32 offset;
4105 +/* The following are only used in .mo files with minor revision >= 1. */
4107 +/* Descriptor for system dependent string segment. */
4108 +struct sysdep_segment
4110 + /* Length of addressed string, including the trailing NUL. */
4111 + nls_uint32 length;
4112 + /* Offset of string in file. */
4113 + nls_uint32 offset;
4116 +/* Descriptor for system dependent string. */
4117 +struct sysdep_string
4119 + /* Offset of static string segments in file. */
4120 + nls_uint32 offset;
4121 + /* Alternating sequence of static and system dependent segments.
4122 + The last segment is a static segment, including the trailing NUL. */
4123 + struct segment_pair
4125 + /* Size of static segment. */
4126 + nls_uint32 segsize;
4127 + /* Reference to system dependent string segment, or ~0 at the end. */
4128 + nls_uint32 sysdepref;
4132 +/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
4133 + regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
4134 +#define SEGMENTS_END ((nls_uint32) ~0)
4136 +/* @@ begin of epilog @@ */
4138 +#endif /* gettext.h */
4139 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/hash-string.h psmisc-20.2.works.clean/intl/hash-string.h
4140 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/hash-string.h 2001-04-13 23:00:42.000000000 -0500
4141 +++ psmisc-20.2.works.clean/intl/hash-string.h 2004-10-13 15:18:41.000000000 -0500
4143 /* Description of GNU message catalog format: string hashing function.
4144 - Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
4145 + Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc.
4147 - This program is free software; you can redistribute it and/or modify
4148 - it under the terms of the GNU General Public License as published by
4149 - the Free Software Foundation; either version 2, or (at your option)
4150 + This program is free software; you can redistribute it and/or modify it
4151 + under the terms of the GNU Library General Public License as published
4152 + by the Free Software Foundation; either version 2, or (at your option)
4155 This program is distributed in the hope that it will be useful,
4156 but WITHOUT ANY WARRANTY; without even the implied warranty of
4157 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4158 - GNU General Public License for more details.
4159 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4160 + Library General Public License for more details.
4162 - You should have received a copy of the GNU General Public License
4163 - along with this program; if not, write to the Free Software Foundation,
4164 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
4165 + You should have received a copy of the GNU Library General Public
4166 + License along with this program; if not, write to the Free Software
4167 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
4170 /* @@ end of prolog @@ */
4174 -# define PARAMS(Args) Args
4176 -# define PARAMS(Args) ()
4180 /* We assume to have `unsigned long int' value with at least 32 bits. */
4181 #define HASHWORDBITS 32
4184 /* Defines the so called `hashpjw' function by P.J. Weinberger
4185 [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
4186 1986, 1987 Bell Telephone Laboratories, Inc.] */
4187 -static unsigned long int hash_string PARAMS ((const char *__str_param));
4189 static inline unsigned long int
4190 -hash_string (str_param)
4191 - const char *str_param;
4192 +hash_string (const char *str_param)
4194 unsigned long int hval, g;
4195 const char *str = str_param;
4197 while (*str != '\0')
4200 - hval += (unsigned long int) *str++;
4201 + hval += (unsigned char) *str++;
4202 g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
4205 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/intl-compat.c psmisc-20.2.works.clean/intl/intl-compat.c
4206 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/intl-compat.c 2001-04-13 23:00:43.000000000 -0500
4207 +++ psmisc-20.2.works.clean/intl/intl-compat.c 2004-10-13 15:18:41.000000000 -0500
4209 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext
4211 - Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
4212 + Copyright (C) 1995, 2000-2003 Software Foundation, Inc.
4214 -This program is free software; you can redistribute it and/or modify
4215 -it under the terms of the GNU General Public License as published by
4216 -the Free Software Foundation; either version 2, or (at your option)
4218 + This program is free software; you can redistribute it and/or modify it
4219 + under the terms of the GNU Library General Public License as published
4220 + by the Free Software Foundation; either version 2, or (at your option)
4221 + any later version.
4223 -This program is distributed in the hope that it will be useful,
4224 -but WITHOUT ANY WARRANTY; without even the implied warranty of
4225 -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4226 -GNU General Public License for more details.
4227 + This program is distributed in the hope that it will be useful,
4228 + but WITHOUT ANY WARRANTY; without even the implied warranty of
4229 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4230 + Library General Public License for more details.
4232 -You should have received a copy of the GNU General Public License
4233 -along with this program; if not, write to the Free Software
4234 -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
4235 + You should have received a copy of the GNU Library General Public
4236 + License along with this program; if not, write to the Free Software
4237 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
4240 #ifdef HAVE_CONFIG_H
4241 # include <config.h>
4244 -#include "libgnuintl.h"
4245 #include "gettextP.h"
4247 /* @@ end of prolog @@ */
4249 -/* This file redirects the gettext functions (without prefix or suffix) to
4250 - those defined in the included GNU gettext library (with "__" suffix).
4251 - It is compiled into libintl when the included GNU gettext library is
4252 - configured --with-included-gettext.
4254 - This redirection works also in the case that the system C library or
4255 - the system libintl library contain gettext/textdomain/... functions.
4256 - If it didn't, we would need to add preprocessor level redirections to
4257 - libgnuintl.h of the following form:
4259 -# define gettext gettext__
4260 -# define dgettext dgettext__
4261 -# define dcgettext dcgettext__
4262 -# define ngettext ngettext__
4263 -# define dngettext dngettext__
4264 -# define dcngettext dcngettext__
4265 -# define textdomain textdomain__
4266 -# define bindtextdomain bindtextdomain__
4267 -# define bind_textdomain_codeset bind_textdomain_codeset__
4269 - How does this redirection work? There are two cases.
4270 - A. When libintl.a is linked into an executable, it works because
4271 - functions defined in the executable always override functions in
4272 - the shared libraries.
4273 - B. When libintl.so is used, it works because
4274 - 1. those systems defining gettext/textdomain/... in the C library
4275 - (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
4276 - ELF systems and define these symbols as weak, thus explicitly
4277 - letting other shared libraries override it.
4278 - 2. those systems defining gettext/textdomain/... in a standalone
4279 - libintl.so library (namely, Solaris 2.3 and newer) have this
4280 - shared library in /usr/lib, and the linker will search /usr/lib
4281 - *after* the directory where the GNU gettext library is installed.
4283 - A third case, namely when libintl.a is linked into a shared library
4284 - whose name is not libintl.so, is not supported. In this case, on
4285 - Solaris, when -lintl precedes the linker option for the shared library
4286 - containing GNU gettext, the system's gettext would indeed override
4287 - the GNU gettext. Anyone doing this kind of stuff must be clever enough
4288 - to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
4290 +/* This file redirects the gettext functions (without prefix) to those
4291 + defined in the included GNU libintl library (with "libintl_" prefix).
4292 + It is compiled into libintl in order to make the AM_GNU_GETTEXT test
4293 + of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
4294 + has the redirections primarily in the <libintl.h> include file.
4295 + It is also compiled into libgnuintl so that libgnuintl.so can be used
4296 + as LD_PRELOADable library on glibc systems, to provide the extra
4297 + features that the functions in the libc don't have (namely, logging). */
4302 #undef bind_textdomain_codeset
4305 +/* When building a DLL, we must export some functions. Note that because
4306 + the functions are only defined for binary backward compatibility, we
4307 + don't need to use __declspec(dllimport) in any case. */
4308 +#if defined _MSC_VER && BUILDING_DLL
4309 +# define DLL_EXPORTED __declspec(dllexport)
4311 +# define DLL_EXPORTED
4318 - const char *msgid;
4319 +gettext (const char *msgid)
4321 - return gettext__ (msgid);
4322 + return libintl_gettext (msgid);
4328 -dgettext (domainname, msgid)
4329 - const char *domainname;
4330 - const char *msgid;
4331 +dgettext (const char *domainname, const char *msgid)
4333 - return dgettext__ (domainname, msgid);
4334 + return libintl_dgettext (domainname, msgid);
4340 -dcgettext (domainname, msgid, category)
4341 - const char *domainname;
4342 - const char *msgid;
4344 +dcgettext (const char *domainname, const char *msgid, int category)
4346 - return dcgettext__ (domainname, msgid, category);
4347 + return libintl_dcgettext (domainname, msgid, category);
4353 -ngettext (msgid1, msgid2, n)
4354 - const char *msgid1;
4355 - const char *msgid2;
4356 - unsigned long int n;
4357 +ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
4359 - return ngettext__ (msgid1, msgid2, n);
4360 + return libintl_ngettext (msgid1, msgid2, n);
4366 -dngettext (domainname, msgid1, msgid2, n)
4367 - const char *domainname;
4368 - const char *msgid1;
4369 - const char *msgid2;
4370 - unsigned long int n;
4371 +dngettext (const char *domainname,
4372 + const char *msgid1, const char *msgid2, unsigned long int n)
4374 - return dngettext__ (domainname, msgid1, msgid2, n);
4375 + return libintl_dngettext (domainname, msgid1, msgid2, n);
4381 -dcngettext (domainname, msgid1, msgid2, n, category)
4382 - const char *domainname;
4383 - const char *msgid1;
4384 - const char *msgid2;
4385 - unsigned long int n;
4387 +dcngettext (const char *domainname,
4388 + const char *msgid1, const char *msgid2, unsigned long int n,
4391 - return dcngettext__ (domainname, msgid1, msgid2, n, category);
4392 + return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
4398 -textdomain (domainname)
4399 - const char *domainname;
4400 +textdomain (const char *domainname)
4402 - return textdomain__ (domainname);
4403 + return libintl_textdomain (domainname);
4409 -bindtextdomain (domainname, dirname)
4410 - const char *domainname;
4411 - const char *dirname;
4412 +bindtextdomain (const char *domainname, const char *dirname)
4414 - return bindtextdomain__ (domainname, dirname);
4415 + return libintl_bindtextdomain (domainname, dirname);
4421 -bind_textdomain_codeset (domainname, codeset)
4422 - const char *domainname;
4423 - const char *codeset;
4424 +bind_textdomain_codeset (const char *domainname, const char *codeset)
4426 - return bind_textdomain_codeset__ (domainname, codeset);
4427 + return libintl_bind_textdomain_codeset (domainname, codeset);
4429 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/l10nflist.c psmisc-20.2.works.clean/intl/l10nflist.c
4430 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/l10nflist.c 2001-04-13 23:00:42.000000000 -0500
4431 +++ psmisc-20.2.works.clean/intl/l10nflist.c 2004-10-13 15:18:41.000000000 -0500
4433 -/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
4434 +/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
4435 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
4437 - This program is free software; you can redistribute it and/or modify
4438 - it under the terms of the GNU General Public License as published by
4439 - the Free Software Foundation; either version 2, or (at your option)
4440 + This program is free software; you can redistribute it and/or modify it
4441 + under the terms of the GNU Library General Public License as published
4442 + by the Free Software Foundation; either version 2, or (at your option)
4445 This program is distributed in the hope that it will be useful,
4446 but WITHOUT ANY WARRANTY; without even the implied warranty of
4447 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4448 - GNU General Public License for more details.
4449 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4450 + Library General Public License for more details.
4452 - You should have received a copy of the GNU General Public License
4453 - along with this program; if not, write to the Free Software Foundation,
4454 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
4455 + You should have received a copy of the GNU Library General Public
4456 + License along with this program; if not, write to the Free Software
4457 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
4460 /* Tell glibc's <string.h> to provide a prototype for stpcpy().
4461 This must come before <config.h> because <config.h> may include
4466 -#if !HAVE_STRCHR && !defined _LIBC
4468 -# define strchr index
4472 #if defined _LIBC || defined HAVE_ARGZ_H
4477 # ifndef HAVE_STPCPY
4478 -static char *stpcpy PARAMS ((char *dest, const char *src));
4479 +static char *stpcpy (char *dest, const char *src);
4483 +/* Pathname support.
4484 + ISSLASH(C) tests whether C is a directory separator character.
4485 + IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
4486 + it may be concatenated to a directory pathname.
4488 +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
4489 + /* Win32, OS/2, DOS */
4490 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
4491 +# define HAS_DEVICE(P) \
4492 + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
4494 +# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
4497 +# define ISSLASH(C) ((C) == '/')
4498 +# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
4501 /* Define function which are usually not available. */
4503 #if !defined _LIBC && !defined HAVE___ARGZ_COUNT
4504 /* Returns the number of strings in ARGZ. */
4505 -static size_t argz_count__ PARAMS ((const char *argz, size_t len));
4508 -argz_count__ (argz, len)
4511 +argz_count__ (const char *argz, size_t len)
4517 # undef __argz_count
4518 # define __argz_count(argz, len) argz_count__ (argz, len)
4521 +# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
4523 #endif /* !_LIBC && !HAVE___ARGZ_COUNT */
4525 #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
4526 /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
4527 except the last into the character SEP. */
4528 -static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
4531 -argz_stringify__ (argz, len, sep)
4535 +argz_stringify__ (char *argz, size_t len, int sep)
4539 @@ -113,17 +122,16 @@
4541 # undef __argz_stringify
4542 # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
4545 +# define __argz_stringify(argz, len, sep) \
4546 + INTUSE(__argz_stringify) (argz, len, sep)
4548 #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
4550 #if !defined _LIBC && !defined HAVE___ARGZ_NEXT
4551 -static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
4552 - const char *entry));
4555 -argz_next__ (argz, argz_len, entry)
4558 - const char *entry;
4559 +argz_next__ (char *argz, size_t argz_len, const char *entry)
4563 @@ -144,11 +152,8 @@
4566 /* Return number of bits set in X. */
4567 -static int pop PARAMS ((int x));
4574 /* We assume that no more than 16 bits are used. */
4575 x = ((x & ~0x5555) >> 1) + (x & 0x5555);
4576 @@ -161,32 +166,27 @@
4579 struct loaded_l10nfile *
4580 -_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
4581 - territory, codeset, normalized_codeset, modifier, special,
4582 - sponsor, revision, filename, domainbinding, do_allocate)
4583 - struct loaded_l10nfile **l10nfile_list;
4584 - const char *dirlist;
4585 - size_t dirlist_len;
4587 - const char *language;
4588 - const char *territory;
4589 - const char *codeset;
4590 - const char *normalized_codeset;
4591 - const char *modifier;
4592 - const char *special;
4593 - const char *sponsor;
4594 - const char *revision;
4595 - const char *filename;
4596 - struct binding *domainbinding;
4598 +_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
4599 + const char *dirlist, size_t dirlist_len,
4600 + int mask, const char *language, const char *territory,
4601 + const char *codeset, const char *normalized_codeset,
4602 + const char *modifier, const char *special,
4603 + const char *sponsor, const char *revision,
4604 + const char *filename, int do_allocate)
4607 - struct loaded_l10nfile *last = NULL;
4608 + struct loaded_l10nfile **lastp;
4609 struct loaded_l10nfile *retval;
4611 + size_t dirlist_count;
4615 + /* If LANGUAGE contains an absolute directory specification, we ignore
4617 + if (IS_ABSOLUTE_PATH (language))
4620 /* Allocate room for the full file name. */
4621 abs_filename = (char *) malloc (dirlist_len
4624 + (((mask & CEN_SPONSOR) != 0
4625 || (mask & CEN_REVISION) != 0)
4626 ? (1 + ((mask & CEN_SPONSOR) != 0
4627 - ? strlen (sponsor) + 1 : 0)
4628 + ? strlen (sponsor) : 0)
4629 + ((mask & CEN_REVISION) != 0
4630 ? strlen (revision) + 1 : 0)) : 0)
4631 + 1 + strlen (filename) + 1);
4632 @@ -212,14 +212,16 @@
4633 if (abs_filename == NULL)
4639 /* Construct file name. */
4640 - memcpy (abs_filename, dirlist, dirlist_len);
4641 - __argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
4642 - cp = abs_filename + (dirlist_len - 1);
4644 + cp = abs_filename;
4645 + if (dirlist_len > 0)
4647 + memcpy (cp, dirlist, dirlist_len);
4648 + __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
4649 + cp += dirlist_len;
4653 cp = stpcpy (cp, language);
4655 if ((mask & TERRITORY) != 0)
4658 /* Look in list of already loaded domains whether it is already
4661 + lastp = l10nfile_list;
4662 for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
4663 if (retval->filename != NULL)
4670 + lastp = &retval->next;
4673 if (retval != NULL || do_allocate == 0)
4674 @@ -290,52 +292,68 @@
4678 - retval = (struct loaded_l10nfile *)
4679 - malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
4680 - * (1 << pop (mask))
4681 - * sizeof (struct loaded_l10nfile *)));
4682 + dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
4684 + /* Allocate a new loaded_l10nfile. */
4686 + (struct loaded_l10nfile *)
4687 + malloc (sizeof (*retval)
4688 + + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
4689 + * sizeof (struct loaded_l10nfile *)));
4693 retval->filename = abs_filename;
4694 - retval->domainbinding = domainbinding;
4695 - retval->decided = (__argz_count (dirlist, dirlist_len) != 1
4697 + /* We set retval->data to NULL here; it is filled in later.
4698 + Setting retval->decided to 1 here means that retval does not
4699 + correspond to a real file (dirlist_count > 1) or is not worth
4700 + looking up (if an unnormalized codeset was specified). */
4701 + retval->decided = (dirlist_count > 1
4702 || ((mask & XPG_CODESET) != 0
4703 && (mask & XPG_NORM_CODESET) != 0));
4704 retval->data = NULL;
4708 - retval->next = *l10nfile_list;
4709 - *l10nfile_list = retval;
4713 - retval->next = last->next;
4714 - last->next = retval;
4716 + retval->next = *lastp;
4720 - /* If the DIRLIST is a real list the RETVAL entry corresponds not to
4721 - a real file. So we have to use the DIRLIST separation mechanism
4722 - of the inner loop. */
4723 - cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
4724 - for (; cnt >= 0; --cnt)
4725 + /* Recurse to fill the inheritance list of RETVAL.
4726 + If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
4727 + entry does not correspond to a real file; retval->filename contains
4728 + colons. In this case we loop across all elements of DIRLIST and
4729 + across all bit patterns dominated by MASK.
4730 + If the DIRLIST is a single directory or entirely redundant (i.e.
4731 + DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
4732 + MASK, excluding MASK itself.
4733 + In either case, we loop down from MASK to 0. This has the effect
4734 + that the extra bits in the locale name are dropped in this order:
4735 + first the modifier, then the territory, then the codeset, then the
4736 + normalized_codeset. */
4737 + for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
4738 if ((cnt & ~mask) == 0
4739 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
4740 && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
4742 - /* Iterate over all elements of the DIRLIST. */
4744 + if (dirlist_count > 1)
4746 + /* Iterate over all elements of the DIRLIST. */
4749 - while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
4751 + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
4753 + retval->successor[entries++]
4754 + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
4755 + cnt, language, territory, codeset,
4756 + normalized_codeset, modifier, special,
4757 + sponsor, revision, filename, 1);
4760 retval->successor[entries++]
4761 - = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
4762 - language, territory, codeset,
4763 + = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
4764 + cnt, language, territory, codeset,
4765 normalized_codeset, modifier, special,
4766 - sponsor, revision, filename, domainbinding,
4768 + sponsor, revision, filename, 1);
4770 retval->successor[entries] = NULL;
4773 names. The return value is dynamically allocated and has to be
4774 freed by the caller. */
4776 -_nl_normalize_codeset (codeset, name_len)
4777 - const char *codeset;
4779 +_nl_normalize_codeset (const char *codeset, size_t name_len)
4783 @@ -358,11 +374,11 @@
4786 for (cnt = 0; cnt < name_len; ++cnt)
4787 - if (isalnum (codeset[cnt]))
4788 + if (isalnum ((unsigned char) codeset[cnt]))
4792 - if (isalpha (codeset[cnt]))
4793 + if (isalpha ((unsigned char) codeset[cnt]))
4800 for (cnt = 0; cnt < name_len; ++cnt)
4801 - if (isalpha (codeset[cnt]))
4802 - *wp++ = tolower (codeset[cnt]);
4803 - else if (isdigit (codeset[cnt]))
4804 + if (isalpha ((unsigned char) codeset[cnt]))
4805 + *wp++ = tolower ((unsigned char) codeset[cnt]);
4806 + else if (isdigit ((unsigned char) codeset[cnt]))
4807 *wp++ = codeset[cnt];
4812 #if !_LIBC && !HAVE_STPCPY
4817 +stpcpy (char *dest, const char *src)
4819 while ((*dest++ = *src++) != '\0')
4821 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/libgettext.h psmisc-20.2.works.clean/intl/libgettext.h
4822 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/libgettext.h 2001-04-13 23:00:42.000000000 -0500
4823 +++ psmisc-20.2.works.clean/intl/libgettext.h 1969-12-31 18:00:00.000000000 -0600
4825 -/* Convenience header for conditional use of GNU <libintl.h>.
4826 - Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
4828 - This program is free software; you can redistribute it and/or modify
4829 - it under the terms of the GNU General Public License as published by
4830 - the Free Software Foundation; either version 2, or (at your option)
4831 - any later version.
4833 - This program is distributed in the hope that it will be useful,
4834 - but WITHOUT ANY WARRANTY; without even the implied warranty of
4835 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4836 - GNU General Public License for more details.
4838 - You should have received a copy of the GNU General Public License
4839 - along with this program; if not, write to the Free Software Foundation,
4840 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
4842 -#ifndef _LIBGETTEXT_H
4843 -#define _LIBGETTEXT_H 1
4845 -/* NLS can be disabled through the configure --disable-nls option. */
4848 -/* Get declarations of GNU message catalog functions. */
4849 -# include <libintl.h>
4853 -# define gettext(Msgid) (Msgid)
4854 -# define dgettext(Domainname, Msgid) (Msgid)
4855 -# define dcgettext(Domainname, Msgid, Category) (Msgid)
4856 -# define ngettext(Msgid1, Msgid2, N) \
4857 - ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
4858 -# define dngettext(Domainname, Msgid1, Msgid2, N) \
4859 - ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
4860 -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
4861 - ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
4862 -# define textdomain(Domainname) ((char *) (Domainname))
4863 -# define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
4864 -# define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
4868 -/* For automatical extraction of messages sometimes no real
4869 - translation is needed. Instead the string itself is the result. */
4870 -#define gettext_noop(Str) (Str)
4872 -#endif /* _LIBGETTEXT_H */
4873 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/libgnuintl.h psmisc-20.2.works.clean/intl/libgnuintl.h
4874 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/libgnuintl.h 2001-04-13 23:00:42.000000000 -0500
4875 +++ psmisc-20.2.works.clean/intl/libgnuintl.h 1969-12-31 18:00:00.000000000 -0600
4877 -/* Message catalogs for internationalization.
4878 - Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
4880 - This program is free software; you can redistribute it and/or modify
4881 - it under the terms of the GNU General Public License as published by
4882 - the Free Software Foundation; either version 2, or (at your option)
4883 - any later version.
4885 - This program is distributed in the hope that it will be useful,
4886 - but WITHOUT ANY WARRANTY; without even the implied warranty of
4887 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4888 - GNU General Public License for more details.
4890 - You should have received a copy of the GNU General Public License
4891 - along with this program; if not, write to the Free Software Foundation,
4892 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
4895 -#define _LIBINTL_H 1
4897 -#include <locale.h>
4899 -/* The LC_MESSAGES locale category is the category used by the functions
4900 - gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
4901 - On systems that don't define it, use an arbitrary value instead.
4902 - On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
4903 - this file!) and then only defines LC_MESSAGES. To avoid a redefinition
4904 - warning, don't define LC_MESSAGES in this case. */
4905 -#if !defined LC_MESSAGES && !defined __LOCALE_H
4906 -# define LC_MESSAGES 1729
4909 -/* We define an additional symbol to signal that we use the GNU
4910 - implementation of gettext. */
4911 -#define __USE_GNU_GETTEXT 1
4913 -/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
4914 - precedence over _conio_gettext. */
4917 -# define gettext gettext
4921 -# if __STDC__ || defined __cplusplus
4922 -# define PARAMS(args) args
4924 -# define PARAMS(args) ()
4932 -/* Look up MSGID in the current default message catalog for the current
4933 - LC_MESSAGES locale. If not found, returns MSGID itself (the default
4935 -extern char *gettext PARAMS ((const char *__msgid));
4937 -/* Look up MSGID in the DOMAINNAME message catalog for the current
4938 - LC_MESSAGES locale. */
4939 -extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
4941 -/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
4943 -extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
4947 -/* Similar to `gettext' but select the plural form corresponding to the
4949 -extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
4950 - unsigned long int __n));
4952 -/* Similar to `dgettext' but select the plural form corresponding to the
4954 -extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
4955 - const char *__msgid2, unsigned long int __n));
4957 -/* Similar to `dcgettext' but select the plural form corresponding to the
4959 -extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
4960 - const char *__msgid2, unsigned long int __n,
4964 -/* Set the current default message catalog to DOMAINNAME.
4965 - If DOMAINNAME is null, return the current default.
4966 - If DOMAINNAME is "", reset to the default of "messages". */
4967 -extern char *textdomain PARAMS ((const char *__domainname));
4969 -/* Specify that the DOMAINNAME message catalog will be found
4970 - in DIRNAME rather than in the system locale data base. */
4971 -extern char *bindtextdomain PARAMS ((const char *__domainname,
4972 - const char *__dirname));
4974 -/* Specify the character encoding in which the messages from the
4975 - DOMAINNAME message catalog will be returned. */
4976 -extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
4977 - const char *__codeset));
4980 -/* Optimized version of the functions above. */
4981 -#if defined __OPTIMIZED
4982 -/* These are macros, but could also be inline functions. */
4984 -# define gettext(msgid) \
4985 - dgettext (NULL, msgid)
4987 -# define dgettext(domainname, msgid) \
4988 - dcgettext (domainname, msgid, LC_MESSAGES)
4990 -# define ngettext(msgid1, msgid2, n) \
4991 - dngettext (NULL, msgid1, msgid2, n)
4993 -# define dngettext(domainname, msgid1, msgid2, n) \
4994 - dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
4996 -#endif /* Optimizing. */
5003 -#endif /* libintl.h */
5004 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/libgnuintl.h.in psmisc-20.2.works.clean/intl/libgnuintl.h.in
5005 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/libgnuintl.h.in 1969-12-31 18:00:00.000000000 -0600
5006 +++ psmisc-20.2.works.clean/intl/libgnuintl.h.in 2004-10-13 15:18:41.000000000 -0500
5008 +/* Message catalogs for internationalization.
5009 + Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
5011 + This program is free software; you can redistribute it and/or modify it
5012 + under the terms of the GNU Library General Public License as published
5013 + by the Free Software Foundation; either version 2, or (at your option)
5014 + any later version.
5016 + This program is distributed in the hope that it will be useful,
5017 + but WITHOUT ANY WARRANTY; without even the implied warranty of
5018 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5019 + Library General Public License for more details.
5021 + You should have received a copy of the GNU Library General Public
5022 + License along with this program; if not, write to the Free Software
5023 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5027 +#define _LIBINTL_H 1
5029 +#include <locale.h>
5031 +/* The LC_MESSAGES locale category is the category used by the functions
5032 + gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
5033 + On systems that don't define it, use an arbitrary value instead.
5034 + On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
5035 + then includes <libintl.h> (i.e. this file!) and then only defines
5036 + LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
5038 +#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
5039 +# define LC_MESSAGES 1729
5042 +/* We define an additional symbol to signal that we use the GNU
5043 + implementation of gettext. */
5044 +#define __USE_GNU_GETTEXT 1
5046 +/* Provide information about the supported file formats. Returns the
5047 + maximum minor revision number supported for a given major revision. */
5048 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
5049 + ((major) == 0 ? 1 : -1)
5051 +/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
5052 + precedence over _conio_gettext. */
5062 +/* We redirect the functions to those prefixed with "libintl_". This is
5063 + necessary, because some systems define gettext/textdomain/... in the C
5064 + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
5065 + If we used the unprefixed names, there would be cases where the
5066 + definition in the C library would override the one in the libintl.so
5067 + shared library. Recall that on ELF systems, the symbols are looked
5068 + up in the following order:
5069 + 1. in the executable,
5070 + 2. in the shared libraries specified on the link command line, in order,
5071 + 3. in the dependencies of the shared libraries specified on the link
5073 + 4. in the dlopen()ed shared libraries, in the order in which they were
5075 + The definition in the C library would override the one in libintl.so if
5077 + * -lc is given on the link command line and -lintl isn't, or
5078 + * -lc is given on the link command line before -lintl, or
5079 + * libintl.so is a dependency of a dlopen()ed shared library but not
5080 + linked to the executable at link time.
5081 + Since Solaris gettext() behaves differently than GNU gettext(), this
5082 + would be unacceptable.
5084 + The redirection happens by default through macros in C, so that &gettext
5085 + is independent of the compilation unit, but through inline functions in
5086 + C++, in order not to interfere with the name mangling of class fields or
5087 + class methods called 'gettext'. */
5089 +/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
5090 + If he doesn't, we choose the method. A third possible method is
5091 + _INTL_REDIRECT_ASM, supported only by GCC. */
5092 +#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
5093 +# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
5094 +# define _INTL_REDIRECT_ASM
5096 +# ifdef __cplusplus
5097 +# define _INTL_REDIRECT_INLINE
5099 +# define _INTL_REDIRECT_MACROS
5103 +/* Auxiliary macros. */
5104 +#ifdef _INTL_REDIRECT_ASM
5105 +# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
5106 +# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
5107 +# define _INTL_STRINGIFY(prefix) #prefix
5109 +# define _INTL_ASM(cname)
5112 +/* Look up MSGID in the current default message catalog for the current
5113 + LC_MESSAGES locale. If not found, returns MSGID itself (the default
5115 +#ifdef _INTL_REDIRECT_INLINE
5116 +extern char *libintl_gettext (const char *__msgid);
5117 +static inline char *gettext (const char *__msgid)
5119 + return libintl_gettext (__msgid);
5122 +#ifdef _INTL_REDIRECT_MACROS
5123 +# define gettext libintl_gettext
5125 +extern char *gettext (const char *__msgid)
5126 + _INTL_ASM (libintl_gettext);
5129 +/* Look up MSGID in the DOMAINNAME message catalog for the current
5130 + LC_MESSAGES locale. */
5131 +#ifdef _INTL_REDIRECT_INLINE
5132 +extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
5133 +static inline char *dgettext (const char *__domainname, const char *__msgid)
5135 + return libintl_dgettext (__domainname, __msgid);
5138 +#ifdef _INTL_REDIRECT_MACROS
5139 +# define dgettext libintl_dgettext
5141 +extern char *dgettext (const char *__domainname, const char *__msgid)
5142 + _INTL_ASM (libintl_dgettext);
5145 +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
5147 +#ifdef _INTL_REDIRECT_INLINE
5148 +extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
5150 +static inline char *dcgettext (const char *__domainname, const char *__msgid,
5153 + return libintl_dcgettext (__domainname, __msgid, __category);
5156 +#ifdef _INTL_REDIRECT_MACROS
5157 +# define dcgettext libintl_dcgettext
5159 +extern char *dcgettext (const char *__domainname, const char *__msgid,
5161 + _INTL_ASM (libintl_dcgettext);
5165 +/* Similar to `gettext' but select the plural form corresponding to the
5167 +#ifdef _INTL_REDIRECT_INLINE
5168 +extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
5169 + unsigned long int __n);
5170 +static inline char *ngettext (const char *__msgid1, const char *__msgid2,
5171 + unsigned long int __n)
5173 + return libintl_ngettext (__msgid1, __msgid2, __n);
5176 +#ifdef _INTL_REDIRECT_MACROS
5177 +# define ngettext libintl_ngettext
5179 +extern char *ngettext (const char *__msgid1, const char *__msgid2,
5180 + unsigned long int __n)
5181 + _INTL_ASM (libintl_ngettext);
5184 +/* Similar to `dgettext' but select the plural form corresponding to the
5186 +#ifdef _INTL_REDIRECT_INLINE
5187 +extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
5188 + const char *__msgid2, unsigned long int __n);
5189 +static inline char *dngettext (const char *__domainname, const char *__msgid1,
5190 + const char *__msgid2, unsigned long int __n)
5192 + return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
5195 +#ifdef _INTL_REDIRECT_MACROS
5196 +# define dngettext libintl_dngettext
5198 +extern char *dngettext (const char *__domainname,
5199 + const char *__msgid1, const char *__msgid2,
5200 + unsigned long int __n)
5201 + _INTL_ASM (libintl_dngettext);
5204 +/* Similar to `dcgettext' but select the plural form corresponding to the
5206 +#ifdef _INTL_REDIRECT_INLINE
5207 +extern char *libintl_dcngettext (const char *__domainname,
5208 + const char *__msgid1, const char *__msgid2,
5209 + unsigned long int __n, int __category);
5210 +static inline char *dcngettext (const char *__domainname,
5211 + const char *__msgid1, const char *__msgid2,
5212 + unsigned long int __n, int __category)
5214 + return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
5217 +#ifdef _INTL_REDIRECT_MACROS
5218 +# define dcngettext libintl_dcngettext
5220 +extern char *dcngettext (const char *__domainname,
5221 + const char *__msgid1, const char *__msgid2,
5222 + unsigned long int __n, int __category)
5223 + _INTL_ASM (libintl_dcngettext);
5227 +/* Set the current default message catalog to DOMAINNAME.
5228 + If DOMAINNAME is null, return the current default.
5229 + If DOMAINNAME is "", reset to the default of "messages". */
5230 +#ifdef _INTL_REDIRECT_INLINE
5231 +extern char *libintl_textdomain (const char *__domainname);
5232 +static inline char *textdomain (const char *__domainname)
5234 + return libintl_textdomain (__domainname);
5237 +#ifdef _INTL_REDIRECT_MACROS
5238 +# define textdomain libintl_textdomain
5240 +extern char *textdomain (const char *__domainname)
5241 + _INTL_ASM (libintl_textdomain);
5244 +/* Specify that the DOMAINNAME message catalog will be found
5245 + in DIRNAME rather than in the system locale data base. */
5246 +#ifdef _INTL_REDIRECT_INLINE
5247 +extern char *libintl_bindtextdomain (const char *__domainname,
5248 + const char *__dirname);
5249 +static inline char *bindtextdomain (const char *__domainname,
5250 + const char *__dirname)
5252 + return libintl_bindtextdomain (__domainname, __dirname);
5255 +#ifdef _INTL_REDIRECT_MACROS
5256 +# define bindtextdomain libintl_bindtextdomain
5258 +extern char *bindtextdomain (const char *__domainname, const char *__dirname)
5259 + _INTL_ASM (libintl_bindtextdomain);
5262 +/* Specify the character encoding in which the messages from the
5263 + DOMAINNAME message catalog will be returned. */
5264 +#ifdef _INTL_REDIRECT_INLINE
5265 +extern char *libintl_bind_textdomain_codeset (const char *__domainname,
5266 + const char *__codeset);
5267 +static inline char *bind_textdomain_codeset (const char *__domainname,
5268 + const char *__codeset)
5270 + return libintl_bind_textdomain_codeset (__domainname, __codeset);
5273 +#ifdef _INTL_REDIRECT_MACROS
5274 +# define bind_textdomain_codeset libintl_bind_textdomain_codeset
5276 +extern char *bind_textdomain_codeset (const char *__domainname,
5277 + const char *__codeset)
5278 + _INTL_ASM (libintl_bind_textdomain_codeset);
5282 +/* Support for format strings with positions in *printf(), following the
5283 + POSIX/XSI specification.
5284 + Note: These replacements for the *printf() functions are visible only
5285 + in source files that #include <libintl.h> or #include "gettext.h".
5286 + Packages that use *printf() in source files that don't refer to _()
5287 + or gettext() but for which the format string could be the return value
5288 + of _() or gettext() need to add this #include. Oh well. */
5290 +#if !@HAVE_POSIX_PRINTF@
5293 +#include <stddef.h>
5296 +#if __STDC__ || defined __cplusplus || defined _MSC_VER
5297 +# include <stdarg.h>
5299 +# include <varargs.h>
5303 +#define fprintf libintl_fprintf
5304 +extern int fprintf (FILE *, const char *, ...);
5306 +#define vfprintf libintl_vfprintf
5307 +extern int vfprintf (FILE *, const char *, va_list);
5310 +#define printf libintl_printf
5311 +extern int printf (const char *, ...);
5313 +#define vprintf libintl_vprintf
5314 +extern int vprintf (const char *, va_list);
5317 +#define sprintf libintl_sprintf
5318 +extern int sprintf (char *, const char *, ...);
5320 +#define vsprintf libintl_vsprintf
5321 +extern int vsprintf (char *, const char *, va_list);
5323 +#if @HAVE_SNPRINTF@
5326 +#define snprintf libintl_snprintf
5327 +extern int snprintf (char *, size_t, const char *, ...);
5329 +#define vsnprintf libintl_vsnprintf
5330 +extern int vsnprintf (char *, size_t, const char *, va_list);
5334 +#if @HAVE_ASPRINTF@
5337 +#define asprintf libintl_asprintf
5338 +extern int asprintf (char **, const char *, ...);
5340 +#define vasprintf libintl_vasprintf
5341 +extern int vasprintf (char **, const char *, va_list);
5348 +#define fwprintf libintl_fwprintf
5349 +extern int fwprintf (FILE *, const wchar_t *, ...);
5351 +#define vfwprintf libintl_vfwprintf
5352 +extern int vfwprintf (FILE *, const wchar_t *, va_list);
5355 +#define wprintf libintl_wprintf
5356 +extern int wprintf (const wchar_t *, ...);
5358 +#define vwprintf libintl_vwprintf
5359 +extern int vwprintf (const wchar_t *, va_list);
5362 +#define swprintf libintl_swprintf
5363 +extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
5365 +#define vswprintf libintl_vswprintf
5366 +extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
5373 +/* Support for relocatable packages. */
5375 +/* Sets the original and the current installation prefix of the package.
5376 + Relocation simply replaces a pathname starting with the original prefix
5377 + by the corresponding pathname with the current prefix instead. Both
5378 + prefixes should be directory names without trailing slash (i.e. use ""
5379 + instead of "/"). */
5380 +#define libintl_set_relocation_prefix libintl_set_relocation_prefix
5382 + libintl_set_relocation_prefix (const char *orig_prefix,
5383 + const char *curr_prefix);
5390 +#endif /* libintl.h */
5391 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/loadinfo.h psmisc-20.2.works.clean/intl/loadinfo.h
5392 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/loadinfo.h 2001-04-13 23:00:42.000000000 -0500
5393 +++ psmisc-20.2.works.clean/intl/loadinfo.h 2004-10-13 15:18:41.000000000 -0500
5395 -/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
5396 +/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc.
5397 This file is part of the GNU C Library.
5398 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
5400 - This program is free software; you can redistribute it and/or modify
5401 - it under the terms of the GNU General Public License as published by
5402 - the Free Software Foundation; either version 2, or (at your option)
5403 + This program is free software; you can redistribute it and/or modify it
5404 + under the terms of the GNU Library General Public License as published
5405 + by the Free Software Foundation; either version 2, or (at your option)
5408 This program is distributed in the hope that it will be useful,
5409 but WITHOUT ANY WARRANTY; without even the implied warranty of
5410 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5411 - GNU General Public License for more details.
5412 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5413 + Library General Public License for more details.
5415 - You should have received a copy of the GNU General Public License
5416 - along with this program; if not, write to the Free Software Foundation,
5417 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
5418 + You should have received a copy of the GNU Library General Public
5419 + License along with this program; if not, write to the Free Software
5420 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5424 #define _LOADINFO_H 1
5428 -# define PARAMS(args) args
5430 -# define PARAMS(args) ()
5433 +/* Declarations of locale dependent catalog lookup functions.
5436 + localealias.c Possibly replace a locale name by another.
5437 + explodename.c Split a locale name into its various fields.
5438 + l10nflist.c Generate a list of filenames of possible message catalogs.
5439 + finddomain.c Find and open the relevant message catalogs.
5441 + The main function _nl_find_domain() in finddomain.c is declared
5445 #ifndef internal_function
5446 # define internal_function
5448 struct loaded_l10nfile
5450 const char *filename;
5451 - struct binding *domainbinding;
5456 names. Normalization allows the user to use any of the common
5457 names. The return value is dynamically allocated and has to be
5458 freed by the caller. */
5459 -extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
5460 - size_t name_len));
5461 +extern const char *_nl_normalize_codeset (const char *codeset,
5464 +/* Lookup a locale dependent file.
5465 + *L10NFILE_LIST denotes a pool of lookup results of locale dependent
5466 + files of the same kind, sorted in decreasing order of ->filename.
5467 + DIRLIST and DIRLIST_LEN are an argz list of directories in which to
5468 + look, containing at least one directory (i.e. DIRLIST_LEN > 0).
5469 + MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
5470 + SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
5471 + produced by _nl_explode_name(). FILENAME is the filename suffix.
5472 + The return value is the lookup result, either found in *L10NFILE_LIST,
5473 + or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
5474 + If the return value is non-NULL, it is added to *L10NFILE_LIST, and
5475 + its ->next field denotes the chaining inside *L10NFILE_LIST, and
5476 + furthermore its ->successor[] field contains a list of other lookup
5477 + results from which this lookup result inherits. */
5478 extern struct loaded_l10nfile *
5479 -_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
5480 - const char *dirlist, size_t dirlist_len, int mask,
5481 - const char *language, const char *territory,
5482 - const char *codeset,
5483 - const char *normalized_codeset,
5484 - const char *modifier, const char *special,
5485 - const char *sponsor, const char *revision,
5486 - const char *filename,
5487 - struct binding *domainbinding, int do_allocate));
5490 -extern const char *_nl_expand_alias PARAMS ((const char *name));
5492 -/* normalized_codeset is dynamically allocated and has to be freed by
5494 -extern int _nl_explode_name PARAMS ((char *name, const char **language,
5495 - const char **modifier,
5496 - const char **territory,
5497 - const char **codeset,
5498 - const char **normalized_codeset,
5499 - const char **special,
5500 - const char **sponsor,
5501 - const char **revision));
5502 +_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
5503 + const char *dirlist, size_t dirlist_len, int mask,
5504 + const char *language, const char *territory,
5505 + const char *codeset, const char *normalized_codeset,
5506 + const char *modifier, const char *special,
5507 + const char *sponsor, const char *revision,
5508 + const char *filename, int do_allocate);
5510 -extern char *_nl_find_language PARAMS ((const char *name));
5511 +/* Lookup the real locale name for a locale alias NAME, or NULL if
5512 + NAME is not a locale alias (but possibly a real locale name).
5513 + The return value is statically allocated and must not be freed. */
5514 +extern const char *_nl_expand_alias (const char *name);
5516 +/* Split a locale name NAME into its pieces: language, modifier,
5517 + territory, codeset, special, sponsor, revision.
5518 + NAME gets destructively modified: NUL bytes are inserted here and
5519 + there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
5520 + *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
5521 + pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
5522 + gets assigned the expanded *CODESET, if it is different from *CODESET;
5523 + this one is dynamically allocated and has to be freed by the caller.
5524 + The return value is a bitmask, where each bit corresponds to one
5526 + XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
5527 + TERRITORY for *TERRITORY,
5528 + XPG_CODESET for *CODESET,
5529 + XPG_NORM_CODESET for *NORMALIZED_CODESET,
5530 + CEN_SPECIAL for *SPECIAL,
5531 + CEN_SPONSOR for *SPONSOR,
5532 + CEN_REVISION for *REVISION.
5534 +extern int _nl_explode_name (char *name, const char **language,
5535 + const char **modifier, const char **territory,
5536 + const char **codeset,
5537 + const char **normalized_codeset,
5538 + const char **special, const char **sponsor,
5539 + const char **revision);
5541 -extern char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
5542 - const char *msgid, size_t *lengthp))
5543 - internal_function;
5544 +/* Split a locale name NAME into a leading language part and all the
5545 + rest. Return a pointer to the first character after the language,
5546 + i.e. to the first byte of the rest. */
5547 +extern char *_nl_find_language (const char *name);
5549 #endif /* loadinfo.h */
5550 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/loadmsgcat.c psmisc-20.2.works.clean/intl/loadmsgcat.c
5551 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/loadmsgcat.c 2001-04-13 23:00:42.000000000 -0500
5552 +++ psmisc-20.2.works.clean/intl/loadmsgcat.c 2004-10-13 15:18:41.000000000 -0500
5554 /* Load needed message catalogs.
5555 - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
5556 + Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
5558 - This program is free software; you can redistribute it and/or modify
5559 - it under the terms of the GNU General Public License as published by
5560 - the Free Software Foundation; either version 2, or (at your option)
5561 + This program is free software; you can redistribute it and/or modify it
5562 + under the terms of the GNU Library General Public License as published
5563 + by the Free Software Foundation; either version 2, or (at your option)
5566 This program is distributed in the hope that it will be useful,
5567 but WITHOUT ANY WARRANTY; without even the implied warranty of
5568 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5569 - GNU General Public License for more details.
5570 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5571 + Library General Public License for more details.
5573 - You should have received a copy of the GNU General Public License
5574 - along with this program; if not, write to the Free Software Foundation,
5575 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
5576 + You should have received a copy of the GNU Library General Public
5577 + License along with this program; if not, write to the Free Software
5578 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5581 /* Tell glibc's <string.h> to provide a prototype for mempcpy().
5582 This must come before <config.h> because <config.h> may include
5584 #include <sys/stat.h>
5588 # define alloca __builtin_alloca
5589 # define HAVE_ALLOCA 1
5591 -# if defined HAVE_ALLOCA_H || defined _LIBC
5592 -# include <alloca.h>
5594 +# include <malloc.h>
5595 +# define alloca _alloca
5599 +# if defined HAVE_ALLOCA_H || defined _LIBC
5600 +# include <alloca.h>
5612 @@ -70,13 +77,380 @@
5616 -#include "gettext.h"
5617 +#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
5618 +# include <stdint.h>
5620 +#if defined HAVE_INTTYPES_H || defined _LIBC
5621 +# include <inttypes.h>
5625 #include "gettextP.h"
5626 +#include "hash-string.h"
5627 +#include "plural-exp.h"
5630 # include "../locale/localeinfo.h"
5633 +/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
5634 + Note that our fallback values need not be literal strings, because we don't
5635 + use them with preprocessor string concatenation. */
5636 +#if !defined PRId8 || PRI_MACROS_BROKEN
5640 +#if !defined PRIi8 || PRI_MACROS_BROKEN
5644 +#if !defined PRIo8 || PRI_MACROS_BROKEN
5648 +#if !defined PRIu8 || PRI_MACROS_BROKEN
5652 +#if !defined PRIx8 || PRI_MACROS_BROKEN
5656 +#if !defined PRIX8 || PRI_MACROS_BROKEN
5660 +#if !defined PRId16 || PRI_MACROS_BROKEN
5662 +# define PRId16 "d"
5664 +#if !defined PRIi16 || PRI_MACROS_BROKEN
5666 +# define PRIi16 "i"
5668 +#if !defined PRIo16 || PRI_MACROS_BROKEN
5670 +# define PRIo16 "o"
5672 +#if !defined PRIu16 || PRI_MACROS_BROKEN
5674 +# define PRIu16 "u"
5676 +#if !defined PRIx16 || PRI_MACROS_BROKEN
5678 +# define PRIx16 "x"
5680 +#if !defined PRIX16 || PRI_MACROS_BROKEN
5682 +# define PRIX16 "X"
5684 +#if !defined PRId32 || PRI_MACROS_BROKEN
5686 +# define PRId32 "d"
5688 +#if !defined PRIi32 || PRI_MACROS_BROKEN
5690 +# define PRIi32 "i"
5692 +#if !defined PRIo32 || PRI_MACROS_BROKEN
5694 +# define PRIo32 "o"
5696 +#if !defined PRIu32 || PRI_MACROS_BROKEN
5698 +# define PRIu32 "u"
5700 +#if !defined PRIx32 || PRI_MACROS_BROKEN
5702 +# define PRIx32 "x"
5704 +#if !defined PRIX32 || PRI_MACROS_BROKEN
5706 +# define PRIX32 "X"
5708 +#if !defined PRId64 || PRI_MACROS_BROKEN
5710 +# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
5712 +#if !defined PRIi64 || PRI_MACROS_BROKEN
5714 +# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
5716 +#if !defined PRIo64 || PRI_MACROS_BROKEN
5718 +# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
5720 +#if !defined PRIu64 || PRI_MACROS_BROKEN
5722 +# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
5724 +#if !defined PRIx64 || PRI_MACROS_BROKEN
5726 +# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
5728 +#if !defined PRIX64 || PRI_MACROS_BROKEN
5730 +# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
5732 +#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
5734 +# define PRIdLEAST8 "d"
5736 +#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
5738 +# define PRIiLEAST8 "i"
5740 +#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
5742 +# define PRIoLEAST8 "o"
5744 +#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
5746 +# define PRIuLEAST8 "u"
5748 +#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
5750 +# define PRIxLEAST8 "x"
5752 +#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
5754 +# define PRIXLEAST8 "X"
5756 +#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
5757 +# undef PRIdLEAST16
5758 +# define PRIdLEAST16 "d"
5760 +#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
5761 +# undef PRIiLEAST16
5762 +# define PRIiLEAST16 "i"
5764 +#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
5765 +# undef PRIoLEAST16
5766 +# define PRIoLEAST16 "o"
5768 +#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
5769 +# undef PRIuLEAST16
5770 +# define PRIuLEAST16 "u"
5772 +#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
5773 +# undef PRIxLEAST16
5774 +# define PRIxLEAST16 "x"
5776 +#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
5777 +# undef PRIXLEAST16
5778 +# define PRIXLEAST16 "X"
5780 +#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
5781 +# undef PRIdLEAST32
5782 +# define PRIdLEAST32 "d"
5784 +#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
5785 +# undef PRIiLEAST32
5786 +# define PRIiLEAST32 "i"
5788 +#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
5789 +# undef PRIoLEAST32
5790 +# define PRIoLEAST32 "o"
5792 +#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
5793 +# undef PRIuLEAST32
5794 +# define PRIuLEAST32 "u"
5796 +#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
5797 +# undef PRIxLEAST32
5798 +# define PRIxLEAST32 "x"
5800 +#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
5801 +# undef PRIXLEAST32
5802 +# define PRIXLEAST32 "X"
5804 +#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
5805 +# undef PRIdLEAST64
5806 +# define PRIdLEAST64 PRId64
5808 +#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
5809 +# undef PRIiLEAST64
5810 +# define PRIiLEAST64 PRIi64
5812 +#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
5813 +# undef PRIoLEAST64
5814 +# define PRIoLEAST64 PRIo64
5816 +#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
5817 +# undef PRIuLEAST64
5818 +# define PRIuLEAST64 PRIu64
5820 +#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
5821 +# undef PRIxLEAST64
5822 +# define PRIxLEAST64 PRIx64
5824 +#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
5825 +# undef PRIXLEAST64
5826 +# define PRIXLEAST64 PRIX64
5828 +#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
5830 +# define PRIdFAST8 "d"
5832 +#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
5834 +# define PRIiFAST8 "i"
5836 +#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
5838 +# define PRIoFAST8 "o"
5840 +#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
5842 +# define PRIuFAST8 "u"
5844 +#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
5846 +# define PRIxFAST8 "x"
5848 +#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
5850 +# define PRIXFAST8 "X"
5852 +#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
5854 +# define PRIdFAST16 "d"
5856 +#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
5858 +# define PRIiFAST16 "i"
5860 +#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
5862 +# define PRIoFAST16 "o"
5864 +#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
5866 +# define PRIuFAST16 "u"
5868 +#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
5870 +# define PRIxFAST16 "x"
5872 +#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
5874 +# define PRIXFAST16 "X"
5876 +#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
5878 +# define PRIdFAST32 "d"
5880 +#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
5882 +# define PRIiFAST32 "i"
5884 +#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
5886 +# define PRIoFAST32 "o"
5888 +#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
5890 +# define PRIuFAST32 "u"
5892 +#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
5894 +# define PRIxFAST32 "x"
5896 +#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
5898 +# define PRIXFAST32 "X"
5900 +#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
5902 +# define PRIdFAST64 PRId64
5904 +#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
5906 +# define PRIiFAST64 PRIi64
5908 +#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
5910 +# define PRIoFAST64 PRIo64
5912 +#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
5914 +# define PRIuFAST64 PRIu64
5916 +#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
5918 +# define PRIxFAST64 PRIx64
5920 +#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
5922 +# define PRIXFAST64 PRIX64
5924 +#if !defined PRIdMAX || PRI_MACROS_BROKEN
5926 +# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
5928 +#if !defined PRIiMAX || PRI_MACROS_BROKEN
5930 +# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
5932 +#if !defined PRIoMAX || PRI_MACROS_BROKEN
5934 +# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
5936 +#if !defined PRIuMAX || PRI_MACROS_BROKEN
5938 +# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
5940 +#if !defined PRIxMAX || PRI_MACROS_BROKEN
5942 +# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
5944 +#if !defined PRIXMAX || PRI_MACROS_BROKEN
5946 +# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
5948 +#if !defined PRIdPTR || PRI_MACROS_BROKEN
5951 + (sizeof (void *) == sizeof (long) ? "ld" : \
5952 + sizeof (void *) == sizeof (int) ? "d" : \
5955 +#if !defined PRIiPTR || PRI_MACROS_BROKEN
5958 + (sizeof (void *) == sizeof (long) ? "li" : \
5959 + sizeof (void *) == sizeof (int) ? "i" : \
5962 +#if !defined PRIoPTR || PRI_MACROS_BROKEN
5965 + (sizeof (void *) == sizeof (long) ? "lo" : \
5966 + sizeof (void *) == sizeof (int) ? "o" : \
5969 +#if !defined PRIuPTR || PRI_MACROS_BROKEN
5972 + (sizeof (void *) == sizeof (long) ? "lu" : \
5973 + sizeof (void *) == sizeof (int) ? "u" : \
5976 +#if !defined PRIxPTR || PRI_MACROS_BROKEN
5979 + (sizeof (void *) == sizeof (long) ? "lx" : \
5980 + sizeof (void *) == sizeof (int) ? "x" : \
5983 +#if !defined PRIXPTR || PRI_MACROS_BROKEN
5986 + (sizeof (void *) == sizeof (long) ? "lX" : \
5987 + sizeof (void *) == sizeof (int) ? "X" : \
5991 /* @@ end of prolog @@ */
5995 # define munmap __munmap
5998 -/* Names for the libintl functions are a problem. They must not clash
5999 - with existing names and they should follow ANSI C. But this source
6000 - code is also used in GNU C Library where the names have a __
6001 - prefix. So we have to make a difference here. */
6003 -# define PLURAL_PARSE __gettextparse
6005 -# define PLURAL_PARSE gettextparse__
6008 /* For those losing systems which don't have `alloca' we have to add
6009 some additional code emulating it. */
6011 @@ -126,85 +490,424 @@
6016 /* We need a sign, whether a new catalog was loaded, which can be associated
6017 with all translations. This is important if the translations are
6018 cached by one of GCC's features. */
6019 int _nl_msg_cat_cntr;
6021 -#if defined __GNUC__ \
6022 - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
6024 -/* These structs are the constant expression for the germanic plural
6025 - form determination. It represents the expression "n != 1". */
6026 -static const struct expression plvar =
6031 -static const struct expression plone =
6040 -static struct expression germanic_plural =
6041 +/* Expand a system dependent string segment. Return NULL if unsupported. */
6042 +static const char *
6043 +get_sysdep_segment_value (const char *name)
6046 - .operation = not_equal,
6050 + /* Test for an ISO C 99 section 7.8.1 format string directive.
6052 + P R I { d | i | o | u | x | X }
6053 + { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */
6054 + /* We don't use a table of 14 times 6 'const char *' strings here, because
6055 + data relocations cost startup time. */
6056 + if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
6058 - [0] = (struct expression *) &plvar,
6059 - [1] = (struct expression *) &plone
6060 + if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
6061 + || name[3] == 'x' || name[3] == 'X')
6063 + if (name[4] == '8' && name[5] == '\0')
6065 + if (name[3] == 'd')
6067 + if (name[3] == 'i')
6069 + if (name[3] == 'o')
6071 + if (name[3] == 'u')
6073 + if (name[3] == 'x')
6075 + if (name[3] == 'X')
6079 + if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
6081 + if (name[3] == 'd')
6083 + if (name[3] == 'i')
6085 + if (name[3] == 'o')
6087 + if (name[3] == 'u')
6089 + if (name[3] == 'x')
6091 + if (name[3] == 'X')
6095 + if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
6097 + if (name[3] == 'd')
6099 + if (name[3] == 'i')
6101 + if (name[3] == 'o')
6103 + if (name[3] == 'u')
6105 + if (name[3] == 'x')
6107 + if (name[3] == 'X')
6111 + if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
6113 + if (name[3] == 'd')
6115 + if (name[3] == 'i')
6117 + if (name[3] == 'o')
6119 + if (name[3] == 'u')
6121 + if (name[3] == 'x')
6123 + if (name[3] == 'X')
6127 + if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
6128 + && name[7] == 'S' && name[8] == 'T')
6130 + if (name[9] == '8' && name[10] == '\0')
6132 + if (name[3] == 'd')
6133 + return PRIdLEAST8;
6134 + if (name[3] == 'i')
6135 + return PRIiLEAST8;
6136 + if (name[3] == 'o')
6137 + return PRIoLEAST8;
6138 + if (name[3] == 'u')
6139 + return PRIuLEAST8;
6140 + if (name[3] == 'x')
6141 + return PRIxLEAST8;
6142 + if (name[3] == 'X')
6143 + return PRIXLEAST8;
6146 + if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
6148 + if (name[3] == 'd')
6149 + return PRIdLEAST16;
6150 + if (name[3] == 'i')
6151 + return PRIiLEAST16;
6152 + if (name[3] == 'o')
6153 + return PRIoLEAST16;
6154 + if (name[3] == 'u')
6155 + return PRIuLEAST16;
6156 + if (name[3] == 'x')
6157 + return PRIxLEAST16;
6158 + if (name[3] == 'X')
6159 + return PRIXLEAST16;
6162 + if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
6164 + if (name[3] == 'd')
6165 + return PRIdLEAST32;
6166 + if (name[3] == 'i')
6167 + return PRIiLEAST32;
6168 + if (name[3] == 'o')
6169 + return PRIoLEAST32;
6170 + if (name[3] == 'u')
6171 + return PRIuLEAST32;
6172 + if (name[3] == 'x')
6173 + return PRIxLEAST32;
6174 + if (name[3] == 'X')
6175 + return PRIXLEAST32;
6178 + if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
6180 + if (name[3] == 'd')
6181 + return PRIdLEAST64;
6182 + if (name[3] == 'i')
6183 + return PRIiLEAST64;
6184 + if (name[3] == 'o')
6185 + return PRIoLEAST64;
6186 + if (name[3] == 'u')
6187 + return PRIuLEAST64;
6188 + if (name[3] == 'x')
6189 + return PRIxLEAST64;
6190 + if (name[3] == 'X')
6191 + return PRIXLEAST64;
6195 + if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
6196 + && name[7] == 'T')
6198 + if (name[8] == '8' && name[9] == '\0')
6200 + if (name[3] == 'd')
6202 + if (name[3] == 'i')
6204 + if (name[3] == 'o')
6206 + if (name[3] == 'u')
6208 + if (name[3] == 'x')
6210 + if (name[3] == 'X')
6214 + if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
6216 + if (name[3] == 'd')
6217 + return PRIdFAST16;
6218 + if (name[3] == 'i')
6219 + return PRIiFAST16;
6220 + if (name[3] == 'o')
6221 + return PRIoFAST16;
6222 + if (name[3] == 'u')
6223 + return PRIuFAST16;
6224 + if (name[3] == 'x')
6225 + return PRIxFAST16;
6226 + if (name[3] == 'X')
6227 + return PRIXFAST16;
6230 + if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
6232 + if (name[3] == 'd')
6233 + return PRIdFAST32;
6234 + if (name[3] == 'i')
6235 + return PRIiFAST32;
6236 + if (name[3] == 'o')
6237 + return PRIoFAST32;
6238 + if (name[3] == 'u')
6239 + return PRIuFAST32;
6240 + if (name[3] == 'x')
6241 + return PRIxFAST32;
6242 + if (name[3] == 'X')
6243 + return PRIXFAST32;
6246 + if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
6248 + if (name[3] == 'd')
6249 + return PRIdFAST64;
6250 + if (name[3] == 'i')
6251 + return PRIiFAST64;
6252 + if (name[3] == 'o')
6253 + return PRIoFAST64;
6254 + if (name[3] == 'u')
6255 + return PRIuFAST64;
6256 + if (name[3] == 'x')
6257 + return PRIxFAST64;
6258 + if (name[3] == 'X')
6259 + return PRIXFAST64;
6263 + if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
6264 + && name[7] == '\0')
6266 + if (name[3] == 'd')
6268 + if (name[3] == 'i')
6270 + if (name[3] == 'o')
6272 + if (name[3] == 'u')
6274 + if (name[3] == 'x')
6276 + if (name[3] == 'X')
6280 + if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
6281 + && name[7] == '\0')
6283 + if (name[3] == 'd')
6285 + if (name[3] == 'i')
6287 + if (name[3] == 'o')
6289 + if (name[3] == 'u')
6291 + if (name[3] == 'x')
6293 + if (name[3] == 'X')
6301 + /* Test for a glibc specific printf() format directive flag. */
6302 + if (name[0] == 'I' && name[1] == '\0')
6304 +#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
6305 + /* The 'I' flag, in numeric format directives, replaces ASCII digits
6306 + with the 'outdigits' defined in the LC_CTYPE locale facet. This is
6307 + used for Farsi (Persian) and maybe Arabic. */
6313 + /* Other system dependent strings are not valid. */
6317 -# define INIT_GERMANIC_PLURAL()
6318 +/* Initialize the codeset dependent parts of an opened message catalog.
6319 + Return the header entry. */
6322 +_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
6323 + struct loaded_domain *domain,
6324 + struct binding *domainbinding)
6326 + /* Find out about the character set the file is encoded with.
6327 + This can be found (in textual form) in the entry "". If this
6328 + entry does not exist or if this does not contain the `charset='
6329 + information, we will assume the charset matches the one the
6330 + current locale and we don't have to perform any conversion. */
6332 + size_t nullentrylen;
6334 + /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
6335 + domain->codeset_cntr =
6336 + (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
6338 + domain->conv = (__gconv_t) -1;
6341 + domain->conv = (iconv_t) -1;
6344 + domain->conv_tab = NULL;
6346 -/* For compilers without support for ISO C 99 struct/union initializers:
6347 - Initialization at run-time. */
6349 -static struct expression plvar;
6350 -static struct expression plone;
6351 -static struct expression germanic_plural;
6352 + /* Get the header entry. */
6353 + nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
6356 -init_germanic_plural ()
6358 - if (plone.val.num == 0)
6359 + if (nullentry != NULL)
6362 - plvar.operation = var;
6363 +#if defined _LIBC || HAVE_ICONV
6364 + const char *charsetstr;
6367 - plone.operation = num;
6368 - plone.val.num = 1;
6369 + charsetstr = strstr (nullentry, "charset=");
6370 + if (charsetstr != NULL)
6374 + const char *outcharset;
6376 - germanic_plural.nargs = 2;
6377 - germanic_plural.operation = not_equal;
6378 - germanic_plural.val.args[0] = &plvar;
6379 - germanic_plural.val.args[1] = &plone;
6380 + charsetstr += strlen ("charset=");
6381 + len = strcspn (charsetstr, " \t\n");
6383 + charset = (char *) alloca (len + 1);
6384 +# if defined _LIBC || HAVE_MEMPCPY
6385 + *((char *) mempcpy (charset, charsetstr, len)) = '\0';
6387 + memcpy (charset, charsetstr, len);
6388 + charset[len] = '\0';
6391 + /* The output charset should normally be determined by the
6392 + locale. But sometimes the locale is not used or not correctly
6393 + set up, so we provide a possibility for the user to override
6394 + this. Moreover, the value specified through
6395 + bind_textdomain_codeset overrides both. */
6396 + if (domainbinding != NULL && domainbinding->codeset != NULL)
6397 + outcharset = domainbinding->codeset;
6400 + outcharset = getenv ("OUTPUT_CHARSET");
6401 + if (outcharset == NULL || outcharset[0] == '\0')
6404 + outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
6407 + extern const char *locale_charset (void);
6408 + outcharset = locale_charset ();
6415 + /* We always want to use transliteration. */
6416 + outcharset = norm_add_slashes (outcharset, "TRANSLIT");
6417 + charset = norm_add_slashes (charset, NULL);
6418 + if (__gconv_open (outcharset, charset, &domain->conv,
6419 + GCONV_AVOID_NOCONV)
6421 + domain->conv = (__gconv_t) -1;
6424 + /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
6425 + we want to use transliteration. */
6426 +# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
6427 + || _LIBICONV_VERSION >= 0x0105
6428 + if (strchr (outcharset, '/') == NULL)
6432 + len = strlen (outcharset);
6433 + tmp = (char *) alloca (len + 10 + 1);
6434 + memcpy (tmp, outcharset, len);
6435 + memcpy (tmp + len, "//TRANSLIT", 10 + 1);
6438 + domain->conv = iconv_open (outcharset, charset);
6440 + freea (outcharset);
6444 + domain->conv = iconv_open (outcharset, charset);
6450 +#endif /* _LIBC || HAVE_ICONV */
6456 -# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
6457 +/* Frees the codeset dependent parts of an opened message catalog. */
6460 +_nl_free_domain_conv (struct loaded_domain *domain)
6462 + if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
6463 + free (domain->conv_tab);
6466 + if (domain->conv != (__gconv_t) -1)
6467 + __gconv_close (domain->conv);
6470 + if (domain->conv != (iconv_t) -1)
6471 + iconv_close (domain->conv);
6477 /* Load the message catalogs specified by FILENAME. If it is no valid
6478 message catalog do nothing. */
6481 -_nl_load_domain (domain_file)
6482 - struct loaded_l10nfile *domain_file;
6483 +_nl_load_domain (struct loaded_l10nfile *domain_file,
6484 + struct binding *domainbinding)
6488 @@ -216,12 +919,16 @@
6489 struct mo_file_header *data = (struct mo_file_header *) -1;
6491 struct loaded_domain *domain;
6493 - size_t nullentrylen;
6495 + const char *nullentry;
6497 domain_file->decided = 1;
6498 domain_file->data = NULL;
6500 + /* Note that it would be useless to store domainbinding in domain_file
6501 + because domainbinding might be == NULL now but != NULL later (after
6502 + a call to bind_textdomain_codeset). */
6504 /* If the record does not represent a valid locale the FILENAME
6505 might be NULL. This can happen when according to the given
6506 specification the locale file name is different for XPG and CEN
6507 @@ -320,22 +1027,353 @@
6508 domain->use_mmap = use_mmap;
6509 domain->mmap_size = size;
6510 domain->must_swap = data->magic != _MAGIC;
6511 + domain->malloced = NULL;
6513 /* Fill in the information about the available tables. */
6514 - switch (W (domain->must_swap, data->revision))
6515 + revision = W (domain->must_swap, data->revision);
6516 + /* We support only the major revisions 0 and 1. */
6517 + switch (revision >> 16)
6521 domain->nstrings = W (domain->must_swap, data->nstrings);
6522 - domain->orig_tab = (struct string_desc *)
6523 + domain->orig_tab = (const struct string_desc *)
6524 ((char *) data + W (domain->must_swap, data->orig_tab_offset));
6525 - domain->trans_tab = (struct string_desc *)
6526 + domain->trans_tab = (const struct string_desc *)
6527 ((char *) data + W (domain->must_swap, data->trans_tab_offset));
6528 domain->hash_size = W (domain->must_swap, data->hash_tab_size);
6529 - domain->hash_tab = (nls_uint32 *)
6530 - ((char *) data + W (domain->must_swap, data->hash_tab_offset));
6531 + domain->hash_tab =
6532 + (domain->hash_size > 2
6533 + ? (const nls_uint32 *)
6534 + ((char *) data + W (domain->must_swap, data->hash_tab_offset))
6536 + domain->must_swap_hash_tab = domain->must_swap;
6538 + /* Now dispatch on the minor revision. */
6539 + switch (revision & 0xffff)
6542 + domain->n_sysdep_strings = 0;
6543 + domain->orig_sysdep_tab = NULL;
6544 + domain->trans_sysdep_tab = NULL;
6549 + nls_uint32 n_sysdep_strings;
6551 + if (domain->hash_tab == NULL)
6552 + /* This is invalid. These minor revisions need a hash table. */
6555 + n_sysdep_strings =
6556 + W (domain->must_swap, data->n_sysdep_strings);
6557 + if (n_sysdep_strings > 0)
6559 + nls_uint32 n_sysdep_segments;
6560 + const struct sysdep_segment *sysdep_segments;
6561 + const char **sysdep_segment_values;
6562 + const nls_uint32 *orig_sysdep_tab;
6563 + const nls_uint32 *trans_sysdep_tab;
6564 + nls_uint32 n_inmem_sysdep_strings;
6567 + struct sysdep_string_desc *inmem_orig_sysdep_tab;
6568 + struct sysdep_string_desc *inmem_trans_sysdep_tab;
6569 + nls_uint32 *inmem_hash_tab;
6570 + unsigned int i, j;
6572 + /* Get the values of the system dependent segments. */
6573 + n_sysdep_segments =
6574 + W (domain->must_swap, data->n_sysdep_segments);
6575 + sysdep_segments = (const struct sysdep_segment *)
6577 + + W (domain->must_swap, data->sysdep_segments_offset));
6578 + sysdep_segment_values =
6579 + alloca (n_sysdep_segments * sizeof (const char *));
6580 + for (i = 0; i < n_sysdep_segments; i++)
6582 + const char *name =
6584 + + W (domain->must_swap, sysdep_segments[i].offset);
6585 + nls_uint32 namelen =
6586 + W (domain->must_swap, sysdep_segments[i].length);
6588 + if (!(namelen > 0 && name[namelen - 1] == '\0'))
6590 + freea (sysdep_segment_values);
6594 + sysdep_segment_values[i] = get_sysdep_segment_value (name);
6597 + orig_sysdep_tab = (const nls_uint32 *)
6599 + + W (domain->must_swap, data->orig_sysdep_tab_offset));
6600 + trans_sysdep_tab = (const nls_uint32 *)
6602 + + W (domain->must_swap, data->trans_sysdep_tab_offset));
6604 + /* Compute the amount of additional memory needed for the
6605 + system dependent strings and the augmented hash table.
6606 + At the same time, also drop string pairs which refer to
6607 + an undefined system dependent segment. */
6608 + n_inmem_sysdep_strings = 0;
6609 + memneed = domain->hash_size * sizeof (nls_uint32);
6610 + for (i = 0; i < n_sysdep_strings; i++)
6615 + for (j = 0; j < 2; j++)
6617 + const struct sysdep_string *sysdep_string =
6618 + (const struct sysdep_string *)
6620 + + W (domain->must_swap,
6622 + ? orig_sysdep_tab[i]
6623 + : trans_sysdep_tab[i]));
6625 + const struct segment_pair *p = sysdep_string->segments;
6627 + if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
6628 + for (p = sysdep_string->segments;; p++)
6630 + nls_uint32 sysdepref;
6632 + need += W (domain->must_swap, p->segsize);
6634 + sysdepref = W (domain->must_swap, p->sysdepref);
6635 + if (sysdepref == SEGMENTS_END)
6638 + if (sysdepref >= n_sysdep_segments)
6641 + freea (sysdep_segment_values);
6645 + if (sysdep_segment_values[sysdepref] == NULL)
6647 + /* This particular string pair is invalid. */
6652 + need += strlen (sysdep_segment_values[sysdepref]);
6662 + n_inmem_sysdep_strings++;
6663 + memneed += needs[0] + needs[1];
6666 + memneed += 2 * n_inmem_sysdep_strings
6667 + * sizeof (struct sysdep_string_desc);
6669 + if (n_inmem_sysdep_strings > 0)
6673 + /* Allocate additional memory. */
6674 + mem = (char *) malloc (memneed);
6678 + domain->malloced = mem;
6679 + inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
6680 + mem += n_inmem_sysdep_strings
6681 + * sizeof (struct sysdep_string_desc);
6682 + inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
6683 + mem += n_inmem_sysdep_strings
6684 + * sizeof (struct sysdep_string_desc);
6685 + inmem_hash_tab = (nls_uint32 *) mem;
6686 + mem += domain->hash_size * sizeof (nls_uint32);
6688 + /* Compute the system dependent strings. */
6690 + for (i = 0; i < n_sysdep_strings; i++)
6694 + for (j = 0; j < 2; j++)
6696 + const struct sysdep_string *sysdep_string =
6697 + (const struct sysdep_string *)
6699 + + W (domain->must_swap,
6701 + ? orig_sysdep_tab[i]
6702 + : trans_sysdep_tab[i]));
6703 + const struct segment_pair *p =
6704 + sysdep_string->segments;
6706 + if (W (domain->must_swap, p->sysdepref)
6708 + for (p = sysdep_string->segments;; p++)
6710 + nls_uint32 sysdepref;
6713 + W (domain->must_swap, p->sysdepref);
6714 + if (sysdepref == SEGMENTS_END)
6717 + if (sysdep_segment_values[sysdepref] == NULL)
6719 + /* This particular string pair is
6732 + for (j = 0; j < 2; j++)
6734 + const struct sysdep_string *sysdep_string =
6735 + (const struct sysdep_string *)
6737 + + W (domain->must_swap,
6739 + ? orig_sysdep_tab[i]
6740 + : trans_sysdep_tab[i]));
6741 + const char *static_segments =
6743 + + W (domain->must_swap, sysdep_string->offset);
6744 + const struct segment_pair *p =
6745 + sysdep_string->segments;
6747 + /* Concatenate the segments, and fill
6748 + inmem_orig_sysdep_tab[k] (for j == 0) and
6749 + inmem_trans_sysdep_tab[k] (for j == 1). */
6751 + struct sysdep_string_desc *inmem_tab_entry =
6753 + ? inmem_orig_sysdep_tab
6754 + : inmem_trans_sysdep_tab)
6757 + if (W (domain->must_swap, p->sysdepref)
6760 + /* Only one static segment. */
6761 + inmem_tab_entry->length =
6762 + W (domain->must_swap, p->segsize);
6763 + inmem_tab_entry->pointer = static_segments;
6767 + inmem_tab_entry->pointer = mem;
6769 + for (p = sysdep_string->segments;; p++)
6771 + nls_uint32 segsize =
6772 + W (domain->must_swap, p->segsize);
6773 + nls_uint32 sysdepref =
6774 + W (domain->must_swap, p->sysdepref);
6779 + memcpy (mem, static_segments, segsize);
6781 + static_segments += segsize;
6784 + if (sysdepref == SEGMENTS_END)
6787 + n = strlen (sysdep_segment_values[sysdepref]);
6788 + memcpy (mem, sysdep_segment_values[sysdepref], n);
6792 + inmem_tab_entry->length =
6793 + mem - inmem_tab_entry->pointer;
6800 + if (k != n_inmem_sysdep_strings)
6803 + /* Compute the augmented hash table. */
6804 + for (i = 0; i < domain->hash_size; i++)
6805 + inmem_hash_tab[i] =
6806 + W (domain->must_swap_hash_tab, domain->hash_tab[i]);
6807 + for (i = 0; i < n_inmem_sysdep_strings; i++)
6809 + const char *msgid = inmem_orig_sysdep_tab[i].pointer;
6810 + nls_uint32 hash_val = hash_string (msgid);
6811 + nls_uint32 idx = hash_val % domain->hash_size;
6813 + 1 + (hash_val % (domain->hash_size - 2));
6817 + if (inmem_hash_tab[idx] == 0)
6819 + /* Hash table entry is empty. Use it. */
6820 + inmem_hash_tab[idx] = 1 + domain->nstrings + i;
6824 + if (idx >= domain->hash_size - incr)
6825 + idx -= domain->hash_size - incr;
6831 + domain->n_sysdep_strings = n_inmem_sysdep_strings;
6832 + domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
6833 + domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
6835 + domain->hash_tab = inmem_hash_tab;
6836 + domain->must_swap_hash_tab = 0;
6840 + domain->n_sysdep_strings = 0;
6841 + domain->orig_sysdep_tab = NULL;
6842 + domain->trans_sysdep_tab = NULL;
6845 + freea (sysdep_segment_values);
6849 + domain->n_sysdep_strings = 0;
6850 + domain->orig_sysdep_tab = NULL;
6851 + domain->trans_sysdep_tab = NULL;
6858 /* This is an invalid revision. */
6860 + /* This is an invalid .mo file. */
6861 + if (domain->malloced)
6862 + free (domain->malloced);
6865 munmap ((caddr_t) data, size);
6866 @@ -347,154 +1385,28 @@
6870 - /* Now find out about the character set the file is encoded with.
6871 - This can be found (in textual form) in the entry "". If this
6872 - entry does not exist or if this does not contain the `charset='
6873 - information, we will assume the charset matches the one the
6874 - current locale and we don't have to perform any conversion. */
6876 - domain->conv = (__gconv_t) -1;
6879 - domain->conv = (iconv_t) -1;
6882 - domain->conv_tab = NULL;
6883 - nullentry = _nl_find_msg (domain_file, "", &nullentrylen);
6884 - if (nullentry != NULL)
6886 -#if defined _LIBC || HAVE_ICONV
6887 - const char *charsetstr;
6889 - charsetstr = strstr (nullentry, "charset=");
6890 - if (charsetstr != NULL)
6894 - const char *outcharset;
6896 - charsetstr += strlen ("charset=");
6897 - len = strcspn (charsetstr, " \t\n");
6899 - charset = (char *) alloca (len + 1);
6900 -# if defined _LIBC || HAVE_MEMPCPY
6901 - *((char *) mempcpy (charset, charsetstr, len)) = '\0';
6903 - memcpy (charset, charsetstr, len);
6904 - charset[len] = '\0';
6907 - /* The output charset should normally be determined by the
6908 - locale. But sometimes the locale is not used or not correctly
6909 - set up, so we provide a possibility for the user to override
6910 - this. Moreover, the value specified through
6911 - bind_textdomain_codeset overrides both. */
6912 - if (domain_file->domainbinding != NULL
6913 - && domain_file->domainbinding->codeset != NULL)
6914 - outcharset = domain_file->domainbinding->codeset;
6917 - outcharset = getenv ("OUTPUT_CHARSET");
6918 - if (outcharset == NULL || outcharset[0] == '\0')
6921 - outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
6924 - extern const char *locale_charset (void);
6925 - outcharset = locale_charset ();
6932 - /* We always want to use transliteration. */
6933 - outcharset = norm_add_slashes (outcharset, "TRANSLIT");
6934 - charset = norm_add_slashes (charset, NULL);
6935 - if (__gconv_open (outcharset, charset, &domain->conv,
6936 - GCONV_AVOID_NOCONV)
6938 - domain->conv = (__gconv_t) -1;
6941 - domain->conv = iconv_open (outcharset, charset);
6947 -#endif /* _LIBC || HAVE_ICONV */
6949 + /* Now initialize the character set converter from the character set
6950 + the file is encoded with (found in the header entry) to the domain's
6951 + specified character set or the locale's character set. */
6952 + nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
6954 /* Also look for a plural specification. */
6955 - if (nullentry != NULL)
6957 - const char *plural;
6958 - const char *nplurals;
6960 - plural = strstr (nullentry, "plural=");
6961 - nplurals = strstr (nullentry, "nplurals=");
6962 - if (plural == NULL || nplurals == NULL)
6966 - /* First get the number. */
6968 - unsigned long int n;
6969 - struct parse_args args;
6972 - while (*nplurals != '\0' && isspace (*nplurals))
6974 -#if defined HAVE_STRTOUL || defined _LIBC
6975 - n = strtoul (nplurals, &endp, 10);
6977 - for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
6978 - n = n * 10 + (*endp - '0');
6980 - domain->nplurals = n;
6981 - if (nplurals == endp)
6984 - /* Due to the restrictions bison imposes onto the interface of the
6985 - scanner function we have to put the input string and the result
6986 - passed up from the parser into the same structure which address
6987 - is passed down to the parser. */
6990 - if (PLURAL_PARSE (&args) != 0)
6992 - domain->plural = args.res;
6997 - /* By default we are using the Germanic form: singular form only
6998 - for `one', the plural form otherwise. Yes, this is also what
6999 - English is using since English is a Germanic language. */
7001 - INIT_GERMANIC_PLURAL ();
7002 - domain->plural = &germanic_plural;
7003 - domain->nplurals = 2;
7005 + EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
7012 -_nl_unload_domain (domain)
7013 - struct loaded_domain *domain;
7014 +_nl_unload_domain (struct loaded_domain *domain)
7016 - if (domain->plural != &germanic_plural)
7017 + if (domain->plural != &__gettext_germanic_plural)
7018 __gettext_free_exp (domain->plural);
7020 - if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
7021 - free (domain->conv_tab);
7022 + _nl_free_domain_conv (domain);
7024 - if (domain->conv != (__gconv_t) -1)
7025 - __gconv_close (domain->conv);
7026 + if (domain->malloced)
7027 + free (domain->malloced);
7029 # ifdef _POSIX_MAPPED_FILES
7030 if (domain->use_mmap)
7031 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/localcharset.c psmisc-20.2.works.clean/intl/localcharset.c
7032 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/localcharset.c 2001-04-13 23:00:43.000000000 -0500
7033 +++ psmisc-20.2.works.clean/intl/localcharset.c 2004-10-13 15:18:41.000000000 -0500
7035 /* Determine a canonical name for the current locale's character encoding.
7037 - Copyright (C) 2000-2001 Free Software Foundation, Inc.
7038 + Copyright (C) 2000-2003 Free Software Foundation, Inc.
7040 This program is free software; you can redistribute it and/or modify it
7041 under the terms of the GNU Library General Public License as published
7043 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7046 -/* Written by Bruno Haible <haible@clisp.cons.org>. */
7047 +/* Written by Bruno Haible <bruno@clisp.org>. */
7049 #ifdef HAVE_CONFIG_H
7050 # include <config.h>
7053 +/* Specification. */
7054 +#include "localcharset.h"
7057 # include <stddef.h>
7064 +#if defined __EMX__
7065 +/* Assume EMX program runs on OS/2, even if compiled under DOS. */
7070 # if HAVE_LANGINFO_CODESET
7071 # include <langinfo.h>
7074 # include <locale.h>
7078 +#elif defined WIN32
7079 # define WIN32_LEAN_AND_MEAN
7080 # include <windows.h>
7087 +#if ENABLE_RELOCATABLE
7088 +# include "relocatable.h"
7090 +# define relocate(pathname) (pathname)
7093 +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
7094 + /* Win32, OS/2, DOS */
7095 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
7098 #ifndef DIRECTORY_SEPARATOR
7099 # define DIRECTORY_SEPARATOR '/'
7101 # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
7104 +#if HAVE_DECL_GETC_UNLOCKED
7106 +# define getc getc_unlocked
7109 /* The following static variable is declared 'volatile' to avoid a
7110 possible multithread problem in the function get_charset_aliases. If we
7111 are running in a threaded environment, and if two threads initialize
7112 @@ -75,20 +103,20 @@
7113 /* Pointer to the contents of the charset.alias file, if it has already been
7114 read, else NULL. Its format is:
7115 ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
7116 -static char * volatile charset_aliases;
7117 +static const char * volatile charset_aliases;
7119 /* Return a pointer to the contents of the charset.alias file. */
7121 get_charset_aliases ()
7126 cp = charset_aliases;
7130 +#if !(defined VMS || defined WIN32)
7132 - const char *dir = LIBDIR;
7133 + const char *dir = relocate (LIBDIR);
7134 const char *base = "charset.alias";
7137 @@ -138,19 +166,19 @@
7141 - if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
7142 + if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
7148 res_size = l1 + 1 + l2 + 1;
7149 - res_ptr = malloc (res_size + 1);
7150 + res_ptr = (char *) malloc (res_size + 1);
7154 res_size += l1 + 1 + l2 + 1;
7155 - res_ptr = realloc (res_ptr, res_size + 1);
7156 + res_ptr = (char *) realloc (res_ptr, res_size + 1);
7158 if (res_ptr == NULL)
7160 @@ -174,14 +202,54 @@
7161 if (file_name != NULL)
7168 + /* To avoid the troubles of an extra file charset.alias_vms in the
7169 + sources of many GNU packages, simply inline the aliases here. */
7170 + /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
7171 + "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
7172 + section 10.7 "Handling Different Character Sets". */
7173 + cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
7174 + "ISO8859-2" "\0" "ISO-8859-2" "\0"
7175 + "ISO8859-5" "\0" "ISO-8859-5" "\0"
7176 + "ISO8859-7" "\0" "ISO-8859-7" "\0"
7177 + "ISO8859-8" "\0" "ISO-8859-8" "\0"
7178 + "ISO8859-9" "\0" "ISO-8859-9" "\0"
7180 + "eucJP" "\0" "EUC-JP" "\0"
7181 + "SJIS" "\0" "SHIFT_JIS" "\0"
7182 + "DECKANJI" "\0" "DEC-KANJI" "\0"
7183 + "SDECKANJI" "\0" "EUC-JP" "\0"
7185 + "eucTW" "\0" "EUC-TW" "\0"
7186 + "DECHANYU" "\0" "DEC-HANYU" "\0"
7187 + "DECHANZI" "\0" "GB2312" "\0"
7189 + "DECKOREAN" "\0" "EUC-KR" "\0";
7193 /* To avoid the troubles of installing a separate file in the same
7194 directory as the DLL and of retrieving the DLL's directory at
7195 runtime, simply inline the aliases here. */
7197 cp = "CP936" "\0" "GBK" "\0"
7198 - "CP1361" "\0" "JOHAB" "\0";
7199 + "CP1361" "\0" "JOHAB" "\0"
7200 + "CP20127" "\0" "ASCII" "\0"
7201 + "CP20866" "\0" "KOI8-R" "\0"
7202 + "CP21866" "\0" "KOI8-RU" "\0"
7203 + "CP28591" "\0" "ISO-8859-1" "\0"
7204 + "CP28592" "\0" "ISO-8859-2" "\0"
7205 + "CP28593" "\0" "ISO-8859-3" "\0"
7206 + "CP28594" "\0" "ISO-8859-4" "\0"
7207 + "CP28595" "\0" "ISO-8859-5" "\0"
7208 + "CP28596" "\0" "ISO-8859-6" "\0"
7209 + "CP28597" "\0" "ISO-8859-7" "\0"
7210 + "CP28598" "\0" "ISO-8859-8" "\0"
7211 + "CP28599" "\0" "ISO-8859-9" "\0"
7212 + "CP28605" "\0" "ISO-8859-15" "\0";
7216 charset_aliases = cp;
7218 const char *codeset;
7219 const char *aliases;
7222 +#if !(defined WIN32 || defined OS2)
7224 # if HAVE_LANGINFO_CODESET
7226 @@ -242,14 +310,67 @@
7231 +#elif defined WIN32
7233 static char buf[2 + 10 + 1];
7235 - /* Win32 has a function returning the locale's codepage as a number. */
7236 + /* Woe32 has a function returning the locale's codepage as a number. */
7237 sprintf (buf, "CP%u", GetACP ());
7242 + const char *locale;
7243 + static char buf[2 + 10 + 1];
7247 + /* Allow user to override the codeset, as set in the operating system,
7248 + with standard language environment variables. */
7249 + locale = getenv ("LC_ALL");
7250 + if (locale == NULL || locale[0] == '\0')
7252 + locale = getenv ("LC_CTYPE");
7253 + if (locale == NULL || locale[0] == '\0')
7254 + locale = getenv ("LANG");
7256 + if (locale != NULL && locale[0] != '\0')
7258 + /* If the locale name contains an encoding after the dot, return it. */
7259 + const char *dot = strchr (locale, '.');
7263 + const char *modifier;
7266 + /* Look for the possible @... trailer and remove it, if any. */
7267 + modifier = strchr (dot, '@');
7268 + if (modifier == NULL)
7270 + if (modifier - dot < sizeof (buf))
7272 + memcpy (buf, dot, modifier - dot);
7273 + buf [modifier - dot] = '\0';
7278 + /* Resolve through the charset.alias file. */
7283 + /* OS/2 has a function returning the locale's codepage as a number. */
7284 + if (DosQueryCp (sizeof (cp), cp, &cplen))
7288 + sprintf (buf, "CP%u", cp[0]);
7295 if (codeset == NULL)
7296 @@ -267,5 +388,11 @@
7300 + /* Don't return an empty string. GNU libc and GNU libiconv interpret
7301 + the empty string as denoting "the locale's character encoding",
7302 + thus GNU libiconv would call this function a second time. */
7303 + if (codeset[0] == '\0')
7304 + codeset = "ASCII";
7308 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/localcharset.h psmisc-20.2.works.clean/intl/localcharset.h
7309 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/localcharset.h 1969-12-31 18:00:00.000000000 -0600
7310 +++ psmisc-20.2.works.clean/intl/localcharset.h 2004-10-13 15:18:41.000000000 -0500
7312 +/* Determine a canonical name for the current locale's character encoding.
7313 + Copyright (C) 2000-2003 Free Software Foundation, Inc.
7314 + This file is part of the GNU CHARSET Library.
7316 + This program is free software; you can redistribute it and/or modify it
7317 + under the terms of the GNU Library General Public License as published
7318 + by the Free Software Foundation; either version 2, or (at your option)
7319 + any later version.
7321 + This program is distributed in the hope that it will be useful,
7322 + but WITHOUT ANY WARRANTY; without even the implied warranty of
7323 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7324 + Library General Public License for more details.
7326 + You should have received a copy of the GNU Library General Public
7327 + License along with this program; if not, write to the Free Software
7328 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7331 +#ifndef _LOCALCHARSET_H
7332 +#define _LOCALCHARSET_H
7340 +/* Determine the current locale's character encoding, and canonicalize it
7341 + into one of the canonical names listed in config.charset.
7342 + The result must not be freed; it is statically allocated.
7343 + If the canonical name cannot be determined, the result is a non-canonical
7345 +extern const char * locale_charset (void);
7353 +#endif /* _LOCALCHARSET_H */
7354 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/locale.alias psmisc-20.2.works.clean/intl/locale.alias
7355 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/locale.alias 2001-04-13 23:00:42.000000000 -0500
7356 +++ psmisc-20.2.works.clean/intl/locale.alias 2004-10-13 15:18:41.000000000 -0500
7358 # Locale name alias data base.
7359 -# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
7360 +# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc.
7362 -# This program is free software; you can redistribute it and/or modify
7363 -# it under the terms of the GNU General Public License as published by
7364 -# the Free Software Foundation; either version 2, or (at your option)
7365 +# This program is free software; you can redistribute it and/or modify it
7366 +# under the terms of the GNU Library General Public License as published
7367 +# by the Free Software Foundation; either version 2, or (at your option)
7368 # any later version.
7370 # This program is distributed in the hope that it will be useful,
7371 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7372 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7373 -# GNU General Public License for more details.
7374 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7375 +# Library General Public License for more details.
7377 -# You should have received a copy of the GNU General Public License
7378 -# along with this program; if not, write to the Free Software
7379 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7380 +# You should have received a copy of the GNU Library General Public
7381 +# License along with this program; if not, write to the Free Software
7382 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7385 # The format of this file is the same as for the corresponding file of
7386 # the X Window System, which normally can be found in
7389 # Packages using this file:
7391 -bokmal no_NO.ISO-8859-1
7392 -bokmål no_NO.ISO-8859-1
7393 +bokmal nb_NO.ISO-8859-1
7394 +bokmål nb_NO.ISO-8859-1
7395 catalan ca_ES.ISO-8859-1
7396 croatian hr_HR.ISO-8859-2
7397 czech cs_CZ.ISO-8859-2
7399 galician gl_ES.ISO-8859-1
7400 german de_DE.ISO-8859-1
7401 greek el_GR.ISO-8859-7
7402 -hebrew iw_IL.ISO-8859-8
7403 +hebrew he_IL.ISO-8859-8
7404 hrvatski hr_HR.ISO-8859-2
7405 hungarian hu_HU.ISO-8859-2
7406 icelandic is_IS.ISO-8859-1
7408 korean.euc ko_KR.eucKR
7410 lithuanian lt_LT.ISO-8859-13
7411 -nb_NO no_NO.ISO-8859-1
7412 -nb_NO.ISO-8859-1 no_NO.ISO-8859-1
7413 -norwegian no_NO.ISO-8859-1
7414 +no_NO nb_NO.ISO-8859-1
7415 +no_NO.ISO-8859-1 nb_NO.ISO-8859-1
7416 +norwegian nb_NO.ISO-8859-1
7417 nynorsk nn_NO.ISO-8859-1
7418 polish pl_PL.ISO-8859-2
7419 portuguese pt_PT.ISO-8859-1
7420 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/localealias.c psmisc-20.2.works.clean/intl/localealias.c
7421 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/localealias.c 2001-04-13 23:00:42.000000000 -0500
7422 +++ psmisc-20.2.works.clean/intl/localealias.c 2004-10-13 15:18:41.000000000 -0500
7424 /* Handle aliases for locale names.
7425 - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
7426 + Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
7428 - This program is free software; you can redistribute it and/or modify
7429 - it under the terms of the GNU General Public License as published by
7430 - the Free Software Foundation; either version 2, or (at your option)
7431 + This program is free software; you can redistribute it and/or modify it
7432 + under the terms of the GNU Library General Public License as published
7433 + by the Free Software Foundation; either version 2, or (at your option)
7436 This program is distributed in the hope that it will be useful,
7437 but WITHOUT ANY WARRANTY; without even the implied warranty of
7438 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7439 - GNU General Public License for more details.
7440 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7441 + Library General Public License for more details.
7443 - You should have received a copy of the GNU General Public License
7444 - along with this program; if not, write to the Free Software Foundation,
7445 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
7446 + You should have received a copy of the GNU Library General Public
7447 + License along with this program; if not, write to the Free Software
7448 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7451 /* Tell glibc's <string.h> to provide a prototype for mempcpy().
7452 This must come before <config.h> because <config.h> may include
7457 +#if defined _LIBC || defined HAVE___FSETLOCKING
7458 +# include <stdio_ext.h>
7460 #include <sys/types.h>
7464 # define alloca __builtin_alloca
7465 # define HAVE_ALLOCA 1
7467 -# if defined HAVE_ALLOCA_H || defined _LIBC
7468 -# include <alloca.h>
7470 +# include <malloc.h>
7471 +# define alloca _alloca
7475 +# if defined HAVE_ALLOCA_H || defined _LIBC
7476 +# include <alloca.h>
7493 -#if !HAVE_STRCHR && !defined _LIBC
7495 -# define strchr index
7499 #include "gettextP.h"
7501 +#if ENABLE_RELOCATABLE
7502 +# include "relocatable.h"
7504 +# define relocate(pathname) (pathname)
7507 /* @@ end of prolog @@ */
7511 # define mempcpy __mempcpy
7513 # define HAVE_MEMPCPY 1
7514 +# define HAVE___FSETLOCKING 1
7516 /* We need locking here since we can be called from different places. */
7517 # include <bits/libc-lock.h>
7519 # define internal_function
7522 +/* Some optimizations for glibc. */
7524 +# define FEOF(fp) feof_unlocked (fp)
7525 +# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
7527 +# define FEOF(fp) feof (fp)
7528 +# define FGETS(buf, n, fp) fgets (buf, n, fp)
7531 /* For those losing systems which don't have `alloca' we have to add
7532 some additional code emulating it. */
7534 @@ -90,11 +110,11 @@
7535 # define freea(p) free (p)
7538 -#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
7539 +#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
7541 # define fgets(buf, len, s) fgets_unlocked (buf, len, s)
7543 -#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
7544 +#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
7546 # define feof(s) feof_unlocked (s)
7548 @@ -107,27 +127,30 @@
7552 -static char *string_space;
7554 +# define libc_freeres_ptr(decl) decl
7557 +libc_freeres_ptr (static char *string_space);
7558 static size_t string_space_act;
7559 static size_t string_space_max;
7560 -static struct alias_map *map;
7561 +libc_freeres_ptr (static struct alias_map *map);
7563 static size_t maxmap;
7566 /* Prototypes for local functions. */
7567 -static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
7568 +static size_t read_alias_file (const char *fname, int fname_len)
7570 -static int extend_alias_table PARAMS ((void));
7571 -static int alias_compare PARAMS ((const struct alias_map *map1,
7572 - const struct alias_map *map2));
7573 +static int extend_alias_table (void);
7574 +static int alias_compare (const struct alias_map *map1,
7575 + const struct alias_map *map2);
7579 -_nl_expand_alias (name)
7581 +_nl_expand_alias (const char *name)
7583 - static const char *locale_alias_path = LOCALE_ALIAS_PATH;
7584 + static const char *locale_alias_path;
7585 struct alias_map *retval;
7586 const char *result = NULL;
7589 __libc_lock_lock (lock);
7592 + if (locale_alias_path == NULL)
7593 + locale_alias_path = LOCALE_ALIAS_PATH;
7597 struct alias_map item;
7600 retval = (struct alias_map *) bsearch (&item, map, nmap,
7601 sizeof (struct alias_map),
7602 - (int (*) PARAMS ((const void *,
7604 + (int (*) (const void *,
7613 -read_alias_file (fname, fname_len)
7614 - const char *fname;
7616 +read_alias_file (const char *fname, int fname_len)
7620 @@ -206,58 +230,52 @@
7621 memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
7624 - fp = fopen (full_fname, "r");
7625 + fp = fopen (relocate (full_fname), "r");
7630 +#ifdef HAVE___FSETLOCKING
7631 + /* No threads present. */
7632 + __fsetlocking (fp, FSETLOCKING_BYCALLER);
7636 - while (!feof (fp))
7637 + while (!FEOF (fp))
7639 /* It is a reasonable approach to use a fix buffer here because
7640 a) we are only interested in the first two fields
7641 b) these fields must be usable as file names and so must not
7645 + We avoid a multi-kilobyte buffer here since this would use up
7646 + stack space which we might not have if the program ran out of
7653 - if (fgets (buf, sizeof buf, fp) == NULL)
7654 + if (FGETS (buf, sizeof buf, fp) == NULL)
7658 - /* Possibly not the whole line fits into the buffer. Ignore
7659 - the rest of the line. */
7660 - if (strchr (buf, '\n') == NULL)
7662 - char altbuf[BUFSIZ];
7664 - if (fgets (altbuf, sizeof altbuf, fp) == NULL)
7665 - /* Make sure the inner loop will be left. The outer loop
7666 - will exit at the `feof' test. */
7668 - while (strchr (altbuf, '\n') == NULL);
7672 /* Ignore leading white space. */
7673 - while (isspace (cp[0]))
7674 + while (isspace ((unsigned char) cp[0]))
7677 /* A leading '#' signals a comment line. */
7678 if (cp[0] != '\0' && cp[0] != '#')
7681 - while (cp[0] != '\0' && !isspace (cp[0]))
7682 + while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
7684 /* Terminate alias name. */
7688 /* Now look for the beginning of the value. */
7689 - while (isspace (cp[0]))
7690 + while (isspace ((unsigned char) cp[0]))
7698 - while (cp[0] != '\0' && !isspace (cp[0]))
7699 + while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
7701 /* Terminate value. */
7703 @@ -324,6 +342,14 @@
7708 + /* Possibly not the whole line fits into the buffer. Ignore
7709 + the rest of the line. */
7710 + while (strchr (buf, '\n') == NULL)
7711 + if (FGETS (buf, sizeof buf, fp) == NULL)
7712 + /* Make sure the inner loop will be left. The outer loop
7713 + will exit at the `feof' test. */
7717 /* Should we test for ferror()? I think we have to silently ignore
7721 qsort (map, nmap, sizeof (struct alias_map),
7722 - (int (*) PARAMS ((const void *, const void *))) alias_compare);
7723 + (int (*) (const void *, const void *)) alias_compare);
7727 @@ -357,23 +383,8 @@
7732 -static void __attribute__ ((unused))
7735 - if (string_space != NULL)
7736 - free (string_space);
7740 -text_set_element (__libc_subfreeres, free_mem);
7745 -alias_compare (map1, map2)
7746 - const struct alias_map *map1;
7747 - const struct alias_map *map2;
7748 +alias_compare (const struct alias_map *map1, const struct alias_map *map2)
7750 #if defined _LIBC || defined HAVE_STRCASECMP
7751 return strcasecmp (map1->alias, map2->alias);
7752 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/localename.c psmisc-20.2.works.clean/intl/localename.c
7753 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/localename.c 1969-12-31 18:00:00.000000000 -0600
7754 +++ psmisc-20.2.works.clean/intl/localename.c 2004-10-13 15:18:41.000000000 -0500
7756 +/* Determine the current selected locale.
7757 + Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
7759 + This program is free software; you can redistribute it and/or modify it
7760 + under the terms of the GNU Library General Public License as published
7761 + by the Free Software Foundation; either version 2, or (at your option)
7762 + any later version.
7764 + This program is distributed in the hope that it will be useful,
7765 + but WITHOUT ANY WARRANTY; without even the implied warranty of
7766 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7767 + Library General Public License for more details.
7769 + You should have received a copy of the GNU Library General Public
7770 + License along with this program; if not, write to the Free Software
7771 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7774 +/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
7775 +/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
7777 +#ifdef HAVE_CONFIG_H
7778 +# include <config.h>
7781 +#include <stdlib.h>
7782 +#include <locale.h>
7784 +#if defined _WIN32 || defined __WIN32__
7785 +# undef WIN32 /* avoid warning on mingw32 */
7790 +# define WIN32_LEAN_AND_MEAN
7791 +# include <windows.h>
7792 +/* List of language codes, sorted by value:
7794 + 0x02 LANG_BULGARIAN
7806 + 0x0e LANG_HUNGARIAN
7807 + 0x0f LANG_ICELANDIC
7809 + 0x11 LANG_JAPANESE
7812 + 0x14 LANG_NORWEGIAN
7814 + 0x16 LANG_PORTUGUESE
7815 + 0x17 LANG_RHAETO_ROMANCE
7816 + 0x18 LANG_ROMANIAN
7818 + 0x1a LANG_CROATIAN == LANG_SERBIAN
7820 + 0x1c LANG_ALBANIAN
7825 + 0x21 LANG_INDONESIAN
7826 + 0x22 LANG_UKRAINIAN
7827 + 0x23 LANG_BELARUSIAN
7828 + 0x24 LANG_SLOVENIAN
7829 + 0x25 LANG_ESTONIAN
7831 + 0x27 LANG_LITHUANIAN
7834 + 0x2a LANG_VIETNAMESE
7835 + 0x2b LANG_ARMENIAN
7839 + 0x2f LANG_MACEDONIAN
7846 + 0x36 LANG_AFRIKAANS
7847 + 0x37 LANG_GEORGIAN
7848 + 0x38 LANG_FAEROESE
7863 + 0x47 LANG_GUJARATI
7868 + 0x4c LANG_MALAYALAM
7869 + 0x4d LANG_ASSAMESE
7871 + 0x4f LANG_SANSKRIT
7872 + 0x50 LANG_MONGOLIAN
7875 + 0x53 LANG_CAMBODIAN
7878 + 0x56 LANG_GALICIAN
7880 + 0x58 LANG_MANIPURI
7883 + 0x5b LANG_SINHALESE
7884 + 0x5c LANG_CHEROKEE
7885 + 0x5d LANG_INUKTITUT
7887 + 0x5f LANG_TAMAZIGHT
7888 + 0x60 LANG_KASHMIRI
7895 + 0x67 LANG_FULFULDE
7902 + 0x73 LANG_TIGRINYA
7904 + 0x75 LANG_HAWAIIAN
7908 + 0x79 LANG_PAPIAMENTU
7910 +/* Mingw headers don't have latest language and sublanguage codes. */
7911 +# ifndef LANG_AFRIKAANS
7912 +# define LANG_AFRIKAANS 0x36
7914 +# ifndef LANG_ALBANIAN
7915 +# define LANG_ALBANIAN 0x1c
7917 +# ifndef LANG_AMHARIC
7918 +# define LANG_AMHARIC 0x5e
7920 +# ifndef LANG_ARABIC
7921 +# define LANG_ARABIC 0x01
7923 +# ifndef LANG_ARMENIAN
7924 +# define LANG_ARMENIAN 0x2b
7926 +# ifndef LANG_ASSAMESE
7927 +# define LANG_ASSAMESE 0x4d
7929 +# ifndef LANG_AZERI
7930 +# define LANG_AZERI 0x2c
7932 +# ifndef LANG_BASQUE
7933 +# define LANG_BASQUE 0x2d
7935 +# ifndef LANG_BELARUSIAN
7936 +# define LANG_BELARUSIAN 0x23
7938 +# ifndef LANG_BENGALI
7939 +# define LANG_BENGALI 0x45
7941 +# ifndef LANG_BURMESE
7942 +# define LANG_BURMESE 0x55
7944 +# ifndef LANG_CAMBODIAN
7945 +# define LANG_CAMBODIAN 0x53
7947 +# ifndef LANG_CATALAN
7948 +# define LANG_CATALAN 0x03
7950 +# ifndef LANG_CHEROKEE
7951 +# define LANG_CHEROKEE 0x5c
7953 +# ifndef LANG_DIVEHI
7954 +# define LANG_DIVEHI 0x65
7957 +# define LANG_EDO 0x66
7959 +# ifndef LANG_ESTONIAN
7960 +# define LANG_ESTONIAN 0x25
7962 +# ifndef LANG_FAEROESE
7963 +# define LANG_FAEROESE 0x38
7965 +# ifndef LANG_FARSI
7966 +# define LANG_FARSI 0x29
7968 +# ifndef LANG_FRISIAN
7969 +# define LANG_FRISIAN 0x62
7971 +# ifndef LANG_FULFULDE
7972 +# define LANG_FULFULDE 0x67
7974 +# ifndef LANG_GAELIC
7975 +# define LANG_GAELIC 0x3c
7977 +# ifndef LANG_GALICIAN
7978 +# define LANG_GALICIAN 0x56
7980 +# ifndef LANG_GEORGIAN
7981 +# define LANG_GEORGIAN 0x37
7983 +# ifndef LANG_GUARANI
7984 +# define LANG_GUARANI 0x74
7986 +# ifndef LANG_GUJARATI
7987 +# define LANG_GUJARATI 0x47
7989 +# ifndef LANG_HAUSA
7990 +# define LANG_HAUSA 0x68
7992 +# ifndef LANG_HAWAIIAN
7993 +# define LANG_HAWAIIAN 0x75
7995 +# ifndef LANG_HEBREW
7996 +# define LANG_HEBREW 0x0d
7998 +# ifndef LANG_HINDI
7999 +# define LANG_HINDI 0x39
8001 +# ifndef LANG_IBIBIO
8002 +# define LANG_IBIBIO 0x69
8005 +# define LANG_IGBO 0x70
8007 +# ifndef LANG_INDONESIAN
8008 +# define LANG_INDONESIAN 0x21
8010 +# ifndef LANG_INUKTITUT
8011 +# define LANG_INUKTITUT 0x5d
8013 +# ifndef LANG_KANNADA
8014 +# define LANG_KANNADA 0x4b
8016 +# ifndef LANG_KANURI
8017 +# define LANG_KANURI 0x71
8019 +# ifndef LANG_KASHMIRI
8020 +# define LANG_KASHMIRI 0x60
8022 +# ifndef LANG_KAZAK
8023 +# define LANG_KAZAK 0x3f
8025 +# ifndef LANG_KONKANI
8026 +# define LANG_KONKANI 0x57
8028 +# ifndef LANG_KYRGYZ
8029 +# define LANG_KYRGYZ 0x40
8032 +# define LANG_LAO 0x54
8034 +# ifndef LANG_LATIN
8035 +# define LANG_LATIN 0x76
8037 +# ifndef LANG_LATVIAN
8038 +# define LANG_LATVIAN 0x26
8040 +# ifndef LANG_LITHUANIAN
8041 +# define LANG_LITHUANIAN 0x27
8043 +# ifndef LANG_MACEDONIAN
8044 +# define LANG_MACEDONIAN 0x2f
8046 +# ifndef LANG_MALAY
8047 +# define LANG_MALAY 0x3e
8049 +# ifndef LANG_MALAYALAM
8050 +# define LANG_MALAYALAM 0x4c
8052 +# ifndef LANG_MALTESE
8053 +# define LANG_MALTESE 0x3a
8055 +# ifndef LANG_MANIPURI
8056 +# define LANG_MANIPURI 0x58
8058 +# ifndef LANG_MARATHI
8059 +# define LANG_MARATHI 0x4e
8061 +# ifndef LANG_MONGOLIAN
8062 +# define LANG_MONGOLIAN 0x50
8064 +# ifndef LANG_NEPALI
8065 +# define LANG_NEPALI 0x61
8067 +# ifndef LANG_ORIYA
8068 +# define LANG_ORIYA 0x48
8070 +# ifndef LANG_OROMO
8071 +# define LANG_OROMO 0x72
8073 +# ifndef LANG_PAPIAMENTU
8074 +# define LANG_PAPIAMENTU 0x79
8076 +# ifndef LANG_PASHTO
8077 +# define LANG_PASHTO 0x63
8079 +# ifndef LANG_PUNJABI
8080 +# define LANG_PUNJABI 0x46
8082 +# ifndef LANG_RHAETO_ROMANCE
8083 +# define LANG_RHAETO_ROMANCE 0x17
8085 +# ifndef LANG_SAAMI
8086 +# define LANG_SAAMI 0x3b
8088 +# ifndef LANG_SANSKRIT
8089 +# define LANG_SANSKRIT 0x4f
8091 +# ifndef LANG_SERBIAN
8092 +# define LANG_SERBIAN 0x1a
8094 +# ifndef LANG_SINDHI
8095 +# define LANG_SINDHI 0x59
8097 +# ifndef LANG_SINHALESE
8098 +# define LANG_SINHALESE 0x5b
8100 +# ifndef LANG_SLOVAK
8101 +# define LANG_SLOVAK 0x1b
8103 +# ifndef LANG_SOMALI
8104 +# define LANG_SOMALI 0x77
8106 +# ifndef LANG_SORBIAN
8107 +# define LANG_SORBIAN 0x2e
8110 +# define LANG_SUTU 0x30
8112 +# ifndef LANG_SWAHILI
8113 +# define LANG_SWAHILI 0x41
8115 +# ifndef LANG_SYRIAC
8116 +# define LANG_SYRIAC 0x5a
8118 +# ifndef LANG_TAGALOG
8119 +# define LANG_TAGALOG 0x64
8121 +# ifndef LANG_TAJIK
8122 +# define LANG_TAJIK 0x28
8124 +# ifndef LANG_TAMAZIGHT
8125 +# define LANG_TAMAZIGHT 0x5f
8127 +# ifndef LANG_TAMIL
8128 +# define LANG_TAMIL 0x49
8130 +# ifndef LANG_TATAR
8131 +# define LANG_TATAR 0x44
8133 +# ifndef LANG_TELUGU
8134 +# define LANG_TELUGU 0x4a
8137 +# define LANG_THAI 0x1e
8139 +# ifndef LANG_TIBETAN
8140 +# define LANG_TIBETAN 0x51
8142 +# ifndef LANG_TIGRINYA
8143 +# define LANG_TIGRINYA 0x73
8145 +# ifndef LANG_TSONGA
8146 +# define LANG_TSONGA 0x31
8148 +# ifndef LANG_TSWANA
8149 +# define LANG_TSWANA 0x32
8151 +# ifndef LANG_TURKMEN
8152 +# define LANG_TURKMEN 0x42
8154 +# ifndef LANG_UKRAINIAN
8155 +# define LANG_UKRAINIAN 0x22
8158 +# define LANG_URDU 0x20
8160 +# ifndef LANG_UZBEK
8161 +# define LANG_UZBEK 0x43
8163 +# ifndef LANG_VENDA
8164 +# define LANG_VENDA 0x33
8166 +# ifndef LANG_VIETNAMESE
8167 +# define LANG_VIETNAMESE 0x2a
8169 +# ifndef LANG_WELSH
8170 +# define LANG_WELSH 0x52
8172 +# ifndef LANG_XHOSA
8173 +# define LANG_XHOSA 0x34
8176 +# define LANG_YI 0x78
8178 +# ifndef LANG_YIDDISH
8179 +# define LANG_YIDDISH 0x3d
8181 +# ifndef LANG_YORUBA
8182 +# define LANG_YORUBA 0x6a
8185 +# define LANG_ZULU 0x35
8187 +# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
8188 +# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
8190 +# ifndef SUBLANG_ARABIC_IRAQ
8191 +# define SUBLANG_ARABIC_IRAQ 0x02
8193 +# ifndef SUBLANG_ARABIC_EGYPT
8194 +# define SUBLANG_ARABIC_EGYPT 0x03
8196 +# ifndef SUBLANG_ARABIC_LIBYA
8197 +# define SUBLANG_ARABIC_LIBYA 0x04
8199 +# ifndef SUBLANG_ARABIC_ALGERIA
8200 +# define SUBLANG_ARABIC_ALGERIA 0x05
8202 +# ifndef SUBLANG_ARABIC_MOROCCO
8203 +# define SUBLANG_ARABIC_MOROCCO 0x06
8205 +# ifndef SUBLANG_ARABIC_TUNISIA
8206 +# define SUBLANG_ARABIC_TUNISIA 0x07
8208 +# ifndef SUBLANG_ARABIC_OMAN
8209 +# define SUBLANG_ARABIC_OMAN 0x08
8211 +# ifndef SUBLANG_ARABIC_YEMEN
8212 +# define SUBLANG_ARABIC_YEMEN 0x09
8214 +# ifndef SUBLANG_ARABIC_SYRIA
8215 +# define SUBLANG_ARABIC_SYRIA 0x0a
8217 +# ifndef SUBLANG_ARABIC_JORDAN
8218 +# define SUBLANG_ARABIC_JORDAN 0x0b
8220 +# ifndef SUBLANG_ARABIC_LEBANON
8221 +# define SUBLANG_ARABIC_LEBANON 0x0c
8223 +# ifndef SUBLANG_ARABIC_KUWAIT
8224 +# define SUBLANG_ARABIC_KUWAIT 0x0d
8226 +# ifndef SUBLANG_ARABIC_UAE
8227 +# define SUBLANG_ARABIC_UAE 0x0e
8229 +# ifndef SUBLANG_ARABIC_BAHRAIN
8230 +# define SUBLANG_ARABIC_BAHRAIN 0x0f
8232 +# ifndef SUBLANG_ARABIC_QATAR
8233 +# define SUBLANG_ARABIC_QATAR 0x10
8235 +# ifndef SUBLANG_AZERI_LATIN
8236 +# define SUBLANG_AZERI_LATIN 0x01
8238 +# ifndef SUBLANG_AZERI_CYRILLIC
8239 +# define SUBLANG_AZERI_CYRILLIC 0x02
8241 +# ifndef SUBLANG_BENGALI_INDIA
8242 +# define SUBLANG_BENGALI_INDIA 0x00
8244 +# ifndef SUBLANG_BENGALI_BANGLADESH
8245 +# define SUBLANG_BENGALI_BANGLADESH 0x01
8247 +# ifndef SUBLANG_CHINESE_MACAU
8248 +# define SUBLANG_CHINESE_MACAU 0x05
8250 +# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
8251 +# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
8253 +# ifndef SUBLANG_ENGLISH_JAMAICA
8254 +# define SUBLANG_ENGLISH_JAMAICA 0x08
8256 +# ifndef SUBLANG_ENGLISH_CARIBBEAN
8257 +# define SUBLANG_ENGLISH_CARIBBEAN 0x09
8259 +# ifndef SUBLANG_ENGLISH_BELIZE
8260 +# define SUBLANG_ENGLISH_BELIZE 0x0a
8262 +# ifndef SUBLANG_ENGLISH_TRINIDAD
8263 +# define SUBLANG_ENGLISH_TRINIDAD 0x0b
8265 +# ifndef SUBLANG_ENGLISH_ZIMBABWE
8266 +# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
8268 +# ifndef SUBLANG_ENGLISH_PHILIPPINES
8269 +# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
8271 +# ifndef SUBLANG_ENGLISH_INDONESIA
8272 +# define SUBLANG_ENGLISH_INDONESIA 0x0e
8274 +# ifndef SUBLANG_ENGLISH_HONGKONG
8275 +# define SUBLANG_ENGLISH_HONGKONG 0x0f
8277 +# ifndef SUBLANG_ENGLISH_INDIA
8278 +# define SUBLANG_ENGLISH_INDIA 0x10
8280 +# ifndef SUBLANG_ENGLISH_MALAYSIA
8281 +# define SUBLANG_ENGLISH_MALAYSIA 0x11
8283 +# ifndef SUBLANG_ENGLISH_SINGAPORE
8284 +# define SUBLANG_ENGLISH_SINGAPORE 0x12
8286 +# ifndef SUBLANG_FRENCH_LUXEMBOURG
8287 +# define SUBLANG_FRENCH_LUXEMBOURG 0x05
8289 +# ifndef SUBLANG_FRENCH_MONACO
8290 +# define SUBLANG_FRENCH_MONACO 0x06
8292 +# ifndef SUBLANG_FRENCH_WESTINDIES
8293 +# define SUBLANG_FRENCH_WESTINDIES 0x07
8295 +# ifndef SUBLANG_FRENCH_REUNION
8296 +# define SUBLANG_FRENCH_REUNION 0x08
8298 +# ifndef SUBLANG_FRENCH_CONGO
8299 +# define SUBLANG_FRENCH_CONGO 0x09
8301 +# ifndef SUBLANG_FRENCH_SENEGAL
8302 +# define SUBLANG_FRENCH_SENEGAL 0x0a
8304 +# ifndef SUBLANG_FRENCH_CAMEROON
8305 +# define SUBLANG_FRENCH_CAMEROON 0x0b
8307 +# ifndef SUBLANG_FRENCH_COTEDIVOIRE
8308 +# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
8310 +# ifndef SUBLANG_FRENCH_MALI
8311 +# define SUBLANG_FRENCH_MALI 0x0d
8313 +# ifndef SUBLANG_FRENCH_MOROCCO
8314 +# define SUBLANG_FRENCH_MOROCCO 0x0e
8316 +# ifndef SUBLANG_FRENCH_HAITI
8317 +# define SUBLANG_FRENCH_HAITI 0x0f
8319 +# ifndef SUBLANG_GERMAN_LUXEMBOURG
8320 +# define SUBLANG_GERMAN_LUXEMBOURG 0x04
8322 +# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
8323 +# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
8325 +# ifndef SUBLANG_KASHMIRI_INDIA
8326 +# define SUBLANG_KASHMIRI_INDIA 0x02
8328 +# ifndef SUBLANG_MALAY_MALAYSIA
8329 +# define SUBLANG_MALAY_MALAYSIA 0x01
8331 +# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
8332 +# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
8334 +# ifndef SUBLANG_NEPALI_INDIA
8335 +# define SUBLANG_NEPALI_INDIA 0x02
8337 +# ifndef SUBLANG_PUNJABI_INDIA
8338 +# define SUBLANG_PUNJABI_INDIA 0x00
8340 +# ifndef SUBLANG_PUNJABI_PAKISTAN
8341 +# define SUBLANG_PUNJABI_PAKISTAN 0x01
8343 +# ifndef SUBLANG_ROMANIAN_ROMANIA
8344 +# define SUBLANG_ROMANIAN_ROMANIA 0x00
8346 +# ifndef SUBLANG_ROMANIAN_MOLDOVA
8347 +# define SUBLANG_ROMANIAN_MOLDOVA 0x01
8349 +# ifndef SUBLANG_SERBIAN_LATIN
8350 +# define SUBLANG_SERBIAN_LATIN 0x02
8352 +# ifndef SUBLANG_SERBIAN_CYRILLIC
8353 +# define SUBLANG_SERBIAN_CYRILLIC 0x03
8355 +# ifndef SUBLANG_SINDHI_INDIA
8356 +# define SUBLANG_SINDHI_INDIA 0x00
8358 +# ifndef SUBLANG_SINDHI_PAKISTAN
8359 +# define SUBLANG_SINDHI_PAKISTAN 0x01
8361 +# ifndef SUBLANG_SPANISH_GUATEMALA
8362 +# define SUBLANG_SPANISH_GUATEMALA 0x04
8364 +# ifndef SUBLANG_SPANISH_COSTA_RICA
8365 +# define SUBLANG_SPANISH_COSTA_RICA 0x05
8367 +# ifndef SUBLANG_SPANISH_PANAMA
8368 +# define SUBLANG_SPANISH_PANAMA 0x06
8370 +# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
8371 +# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
8373 +# ifndef SUBLANG_SPANISH_VENEZUELA
8374 +# define SUBLANG_SPANISH_VENEZUELA 0x08
8376 +# ifndef SUBLANG_SPANISH_COLOMBIA
8377 +# define SUBLANG_SPANISH_COLOMBIA 0x09
8379 +# ifndef SUBLANG_SPANISH_PERU
8380 +# define SUBLANG_SPANISH_PERU 0x0a
8382 +# ifndef SUBLANG_SPANISH_ARGENTINA
8383 +# define SUBLANG_SPANISH_ARGENTINA 0x0b
8385 +# ifndef SUBLANG_SPANISH_ECUADOR
8386 +# define SUBLANG_SPANISH_ECUADOR 0x0c
8388 +# ifndef SUBLANG_SPANISH_CHILE
8389 +# define SUBLANG_SPANISH_CHILE 0x0d
8391 +# ifndef SUBLANG_SPANISH_URUGUAY
8392 +# define SUBLANG_SPANISH_URUGUAY 0x0e
8394 +# ifndef SUBLANG_SPANISH_PARAGUAY
8395 +# define SUBLANG_SPANISH_PARAGUAY 0x0f
8397 +# ifndef SUBLANG_SPANISH_BOLIVIA
8398 +# define SUBLANG_SPANISH_BOLIVIA 0x10
8400 +# ifndef SUBLANG_SPANISH_EL_SALVADOR
8401 +# define SUBLANG_SPANISH_EL_SALVADOR 0x11
8403 +# ifndef SUBLANG_SPANISH_HONDURAS
8404 +# define SUBLANG_SPANISH_HONDURAS 0x12
8406 +# ifndef SUBLANG_SPANISH_NICARAGUA
8407 +# define SUBLANG_SPANISH_NICARAGUA 0x13
8409 +# ifndef SUBLANG_SPANISH_PUERTO_RICO
8410 +# define SUBLANG_SPANISH_PUERTO_RICO 0x14
8412 +# ifndef SUBLANG_SWEDISH_FINLAND
8413 +# define SUBLANG_SWEDISH_FINLAND 0x02
8415 +# ifndef SUBLANG_TAMAZIGHT_ARABIC
8416 +# define SUBLANG_TAMAZIGHT_ARABIC 0x01
8418 +# ifndef SUBLANG_TAMAZIGHT_LATIN
8419 +# define SUBLANG_TAMAZIGHT_LATIN 0x02
8421 +# ifndef SUBLANG_TIGRINYA_ETHIOPIA
8422 +# define SUBLANG_TIGRINYA_ETHIOPIA 0x00
8424 +# ifndef SUBLANG_TIGRINYA_ERITREA
8425 +# define SUBLANG_TIGRINYA_ERITREA 0x01
8427 +# ifndef SUBLANG_URDU_PAKISTAN
8428 +# define SUBLANG_URDU_PAKISTAN 0x01
8430 +# ifndef SUBLANG_URDU_INDIA
8431 +# define SUBLANG_URDU_INDIA 0x02
8433 +# ifndef SUBLANG_UZBEK_LATIN
8434 +# define SUBLANG_UZBEK_LATIN 0x01
8436 +# ifndef SUBLANG_UZBEK_CYRILLIC
8437 +# define SUBLANG_UZBEK_CYRILLIC 0x02
8441 +/* XPG3 defines the result of 'setlocale (category, NULL)' as:
8442 + "Directs 'setlocale()' to query 'category' and return the current
8443 + setting of 'local'."
8444 + However it does not specify the exact format. Neither do SUSV2 and
8445 + ISO C 99. So we can use this feature only on selected systems (e.g.
8446 + those using GNU C Library). */
8447 +#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
8448 +# define HAVE_LOCALE_NULL
8451 +/* Determine the current locale's name, and canonicalize it into XPG syntax
8452 + language[_territory[.codeset]][@modifier]
8453 + The codeset part in the result is not reliable; the locale_charset()
8454 + should be used for codeset information instead.
8455 + The result must not be freed; it is statically allocated. */
8458 +_nl_locale_name (int category, const char *categoryname)
8460 + const char *retval;
8464 + /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
8465 + On some systems this can be done by the 'setlocale' function itself. */
8466 +# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
8467 + retval = setlocale (category, NULL);
8469 + /* Setting of LC_ALL overwrites all other. */
8470 + retval = getenv ("LC_ALL");
8471 + if (retval == NULL || retval[0] == '\0')
8473 + /* Next comes the name of the desired category. */
8474 + retval = getenv (categoryname);
8475 + if (retval == NULL || retval[0] == '\0')
8477 + /* Last possibility is the LANG environment variable. */
8478 + retval = getenv ("LANG");
8479 + if (retval == NULL || retval[0] == '\0')
8480 + /* We use C as the default domain. POSIX says this is
8481 + implementation defined. */
8491 + /* Return an XPG style locale name language[_territory][@modifier].
8492 + Don't even bother determining the codeset; it's not useful in this
8493 + context, because message catalogs are not specific to a single
8500 + /* Let the user override the system settings through environment
8501 + variables, as on POSIX systems. */
8502 + retval = getenv ("LC_ALL");
8503 + if (retval != NULL && retval[0] != '\0')
8505 + retval = getenv (categoryname);
8506 + if (retval != NULL && retval[0] != '\0')
8508 + retval = getenv ("LANG");
8509 + if (retval != NULL && retval[0] != '\0')
8512 + /* Use native Win32 API locale ID. */
8513 + lcid = GetThreadLocale ();
8515 + /* Strip off the sorting rules, keep only the language part. */
8516 + langid = LANGIDFROMLCID (lcid);
8518 + /* Split into language and territory part. */
8519 + primary = PRIMARYLANGID (langid);
8520 + sub = SUBLANGID (langid);
8522 + /* Dispatch on language.
8523 + See also http://www.unicode.org/unicode/onlinedat/languages.html .
8524 + For details about languages, see http://www.ethnologue.com/ . */
8527 + case LANG_AFRIKAANS: return "af_ZA";
8528 + case LANG_ALBANIAN: return "sq_AL";
8529 + case LANG_AMHARIC: return "am_ET";
8533 + case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
8534 + case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
8535 + case SUBLANG_ARABIC_EGYPT: return "ar_EG";
8536 + case SUBLANG_ARABIC_LIBYA: return "ar_LY";
8537 + case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
8538 + case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
8539 + case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
8540 + case SUBLANG_ARABIC_OMAN: return "ar_OM";
8541 + case SUBLANG_ARABIC_YEMEN: return "ar_YE";
8542 + case SUBLANG_ARABIC_SYRIA: return "ar_SY";
8543 + case SUBLANG_ARABIC_JORDAN: return "ar_JO";
8544 + case SUBLANG_ARABIC_LEBANON: return "ar_LB";
8545 + case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
8546 + case SUBLANG_ARABIC_UAE: return "ar_AE";
8547 + case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
8548 + case SUBLANG_ARABIC_QATAR: return "ar_QA";
8551 + case LANG_ARMENIAN: return "hy_AM";
8552 + case LANG_ASSAMESE: return "as_IN";
8556 + /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
8557 + case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
8558 + case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
8562 + return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
8563 + case LANG_BELARUSIAN: return "be_BY";
8564 + case LANG_BENGALI:
8567 + case SUBLANG_BENGALI_INDIA: return "bn_IN";
8568 + case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
8571 + case LANG_BULGARIAN: return "bg_BG";
8572 + case LANG_BURMESE: return "my_MM";
8573 + case LANG_CAMBODIAN: return "km_KH";
8574 + case LANG_CATALAN: return "ca_ES";
8575 + case LANG_CHEROKEE: return "chr_US";
8576 + case LANG_CHINESE:
8579 + case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
8580 + case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
8581 + case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
8582 + case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
8583 + case SUBLANG_CHINESE_MACAU: return "zh_MO";
8586 + case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
8587 + * What used to be called Serbo-Croatian
8588 + * should really now be two separate
8589 + * languages because of political reasons.
8590 + * (Says tml, who knows nothing about Serbian
8592 + * (I can feel those flames coming already.)
8596 + case SUBLANG_DEFAULT: return "hr_HR";
8597 + case SUBLANG_SERBIAN_LATIN: return "sr_CS";
8598 + case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
8601 + case LANG_CZECH: return "cs_CZ";
8602 + case LANG_DANISH: return "da_DK";
8603 + case LANG_DIVEHI: return "dv_MV";
8607 + case SUBLANG_DUTCH: return "nl_NL";
8608 + case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
8611 + case LANG_EDO: return "bin_NG";
8612 + case LANG_ENGLISH:
8615 + /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
8616 + * English was the language spoken in England.
8619 + case SUBLANG_ENGLISH_US: return "en_US";
8620 + case SUBLANG_ENGLISH_UK: return "en_GB";
8621 + case SUBLANG_ENGLISH_AUS: return "en_AU";
8622 + case SUBLANG_ENGLISH_CAN: return "en_CA";
8623 + case SUBLANG_ENGLISH_NZ: return "en_NZ";
8624 + case SUBLANG_ENGLISH_EIRE: return "en_IE";
8625 + case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
8626 + case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
8627 + case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
8628 + case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
8629 + case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
8630 + case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
8631 + case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
8632 + case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
8633 + case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
8634 + case SUBLANG_ENGLISH_INDIA: return "en_IN";
8635 + case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
8636 + case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
8639 + case LANG_ESTONIAN: return "et_EE";
8640 + case LANG_FAEROESE: return "fo_FO";
8641 + case LANG_FARSI: return "fa_IR";
8642 + case LANG_FINNISH: return "fi_FI";
8646 + case SUBLANG_FRENCH: return "fr_FR";
8647 + case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
8648 + case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
8649 + case SUBLANG_FRENCH_SWISS: return "fr_CH";
8650 + case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
8651 + case SUBLANG_FRENCH_MONACO: return "fr_MC";
8652 + case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
8653 + case SUBLANG_FRENCH_REUNION: return "fr_RE";
8654 + case SUBLANG_FRENCH_CONGO: return "fr_CG";
8655 + case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
8656 + case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
8657 + case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
8658 + case SUBLANG_FRENCH_MALI: return "fr_ML";
8659 + case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
8660 + case SUBLANG_FRENCH_HAITI: return "fr_HT";
8663 + case LANG_FRISIAN: return "fy_NL";
8664 + case LANG_FULFULDE:
8665 + /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
8670 + case 0x01: /* SCOTTISH */ return "gd_GB";
8671 + case 0x02: /* IRISH */ return "ga_IE";
8674 + case LANG_GALICIAN: return "gl_ES";
8675 + case LANG_GEORGIAN: return "ka_GE";
8679 + case SUBLANG_GERMAN: return "de_DE";
8680 + case SUBLANG_GERMAN_SWISS: return "de_CH";
8681 + case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
8682 + case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
8683 + case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
8686 + case LANG_GREEK: return "el_GR";
8687 + case LANG_GUARANI: return "gn_PY";
8688 + case LANG_GUJARATI: return "gu_IN";
8689 + case LANG_HAUSA: return "ha_NG";
8690 + case LANG_HAWAIIAN:
8691 + /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
8692 + or Hawaii Creole English ("cpe_US", 600000 speakers)? */
8694 + case LANG_HEBREW: return "he_IL";
8695 + case LANG_HINDI: return "hi_IN";
8696 + case LANG_HUNGARIAN: return "hu_HU";
8697 + case LANG_IBIBIO: return "nic_NG";
8698 + case LANG_ICELANDIC: return "is_IS";
8699 + case LANG_IGBO: return "ig_NG";
8700 + case LANG_INDONESIAN: return "id_ID";
8701 + case LANG_INUKTITUT: return "iu_CA";
8702 + case LANG_ITALIAN:
8705 + case SUBLANG_ITALIAN: return "it_IT";
8706 + case SUBLANG_ITALIAN_SWISS: return "it_CH";
8709 + case LANG_JAPANESE: return "ja_JP";
8710 + case LANG_KANNADA: return "kn_IN";
8711 + case LANG_KANURI: return "kr_NG";
8712 + case LANG_KASHMIRI:
8715 + case SUBLANG_DEFAULT: return "ks_PK";
8716 + case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
8719 + case LANG_KAZAK: return "kk_KZ";
8720 + case LANG_KONKANI:
8721 + /* FIXME: Adjust this when such locales appear on Unix. */
8723 + case LANG_KOREAN: return "ko_KR";
8724 + case LANG_KYRGYZ: return "ky_KG";
8725 + case LANG_LAO: return "lo_LA";
8726 + case LANG_LATIN: return "la_VA";
8727 + case LANG_LATVIAN: return "lv_LV";
8728 + case LANG_LITHUANIAN: return "lt_LT";
8729 + case LANG_MACEDONIAN: return "mk_MK";
8733 + case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
8734 + case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
8737 + case LANG_MALAYALAM: return "ml_IN";
8738 + case LANG_MALTESE: return "mt_MT";
8739 + case LANG_MANIPURI:
8740 + /* FIXME: Adjust this when such locales appear on Unix. */
8742 + case LANG_MARATHI: return "mr_IN";
8743 + case LANG_MONGOLIAN:
8744 + return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
8748 + case SUBLANG_DEFAULT: return "ne_NP";
8749 + case SUBLANG_NEPALI_INDIA: return "ne_IN";
8752 + case LANG_NORWEGIAN:
8755 + case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
8756 + case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
8759 + case LANG_ORIYA: return "or_IN";
8760 + case LANG_OROMO: return "om_ET";
8761 + case LANG_PAPIAMENTU: return "pap_AN";
8763 + return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
8764 + case LANG_POLISH: return "pl_PL";
8765 + case LANG_PORTUGUESE:
8768 + case SUBLANG_PORTUGUESE: return "pt_PT";
8769 + /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
8770 + Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
8771 + case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
8774 + case LANG_PUNJABI:
8777 + case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
8778 + case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
8781 + case LANG_RHAETO_ROMANCE: return "rm_CH";
8782 + case LANG_ROMANIAN:
8785 + case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
8786 + case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
8789 + case LANG_RUSSIAN:
8790 + return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
8791 + case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
8792 + case LANG_SANSKRIT: return "sa_IN";
8796 + case SUBLANG_SINDHI_INDIA: return "sd_IN";
8797 + case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
8800 + case LANG_SINHALESE: return "si_LK";
8801 + case LANG_SLOVAK: return "sk_SK";
8802 + case LANG_SLOVENIAN: return "sl_SI";
8803 + case LANG_SOMALI: return "so_SO";
8804 + case LANG_SORBIAN:
8805 + /* FIXME: Adjust this when such locales appear on Unix. */
8807 + case LANG_SPANISH:
8810 + case SUBLANG_SPANISH: return "es_ES";
8811 + case SUBLANG_SPANISH_MEXICAN: return "es_MX";
8812 + case SUBLANG_SPANISH_MODERN:
8813 + return "es_ES@modern"; /* not seen on Unix */
8814 + case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
8815 + case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
8816 + case SUBLANG_SPANISH_PANAMA: return "es_PA";
8817 + case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
8818 + case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
8819 + case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
8820 + case SUBLANG_SPANISH_PERU: return "es_PE";
8821 + case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
8822 + case SUBLANG_SPANISH_ECUADOR: return "es_EC";
8823 + case SUBLANG_SPANISH_CHILE: return "es_CL";
8824 + case SUBLANG_SPANISH_URUGUAY: return "es_UY";
8825 + case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
8826 + case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
8827 + case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
8828 + case SUBLANG_SPANISH_HONDURAS: return "es_HN";
8829 + case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
8830 + case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
8833 + case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
8834 + case LANG_SWAHILI: return "sw_KE";
8835 + case LANG_SWEDISH:
8838 + case SUBLANG_DEFAULT: return "sv_SE";
8839 + case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
8842 + case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
8843 + case LANG_TAGALOG: return "tl_PH";
8844 + case LANG_TAJIK: return "tg_TJ";
8845 + case LANG_TAMAZIGHT:
8848 + /* FIXME: Adjust this when Tamazight locales appear on Unix. */
8849 + case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
8850 + case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin";
8854 + return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
8855 + case LANG_TATAR: return "tt_RU";
8856 + case LANG_TELUGU: return "te_IN";
8857 + case LANG_THAI: return "th_TH";
8858 + case LANG_TIBETAN: return "bo_CN";
8859 + case LANG_TIGRINYA:
8862 + case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
8863 + case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
8866 + case LANG_TSONGA: return "ts_ZA";
8867 + case LANG_TSWANA: return "tn_BW";
8868 + case LANG_TURKISH: return "tr_TR";
8869 + case LANG_TURKMEN: return "tk_TM";
8870 + case LANG_UKRAINIAN: return "uk_UA";
8874 + case SUBLANG_URDU_PAKISTAN: return "ur_PK";
8875 + case SUBLANG_URDU_INDIA: return "ur_IN";
8881 + case SUBLANG_UZBEK_LATIN: return "uz_UZ";
8882 + case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
8885 + case LANG_VENDA: return "ve_ZA";
8886 + case LANG_VIETNAMESE: return "vi_VN";
8887 + case LANG_WELSH: return "cy_GB";
8888 + case LANG_XHOSA: return "xh_ZA";
8889 + case LANG_YI: return "sit_CN";
8890 + case LANG_YIDDISH: return "yi_IL";
8891 + case LANG_YORUBA: return "yo_NG";
8892 + case LANG_ZULU: return "zu_ZA";
8893 + default: return "C";
8898 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/log.c psmisc-20.2.works.clean/intl/log.c
8899 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/log.c 1969-12-31 18:00:00.000000000 -0600
8900 +++ psmisc-20.2.works.clean/intl/log.c 2004-10-13 15:18:41.000000000 -0500
8902 +/* Log file output.
8903 + Copyright (C) 2003 Free Software Foundation, Inc.
8905 + This program is free software; you can redistribute it and/or modify it
8906 + under the terms of the GNU Library General Public License as published
8907 + by the Free Software Foundation; either version 2, or (at your option)
8908 + any later version.
8910 + This program is distributed in the hope that it will be useful,
8911 + but WITHOUT ANY WARRANTY; without even the implied warranty of
8912 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8913 + Library General Public License for more details.
8915 + You should have received a copy of the GNU Library General Public
8916 + License along with this program; if not, write to the Free Software
8917 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
8920 +/* Written by Bruno Haible <bruno@clisp.org>. */
8922 +#ifdef HAVE_CONFIG_H
8923 +# include <config.h>
8927 +#include <stdlib.h>
8928 +#include <string.h>
8930 +/* Print an ASCII string with quotes and escape sequences where needed. */
8932 +print_escaped (FILE *stream, const char *str)
8934 + putc ('"', stream);
8935 + for (; *str != '\0'; str++)
8938 + fputs ("\\n\"", stream);
8939 + if (str[1] == '\0')
8941 + fputs ("\n\"", stream);
8945 + if (*str == '"' || *str == '\\')
8946 + putc ('\\', stream);
8947 + putc (*str, stream);
8949 + putc ('"', stream);
8952 +/* Add to the log file an entry denoting a failed translation. */
8954 +_nl_log_untranslated (const char *logfilename, const char *domainname,
8955 + const char *msgid1, const char *msgid2, int plural)
8957 + static char *last_logfilename = NULL;
8958 + static FILE *last_logfile = NULL;
8961 + /* Can we reuse the last opened logfile? */
8962 + if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
8964 + /* Close the last used logfile. */
8965 + if (last_logfilename != NULL)
8967 + if (last_logfile != NULL)
8969 + fclose (last_logfile);
8970 + last_logfile = NULL;
8972 + free (last_logfilename);
8973 + last_logfilename = NULL;
8975 + /* Open the logfile. */
8976 + last_logfilename = (char *) malloc (strlen (logfilename) + 1);
8977 + if (last_logfilename == NULL)
8979 + strcpy (last_logfilename, logfilename);
8980 + last_logfile = fopen (logfilename, "a");
8981 + if (last_logfile == NULL)
8984 + logfile = last_logfile;
8986 + fprintf (logfile, "domain ");
8987 + print_escaped (logfile, domainname);
8988 + fprintf (logfile, "\nmsgid ");
8989 + print_escaped (logfile, msgid1);
8992 + fprintf (logfile, "\nmsgid_plural ");
8993 + print_escaped (logfile, msgid2);
8994 + fprintf (logfile, "\nmsgstr[0] \"\"\n");
8997 + fprintf (logfile, "\nmsgstr \"\"\n");
8998 + putc ('\n', logfile);
9000 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/ngettext.c psmisc-20.2.works.clean/intl/ngettext.c
9001 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/ngettext.c 2001-04-13 23:00:43.000000000 -0500
9002 +++ psmisc-20.2.works.clean/intl/ngettext.c 2004-10-13 15:18:41.000000000 -0500
9004 /* Implementation of ngettext(3) function.
9005 - Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
9006 + Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
9008 - This program is free software; you can redistribute it and/or modify
9009 - it under the terms of the GNU General Public License as published by
9010 - the Free Software Foundation; either version 2, or (at your option)
9011 + This program is free software; you can redistribute it and/or modify it
9012 + under the terms of the GNU Library General Public License as published
9013 + by the Free Software Foundation; either version 2, or (at your option)
9016 This program is distributed in the hope that it will be useful,
9017 but WITHOUT ANY WARRANTY; without even the implied warranty of
9018 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9019 - GNU General Public License for more details.
9020 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9021 + Library General Public License for more details.
9023 - You should have received a copy of the GNU General Public License
9024 - along with this program; if not, write to the Free Software Foundation,
9025 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
9026 + You should have received a copy of the GNU Library General Public
9027 + License along with this program; if not, write to the Free Software
9028 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9031 #ifdef HAVE_CONFIG_H
9032 # include <config.h>
9034 # define NGETTEXT __ngettext
9035 # define DCNGETTEXT __dcngettext
9037 -# define NGETTEXT ngettext__
9038 -# define DCNGETTEXT dcngettext__
9039 +# define NGETTEXT libintl_ngettext
9040 +# define DCNGETTEXT libintl_dcngettext
9043 /* Look up MSGID in the current default message catalog for the current
9044 LC_MESSAGES locale. If not found, returns MSGID itself (the default
9047 -NGETTEXT (msgid1, msgid2, n)
9048 - const char *msgid1;
9049 - const char *msgid2;
9050 - unsigned long int n;
9051 +NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n)
9053 return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
9055 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/os2compat.c psmisc-20.2.works.clean/intl/os2compat.c
9056 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/os2compat.c 1969-12-31 18:00:00.000000000 -0600
9057 +++ psmisc-20.2.works.clean/intl/os2compat.c 2004-10-13 15:18:41.000000000 -0500
9059 +/* OS/2 compatibility functions.
9060 + Copyright (C) 2001-2002 Free Software Foundation, Inc.
9062 + This program is free software; you can redistribute it and/or modify it
9063 + under the terms of the GNU Library General Public License as published
9064 + by the Free Software Foundation; either version 2, or (at your option)
9065 + any later version.
9067 + This program is distributed in the hope that it will be useful,
9068 + but WITHOUT ANY WARRANTY; without even the implied warranty of
9069 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9070 + Library General Public License for more details.
9072 + You should have received a copy of the GNU Library General Public
9073 + License along with this program; if not, write to the Free Software
9074 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9078 +#ifdef HAVE_CONFIG_H
9079 +#include <config.h>
9082 +#include <stdlib.h>
9083 +#include <string.h>
9084 +#include <sys/param.h>
9086 +/* A version of getenv() that works from DLLs */
9087 +extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
9090 +_nl_getenv (const char *name)
9092 + unsigned char *value;
9093 + if (DosScanEnv (name, &value))
9099 +/* A fixed size buffer. */
9100 +char libintl_nl_default_dirname[MAXPATHLEN+1];
9102 +char *_nlos2_libdir = NULL;
9103 +char *_nlos2_localealiaspath = NULL;
9104 +char *_nlos2_localedir = NULL;
9106 +static __attribute__((constructor)) void
9107 +nlos2_initialize ()
9109 + char *root = getenv ("UNIXROOT");
9110 + char *gnulocaledir = getenv ("GNULOCALEDIR");
9112 + _nlos2_libdir = gnulocaledir;
9113 + if (!_nlos2_libdir)
9117 + size_t sl = strlen (root);
9118 + _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
9119 + memcpy (_nlos2_libdir, root, sl);
9120 + memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
9123 + _nlos2_libdir = LIBDIR;
9126 + _nlos2_localealiaspath = gnulocaledir;
9127 + if (!_nlos2_localealiaspath)
9131 + size_t sl = strlen (root);
9132 + _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
9133 + memcpy (_nlos2_localealiaspath, root, sl);
9134 + memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
9137 + _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
9140 + _nlos2_localedir = gnulocaledir;
9141 + if (!_nlos2_localedir)
9145 + size_t sl = strlen (root);
9146 + _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
9147 + memcpy (_nlos2_localedir, root, sl);
9148 + memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
9151 + _nlos2_localedir = LOCALEDIR;
9154 + if (strlen (_nlos2_localedir) <= MAXPATHLEN)
9155 + strcpy (libintl_nl_default_dirname, _nlos2_localedir);
9157 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/os2compat.h psmisc-20.2.works.clean/intl/os2compat.h
9158 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/os2compat.h 1969-12-31 18:00:00.000000000 -0600
9159 +++ psmisc-20.2.works.clean/intl/os2compat.h 2004-10-13 15:18:41.000000000 -0500
9161 +/* OS/2 compatibility defines.
9162 + This file is intended to be included from config.h
9163 + Copyright (C) 2001-2002 Free Software Foundation, Inc.
9165 + This program is free software; you can redistribute it and/or modify it
9166 + under the terms of the GNU Library General Public License as published
9167 + by the Free Software Foundation; either version 2, or (at your option)
9168 + any later version.
9170 + This program is distributed in the hope that it will be useful,
9171 + but WITHOUT ANY WARRANTY; without even the implied warranty of
9172 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9173 + Library General Public License for more details.
9175 + You should have received a copy of the GNU Library General Public
9176 + License along with this program; if not, write to the Free Software
9177 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9180 +/* When included from os2compat.h we need all the original definitions */
9184 +#define LIBDIR _nlos2_libdir
9185 +extern char *_nlos2_libdir;
9188 +#define LOCALEDIR _nlos2_localedir
9189 +extern char *_nlos2_localedir;
9191 +#undef LOCALE_ALIAS_PATH
9192 +#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
9193 +extern char *_nlos2_localealiaspath;
9197 +#undef HAVE_STRCASECMP
9198 +#define HAVE_STRCASECMP 1
9199 +#define strcasecmp stricmp
9200 +#define strncasecmp strnicmp
9202 +/* We have our own getenv() which works even if library is compiled as DLL */
9203 +#define getenv _nl_getenv
9205 +/* Older versions of gettext used -1 as the value of LC_MESSAGES */
9206 +#define LC_MESSAGES_COMPAT (-1)
9207 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/osdep.c psmisc-20.2.works.clean/intl/osdep.c
9208 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/osdep.c 1969-12-31 18:00:00.000000000 -0600
9209 +++ psmisc-20.2.works.clean/intl/osdep.c 2004-10-13 15:18:41.000000000 -0500
9211 +/* OS dependent parts of libintl.
9212 + Copyright (C) 2001-2002 Free Software Foundation, Inc.
9214 + This program is free software; you can redistribute it and/or modify it
9215 + under the terms of the GNU Library General Public License as published
9216 + by the Free Software Foundation; either version 2, or (at your option)
9217 + any later version.
9219 + This program is distributed in the hope that it will be useful,
9220 + but WITHOUT ANY WARRANTY; without even the implied warranty of
9221 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9222 + Library General Public License for more details.
9224 + You should have received a copy of the GNU Library General Public
9225 + License along with this program; if not, write to the Free Software
9226 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9229 +#if defined __EMX__
9230 +# include "os2compat.c"
9232 +/* Avoid AIX compiler warning. */
9235 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/plural-exp.c psmisc-20.2.works.clean/intl/plural-exp.c
9236 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/plural-exp.c 1969-12-31 18:00:00.000000000 -0600
9237 +++ psmisc-20.2.works.clean/intl/plural-exp.c 2004-10-13 15:18:41.000000000 -0500
9239 +/* Expression parsing for plural form selection.
9240 + Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
9241 + Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
9243 + This program is free software; you can redistribute it and/or modify it
9244 + under the terms of the GNU Library General Public License as published
9245 + by the Free Software Foundation; either version 2, or (at your option)
9246 + any later version.
9248 + This program is distributed in the hope that it will be useful,
9249 + but WITHOUT ANY WARRANTY; without even the implied warranty of
9250 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9251 + Library General Public License for more details.
9253 + You should have received a copy of the GNU Library General Public
9254 + License along with this program; if not, write to the Free Software
9255 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9258 +#ifdef HAVE_CONFIG_H
9259 +# include <config.h>
9263 +#include <stdlib.h>
9264 +#include <string.h>
9266 +#include "plural-exp.h"
9268 +#if (defined __GNUC__ && !defined __APPLE_CC__) \
9269 + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
9271 +/* These structs are the constant expression for the germanic plural
9272 + form determination. It represents the expression "n != 1". */
9273 +static const struct expression plvar =
9278 +static const struct expression plone =
9287 +struct expression GERMANIC_PLURAL =
9290 + .operation = not_equal,
9295 + [0] = (struct expression *) &plvar,
9296 + [1] = (struct expression *) &plone
9301 +# define INIT_GERMANIC_PLURAL()
9305 +/* For compilers without support for ISO C 99 struct/union initializers:
9306 + Initialization at run-time. */
9308 +static struct expression plvar;
9309 +static struct expression plone;
9310 +struct expression GERMANIC_PLURAL;
9313 +init_germanic_plural ()
9315 + if (plone.val.num == 0)
9318 + plvar.operation = var;
9321 + plone.operation = num;
9322 + plone.val.num = 1;
9324 + GERMANIC_PLURAL.nargs = 2;
9325 + GERMANIC_PLURAL.operation = not_equal;
9326 + GERMANIC_PLURAL.val.args[0] = &plvar;
9327 + GERMANIC_PLURAL.val.args[1] = &plone;
9331 +# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
9337 +EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp,
9338 + unsigned long int *npluralsp)
9340 + if (nullentry != NULL)
9342 + const char *plural;
9343 + const char *nplurals;
9345 + plural = strstr (nullentry, "plural=");
9346 + nplurals = strstr (nullentry, "nplurals=");
9347 + if (plural == NULL || nplurals == NULL)
9352 + unsigned long int n;
9353 + struct parse_args args;
9355 + /* First get the number. */
9357 + while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
9359 + if (!(*nplurals >= '0' && *nplurals <= '9'))
9361 +#if defined HAVE_STRTOUL || defined _LIBC
9362 + n = strtoul (nplurals, &endp, 10);
9364 + for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
9365 + n = n * 10 + (*endp - '0');
9367 + if (nplurals == endp)
9371 + /* Due to the restrictions bison imposes onto the interface of the
9372 + scanner function we have to put the input string and the result
9373 + passed up from the parser into the same structure which address
9374 + is passed down to the parser. */
9377 + if (PLURAL_PARSE (&args) != 0)
9379 + *pluralp = args.res;
9384 + /* By default we are using the Germanic form: singular form only
9385 + for `one', the plural form otherwise. Yes, this is also what
9386 + English is using since English is a Germanic language. */
9388 + INIT_GERMANIC_PLURAL ();
9389 + *pluralp = &GERMANIC_PLURAL;
9393 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/plural-exp.h psmisc-20.2.works.clean/intl/plural-exp.h
9394 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/plural-exp.h 1969-12-31 18:00:00.000000000 -0600
9395 +++ psmisc-20.2.works.clean/intl/plural-exp.h 2004-10-13 15:18:41.000000000 -0500
9397 +/* Expression parsing and evaluation for plural form selection.
9398 + Copyright (C) 2000-2003 Free Software Foundation, Inc.
9399 + Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
9401 + This program is free software; you can redistribute it and/or modify it
9402 + under the terms of the GNU Library General Public License as published
9403 + by the Free Software Foundation; either version 2, or (at your option)
9404 + any later version.
9406 + This program is distributed in the hope that it will be useful,
9407 + but WITHOUT ANY WARRANTY; without even the implied warranty of
9408 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9409 + Library General Public License for more details.
9411 + You should have received a copy of the GNU Library General Public
9412 + License along with this program; if not, write to the Free Software
9413 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9416 +#ifndef _PLURAL_EXP_H
9417 +#define _PLURAL_EXP_H
9419 +#ifndef internal_function
9420 +# define internal_function
9423 +#ifndef attribute_hidden
9424 +# define attribute_hidden
9428 +/* This is the representation of the expressions to determine the
9432 + int nargs; /* Number of arguments. */
9435 + /* Without arguments: */
9436 + var, /* The variable "n". */
9437 + num, /* Decimal number. */
9438 + /* Unary operators: */
9439 + lnot, /* Logical NOT. */
9440 + /* Binary operators: */
9441 + mult, /* Multiplication. */
9442 + divide, /* Division. */
9443 + module, /* Modulo operation. */
9444 + plus, /* Addition. */
9445 + minus, /* Subtraction. */
9446 + less_than, /* Comparison. */
9447 + greater_than, /* Comparison. */
9448 + less_or_equal, /* Comparison. */
9449 + greater_or_equal, /* Comparison. */
9450 + equal, /* Comparison for equality. */
9451 + not_equal, /* Comparison for inequality. */
9452 + land, /* Logical AND. */
9453 + lor, /* Logical OR. */
9454 + /* Ternary operators: */
9455 + qmop /* Question mark operator. */
9459 + unsigned long int num; /* Number value for `num'. */
9460 + struct expression *args[3]; /* Up to three arguments. */
9464 +/* This is the data structure to pass information to the parser and get
9465 + the result in a thread-safe way. */
9469 + struct expression *res;
9473 +/* Names for the libintl functions are a problem. This source code is used
9474 + 1. in the GNU C Library library,
9475 + 2. in the GNU libintl library,
9476 + 3. in the GNU gettext tools.
9477 + The function names in each situation must be different, to allow for
9478 + binary incompatible changes in 'struct expression'. Furthermore,
9479 + 1. in the GNU C Library library, the names have a __ prefix,
9480 + 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
9481 + must follow ANSI C and not start with __.
9482 + So we have to distinguish the three cases. */
9484 +# define FREE_EXPRESSION __gettext_free_exp
9485 +# define PLURAL_PARSE __gettextparse
9486 +# define GERMANIC_PLURAL __gettext_germanic_plural
9487 +# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
9488 +#elif defined (IN_LIBINTL)
9489 +# define FREE_EXPRESSION libintl_gettext_free_exp
9490 +# define PLURAL_PARSE libintl_gettextparse
9491 +# define GERMANIC_PLURAL libintl_gettext_germanic_plural
9492 +# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
9494 +# define FREE_EXPRESSION free_plural_expression
9495 +# define PLURAL_PARSE parse_plural_expression
9496 +# define GERMANIC_PLURAL germanic_plural
9497 +# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
9500 +extern void FREE_EXPRESSION (struct expression *exp)
9501 + internal_function;
9502 +extern int PLURAL_PARSE (void *arg);
9503 +extern struct expression GERMANIC_PLURAL attribute_hidden;
9504 +extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
9505 + struct expression **pluralp,
9506 + unsigned long int *npluralsp)
9507 + internal_function;
9509 +#if !defined (_LIBC) && !defined (IN_LIBINTL)
9510 +extern unsigned long int plural_eval (struct expression *pexp,
9511 + unsigned long int n);
9514 +#endif /* _PLURAL_EXP_H */
9515 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/plural.c psmisc-20.2.works.clean/intl/plural.c
9516 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/plural.c 2001-10-17 17:05:25.000000000 -0500
9517 +++ psmisc-20.2.works.clean/intl/plural.c 2004-10-13 15:18:43.000000000 -0500
9520 -/* A Bison parser, made from plural.y
9521 - by GNU Bison version 1.28 */
9522 +/* A Bison parser, made from plural.y
9523 + by GNU bison 1.35. */
9525 #define YYBISON 1 /* Identify Bison output. */
9528 #define yychar __gettextchar
9529 #define yydebug __gettextdebug
9530 #define yynerrs __gettextnerrs
9536 +# define EQUOP2 257
9537 +# define CMPOP2 258
9538 +# define ADDOP2 259
9539 +# define MULOP2 260
9540 +# define NUMBER 261
9544 /* Expression parsing for plural form selection.
9545 - Copyright (C) 2000, 2001 Free Software Foundation, Inc.
9546 + Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
9547 Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
9549 - This program is free software; you can redistribute it and/or modify
9550 - it under the terms of the GNU General Public License as published by
9551 - the Free Software Foundation; either version 2, or (at your option)
9552 + This program is free software; you can redistribute it and/or modify it
9553 + under the terms of the GNU Library General Public License as published
9554 + by the Free Software Foundation; either version 2, or (at your option)
9557 This program is distributed in the hope that it will be useful,
9558 but WITHOUT ANY WARRANTY; without even the implied warranty of
9559 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9560 - GNU General Public License for more details.
9561 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9562 + Library General Public License for more details.
9564 - You should have received a copy of the GNU General Public License
9565 - along with this program; if not, write to the Free Software Foundation,
9566 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
9567 + You should have received a copy of the GNU Library General Public
9568 + License along with this program; if not, write to the Free Software
9569 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9572 /* The bison generated parser uses alloca. AIX 3 forces us to put this
9573 declaration at the beginning of the file. The declaration in bison's
9575 # include <config.h>
9578 +#include <stddef.h>
9580 -#include "gettextP.h"
9581 +#include "plural-exp.h"
9583 -/* Names for the libintl functions are a problem. They must not clash
9584 - with existing names and they should follow ANSI C. But this source
9585 - code is also used in GNU C Library where the names have a __
9586 - prefix. So we have to make a difference here. */
9588 -# define FREE_EXPRESSION __gettext_free_exp
9590 -# define FREE_EXPRESSION gettext_free_exp__
9591 -# define __gettextparse gettextparse__
9592 +/* The main function generated by the parser is called __gettextparse,
9593 + but we want it to be called PLURAL_PARSE. */
9595 +# define __gettextparse PLURAL_PARSE
9598 #define YYLEX_PARAM &((struct parse_args *) arg)->cp
9599 #define YYPARSE_PARAM arg
9601 -#line 52 "plural.y"
9602 +#line 49 "plural.y"
9605 unsigned long int num;
9607 struct expression *exp;
9609 -#line 58 "plural.y"
9611 +# define YYSTYPE yystype
9612 +# define YYSTYPE_IS_TRIVIAL 1
9614 +#line 55 "plural.y"
9616 /* Prototypes for local functions. */
9617 -static struct expression *new_exp PARAMS ((int nargs, enum operator op,
9618 - struct expression * const *args));
9619 -static inline struct expression *new_exp_0 PARAMS ((enum operator op));
9620 -static inline struct expression *new_exp_1 PARAMS ((enum operator op,
9621 - struct expression *right));
9622 -static struct expression *new_exp_2 PARAMS ((enum operator op,
9623 - struct expression *left,
9624 - struct expression *right));
9625 -static inline struct expression *new_exp_3 PARAMS ((enum operator op,
9626 - struct expression *bexp,
9627 - struct expression *tbranch,
9628 - struct expression *fbranch));
9629 -static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
9630 -static void yyerror PARAMS ((const char *str));
9631 +static int yylex (YYSTYPE *lval, const char **pexp);
9632 +static void yyerror (const char *str);
9634 /* Allocation of expressions. */
9636 static struct expression *
9637 -new_exp (nargs, op, args)
9640 - struct expression * const *args;
9641 +new_exp (int nargs, enum operator op, struct expression * const *args)
9644 struct expression *newp;
9645 @@ -125,16 +110,13 @@
9648 static inline struct expression *
9651 +new_exp_0 (enum operator op)
9653 return new_exp (0, op, NULL);
9656 static inline struct expression *
9657 -new_exp_1 (op, right)
9659 - struct expression *right;
9660 +new_exp_1 (enum operator op, struct expression *right)
9662 struct expression *args[1];
9664 @@ -143,10 +125,7 @@
9667 static struct expression *
9668 -new_exp_2 (op, left, right)
9670 - struct expression *left;
9671 - struct expression *right;
9672 +new_exp_2 (enum operator op, struct expression *left, struct expression *right)
9674 struct expression *args[2];
9676 @@ -156,11 +135,8 @@
9679 static inline struct expression *
9680 -new_exp_3 (op, bexp, tbranch, fbranch)
9682 - struct expression *bexp;
9683 - struct expression *tbranch;
9684 - struct expression *fbranch;
9685 +new_exp_3 (enum operator op, struct expression *bexp,
9686 + struct expression *tbranch, struct expression *fbranch)
9688 struct expression *args[3];
9690 @@ -170,12 +146,8 @@
9691 return new_exp (3, op, args);
9696 -#ifndef __cplusplus
9705 @@ -184,129 +156,152 @@
9706 #define YYFLAG -32768
9709 +/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
9710 #define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
9712 -static const char yytranslate[] = { 0,
9713 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9714 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9715 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9716 - 2, 2, 10, 2, 2, 2, 2, 5, 2, 14,
9717 - 15, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9718 - 2, 2, 2, 2, 2, 2, 2, 12, 2, 2,
9719 - 2, 2, 3, 2, 2, 2, 2, 2, 2, 2,
9720 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9721 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9722 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9723 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 13,
9724 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9725 - 2, 2, 2, 4, 2, 2, 2, 2, 2, 2,
9726 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9727 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9728 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9729 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9730 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9731 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9732 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9733 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9734 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9735 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9736 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9737 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9738 - 2, 2, 2, 2, 2, 1, 6, 7, 8, 9,
9740 +/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
9741 +static const char yytranslate[] =
9743 + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9744 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9745 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9746 + 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
9747 + 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
9748 + 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
9749 + 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
9750 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9751 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9752 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9753 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9754 + 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9755 + 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
9756 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9757 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9758 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9759 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9760 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9761 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9762 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9763 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9764 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9765 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9766 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9767 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9768 + 2, 2, 2, 2, 2, 2, 1, 6, 7, 8,
9773 -static const short yyprhs[] = { 0,
9774 - 0, 2, 8, 12, 16, 20, 24, 28, 32, 35,
9777 +static const short yyprhs[] =
9779 + 0, 0, 2, 8, 12, 16, 20, 24, 28, 32,
9783 -static const short yyrhs[] = { 17,
9784 - 0, 17, 3, 17, 12, 17, 0, 17, 4, 17,
9785 - 0, 17, 5, 17, 0, 17, 6, 17, 0, 17,
9786 - 7, 17, 0, 17, 8, 17, 0, 17, 9, 17,
9787 - 0, 10, 17, 0, 13, 0, 11, 0, 14, 17,
9789 +static const short yyrhs[] =
9791 + 17, 0, 17, 3, 17, 12, 17, 0, 17, 4,
9792 + 17, 0, 17, 5, 17, 0, 17, 6, 17, 0,
9793 + 17, 7, 17, 0, 17, 8, 17, 0, 17, 9,
9794 + 17, 0, 10, 17, 0, 13, 0, 11, 0, 14,
9801 -static const short yyrline[] = { 0,
9802 - 177, 185, 189, 193, 197, 201, 205, 209, 213, 217,
9805 +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
9806 +static const short yyrline[] =
9808 + 0, 150, 158, 162, 166, 170, 174, 178, 182, 186,
9814 -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
9815 +#if (YYDEBUG) || defined YYERROR_VERBOSE
9817 -static const char * const yytname[] = { "$","error","$undefined.","'?'","'|'",
9818 -"'&'","EQUOP2","CMPOP2","ADDOP2","MULOP2","'!'","NUMBER","':'","'n'","'('","')'",
9819 -"start","exp", NULL
9820 +/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
9821 +static const char *const yytname[] =
9823 + "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
9824 + "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
9829 -static const short yyr1[] = { 0,
9830 - 16, 17, 17, 17, 17, 17, 17, 17, 17, 17,
9832 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
9833 +static const short yyr1[] =
9835 + 0, 16, 17, 17, 17, 17, 17, 17, 17, 17,
9839 -static const short yyr2[] = { 0,
9840 - 1, 5, 3, 3, 3, 3, 3, 3, 2, 1,
9842 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
9843 +static const short yyr2[] =
9845 + 0, 1, 5, 3, 3, 3, 3, 3, 3, 2,
9849 -static const short yydefact[] = { 0,
9850 - 0, 11, 10, 0, 1, 9, 0, 0, 0, 0,
9851 - 0, 0, 0, 0, 12, 0, 3, 4, 5, 6,
9852 - 7, 8, 0, 2, 0, 0, 0
9853 +/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
9854 + doesn't specify something else to do. Zero means the default is an
9856 +static const short yydefact[] =
9858 + 0, 0, 11, 10, 0, 1, 9, 0, 0, 0,
9859 + 0, 0, 0, 0, 0, 12, 0, 3, 4, 5,
9860 + 6, 7, 8, 0, 2, 0, 0, 0
9863 -static const short yydefgoto[] = { 25,
9865 +static const short yydefgoto[] =
9870 -static const short yypact[] = { -9,
9871 - -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, -9,
9872 - -9, -9, -9, -9,-32768, 24, 39, 43, 16, 26,
9873 - -3,-32768, -9, 34, 21, 53,-32768
9874 +static const short yypact[] =
9876 + -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9,
9877 + -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16,
9878 + 26, -3,-32768, -9, 34, 21, 53,-32768
9881 -static const short yypgoto[] = {-32768,
9883 +static const short yypgoto[] =
9892 -static const short yytable[] = { 6,
9893 - 1, 2, 7, 3, 4, 14, 16, 17, 18, 19,
9894 - 20, 21, 22, 8, 9, 10, 11, 12, 13, 14,
9895 - 26, 24, 12, 13, 14, 15, 8, 9, 10, 11,
9896 - 12, 13, 14, 13, 14, 23, 8, 9, 10, 11,
9897 - 12, 13, 14, 10, 11, 12, 13, 14, 11, 12,
9899 +static const short yytable[] =
9901 + 6, 1, 2, 7, 3, 4, 14, 16, 17, 18,
9902 + 19, 20, 21, 22, 8, 9, 10, 11, 12, 13,
9903 + 14, 26, 24, 12, 13, 14, 15, 8, 9, 10,
9904 + 11, 12, 13, 14, 13, 14, 23, 8, 9, 10,
9905 + 11, 12, 13, 14, 10, 11, 12, 13, 14, 11,
9909 -static const short yycheck[] = { 1,
9910 - 10, 11, 4, 13, 14, 9, 8, 9, 10, 11,
9911 - 12, 13, 14, 3, 4, 5, 6, 7, 8, 9,
9912 - 0, 23, 7, 8, 9, 15, 3, 4, 5, 6,
9913 - 7, 8, 9, 8, 9, 12, 3, 4, 5, 6,
9914 - 7, 8, 9, 5, 6, 7, 8, 9, 6, 7,
9916 +static const short yycheck[] =
9918 + 1, 10, 11, 4, 13, 14, 9, 8, 9, 10,
9919 + 11, 12, 13, 14, 3, 4, 5, 6, 7, 8,
9920 + 9, 0, 23, 7, 8, 9, 15, 3, 4, 5,
9921 + 6, 7, 8, 9, 8, 9, 12, 3, 4, 5,
9922 + 6, 7, 8, 9, 5, 6, 7, 8, 9, 6,
9927 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
9928 -#line 3 "/usr/share/bison/bison.simple"
9929 -/* This file comes from bison-1.28. */
9930 +#line 3 "/usr/local/share/bison/bison.simple"
9932 /* Skeleton output parser for bison,
9933 - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
9935 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
9938 This program is free software; you can redistribute it and/or modify
9939 it under the terms of the GNU General Public License as published by
9940 @@ -328,62 +323,131 @@
9941 This special exception was added by the Free Software Foundation
9942 in version 1.24 of Bison. */
9944 -/* This is the parser code that is written into each bison parser
9945 - when the %semantic_parser declaration is not specified in the grammar.
9946 - It was written by Richard Stallman by simplifying the hairy parser
9947 - used when %semantic_parser is specified. */
9948 +/* This is the parser code that is written into each bison parser when
9949 + the %semantic_parser declaration is not specified in the grammar.
9950 + It was written by Richard Stallman by simplifying the hairy parser
9951 + used when %semantic_parser is specified. */
9953 -#ifndef YYSTACK_USE_ALLOCA
9955 -#define YYSTACK_USE_ALLOCA
9956 -#else /* alloca not defined */
9958 -#define YYSTACK_USE_ALLOCA
9959 -#define alloca __builtin_alloca
9960 -#else /* not GNU C. */
9961 -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
9962 -#define YYSTACK_USE_ALLOCA
9963 -#include <alloca.h>
9964 -#else /* not sparc */
9965 -/* We think this test detects Watcom and Microsoft C. */
9966 -/* This used to test MSDOS, but that is a bad idea
9967 - since that symbol is in the user namespace. */
9968 -#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
9969 -#if 0 /* No need for malloc.h, which pollutes the namespace;
9970 - instead, just don't use alloca. */
9971 -#include <malloc.h>
9973 -#else /* not MSDOS, or __TURBOC__ */
9975 -/* I don't know what this was needed for, but it pollutes the namespace.
9976 - So I turned it off. rms, 2 May 1997. */
9977 -/* #include <malloc.h> */
9979 -#define YYSTACK_USE_ALLOCA
9980 -#else /* not MSDOS, or __TURBOC__, or _AIX */
9982 -#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
9983 - and on HPUX 10. Eventually we can turn this on. */
9984 -#define YYSTACK_USE_ALLOCA
9985 -#define alloca __builtin_alloca
9986 -#endif /* __hpux */
9988 -#endif /* not _AIX */
9989 -#endif /* not MSDOS, or __TURBOC__ */
9990 -#endif /* not sparc */
9991 -#endif /* not GNU C */
9992 -#endif /* alloca not defined */
9993 -#endif /* YYSTACK_USE_ALLOCA not defined */
9994 +/* All symbols defined below should begin with yy or YY, to avoid
9995 + infringing on user name space. This should be done even for local
9996 + variables, as they might otherwise be expanded by user macros.
9997 + There are some unavoidable exceptions within include files to
9998 + define necessary library symbols; they are noted "INFRINGES ON
9999 + USER NAME SPACE" below. */
10001 +#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
10003 +/* The parser invokes alloca or malloc; define the necessary symbols. */
10005 +# if YYSTACK_USE_ALLOCA
10006 +# define YYSTACK_ALLOC alloca
10008 +# ifndef YYSTACK_USE_ALLOCA
10009 +# if defined (alloca) || defined (_ALLOCA_H)
10010 +# define YYSTACK_ALLOC alloca
10013 +# define YYSTACK_ALLOC __builtin_alloca
10019 +# ifdef YYSTACK_ALLOC
10020 + /* Pacify GCC's `empty if-body' warning. */
10021 +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
10023 +# if defined (__STDC__) || defined (__cplusplus)
10024 +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
10025 +# define YYSIZE_T size_t
10027 +# define YYSTACK_ALLOC malloc
10028 +# define YYSTACK_FREE free
10030 +#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
10033 +#if (! defined (yyoverflow) \
10034 + && (! defined (__cplusplus) \
10035 + || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
10037 +/* A type that is properly aligned for any stack member. */
10047 +/* The size of the maximum gap between one aligned stack and the next. */
10048 +# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
10050 +/* The size of an array large to enough to hold all stacks, each with
10053 +# define YYSTACK_BYTES(N) \
10054 + ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
10055 + + 2 * YYSTACK_GAP_MAX)
10057 +# define YYSTACK_BYTES(N) \
10058 + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
10059 + + YYSTACK_GAP_MAX)
10062 +/* Copy COUNT objects from FROM to TO. The source and destination do
10066 +# define YYCOPY(To, From, Count) \
10067 + __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
10069 +# define YYCOPY(To, From, Count) \
10072 + register YYSIZE_T yyi; \
10073 + for (yyi = 0; yyi < (Count); yyi++) \
10074 + (To)[yyi] = (From)[yyi]; \
10080 +/* Relocate STACK from its old location to the new one. The
10081 + local variables YYSIZE and YYSTACKSIZE give the old and new number of
10082 + elements in the stack, and YYPTR gives the new location of the
10083 + stack. Advance YYPTR to a properly aligned location for the next
10085 +# define YYSTACK_RELOCATE(Stack) \
10088 + YYSIZE_T yynewbytes; \
10089 + YYCOPY (&yyptr->Stack, Stack, yysize); \
10090 + Stack = &yyptr->Stack; \
10091 + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
10092 + yyptr += yynewbytes / sizeof (*yyptr); \
10096 -#ifdef YYSTACK_USE_ALLOCA
10097 -#define YYSTACK_ALLOC alloca
10099 -#define YYSTACK_ALLOC malloc
10102 -/* Note: there must be only one dollar sign in this file.
10103 - It is replaced by the list of actions, each action
10104 - as one case of the switch. */
10106 +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
10107 +# define YYSIZE_T __SIZE_TYPE__
10109 +#if ! defined (YYSIZE_T) && defined (size_t)
10110 +# define YYSIZE_T size_t
10112 +#if ! defined (YYSIZE_T)
10113 +# if defined (__STDC__) || defined (__cplusplus)
10114 +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
10115 +# define YYSIZE_T size_t
10118 +#if ! defined (YYSIZE_T)
10119 +# define YYSIZE_T unsigned int
10122 #define yyerrok (yyerrstatus = 0)
10123 #define yyclearin (yychar = YYEMPTY)
10124 @@ -392,131 +456,161 @@
10125 #define YYACCEPT goto yyacceptlab
10126 #define YYABORT goto yyabortlab
10127 #define YYERROR goto yyerrlab1
10128 -/* Like YYERROR except do call yyerror.
10129 - This remains here temporarily to ease the
10130 - transition to the new meaning of YYERROR, for GCC.
10131 +/* Like YYERROR except do call yyerror. This remains here temporarily
10132 + to ease the transition to the new meaning of YYERROR, for GCC.
10133 Once GCC version 2 has supplanted version 1, this can go. */
10134 #define YYFAIL goto yyerrlab
10135 #define YYRECOVERING() (!!yyerrstatus)
10136 -#define YYBACKUP(token, value) \
10137 +#define YYBACKUP(Token, Value) \
10139 if (yychar == YYEMPTY && yylen == 1) \
10140 - { yychar = (token), yylval = (value); \
10142 + yychar = (Token); \
10143 + yylval = (Value); \
10144 yychar1 = YYTRANSLATE (yychar); \
10149 - { yyerror ("syntax error: cannot back up"); YYERROR; } \
10151 + yyerror ("syntax error: cannot back up"); \
10157 #define YYERRCODE 256
10160 -#define YYLEX yylex()
10164 -#ifdef YYLSP_NEEDED
10165 -#ifdef YYLEX_PARAM
10166 -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
10168 -#define YYLEX yylex(&yylval, &yylloc)
10170 -#else /* not YYLSP_NEEDED */
10171 -#ifdef YYLEX_PARAM
10172 -#define YYLEX yylex(&yylval, YYLEX_PARAM)
10174 -#define YYLEX yylex(&yylval)
10176 -#endif /* not YYLSP_NEEDED */
10177 +/* YYLLOC_DEFAULT -- Compute the default location (before the actions
10180 + When YYLLOC_DEFAULT is run, CURRENT is set the location of the
10181 + first token. By default, to implement support for ranges, extend
10182 + its range to the last symbol. */
10184 +#ifndef YYLLOC_DEFAULT
10185 +# define YYLLOC_DEFAULT(Current, Rhs, N) \
10186 + Current.last_line = Rhs[N].last_line; \
10187 + Current.last_column = Rhs[N].last_column;
10190 -/* If nonreentrant, generate the variables here */
10193 +/* YYLEX -- calling `yylex' with the right arguments. */
10195 -int yychar; /* the lookahead symbol */
10196 -YYSTYPE yylval; /* the semantic value of the */
10197 - /* lookahead symbol */
10200 +# ifdef YYLEX_PARAM
10201 +# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
10203 +# define YYLEX yylex (&yylval, &yylloc)
10205 +# else /* !YYLSP_NEEDED */
10206 +# ifdef YYLEX_PARAM
10207 +# define YYLEX yylex (&yylval, YYLEX_PARAM)
10209 +# define YYLEX yylex (&yylval)
10211 +# endif /* !YYLSP_NEEDED */
10212 +#else /* !YYPURE */
10213 +# define YYLEX yylex ()
10214 +#endif /* !YYPURE */
10216 -#ifdef YYLSP_NEEDED
10217 -YYLTYPE yylloc; /* location data for the lookahead */
10221 -int yynerrs; /* number of parse errors so far */
10222 -#endif /* not YYPURE */
10223 +/* Enable debugging if requested. */
10227 -int yydebug; /* nonzero means print parse trace */
10228 -/* Since this is uninitialized, it does not stop multiple parsers
10229 - from coexisting. */
10231 +# ifndef YYFPRINTF
10232 +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
10233 +# define YYFPRINTF fprintf
10236 -/* YYINITDEPTH indicates the initial size of the parser's stacks */
10237 +# define YYDPRINTF(Args) \
10240 + YYFPRINTF Args; \
10242 +/* Nonzero means print parse trace. It is left uninitialized so that
10243 + multiple parsers can coexist. */
10245 +#else /* !YYDEBUG */
10246 +# define YYDPRINTF(Args)
10247 +#endif /* !YYDEBUG */
10249 +/* YYINITDEPTH -- initial size of the parser's stacks. */
10250 #ifndef YYINITDEPTH
10251 -#define YYINITDEPTH 200
10252 +# define YYINITDEPTH 200
10255 -/* YYMAXDEPTH is the maximum size the stacks can grow to
10256 - (effective only if the built-in stack extension method is used). */
10257 +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
10258 + if the built-in stack extension method is used).
10260 + Do not make this value too large; the results are undefined if
10261 + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
10262 + evaluated with infinite-precision integer arithmetic. */
10264 #if YYMAXDEPTH == 0
10266 +# undef YYMAXDEPTH
10270 -#define YYMAXDEPTH 10000
10271 +# define YYMAXDEPTH 10000
10274 -/* Define __yy_memcpy. Note that the size argument
10275 - should be passed with type unsigned int, because that is what the non-GCC
10276 - definitions require. With GCC, __builtin_memcpy takes an arg
10277 - of type size_t, but it can handle unsigned int. */
10279 -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
10280 -#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
10281 -#else /* not GNU C or C++ */
10282 -#ifndef __cplusplus
10283 +#ifdef YYERROR_VERBOSE
10285 -/* This is the most reliable way to avoid incompatibilities
10286 - in available built-in functions on various systems. */
10288 -__yy_memcpy (to, from, count)
10291 - unsigned int count;
10293 +# if defined (__GLIBC__) && defined (_STRING_H)
10294 +# define yystrlen strlen
10296 +/* Return the length of YYSTR. */
10298 +# if defined (__STDC__) || defined (__cplusplus)
10299 +yystrlen (const char *yystr)
10302 + const char *yystr;
10305 - register char *f = from;
10306 - register char *t = to;
10307 - register int i = count;
10308 + register const char *yys = yystr;
10313 + while (*yys++ != '\0')
10316 -#else /* __cplusplus */
10317 + return yys - yystr - 1;
10322 -/* This is the most reliable way to avoid incompatibilities
10323 - in available built-in functions on various systems. */
10325 -__yy_memcpy (char *to, char *from, unsigned int count)
10327 +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
10328 +# define yystpcpy stpcpy
10330 +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
10333 +# if defined (__STDC__) || defined (__cplusplus)
10334 +yystpcpy (char *yydest, const char *yysrc)
10336 +yystpcpy (yydest, yysrc)
10338 + const char *yysrc;
10341 - register char *t = to;
10342 - register char *f = from;
10343 - register int i = count;
10344 + register char *yyd = yydest;
10345 + register const char *yys = yysrc;
10350 + while ((*yyd++ = *yys++) != '\0')
10360 -#line 217 "/usr/share/bison/bison.simple"
10361 +#line 315 "/usr/local/share/bison/bison.simple"
10364 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
10365 into yyparse. The argument should have type void *.
10366 @@ -525,76 +619,121 @@
10367 to the proper pointer type. */
10369 #ifdef YYPARSE_PARAM
10370 -#ifdef __cplusplus
10371 -#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
10372 -#define YYPARSE_PARAM_DECL
10373 -#else /* not __cplusplus */
10374 -#define YYPARSE_PARAM_ARG YYPARSE_PARAM
10375 -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
10376 -#endif /* not __cplusplus */
10377 -#else /* not YYPARSE_PARAM */
10378 -#define YYPARSE_PARAM_ARG
10379 -#define YYPARSE_PARAM_DECL
10380 -#endif /* not YYPARSE_PARAM */
10381 +# if defined (__STDC__) || defined (__cplusplus)
10382 +# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
10383 +# define YYPARSE_PARAM_DECL
10385 +# define YYPARSE_PARAM_ARG YYPARSE_PARAM
10386 +# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
10388 +#else /* !YYPARSE_PARAM */
10389 +# define YYPARSE_PARAM_ARG
10390 +# define YYPARSE_PARAM_DECL
10391 +#endif /* !YYPARSE_PARAM */
10393 /* Prevent warning if -Wstrict-prototypes. */
10395 -#ifdef YYPARSE_PARAM
10396 +# ifdef YYPARSE_PARAM
10397 int yyparse (void *);
10400 int yyparse (void);
10404 +/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
10405 + variables are global, or local to YYPARSE. */
10407 +#define YY_DECL_NON_LSP_VARIABLES \
10408 +/* The lookahead symbol. */ \
10411 +/* The semantic value of the lookahead symbol. */ \
10414 +/* Number of parse errors so far. */ \
10418 +# define YY_DECL_VARIABLES \
10419 +YY_DECL_NON_LSP_VARIABLES \
10421 +/* Location data for the lookahead symbol. */ \
10424 +# define YY_DECL_VARIABLES \
10425 +YY_DECL_NON_LSP_VARIABLES
10429 +/* If nonreentrant, generate the variables here. */
10433 +#endif /* !YYPURE */
10436 -yyparse(YYPARSE_PARAM_ARG)
10437 +yyparse (YYPARSE_PARAM_ARG)
10440 + /* If reentrant, generate the variables here. */
10442 + YY_DECL_VARIABLES
10443 +#endif /* !YYPURE */
10445 register int yystate;
10447 - register short *yyssp;
10448 - register YYSTYPE *yyvsp;
10449 - int yyerrstatus; /* number of tokens to shift before error messages enabled */
10450 - int yychar1 = 0; /* lookahead token as an internal (translated) token number */
10452 + /* Number of tokens to shift before error messages enabled. */
10454 + /* Lookahead token as an internal (translated) token number. */
10457 - short yyssa[YYINITDEPTH]; /* the state stack */
10458 - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
10459 + /* Three stacks and their tools:
10460 + `yyss': related to states,
10461 + `yyvs': related to semantic values,
10462 + `yyls': related to locations.
10464 - short *yyss = yyssa; /* refer to the stacks thru separate pointers */
10465 - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
10466 + Refer to the stacks thru separate pointers, to allow yyoverflow
10467 + to reallocate them elsewhere. */
10469 -#ifdef YYLSP_NEEDED
10470 - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
10471 + /* The state stack. */
10472 + short yyssa[YYINITDEPTH];
10473 + short *yyss = yyssa;
10474 + register short *yyssp;
10476 + /* The semantic value stack. */
10477 + YYSTYPE yyvsa[YYINITDEPTH];
10478 + YYSTYPE *yyvs = yyvsa;
10479 + register YYSTYPE *yyvsp;
10482 + /* The location stack. */
10483 + YYLTYPE yylsa[YYINITDEPTH];
10484 YYLTYPE *yyls = yylsa;
10488 -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
10490 +# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
10492 -#define YYPOPSTACK (yyvsp--, yyssp--)
10493 +# define YYPOPSTACK (yyvsp--, yyssp--)
10496 - int yystacksize = YYINITDEPTH;
10497 - int yyfree_stacks = 0;
10498 + YYSIZE_T yystacksize = YYINITDEPTH;
10504 -#ifdef YYLSP_NEEDED
10509 - YYSTYPE yyval; /* the variable used to return */
10510 - /* semantic values from the action */
10512 + /* The variables used to return semantic value and location from the
10513 + action routines. */
10519 + /* When reducing, the number of symbols on the RHS of the reduced
10525 - fprintf(stderr, "Starting parse\n");
10527 + YYDPRINTF ((stderr, "Starting parse\n"));
10531 @@ -606,110 +745,110 @@
10532 so that they stay on the same level as the state stack.
10533 The wasted elements are never initialized. */
10535 - yyssp = yyss - 1;
10538 -#ifdef YYLSP_NEEDED
10544 -/* Push a new state, which is found in yystate . */
10545 -/* In all cases, when you get here, the value and location stacks
10546 - have just been pushed. so pushing a state here evens the stacks. */
10548 +/*------------------------------------------------------------.
10549 +| yynewstate -- Push a new state, which is found in yystate. |
10550 +`------------------------------------------------------------*/
10552 + /* In all cases, when you get here, the value and location stacks
10553 + have just been pushed. so pushing a state here evens the stacks.
10557 - *++yyssp = yystate;
10559 + *yyssp = yystate;
10561 if (yyssp >= yyss + yystacksize - 1)
10563 - /* Give user a chance to reallocate the stack */
10564 - /* Use copies of these so that the &'s don't force the real ones into memory. */
10565 - YYSTYPE *yyvs1 = yyvs;
10566 - short *yyss1 = yyss;
10567 -#ifdef YYLSP_NEEDED
10568 - YYLTYPE *yyls1 = yyls;
10571 /* Get the current used size of the three stacks, in elements. */
10572 - int size = yyssp - yyss + 1;
10573 + YYSIZE_T yysize = yyssp - yyss + 1;
10576 - /* Each stack pointer address is followed by the size of
10577 - the data in use in that stack, in bytes. */
10578 -#ifdef YYLSP_NEEDED
10579 - /* This used to be a conditional around just the two extra args,
10580 - but that might be undefined if yyoverflow is a macro. */
10581 - yyoverflow("parser stack overflow",
10582 - &yyss1, size * sizeof (*yyssp),
10583 - &yyvs1, size * sizeof (*yyvsp),
10584 - &yyls1, size * sizeof (*yylsp),
10587 - yyoverflow("parser stack overflow",
10588 - &yyss1, size * sizeof (*yyssp),
10589 - &yyvs1, size * sizeof (*yyvsp),
10593 + /* Give user a chance to reallocate the stack. Use copies of
10594 + these so that the &'s don't force the real ones into
10596 + YYSTYPE *yyvs1 = yyvs;
10597 + short *yyss1 = yyss;
10599 - yyss = yyss1; yyvs = yyvs1;
10600 -#ifdef YYLSP_NEEDED
10603 + /* Each stack pointer address is followed by the size of the
10604 + data in use in that stack, in bytes. */
10606 + YYLTYPE *yyls1 = yyls;
10607 + /* This used to be a conditional around just the two extra args,
10608 + but that might be undefined if yyoverflow is a macro. */
10609 + yyoverflow ("parser stack overflow",
10610 + &yyss1, yysize * sizeof (*yyssp),
10611 + &yyvs1, yysize * sizeof (*yyvsp),
10612 + &yyls1, yysize * sizeof (*yylsp),
10616 + yyoverflow ("parser stack overflow",
10617 + &yyss1, yysize * sizeof (*yyssp),
10618 + &yyvs1, yysize * sizeof (*yyvsp),
10624 #else /* no yyoverflow */
10625 +# ifndef YYSTACK_RELOCATE
10626 + goto yyoverflowlab;
10628 /* Extend the stack our own way. */
10629 if (yystacksize >= YYMAXDEPTH)
10631 - yyerror("parser stack overflow");
10632 - if (yyfree_stacks)
10636 -#ifdef YYLSP_NEEDED
10642 + goto yyoverflowlab;
10644 if (yystacksize > YYMAXDEPTH)
10645 yystacksize = YYMAXDEPTH;
10646 -#ifndef YYSTACK_USE_ALLOCA
10647 - yyfree_stacks = 1;
10649 - yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
10650 - __yy_memcpy ((char *)yyss, (char *)yyss1,
10651 - size * (unsigned int) sizeof (*yyssp));
10652 - yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
10653 - __yy_memcpy ((char *)yyvs, (char *)yyvs1,
10654 - size * (unsigned int) sizeof (*yyvsp));
10655 -#ifdef YYLSP_NEEDED
10656 - yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
10657 - __yy_memcpy ((char *)yyls, (char *)yyls1,
10658 - size * (unsigned int) sizeof (*yylsp));
10662 + short *yyss1 = yyss;
10663 + union yyalloc *yyptr =
10664 + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
10666 + goto yyoverflowlab;
10667 + YYSTACK_RELOCATE (yyss);
10668 + YYSTACK_RELOCATE (yyvs);
10670 + YYSTACK_RELOCATE (yyls);
10672 +# undef YYSTACK_RELOCATE
10673 + if (yyss1 != yyssa)
10674 + YYSTACK_FREE (yyss1);
10677 #endif /* no yyoverflow */
10679 - yyssp = yyss + size - 1;
10680 - yyvsp = yyvs + size - 1;
10681 -#ifdef YYLSP_NEEDED
10682 - yylsp = yyls + size - 1;
10683 + yyssp = yyss + yysize - 1;
10684 + yyvsp = yyvs + yysize - 1;
10686 + yylsp = yyls + yysize - 1;
10691 - fprintf(stderr, "Stack size increased to %d\n", yystacksize);
10693 + YYDPRINTF ((stderr, "Stack size increased to %lu\n",
10694 + (unsigned long int) yystacksize));
10696 if (yyssp >= yyss + yystacksize - 1)
10702 - fprintf(stderr, "Entering state %d\n", yystate);
10704 + YYDPRINTF ((stderr, "Entering state %d\n", yystate));
10715 /* Do appropriate processing given the current state. */
10716 /* Read a lookahead token if we need one and don't already have one. */
10717 @@ -728,10 +867,7 @@
10719 if (yychar == YYEMPTY)
10723 - fprintf(stderr, "Reading a token: ");
10725 + YYDPRINTF ((stderr, "Reading a token: "));
10729 @@ -742,25 +878,25 @@
10731 yychar = YYEOF; /* Don't call YYLEX any more */
10735 - fprintf(stderr, "Now at end of input.\n");
10737 + YYDPRINTF ((stderr, "Now at end of input.\n"));
10741 - yychar1 = YYTRANSLATE(yychar);
10742 + yychar1 = YYTRANSLATE (yychar);
10746 + /* We have to keep this `#if YYDEBUG', since we use variables
10747 + which are defined only if `YYDEBUG' is set. */
10750 - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
10751 - /* Give the individual parser a way to print the precise meaning
10752 - of a token, for further debugging info. */
10754 + YYFPRINTF (stderr, "Next token is %d (%s",
10755 + yychar, yytname[yychar1]);
10756 + /* Give the individual parser a way to print the precise
10757 + meaning of a token, for further debugging info. */
10759 YYPRINT (stderr, yychar, yylval);
10761 - fprintf (stderr, ")\n");
10763 + YYFPRINTF (stderr, ")\n");
10767 @@ -792,177 +928,185 @@
10770 /* Shift the lookahead token. */
10774 - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
10776 + YYDPRINTF ((stderr, "Shifting token %d (%s), ",
10777 + yychar, yytname[yychar1]));
10779 /* Discard the token being shifted unless it is eof. */
10780 if (yychar != YYEOF)
10784 -#ifdef YYLSP_NEEDED
10789 - /* count tokens shifted since error; after three, turn off error status. */
10790 - if (yyerrstatus) yyerrstatus--;
10791 + /* Count tokens shifted since error; after three, turn off error
10799 -/* Do the default action for the current state. */
10802 +/*-----------------------------------------------------------.
10803 +| yydefault -- do the default action for the current state. |
10804 +`-----------------------------------------------------------*/
10806 yyn = yydefact[yystate];
10811 -/* Do a reduction. yyn is the number of a rule to reduce with. */
10813 +/*-----------------------------.
10814 +| yyreduce -- Do a reduction. |
10815 +`-----------------------------*/
10817 + /* yyn is the number of a rule to reduce with. */
10820 - yyval = yyvsp[1-yylen]; /* implement default value of the action */
10823 + /* If YYLEN is nonzero, implement the default value of the action:
10826 + Otherwise, the following line sets YYVAL to the semantic value of
10827 + the lookahead token. This behavior is undocumented and Bison
10828 + users should not rely upon it. Assigning to YYVAL
10829 + unconditionally makes the parser a bit smaller, and it avoids a
10830 + GCC warning that YYVAL may be used uninitialized. */
10831 + yyval = yyvsp[1-yylen];
10834 + /* Similarly for the default location. Let the user run additional
10835 + commands if for instance locations are ranges. */
10836 + yyloc = yylsp[1-yylen];
10837 + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
10841 + /* We have to keep this `#if YYDEBUG', since we use variables which
10842 + are defined only if `YYDEBUG' is set. */
10848 - fprintf (stderr, "Reducing via rule %d (line %d), ",
10849 - yyn, yyrline[yyn]);
10850 + YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
10851 + yyn, yyrline[yyn]);
10853 /* Print the symbols being reduced, and their result. */
10854 - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
10855 - fprintf (stderr, "%s ", yytname[yyrhs[i]]);
10856 - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
10857 + for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
10858 + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
10859 + YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
10867 -#line 178 "plural.y"
10868 +#line 151 "plural.y"
10870 if (yyvsp[0].exp == NULL)
10872 ((struct parse_args *) arg)->res = yyvsp[0].exp;
10878 -#line 186 "plural.y"
10879 +#line 159 "plural.y"
10881 yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
10887 -#line 190 "plural.y"
10888 +#line 163 "plural.y"
10890 yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
10896 -#line 194 "plural.y"
10897 +#line 167 "plural.y"
10899 yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
10905 -#line 198 "plural.y"
10906 +#line 171 "plural.y"
10908 yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
10914 -#line 202 "plural.y"
10915 +#line 175 "plural.y"
10917 yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
10923 -#line 206 "plural.y"
10924 +#line 179 "plural.y"
10926 yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
10932 -#line 210 "plural.y"
10933 +#line 183 "plural.y"
10935 yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
10941 -#line 214 "plural.y"
10942 +#line 187 "plural.y"
10944 yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
10950 -#line 218 "plural.y"
10951 +#line 191 "plural.y"
10953 yyval.exp = new_exp_0 (var);
10959 -#line 222 "plural.y"
10960 +#line 195 "plural.y"
10962 if ((yyval.exp = new_exp_0 (num)) != NULL)
10963 yyval.exp->val.num = yyvsp[0].num;
10969 -#line 227 "plural.y"
10970 +#line 200 "plural.y"
10972 yyval.exp = yyvsp[-1].exp;
10978 - /* the action file gets copied in in place of this dollarsign */
10979 -#line 543 "/usr/share/bison/bison.simple"
10981 +#line 705 "/usr/local/share/bison/bison.simple"
10986 -#ifdef YYLSP_NEEDED
10995 - short *ssp1 = yyss - 1;
10996 - fprintf (stderr, "state stack now");
10997 - while (ssp1 != yyssp)
10998 - fprintf (stderr, " %d", *++ssp1);
10999 - fprintf (stderr, "\n");
11000 + short *yyssp1 = yyss - 1;
11001 + YYFPRINTF (stderr, "state stack now");
11002 + while (yyssp1 != yyssp)
11003 + YYFPRINTF (stderr, " %d", *++yyssp1);
11004 + YYFPRINTF (stderr, "\n");
11010 -#ifdef YYLSP_NEEDED
11014 - yylsp->first_line = yylloc.first_line;
11015 - yylsp->first_column = yylloc.first_column;
11016 - yylsp->last_line = (yylsp-1)->last_line;
11017 - yylsp->last_column = (yylsp-1)->last_column;
11022 - yylsp->last_line = (yylsp+yylen-1)->last_line;
11023 - yylsp->last_column = (yylsp+yylen-1)->last_column;
11026 + *++yylsp = yyloc;
11029 - /* Now "shift" the result of the reduction.
11030 - Determine what state that goes to,
11031 - based on the state we popped back to
11032 - and the rule number reduced by. */
11033 + /* Now `shift' the result of the reduction. Determine what state
11034 + that goes to, based on the state we popped back to and the rule
11035 + number reduced by. */
11039 @@ -974,10 +1118,13 @@
11043 -yyerrlab: /* here on detecting error */
11045 - if (! yyerrstatus)
11046 - /* If not already recovering from an error, report this error. */
11047 +/*------------------------------------.
11048 +| yyerrlab -- here on detecting error |
11049 +`------------------------------------*/
11051 + /* If not already recovering from an error, report this error. */
11052 + if (!yyerrstatus)
11056 @@ -986,102 +1133,121 @@
11058 if (yyn > YYFLAG && yyn < YYLAST)
11063 + YYSIZE_T yysize = 0;
11065 + int yyx, yycount;
11068 - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
11069 - for (x = (yyn < 0 ? -yyn : 0);
11070 - x < (sizeof(yytname) / sizeof(char *)); x++)
11071 - if (yycheck[x + yyn] == x)
11072 - size += strlen(yytname[x]) + 15, count++;
11073 - msg = (char *) malloc(size + 15);
11076 + /* Start YYX at -YYN if negative to avoid negative indexes in
11078 + for (yyx = yyn < 0 ? -yyn : 0;
11079 + yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
11080 + if (yycheck[yyx + yyn] == yyx)
11081 + yysize += yystrlen (yytname[yyx]) + 15, yycount++;
11082 + yysize += yystrlen ("parse error, unexpected ") + 1;
11083 + yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
11084 + yymsg = (char *) YYSTACK_ALLOC (yysize);
11087 - strcpy(msg, "parse error");
11088 + char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
11089 + yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
11095 - for (x = (yyn < 0 ? -yyn : 0);
11096 - x < (sizeof(yytname) / sizeof(char *)); x++)
11097 - if (yycheck[x + yyn] == x)
11099 + for (yyx = yyn < 0 ? -yyn : 0;
11100 + yyx < (int) (sizeof (yytname) / sizeof (char *));
11102 + if (yycheck[yyx + yyn] == yyx)
11104 - strcat(msg, count == 0 ? ", expecting `" : " or `");
11105 - strcat(msg, yytname[x]);
11106 - strcat(msg, "'");
11108 + const char *yyq = ! yycount ? ", expecting " : " or ";
11109 + yyp = yystpcpy (yyp, yyq);
11110 + yyp = yystpcpy (yyp, yytname[yyx]);
11117 + YYSTACK_FREE (yymsg);
11120 - yyerror ("parse error; also virtual memory exceeded");
11121 + yyerror ("parse error; also virtual memory exhausted");
11124 -#endif /* YYERROR_VERBOSE */
11125 - yyerror("parse error");
11126 +#endif /* defined (YYERROR_VERBOSE) */
11127 + yyerror ("parse error");
11131 -yyerrlab1: /* here on error raised explicitly by an action */
11134 +/*--------------------------------------------------.
11135 +| yyerrlab1 -- error raised explicitly by an action |
11136 +`--------------------------------------------------*/
11138 if (yyerrstatus == 3)
11140 - /* if just tried and failed to reuse lookahead token after an error, discard it. */
11141 + /* If just tried and failed to reuse lookahead token after an
11142 + error, discard it. */
11144 /* return failure if at end of input */
11145 if (yychar == YYEOF)
11150 - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
11153 + YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
11154 + yychar, yytname[yychar1]));
11158 - /* Else will try to reuse lookahead token
11159 - after shifting the error token. */
11160 + /* Else will try to reuse lookahead token after shifting the error
11163 yyerrstatus = 3; /* Each real token shifted decrements this */
11167 -yyerrdefault: /* current state does not do anything special for the error token. */
11169 +/*-------------------------------------------------------------------.
11170 +| yyerrdefault -- current state does not do anything special for the |
11172 +`-------------------------------------------------------------------*/
11175 /* This is wrong; only states that explicitly want error tokens
11176 should shift them. */
11177 - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
11178 - if (yyn) goto yydefault;
11180 + /* If its default is to accept any token, ok. Otherwise pop it. */
11181 + yyn = yydefact[yystate];
11186 -yyerrpop: /* pop the current state because it cannot handle the error token */
11188 - if (yyssp == yyss) YYABORT;
11189 +/*---------------------------------------------------------------.
11190 +| yyerrpop -- pop the current state because it cannot handle the |
11192 +`---------------------------------------------------------------*/
11194 + if (yyssp == yyss)
11197 yystate = *--yyssp;
11198 -#ifdef YYLSP_NEEDED
11207 - short *ssp1 = yyss - 1;
11208 - fprintf (stderr, "Error: state stack now");
11209 - while (ssp1 != yyssp)
11210 - fprintf (stderr, " %d", *++ssp1);
11211 - fprintf (stderr, "\n");
11212 + short *yyssp1 = yyss - 1;
11213 + YYFPRINTF (stderr, "Error: state stack now");
11214 + while (yyssp1 != yyssp)
11215 + YYFPRINTF (stderr, " %d", *++yyssp1);
11216 + YYFPRINTF (stderr, "\n");
11225 yyn = yypact[yystate];
11228 @@ -1104,50 +1270,52 @@
11229 if (yyn == YYFINAL)
11234 - fprintf(stderr, "Shifting error token, ");
11236 + YYDPRINTF ((stderr, "Shifting error token, "));
11239 -#ifdef YYLSP_NEEDED
11248 - /* YYACCEPT comes here. */
11249 - if (yyfree_stacks)
11253 -#ifdef YYLSP_NEEDED
11260 - /* YYABORT comes here. */
11261 - if (yyfree_stacks)
11265 -#ifdef YYLSP_NEEDED
11267 +/*-------------------------------------.
11268 +| yyacceptlab -- YYACCEPT comes here. |
11269 +`-------------------------------------*/
11274 +/*-----------------------------------.
11275 +| yyabortlab -- YYABORT comes here. |
11276 +`-----------------------------------*/
11281 +/*---------------------------------------------.
11282 +| yyoverflowab -- parser overflow comes here. |
11283 +`---------------------------------------------*/
11285 + yyerror ("parser stack overflow");
11287 + /* Fall through. */
11290 +#ifndef yyoverflow
11291 + if (yyss != yyssa)
11292 + YYSTACK_FREE (yyss);
11298 -#line 232 "plural.y"
11299 +#line 205 "plural.y"
11304 -FREE_EXPRESSION (exp)
11305 - struct expression *exp;
11306 +FREE_EXPRESSION (struct expression *exp)
11310 @@ -1173,9 +1341,7 @@
11314 -yylex (lval, pexp)
11316 - const char **pexp;
11317 +yylex (YYSTYPE *lval, const char **pexp)
11319 const char *exp = *pexp;
11321 @@ -1318,8 +1484,7 @@
11327 +yyerror (const char *str)
11329 /* Do nothing. We don't print error messages here. */
11331 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/plural.y psmisc-20.2.works.clean/intl/plural.y
11332 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/plural.y 2001-04-13 23:00:43.000000000 -0500
11333 +++ psmisc-20.2.works.clean/intl/plural.y 2004-10-13 15:18:41.000000000 -0500
11336 /* Expression parsing for plural form selection.
11337 - Copyright (C) 2000, 2001 Free Software Foundation, Inc.
11338 + Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
11339 Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
11341 - This program is free software; you can redistribute it and/or modify
11342 - it under the terms of the GNU General Public License as published by
11343 - the Free Software Foundation; either version 2, or (at your option)
11344 + This program is free software; you can redistribute it and/or modify it
11345 + under the terms of the GNU Library General Public License as published
11346 + by the Free Software Foundation; either version 2, or (at your option)
11349 This program is distributed in the hope that it will be useful,
11350 but WITHOUT ANY WARRANTY; without even the implied warranty of
11351 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11352 - GNU General Public License for more details.
11353 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11354 + Library General Public License for more details.
11356 - You should have received a copy of the GNU General Public License
11357 - along with this program; if not, write to the Free Software Foundation,
11358 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
11359 + You should have received a copy of the GNU Library General Public
11360 + License along with this program; if not, write to the Free Software
11361 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
11364 /* The bison generated parser uses alloca. AIX 3 forces us to put this
11365 declaration at the beginning of the file. The declaration in bison's
11366 @@ -29,25 +30,21 @@
11367 # include <config.h>
11370 +#include <stddef.h>
11371 #include <stdlib.h>
11372 -#include "gettextP.h"
11373 +#include "plural-exp.h"
11375 -/* Names for the libintl functions are a problem. They must not clash
11376 - with existing names and they should follow ANSI C. But this source
11377 - code is also used in GNU C Library where the names have a __
11378 - prefix. So we have to make a difference here. */
11380 -# define FREE_EXPRESSION __gettext_free_exp
11382 -# define FREE_EXPRESSION gettext_free_exp__
11383 -# define __gettextparse gettextparse__
11384 +/* The main function generated by the parser is called __gettextparse,
11385 + but we want it to be called PLURAL_PARSE. */
11387 +# define __gettextparse PLURAL_PARSE
11390 #define YYLEX_PARAM &((struct parse_args *) arg)->cp
11391 #define YYPARSE_PARAM arg
11398 unsigned long int num;
11399 @@ -57,28 +54,13 @@
11402 /* Prototypes for local functions. */
11403 -static struct expression *new_exp PARAMS ((int nargs, enum operator op,
11404 - struct expression * const *args));
11405 -static inline struct expression *new_exp_0 PARAMS ((enum operator op));
11406 -static inline struct expression *new_exp_1 PARAMS ((enum operator op,
11407 - struct expression *right));
11408 -static struct expression *new_exp_2 PARAMS ((enum operator op,
11409 - struct expression *left,
11410 - struct expression *right));
11411 -static inline struct expression *new_exp_3 PARAMS ((enum operator op,
11412 - struct expression *bexp,
11413 - struct expression *tbranch,
11414 - struct expression *fbranch));
11415 -static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
11416 -static void yyerror PARAMS ((const char *str));
11417 +static int yylex (YYSTYPE *lval, const char **pexp);
11418 +static void yyerror (const char *str);
11420 /* Allocation of expressions. */
11422 static struct expression *
11423 -new_exp (nargs, op, args)
11425 - enum operator op;
11426 - struct expression * const *args;
11427 +new_exp (int nargs, enum operator op, struct expression * const *args)
11430 struct expression *newp;
11431 @@ -107,16 +89,13 @@
11434 static inline struct expression *
11436 - enum operator op;
11437 +new_exp_0 (enum operator op)
11439 return new_exp (0, op, NULL);
11442 static inline struct expression *
11443 -new_exp_1 (op, right)
11444 - enum operator op;
11445 - struct expression *right;
11446 +new_exp_1 (enum operator op, struct expression *right)
11448 struct expression *args[1];
11450 @@ -125,10 +104,7 @@
11453 static struct expression *
11454 -new_exp_2 (op, left, right)
11455 - enum operator op;
11456 - struct expression *left;
11457 - struct expression *right;
11458 +new_exp_2 (enum operator op, struct expression *left, struct expression *right)
11460 struct expression *args[2];
11462 @@ -138,11 +114,8 @@
11465 static inline struct expression *
11466 -new_exp_3 (op, bexp, tbranch, fbranch)
11467 - enum operator op;
11468 - struct expression *bexp;
11469 - struct expression *tbranch;
11470 - struct expression *fbranch;
11471 +new_exp_3 (enum operator op, struct expression *bexp,
11472 + struct expression *tbranch, struct expression *fbranch)
11474 struct expression *args[3];
11476 @@ -233,8 +206,7 @@
11480 -FREE_EXPRESSION (exp)
11481 - struct expression *exp;
11482 +FREE_EXPRESSION (struct expression *exp)
11486 @@ -260,9 +232,7 @@
11490 -yylex (lval, pexp)
11492 - const char **pexp;
11493 +yylex (YYSTYPE *lval, const char **pexp)
11495 const char *exp = *pexp;
11497 @@ -405,8 +375,7 @@
11503 +yyerror (const char *str)
11505 /* Do nothing. We don't print error messages here. */
11507 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf-args.c psmisc-20.2.works.clean/intl/printf-args.c
11508 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf-args.c 1969-12-31 18:00:00.000000000 -0600
11509 +++ psmisc-20.2.works.clean/intl/printf-args.c 2004-10-13 15:18:41.000000000 -0500
11511 +/* Decomposed printf argument list.
11512 + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
11514 + This program is free software; you can redistribute it and/or modify it
11515 + under the terms of the GNU Library General Public License as published
11516 + by the Free Software Foundation; either version 2, or (at your option)
11517 + any later version.
11519 + This program is distributed in the hope that it will be useful,
11520 + but WITHOUT ANY WARRANTY; without even the implied warranty of
11521 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11522 + Library General Public License for more details.
11524 + You should have received a copy of the GNU Library General Public
11525 + License along with this program; if not, write to the Free Software
11526 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
11529 +#ifdef HAVE_CONFIG_H
11530 +# include <config.h>
11533 +/* Specification. */
11534 +#include "printf-args.h"
11540 +printf_fetchargs (va_list args, arguments *a)
11545 + for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
11546 + switch (ap->type)
11549 + ap->a.a_schar = va_arg (args, /*signed char*/ int);
11552 + ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
11555 + ap->a.a_short = va_arg (args, /*short*/ int);
11557 + case TYPE_USHORT:
11558 + ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
11561 + ap->a.a_int = va_arg (args, int);
11564 + ap->a.a_uint = va_arg (args, unsigned int);
11566 + case TYPE_LONGINT:
11567 + ap->a.a_longint = va_arg (args, long int);
11569 + case TYPE_ULONGINT:
11570 + ap->a.a_ulongint = va_arg (args, unsigned long int);
11572 +#ifdef HAVE_LONG_LONG
11573 + case TYPE_LONGLONGINT:
11574 + ap->a.a_longlongint = va_arg (args, long long int);
11576 + case TYPE_ULONGLONGINT:
11577 + ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
11580 + case TYPE_DOUBLE:
11581 + ap->a.a_double = va_arg (args, double);
11583 +#ifdef HAVE_LONG_DOUBLE
11584 + case TYPE_LONGDOUBLE:
11585 + ap->a.a_longdouble = va_arg (args, long double);
11589 + ap->a.a_char = va_arg (args, int);
11591 +#ifdef HAVE_WINT_T
11592 + case TYPE_WIDE_CHAR:
11593 + ap->a.a_wide_char = va_arg (args, wint_t);
11596 + case TYPE_STRING:
11597 + ap->a.a_string = va_arg (args, const char *);
11599 +#ifdef HAVE_WCHAR_T
11600 + case TYPE_WIDE_STRING:
11601 + ap->a.a_wide_string = va_arg (args, const wchar_t *);
11604 + case TYPE_POINTER:
11605 + ap->a.a_pointer = va_arg (args, void *);
11607 + case TYPE_COUNT_SCHAR_POINTER:
11608 + ap->a.a_count_schar_pointer = va_arg (args, signed char *);
11610 + case TYPE_COUNT_SHORT_POINTER:
11611 + ap->a.a_count_short_pointer = va_arg (args, short *);
11613 + case TYPE_COUNT_INT_POINTER:
11614 + ap->a.a_count_int_pointer = va_arg (args, int *);
11616 + case TYPE_COUNT_LONGINT_POINTER:
11617 + ap->a.a_count_longint_pointer = va_arg (args, long int *);
11619 +#ifdef HAVE_LONG_LONG
11620 + case TYPE_COUNT_LONGLONGINT_POINTER:
11621 + ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
11625 + /* Unknown type. */
11630 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf-args.h psmisc-20.2.works.clean/intl/printf-args.h
11631 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf-args.h 1969-12-31 18:00:00.000000000 -0600
11632 +++ psmisc-20.2.works.clean/intl/printf-args.h 2004-10-13 15:18:41.000000000 -0500
11634 +/* Decomposed printf argument list.
11635 + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
11637 + This program is free software; you can redistribute it and/or modify it
11638 + under the terms of the GNU Library General Public License as published
11639 + by the Free Software Foundation; either version 2, or (at your option)
11640 + any later version.
11642 + This program is distributed in the hope that it will be useful,
11643 + but WITHOUT ANY WARRANTY; without even the implied warranty of
11644 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11645 + Library General Public License for more details.
11647 + You should have received a copy of the GNU Library General Public
11648 + License along with this program; if not, write to the Free Software
11649 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
11652 +#ifndef _PRINTF_ARGS_H
11653 +#define _PRINTF_ARGS_H
11656 +#include <stddef.h>
11658 +/* Get wchar_t. */
11659 +#ifdef HAVE_WCHAR_T
11660 +# include <stddef.h>
11664 +#ifdef HAVE_WINT_T
11665 +# include <wchar.h>
11668 +/* Get va_list. */
11669 +#include <stdarg.h>
11672 +/* Argument types */
11684 +#ifdef HAVE_LONG_LONG
11685 + TYPE_LONGLONGINT,
11686 + TYPE_ULONGLONGINT,
11689 +#ifdef HAVE_LONG_DOUBLE
11693 +#ifdef HAVE_WINT_T
11697 +#ifdef HAVE_WCHAR_T
11698 + TYPE_WIDE_STRING,
11701 + TYPE_COUNT_SCHAR_POINTER,
11702 + TYPE_COUNT_SHORT_POINTER,
11703 + TYPE_COUNT_INT_POINTER,
11704 + TYPE_COUNT_LONGINT_POINTER
11705 +#ifdef HAVE_LONG_LONG
11706 +, TYPE_COUNT_LONGLONGINT_POINTER
11710 +/* Polymorphic argument */
11716 + signed char a_schar;
11717 + unsigned char a_uchar;
11719 + unsigned short a_ushort;
11721 + unsigned int a_uint;
11722 + long int a_longint;
11723 + unsigned long int a_ulongint;
11724 +#ifdef HAVE_LONG_LONG
11725 + long long int a_longlongint;
11726 + unsigned long long int a_ulonglongint;
11730 +#ifdef HAVE_LONG_DOUBLE
11731 + long double a_longdouble;
11734 +#ifdef HAVE_WINT_T
11735 + wint_t a_wide_char;
11737 + const char* a_string;
11738 +#ifdef HAVE_WCHAR_T
11739 + const wchar_t* a_wide_string;
11742 + signed char * a_count_schar_pointer;
11743 + short * a_count_short_pointer;
11744 + int * a_count_int_pointer;
11745 + long int * a_count_longint_pointer;
11746 +#ifdef HAVE_LONG_LONG
11747 + long long int * a_count_longlongint_pointer;
11762 +/* Fetch the arguments, putting them into a. */
11768 +int printf_fetchargs (va_list args, arguments *a);
11770 +#endif /* _PRINTF_ARGS_H */
11771 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf-parse.c psmisc-20.2.works.clean/intl/printf-parse.c
11772 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf-parse.c 1969-12-31 18:00:00.000000000 -0600
11773 +++ psmisc-20.2.works.clean/intl/printf-parse.c 2004-10-13 15:18:41.000000000 -0500
11775 +/* Formatted output to strings.
11776 + Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.
11778 + This program is free software; you can redistribute it and/or modify it
11779 + under the terms of the GNU Library General Public License as published
11780 + by the Free Software Foundation; either version 2, or (at your option)
11781 + any later version.
11783 + This program is distributed in the hope that it will be useful,
11784 + but WITHOUT ANY WARRANTY; without even the implied warranty of
11785 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11786 + Library General Public License for more details.
11788 + You should have received a copy of the GNU Library General Public
11789 + License along with this program; if not, write to the Free Software
11790 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
11793 +#ifdef HAVE_CONFIG_H
11794 +# include <config.h>
11797 +/* Specification. */
11798 +#if WIDE_CHAR_VERSION
11799 +# include "wprintf-parse.h"
11801 +# include "printf-parse.h"
11804 +/* Get size_t, NULL. */
11805 +#include <stddef.h>
11807 +/* Get intmax_t. */
11808 +#if HAVE_STDINT_H_WITH_UINTMAX
11809 +# include <stdint.h>
11811 +#if HAVE_INTTYPES_H_WITH_UINTMAX
11812 +# include <inttypes.h>
11815 +/* malloc(), realloc(), free(). */
11816 +#include <stdlib.h>
11818 +/* Checked size_t computations. */
11819 +#include "xsize.h"
11821 +#if WIDE_CHAR_VERSION
11822 +# define PRINTF_PARSE wprintf_parse
11823 +# define CHAR_T wchar_t
11824 +# define DIRECTIVE wchar_t_directive
11825 +# define DIRECTIVES wchar_t_directives
11827 +# define PRINTF_PARSE printf_parse
11828 +# define CHAR_T char
11829 +# define DIRECTIVE char_directive
11830 +# define DIRECTIVES char_directives
11837 +PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
11839 + const CHAR_T *cp = format; /* pointer into format */
11840 + size_t arg_posn = 0; /* number of regular arguments consumed */
11841 + size_t d_allocated; /* allocated elements of d->dir */
11842 + size_t a_allocated; /* allocated elements of a->arg */
11843 + size_t max_width_length = 0;
11844 + size_t max_precision_length = 0;
11848 + d->dir = malloc (d_allocated * sizeof (DIRECTIVE));
11849 + if (d->dir == NULL)
11850 + /* Out of memory. */
11857 +#define REGISTER_ARG(_index_,_type_) \
11859 + size_t n = (_index_); \
11860 + if (n >= a_allocated) \
11862 + size_t memory_size; \
11863 + argument *memory; \
11865 + a_allocated = xtimes (a_allocated, 2); \
11866 + if (a_allocated <= n) \
11867 + a_allocated = xsum (n, 1); \
11868 + memory_size = xtimes (a_allocated, sizeof (argument)); \
11869 + if (size_overflow_p (memory_size)) \
11870 + /* Overflow, would lead to out of memory. */ \
11872 + memory = (a->arg \
11873 + ? realloc (a->arg, memory_size) \
11874 + : malloc (memory_size)); \
11875 + if (memory == NULL) \
11876 + /* Out of memory. */ \
11878 + a->arg = memory; \
11880 + while (a->count <= n) \
11881 + a->arg[a->count++].type = TYPE_NONE; \
11882 + if (a->arg[n].type == TYPE_NONE) \
11883 + a->arg[n].type = (_type_); \
11884 + else if (a->arg[n].type != (_type_)) \
11885 + /* Ambiguous type for positional argument. */ \
11889 + while (*cp != '\0')
11891 + CHAR_T c = *cp++;
11894 + size_t arg_index = ARG_NONE;
11895 + DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
11897 + /* Initialize the next directive. */
11898 + dp->dir_start = cp - 1;
11900 + dp->width_start = NULL;
11901 + dp->width_end = NULL;
11902 + dp->width_arg_index = ARG_NONE;
11903 + dp->precision_start = NULL;
11904 + dp->precision_end = NULL;
11905 + dp->precision_arg_index = ARG_NONE;
11906 + dp->arg_index = ARG_NONE;
11908 + /* Test for positional argument. */
11909 + if (*cp >= '0' && *cp <= '9')
11911 + const CHAR_T *np;
11913 + for (np = cp; *np >= '0' && *np <= '9'; np++)
11919 + for (np = cp; *np >= '0' && *np <= '9'; np++)
11920 + n = xsum (xtimes (n, 10), *np - '0');
11922 + /* Positional argument 0. */
11924 + if (size_overflow_p (n))
11925 + /* n too large, would lead to out of memory later. */
11927 + arg_index = n - 1;
11932 + /* Read the flags. */
11937 + dp->flags |= FLAG_GROUP;
11940 + else if (*cp == '-')
11942 + dp->flags |= FLAG_LEFT;
11945 + else if (*cp == '+')
11947 + dp->flags |= FLAG_SHOWSIGN;
11950 + else if (*cp == ' ')
11952 + dp->flags |= FLAG_SPACE;
11955 + else if (*cp == '#')
11957 + dp->flags |= FLAG_ALT;
11960 + else if (*cp == '0')
11962 + dp->flags |= FLAG_ZERO;
11969 + /* Parse the field width. */
11972 + dp->width_start = cp;
11974 + dp->width_end = cp;
11975 + if (max_width_length < 1)
11976 + max_width_length = 1;
11978 + /* Test for positional argument. */
11979 + if (*cp >= '0' && *cp <= '9')
11981 + const CHAR_T *np;
11983 + for (np = cp; *np >= '0' && *np <= '9'; np++)
11989 + for (np = cp; *np >= '0' && *np <= '9'; np++)
11990 + n = xsum (xtimes (n, 10), *np - '0');
11992 + /* Positional argument 0. */
11994 + if (size_overflow_p (n))
11995 + /* n too large, would lead to out of memory later. */
11997 + dp->width_arg_index = n - 1;
12001 + if (dp->width_arg_index == ARG_NONE)
12003 + dp->width_arg_index = arg_posn++;
12004 + if (dp->width_arg_index == ARG_NONE)
12005 + /* arg_posn wrapped around. */
12008 + REGISTER_ARG (dp->width_arg_index, TYPE_INT);
12010 + else if (*cp >= '0' && *cp <= '9')
12012 + size_t width_length;
12014 + dp->width_start = cp;
12015 + for (; *cp >= '0' && *cp <= '9'; cp++)
12017 + dp->width_end = cp;
12018 + width_length = dp->width_end - dp->width_start;
12019 + if (max_width_length < width_length)
12020 + max_width_length = width_length;
12023 + /* Parse the precision. */
12029 + dp->precision_start = cp - 1;
12031 + dp->precision_end = cp;
12032 + if (max_precision_length < 2)
12033 + max_precision_length = 2;
12035 + /* Test for positional argument. */
12036 + if (*cp >= '0' && *cp <= '9')
12038 + const CHAR_T *np;
12040 + for (np = cp; *np >= '0' && *np <= '9'; np++)
12046 + for (np = cp; *np >= '0' && *np <= '9'; np++)
12047 + n = xsum (xtimes (n, 10), *np - '0');
12049 + /* Positional argument 0. */
12051 + if (size_overflow_p (n))
12052 + /* n too large, would lead to out of memory
12055 + dp->precision_arg_index = n - 1;
12059 + if (dp->precision_arg_index == ARG_NONE)
12061 + dp->precision_arg_index = arg_posn++;
12062 + if (dp->precision_arg_index == ARG_NONE)
12063 + /* arg_posn wrapped around. */
12066 + REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
12070 + size_t precision_length;
12072 + dp->precision_start = cp - 1;
12073 + for (; *cp >= '0' && *cp <= '9'; cp++)
12075 + dp->precision_end = cp;
12076 + precision_length = dp->precision_end - dp->precision_start;
12077 + if (max_precision_length < precision_length)
12078 + max_precision_length = precision_length;
12085 + /* Parse argument type/size specifiers. */
12093 + flags |= (1 << (flags & 1));
12096 + else if (*cp == 'L')
12101 + else if (*cp == 'l')
12106 +#ifdef HAVE_INTMAX_T
12107 + else if (*cp == 'j')
12109 + if (sizeof (intmax_t) > sizeof (long))
12111 + /* intmax_t = long long */
12114 + else if (sizeof (intmax_t) > sizeof (int))
12116 + /* intmax_t = long */
12122 + else if (*cp == 'z' || *cp == 'Z')
12124 + /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
12125 + because the warning facility in gcc-2.95.2 understands
12126 + only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
12127 + if (sizeof (size_t) > sizeof (long))
12129 + /* size_t = long long */
12132 + else if (sizeof (size_t) > sizeof (int))
12134 + /* size_t = long */
12139 + else if (*cp == 't')
12141 + if (sizeof (ptrdiff_t) > sizeof (long))
12143 + /* ptrdiff_t = long long */
12146 + else if (sizeof (ptrdiff_t) > sizeof (int))
12148 + /* ptrdiff_t = long */
12157 + /* Read the conversion character. */
12161 + case 'd': case 'i':
12162 +#ifdef HAVE_LONG_LONG
12163 + if (flags >= 16 || (flags & 4))
12164 + type = TYPE_LONGLONGINT;
12168 + type = TYPE_LONGINT;
12169 + else if (flags & 2)
12170 + type = TYPE_SCHAR;
12171 + else if (flags & 1)
12172 + type = TYPE_SHORT;
12176 + case 'o': case 'u': case 'x': case 'X':
12177 +#ifdef HAVE_LONG_LONG
12178 + if (flags >= 16 || (flags & 4))
12179 + type = TYPE_ULONGLONGINT;
12183 + type = TYPE_ULONGINT;
12184 + else if (flags & 2)
12185 + type = TYPE_UCHAR;
12186 + else if (flags & 1)
12187 + type = TYPE_USHORT;
12189 + type = TYPE_UINT;
12191 + case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
12192 + case 'a': case 'A':
12193 +#ifdef HAVE_LONG_DOUBLE
12194 + if (flags >= 16 || (flags & 4))
12195 + type = TYPE_LONGDOUBLE;
12198 + type = TYPE_DOUBLE;
12202 +#ifdef HAVE_WINT_T
12203 + type = TYPE_WIDE_CHAR;
12208 + type = TYPE_CHAR;
12210 +#ifdef HAVE_WINT_T
12212 + type = TYPE_WIDE_CHAR;
12218 +#ifdef HAVE_WCHAR_T
12219 + type = TYPE_WIDE_STRING;
12224 + type = TYPE_STRING;
12226 +#ifdef HAVE_WCHAR_T
12228 + type = TYPE_WIDE_STRING;
12233 + type = TYPE_POINTER;
12236 +#ifdef HAVE_LONG_LONG
12237 + if (flags >= 16 || (flags & 4))
12238 + type = TYPE_COUNT_LONGLONGINT_POINTER;
12242 + type = TYPE_COUNT_LONGINT_POINTER;
12243 + else if (flags & 2)
12244 + type = TYPE_COUNT_SCHAR_POINTER;
12245 + else if (flags & 1)
12246 + type = TYPE_COUNT_SHORT_POINTER;
12248 + type = TYPE_COUNT_INT_POINTER;
12251 + type = TYPE_NONE;
12254 + /* Unknown conversion character. */
12259 + if (type != TYPE_NONE)
12261 + dp->arg_index = arg_index;
12262 + if (dp->arg_index == ARG_NONE)
12264 + dp->arg_index = arg_posn++;
12265 + if (dp->arg_index == ARG_NONE)
12266 + /* arg_posn wrapped around. */
12269 + REGISTER_ARG (dp->arg_index, type);
12271 + dp->conversion = c;
12272 + dp->dir_end = cp;
12276 + if (d->count >= d_allocated)
12278 + size_t memory_size;
12279 + DIRECTIVE *memory;
12281 + d_allocated = xtimes (d_allocated, 2);
12282 + memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
12283 + if (size_overflow_p (memory_size))
12284 + /* Overflow, would lead to out of memory. */
12286 + memory = realloc (d->dir, memory_size);
12287 + if (memory == NULL)
12288 + /* Out of memory. */
12294 + d->dir[d->count].dir_start = cp;
12296 + d->max_width_length = max_width_length;
12297 + d->max_precision_length = max_precision_length;
12311 +#undef PRINTF_PARSE
12312 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf-parse.h psmisc-20.2.works.clean/intl/printf-parse.h
12313 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf-parse.h 1969-12-31 18:00:00.000000000 -0600
12314 +++ psmisc-20.2.works.clean/intl/printf-parse.h 2004-10-13 15:18:41.000000000 -0500
12316 +/* Parse printf format string.
12317 + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
12319 + This program is free software; you can redistribute it and/or modify it
12320 + under the terms of the GNU Library General Public License as published
12321 + by the Free Software Foundation; either version 2, or (at your option)
12322 + any later version.
12324 + This program is distributed in the hope that it will be useful,
12325 + but WITHOUT ANY WARRANTY; without even the implied warranty of
12326 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12327 + Library General Public License for more details.
12329 + You should have received a copy of the GNU Library General Public
12330 + License along with this program; if not, write to the Free Software
12331 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12334 +#ifndef _PRINTF_PARSE_H
12335 +#define _PRINTF_PARSE_H
12337 +#include "printf-args.h"
12341 +#define FLAG_GROUP 1 /* ' flag */
12342 +#define FLAG_LEFT 2 /* - flag */
12343 +#define FLAG_SHOWSIGN 4 /* + flag */
12344 +#define FLAG_SPACE 8 /* space flag */
12345 +#define FLAG_ALT 16 /* # flag */
12346 +#define FLAG_ZERO 32
12348 +/* arg_index value indicating that no argument is consumed. */
12349 +#define ARG_NONE (~(size_t)0)
12351 +/* A parsed directive. */
12354 + const char* dir_start;
12355 + const char* dir_end;
12357 + const char* width_start;
12358 + const char* width_end;
12359 + size_t width_arg_index;
12360 + const char* precision_start;
12361 + const char* precision_end;
12362 + size_t precision_arg_index;
12363 + char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
12364 + size_t arg_index;
12368 +/* A parsed format string. */
12372 + char_directive *dir;
12373 + size_t max_width_length;
12374 + size_t max_precision_length;
12379 +/* Parses the format string. Fills in the number N of directives, and fills
12380 + in directives[0], ..., directives[N-1], and sets directives[N].dir_start
12381 + to the end of the format string. Also fills in the arg_type fields of the
12382 + arguments and the needed count of arguments. */
12388 +int printf_parse (const char *format, char_directives *d, arguments *a);
12390 +#endif /* _PRINTF_PARSE_H */
12391 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf.c psmisc-20.2.works.clean/intl/printf.c
12392 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/printf.c 1969-12-31 18:00:00.000000000 -0600
12393 +++ psmisc-20.2.works.clean/intl/printf.c 2004-10-13 15:18:42.000000000 -0500
12395 +/* Formatted output to strings, using POSIX/XSI format strings with positions.
12396 + Copyright (C) 2003 Free Software Foundation, Inc.
12397 + Written by Bruno Haible <bruno@clisp.org>, 2003.
12399 + This program is free software; you can redistribute it and/or modify it
12400 + under the terms of the GNU Library General Public License as published
12401 + by the Free Software Foundation; either version 2, or (at your option)
12402 + any later version.
12404 + This program is distributed in the hope that it will be useful,
12405 + but WITHOUT ANY WARRANTY; without even the implied warranty of
12406 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12407 + Library General Public License for more details.
12409 + You should have received a copy of the GNU Library General Public
12410 + License along with this program; if not, write to the Free Software
12411 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12414 +#ifdef HAVE_CONFIG_H
12415 +# include <config.h>
12419 +# define alloca __builtin_alloca
12420 +# define HAVE_ALLOCA 1
12423 +# include <malloc.h>
12424 +# define alloca _alloca
12426 +# if defined HAVE_ALLOCA_H || defined _LIBC
12427 +# include <alloca.h>
12440 +#include <stdio.h>
12442 +#if !HAVE_POSIX_PRINTF
12444 +#include <stdlib.h>
12445 +#include <string.h>
12447 +/* When building a DLL, we must export some functions. Note that because
12448 + the functions are only defined for binary backward compatibility, we
12449 + don't need to use __declspec(dllimport) in any case. */
12450 +#if defined _MSC_VER && BUILDING_DLL
12451 +# define DLL_EXPORTED __declspec(dllexport)
12453 +# define DLL_EXPORTED
12456 +#define STATIC static
12458 +/* Define auxiliary functions declared in "printf-args.h". */
12459 +#include "printf-args.c"
12461 +/* Define auxiliary functions declared in "printf-parse.h". */
12462 +#include "printf-parse.c"
12464 +/* Define functions declared in "vasnprintf.h". */
12465 +#define vasnprintf libintl_vasnprintf
12466 +#include "vasnprintf.c"
12467 +#if 0 /* not needed */
12468 +#define asnprintf libintl_asnprintf
12469 +#include "asnprintf.c"
12474 +libintl_vfprintf (FILE *stream, const char *format, va_list args)
12476 + if (strchr (format, '$') == NULL)
12477 + return vfprintf (stream, format, args);
12481 + char *result = libintl_vasnprintf (NULL, &length, format, args);
12483 + if (result != NULL)
12485 + if (fwrite (result, 1, length, stream) == length)
12495 +libintl_fprintf (FILE *stream, const char *format, ...)
12500 + va_start (args, format);
12501 + retval = libintl_vfprintf (stream, format, args);
12508 +libintl_vprintf (const char *format, va_list args)
12510 + return libintl_vfprintf (stdout, format, args);
12515 +libintl_printf (const char *format, ...)
12520 + va_start (args, format);
12521 + retval = libintl_vprintf (format, args);
12528 +libintl_vsprintf (char *resultbuf, const char *format, va_list args)
12530 + if (strchr (format, '$') == NULL)
12531 + return vsprintf (resultbuf, format, args);
12534 + size_t length = (size_t) ~0 / (4 * sizeof (char));
12535 + char *result = libintl_vasnprintf (resultbuf, &length, format, args);
12536 + if (result != resultbuf)
12548 +libintl_sprintf (char *resultbuf, const char *format, ...)
12553 + va_start (args, format);
12554 + retval = libintl_vsprintf (resultbuf, format, args);
12561 +# if HAVE_DECL__SNPRINTF
12563 +# define system_vsnprintf _vsnprintf
12566 +# define system_vsnprintf vsnprintf
12571 +libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args)
12573 + if (strchr (format, '$') == NULL)
12574 + return system_vsnprintf (resultbuf, length, format, args);
12577 + size_t maxlength = length;
12578 + char *result = libintl_vasnprintf (resultbuf, &length, format, args);
12579 + if (result != resultbuf)
12581 + if (maxlength > 0)
12583 + if (length < maxlength)
12585 + memcpy (resultbuf, result, maxlength - 1);
12586 + resultbuf[maxlength - 1] = '\0';
12598 +libintl_snprintf (char *resultbuf, size_t length, const char *format, ...)
12603 + va_start (args, format);
12604 + retval = libintl_vsnprintf (resultbuf, length, format, args);
12615 +libintl_vasprintf (char **resultp, const char *format, va_list args)
12618 + char *result = libintl_vasnprintf (NULL, &length, format, args);
12619 + if (result == NULL)
12621 + *resultp = result;
12627 +libintl_asprintf (char **resultp, const char *format, ...)
12632 + va_start (args, format);
12633 + retval = libintl_vasprintf (resultp, format, args);
12642 +#include <wchar.h>
12644 +#define WIDE_CHAR_VERSION 1
12646 +/* Define auxiliary functions declared in "wprintf-parse.h". */
12647 +#include "printf-parse.c"
12649 +/* Define functions declared in "vasnprintf.h". */
12650 +#define vasnwprintf libintl_vasnwprintf
12651 +#include "vasnprintf.c"
12652 +#if 0 /* not needed */
12653 +#define asnwprintf libintl_asnwprintf
12654 +#include "asnprintf.c"
12657 +# if HAVE_DECL__SNWPRINTF
12659 +# define system_vswprintf _vsnwprintf
12662 +# define system_vswprintf vswprintf
12667 +libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args)
12669 + if (wcschr (format, '$') == NULL)
12670 + return vfwprintf (stream, format, args);
12674 + wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args);
12676 + if (result != NULL)
12679 + for (i = 0; i < length; i++)
12680 + if (fputwc (result[i], stream) == WEOF)
12692 +libintl_fwprintf (FILE *stream, const wchar_t *format, ...)
12697 + va_start (args, format);
12698 + retval = libintl_vfwprintf (stream, format, args);
12705 +libintl_vwprintf (const wchar_t *format, va_list args)
12707 + return libintl_vfwprintf (stdout, format, args);
12712 +libintl_wprintf (const wchar_t *format, ...)
12717 + va_start (args, format);
12718 + retval = libintl_vwprintf (format, args);
12725 +libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args)
12727 + if (wcschr (format, '$') == NULL)
12728 + return system_vswprintf (resultbuf, length, format, args);
12731 + size_t maxlength = length;
12732 + wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args);
12733 + if (result != resultbuf)
12735 + if (maxlength > 0)
12737 + if (length < maxlength)
12739 + memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t));
12740 + resultbuf[maxlength - 1] = 0;
12752 +libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...)
12757 + va_start (args, format);
12758 + retval = libintl_vswprintf (resultbuf, length, format, args);
12766 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/relocatable.c psmisc-20.2.works.clean/intl/relocatable.c
12767 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/relocatable.c 1969-12-31 18:00:00.000000000 -0600
12768 +++ psmisc-20.2.works.clean/intl/relocatable.c 2004-10-13 15:18:42.000000000 -0500
12770 +/* Provide relocatable packages.
12771 + Copyright (C) 2003 Free Software Foundation, Inc.
12772 + Written by Bruno Haible <bruno@clisp.org>, 2003.
12774 + This program is free software; you can redistribute it and/or modify it
12775 + under the terms of the GNU Library General Public License as published
12776 + by the Free Software Foundation; either version 2, or (at your option)
12777 + any later version.
12779 + This program is distributed in the hope that it will be useful,
12780 + but WITHOUT ANY WARRANTY; without even the implied warranty of
12781 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12782 + Library General Public License for more details.
12784 + You should have received a copy of the GNU Library General Public
12785 + License along with this program; if not, write to the Free Software
12786 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12790 +/* Tell glibc's <stdio.h> to provide a prototype for getline().
12791 + This must come before <config.h> because <config.h> may include
12792 + <features.h>, and once <features.h> has been included, it's too late. */
12793 +#ifndef _GNU_SOURCE
12794 +# define _GNU_SOURCE 1
12797 +#ifdef HAVE_CONFIG_H
12798 +# include "config.h"
12801 +/* Specification. */
12802 +#include "relocatable.h"
12804 +#if ENABLE_RELOCATABLE
12806 +#include <stddef.h>
12807 +#include <stdio.h>
12808 +#include <stdlib.h>
12809 +#include <string.h>
12812 +# define xmalloc malloc
12814 +# include "xalloc.h"
12817 +#if defined _WIN32 || defined __WIN32__
12818 +# define WIN32_LEAN_AND_MEAN
12819 +# include <windows.h>
12822 +#if DEPENDS_ON_LIBCHARSET
12823 +# include <libcharset.h>
12825 +#if DEPENDS_ON_LIBICONV && HAVE_ICONV
12826 +# include <iconv.h>
12828 +#if DEPENDS_ON_LIBINTL && ENABLE_NLS
12829 +# include <libintl.h>
12832 +/* Faked cheap 'bool'. */
12840 +/* Pathname support.
12841 + ISSLASH(C) tests whether C is a directory separator character.
12842 + IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
12844 +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
12845 + /* Win32, OS/2, DOS */
12846 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
12847 +# define HAS_DEVICE(P) \
12848 + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
12849 + && (P)[1] == ':')
12850 +# define IS_PATH_WITH_DIR(P) \
12851 + (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
12852 +# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
12855 +# define ISSLASH(C) ((C) == '/')
12856 +# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
12857 +# define FILESYSTEM_PREFIX_LEN(P) 0
12860 +/* Original installation prefix. */
12861 +static char *orig_prefix;
12862 +static size_t orig_prefix_len;
12863 +/* Current installation prefix. */
12864 +static char *curr_prefix;
12865 +static size_t curr_prefix_len;
12866 +/* These prefixes do not end in a slash. Anything that will be concatenated
12867 + to them must start with a slash. */
12869 +/* Sets the original and the current installation prefix of this module.
12870 + Relocation simply replaces a pathname starting with the original prefix
12871 + by the corresponding pathname with the current prefix instead. Both
12872 + prefixes should be directory names without trailing slash (i.e. use ""
12873 + instead of "/"). */
12875 +set_this_relocation_prefix (const char *orig_prefix_arg,
12876 + const char *curr_prefix_arg)
12878 + if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
12879 + /* Optimization: if orig_prefix and curr_prefix are equal, the
12880 + relocation is a nop. */
12881 + && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
12883 + /* Duplicate the argument strings. */
12886 + orig_prefix_len = strlen (orig_prefix_arg);
12887 + curr_prefix_len = strlen (curr_prefix_arg);
12888 + memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
12890 + if (memory != NULL)
12893 + memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
12894 + orig_prefix = memory;
12895 + memory += orig_prefix_len + 1;
12896 + memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
12897 + curr_prefix = memory;
12901 + orig_prefix = NULL;
12902 + curr_prefix = NULL;
12903 + /* Don't worry about wasted memory here - this function is usually only
12907 +/* Sets the original and the current installation prefix of the package.
12908 + Relocation simply replaces a pathname starting with the original prefix
12909 + by the corresponding pathname with the current prefix instead. Both
12910 + prefixes should be directory names without trailing slash (i.e. use ""
12911 + instead of "/"). */
12913 +set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
12915 + set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
12917 + /* Now notify all dependent libraries. */
12918 +#if DEPENDS_ON_LIBCHARSET
12919 + libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
12921 +#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
12922 + libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
12924 +#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
12925 + libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
12929 +#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
12931 +/* Convenience function:
12932 + Computes the current installation prefix, based on the original
12933 + installation prefix, the original installation directory of a particular
12934 + file, and the current pathname of this file. Returns NULL upon failure. */
12936 +#define compute_curr_prefix local_compute_curr_prefix
12940 +compute_curr_prefix (const char *orig_installprefix,
12941 + const char *orig_installdir,
12942 + const char *curr_pathname)
12944 + const char *curr_installdir;
12945 + const char *rel_installdir;
12947 + if (curr_pathname == NULL)
12950 + /* Determine the relative installation directory, relative to the prefix.
12951 + This is simply the difference between orig_installprefix and
12952 + orig_installdir. */
12953 + if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
12955 + /* Shouldn't happen - nothing should be installed outside $(prefix). */
12957 + rel_installdir = orig_installdir + strlen (orig_installprefix);
12959 + /* Determine the current installation directory. */
12961 + const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname);
12962 + const char *p = curr_pathname + strlen (curr_pathname);
12965 + while (p > p_base)
12968 + if (ISSLASH (*p))
12972 + q = (char *) xmalloc (p - curr_pathname + 1);
12977 + memcpy (q, curr_pathname, p - curr_pathname);
12978 + q[p - curr_pathname] = '\0';
12979 + curr_installdir = q;
12982 + /* Compute the current installation prefix by removing the trailing
12983 + rel_installdir from it. */
12985 + const char *rp = rel_installdir + strlen (rel_installdir);
12986 + const char *cp = curr_installdir + strlen (curr_installdir);
12987 + const char *cp_base =
12988 + curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir);
12990 + while (rp > rel_installdir && cp > cp_base)
12992 + bool same = false;
12993 + const char *rpi = rp;
12994 + const char *cpi = cp;
12996 + while (rpi > rel_installdir && cpi > cp_base)
13000 + if (ISSLASH (*rpi) || ISSLASH (*cpi))
13002 + if (ISSLASH (*rpi) && ISSLASH (*cpi))
13006 +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
13007 + /* Win32, OS/2, DOS - case insignificant filesystem */
13008 + if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
13009 + != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
13012 + if (*rpi != *cpi)
13018 + /* The last pathname component was the same. opi and cpi now point
13019 + to the slash before it. */
13024 + if (rp > rel_installdir)
13025 + /* Unexpected: The curr_installdir does not end with rel_installdir. */
13029 + size_t curr_prefix_len = cp - curr_installdir;
13030 + char *curr_prefix;
13032 + curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
13034 + if (curr_prefix == NULL)
13037 + memcpy (curr_prefix, curr_installdir, curr_prefix_len);
13038 + curr_prefix[curr_prefix_len] = '\0';
13040 + return curr_prefix;
13045 +#endif /* !IN_LIBRARY || PIC */
13047 +#if defined PIC && defined INSTALLDIR
13049 +/* Full pathname of shared library, or NULL. */
13050 +static char *shared_library_fullname;
13052 +#if defined _WIN32 || defined __WIN32__
13054 +/* Determine the full pathname of the shared library when it is loaded. */
13057 +DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
13061 + if (event == DLL_PROCESS_ATTACH)
13063 + /* The DLL is being loaded into an application's address range. */
13064 + static char location[MAX_PATH];
13066 + if (!GetModuleFileName (module_handle, location, sizeof (location)))
13067 + /* Shouldn't happen. */
13070 + if (!IS_PATH_WITH_DIR (location))
13071 + /* Shouldn't happen. */
13074 + shared_library_fullname = strdup (location);
13083 +find_shared_library_fullname ()
13085 +#if defined __linux__ && __GLIBC__ >= 2
13086 + /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
13089 + /* Open the current process' maps file. It describes one VMA per line. */
13090 + fp = fopen ("/proc/self/maps", "r");
13093 + unsigned long address = (unsigned long) &find_shared_library_fullname;
13096 + unsigned long start, end;
13099 + if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
13101 + if (address >= start && address <= end - 1)
13103 + /* Found it. Now see if this line contains a filename. */
13104 + while (c = getc (fp), c != EOF && c != '\n' && c != '/')
13112 + shared_library_fullname = NULL; size = 0;
13113 + len = getline (&shared_library_fullname, &size, fp);
13116 + /* Success: filled shared_library_fullname. */
13117 + if (len > 0 && shared_library_fullname[len - 1] == '\n')
13118 + shared_library_fullname[len - 1] = '\0';
13123 + while (c = getc (fp), c != EOF && c != '\n')
13131 +#endif /* WIN32 / Unix */
13133 +/* Return the full pathname of the current shared library.
13134 + Return NULL if unknown.
13135 + Guaranteed to work only on Linux and Woe32. */
13137 +get_shared_library_fullname ()
13139 +#if !(defined _WIN32 || defined __WIN32__)
13140 + static bool tried_find_shared_library_fullname;
13141 + if (!tried_find_shared_library_fullname)
13143 + find_shared_library_fullname ();
13144 + tried_find_shared_library_fullname = true;
13147 + return shared_library_fullname;
13152 +/* Returns the pathname, relocated according to the current installation
13155 +relocate (const char *pathname)
13157 +#if defined PIC && defined INSTALLDIR
13158 + static int initialized;
13160 + /* Initialization code for a shared library. */
13161 + if (!initialized)
13163 + /* At this point, orig_prefix and curr_prefix likely have already been
13164 + set through the main program's set_program_name_and_installdir
13165 + function. This is sufficient in the case that the library has
13166 + initially been installed in the same orig_prefix. But we can do
13167 + better, to also cover the cases that 1. it has been installed
13168 + in a different prefix before being moved to orig_prefix and (later)
13169 + to curr_prefix, 2. unlike the program, it has not moved away from
13171 + const char *orig_installprefix = INSTALLPREFIX;
13172 + const char *orig_installdir = INSTALLDIR;
13173 + const char *curr_prefix_better;
13175 + curr_prefix_better =
13176 + compute_curr_prefix (orig_installprefix, orig_installdir,
13177 + get_shared_library_fullname ());
13178 + if (curr_prefix_better == NULL)
13179 + curr_prefix_better = curr_prefix;
13181 + set_relocation_prefix (orig_installprefix, curr_prefix_better);
13187 + /* Note: It is not necessary to perform case insensitive comparison here,
13188 + even for DOS-like filesystems, because the pathname argument was
13189 + typically created from the same Makefile variable as orig_prefix came
13191 + if (orig_prefix != NULL && curr_prefix != NULL
13192 + && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
13194 + if (pathname[orig_prefix_len] == '\0')
13195 + /* pathname equals orig_prefix. */
13196 + return curr_prefix;
13197 + if (ISSLASH (pathname[orig_prefix_len]))
13199 + /* pathname starts with orig_prefix. */
13200 + const char *pathname_tail = &pathname[orig_prefix_len];
13202 + (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
13205 + if (result != NULL)
13208 + memcpy (result, curr_prefix, curr_prefix_len);
13209 + strcpy (result + curr_prefix_len, pathname_tail);
13214 + /* Nothing to relocate. */
13219 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/relocatable.h psmisc-20.2.works.clean/intl/relocatable.h
13220 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/relocatable.h 1969-12-31 18:00:00.000000000 -0600
13221 +++ psmisc-20.2.works.clean/intl/relocatable.h 2004-10-13 15:18:42.000000000 -0500
13223 +/* Provide relocatable packages.
13224 + Copyright (C) 2003 Free Software Foundation, Inc.
13225 + Written by Bruno Haible <bruno@clisp.org>, 2003.
13227 + This program is free software; you can redistribute it and/or modify it
13228 + under the terms of the GNU Library General Public License as published
13229 + by the Free Software Foundation; either version 2, or (at your option)
13230 + any later version.
13232 + This program is distributed in the hope that it will be useful,
13233 + but WITHOUT ANY WARRANTY; without even the implied warranty of
13234 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13235 + Library General Public License for more details.
13237 + You should have received a copy of the GNU Library General Public
13238 + License along with this program; if not, write to the Free Software
13239 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
13242 +#ifndef _RELOCATABLE_H
13243 +#define _RELOCATABLE_H
13245 +#ifdef __cplusplus
13250 +/* This can be enabled through the configure --enable-relocatable option. */
13251 +#if ENABLE_RELOCATABLE
13253 +/* When building a DLL, we must export some functions. Note that because
13254 + this is a private .h file, we don't need to use __declspec(dllimport)
13256 +#if defined _MSC_VER && BUILDING_DLL
13257 +# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
13259 +# define RELOCATABLE_DLL_EXPORTED
13262 +/* Sets the original and the current installation prefix of the package.
13263 + Relocation simply replaces a pathname starting with the original prefix
13264 + by the corresponding pathname with the current prefix instead. Both
13265 + prefixes should be directory names without trailing slash (i.e. use ""
13266 + instead of "/"). */
13267 +extern RELOCATABLE_DLL_EXPORTED void
13268 + set_relocation_prefix (const char *orig_prefix,
13269 + const char *curr_prefix);
13271 +/* Returns the pathname, relocated according to the current installation
13273 +extern const char * relocate (const char *pathname);
13275 +/* Memory management: relocate() leaks memory, because it has to construct
13276 + a fresh pathname. If this is a problem because your program calls
13277 + relocate() frequently, think about caching the result. */
13279 +/* Convenience function:
13280 + Computes the current installation prefix, based on the original
13281 + installation prefix, the original installation directory of a particular
13282 + file, and the current pathname of this file. Returns NULL upon failure. */
13283 +extern const char * compute_curr_prefix (const char *orig_installprefix,
13284 + const char *orig_installdir,
13285 + const char *curr_pathname);
13289 +/* By default, we use the hardwired pathnames. */
13290 +#define relocate(pathname) (pathname)
13295 +#ifdef __cplusplus
13299 +#endif /* _RELOCATABLE_H */
13300 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/textdomain.c psmisc-20.2.works.clean/intl/textdomain.c
13301 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/textdomain.c 2001-04-13 23:00:42.000000000 -0500
13302 +++ psmisc-20.2.works.clean/intl/textdomain.c 2004-10-13 15:18:42.000000000 -0500
13304 /* Implementation of the textdomain(3) function.
13305 - Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
13306 + Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
13308 - This program is free software; you can redistribute it and/or modify
13309 - it under the terms of the GNU General Public License as published by
13310 - the Free Software Foundation; either version 2, or (at your option)
13311 + This program is free software; you can redistribute it and/or modify it
13312 + under the terms of the GNU Library General Public License as published
13313 + by the Free Software Foundation; either version 2, or (at your option)
13316 This program is distributed in the hope that it will be useful,
13317 but WITHOUT ANY WARRANTY; without even the implied warranty of
13318 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13319 - GNU General Public License for more details.
13320 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13321 + Library General Public License for more details.
13323 - You should have received a copy of the GNU General Public License
13324 - along with this program; if not, write to the Free Software Foundation,
13325 - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
13326 + You should have received a copy of the GNU Library General Public
13327 + License along with this program; if not, write to the Free Software
13328 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
13331 #ifdef HAVE_CONFIG_H
13332 # include <config.h>
13333 @@ -43,17 +44,17 @@
13334 names than the internal variables in GNU libc, otherwise programs
13335 using libintl.a cannot be linked statically. */
13337 -# define _nl_default_default_domain _nl_default_default_domain__
13338 -# define _nl_current_default_domain _nl_current_default_domain__
13339 +# define _nl_default_default_domain libintl_nl_default_default_domain
13340 +# define _nl_current_default_domain libintl_nl_current_default_domain
13343 /* @@ end of prolog @@ */
13345 /* Name of the default text domain. */
13346 -extern const char _nl_default_default_domain[];
13347 +extern const char _nl_default_default_domain[] attribute_hidden;
13349 /* Default text domain in which entries for gettext(3) are to be found. */
13350 -extern const char *_nl_current_default_domain;
13351 +extern const char *_nl_current_default_domain attribute_hidden;
13354 /* Names for the libintl functions are a problem. They must not clash
13355 @@ -66,18 +67,17 @@
13356 # define strdup(str) __strdup (str)
13359 -# define TEXTDOMAIN textdomain__
13360 +# define TEXTDOMAIN libintl_textdomain
13363 /* Lock variable to protect the global data in the gettext implementation. */
13364 -__libc_rwlock_define (extern, _nl_state_lock)
13365 +__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
13367 /* Set the current default message catalog to DOMAINNAME.
13368 If DOMAINNAME is null, return the current default.
13369 If DOMAINNAME is "", reset to the default of "messages". */
13371 -TEXTDOMAIN (domainname)
13372 - const char *domainname;
13373 +TEXTDOMAIN (const char *domainname)
13377 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/vasnprintf.c psmisc-20.2.works.clean/intl/vasnprintf.c
13378 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/vasnprintf.c 1969-12-31 18:00:00.000000000 -0600
13379 +++ psmisc-20.2.works.clean/intl/vasnprintf.c 2004-10-13 15:18:42.000000000 -0500
13381 +/* vsprintf with automatic memory allocation.
13382 + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
13384 + This program is free software; you can redistribute it and/or modify it
13385 + under the terms of the GNU Library General Public License as published
13386 + by the Free Software Foundation; either version 2, or (at your option)
13387 + any later version.
13389 + This program is distributed in the hope that it will be useful,
13390 + but WITHOUT ANY WARRANTY; without even the implied warranty of
13391 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13392 + Library General Public License for more details.
13394 + You should have received a copy of the GNU Library General Public
13395 + License along with this program; if not, write to the Free Software
13396 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
13399 +/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
13400 + This must come before <config.h> because <config.h> may include
13401 + <features.h>, and once <features.h> has been included, it's too late. */
13402 +#ifndef _GNU_SOURCE
13403 +# define _GNU_SOURCE 1
13406 +#ifdef HAVE_CONFIG_H
13407 +# include <config.h>
13409 +#ifndef IN_LIBINTL
13410 +# include <alloca.h>
13413 +/* Specification. */
13414 +#if WIDE_CHAR_VERSION
13415 +# include "vasnwprintf.h"
13417 +# include "vasnprintf.h"
13420 +#include <stdio.h> /* snprintf(), sprintf() */
13421 +#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
13422 +#include <string.h> /* memcpy(), strlen() */
13423 +#include <errno.h> /* errno */
13424 +#include <limits.h> /* CHAR_BIT */
13425 +#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
13426 +#if WIDE_CHAR_VERSION
13427 +# include "wprintf-parse.h"
13429 +# include "printf-parse.h"
13432 +/* Checked size_t computations. */
13433 +#include "xsize.h"
13435 +#ifdef HAVE_WCHAR_T
13436 +# ifdef HAVE_WCSLEN
13437 +# define local_wcslen wcslen
13439 + /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
13440 + a dependency towards this library, here is a local substitute.
13441 + Define this substitute only once, even if this file is included
13442 + twice in the same compilation unit. */
13443 +# ifndef local_wcslen_defined
13444 +# define local_wcslen_defined 1
13446 +local_wcslen (const wchar_t *s)
13448 + const wchar_t *ptr;
13450 + for (ptr = s; *ptr != (wchar_t) 0; ptr++)
13458 +#if WIDE_CHAR_VERSION
13459 +# define VASNPRINTF vasnwprintf
13460 +# define CHAR_T wchar_t
13461 +# define DIRECTIVE wchar_t_directive
13462 +# define DIRECTIVES wchar_t_directives
13463 +# define PRINTF_PARSE wprintf_parse
13464 +# define USE_SNPRINTF 1
13465 +# if HAVE_DECL__SNWPRINTF
13466 + /* On Windows, the function swprintf() has a different signature than
13467 + on Unix; we use the _snwprintf() function instead. */
13468 +# define SNPRINTF _snwprintf
13471 +# define SNPRINTF swprintf
13474 +# define VASNPRINTF vasnprintf
13475 +# define CHAR_T char
13476 +# define DIRECTIVE char_directive
13477 +# define DIRECTIVES char_directives
13478 +# define PRINTF_PARSE printf_parse
13479 +# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
13480 +# if HAVE_DECL__SNPRINTF
13482 +# define SNPRINTF _snprintf
13485 +# define SNPRINTF snprintf
13490 +VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
13495 + if (PRINTF_PARSE (format, &d, &a) < 0)
13501 +#define CLEANUP() \
13506 + if (printf_fetchargs (args, &a) < 0)
13514 + size_t buf_neededlength;
13516 + CHAR_T *buf_malloced;
13517 + const CHAR_T *cp;
13520 + /* Output string accumulator. */
13522 + size_t allocated;
13525 + /* Allocate a small buffer that will hold a directive passed to
13526 + sprintf or snprintf. */
13527 + buf_neededlength =
13528 + xsum4 (7, d.max_width_length, d.max_precision_length, 6);
13530 + if (buf_neededlength < 4000 / sizeof (CHAR_T))
13532 + buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
13533 + buf_malloced = NULL;
13538 + size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
13539 + if (size_overflow_p (buf_memsize))
13540 + goto out_of_memory_1;
13541 + buf = (CHAR_T *) malloc (buf_memsize);
13543 + goto out_of_memory_1;
13544 + buf_malloced = buf;
13547 + if (resultbuf != NULL)
13549 + result = resultbuf;
13550 + allocated = *lengthp;
13559 + result is either == resultbuf or == NULL or malloc-allocated.
13560 + If length > 0, then result != NULL. */
13562 + /* Ensures that allocated >= needed. Aborts through a jump to
13563 + out_of_memory if needed is SIZE_MAX or otherwise too big. */
13564 +#define ENSURE_ALLOCATION(needed) \
13565 + if ((needed) > allocated) \
13567 + size_t memory_size; \
13568 + CHAR_T *memory; \
13570 + allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \
13571 + if ((needed) > allocated) \
13572 + allocated = (needed); \
13573 + memory_size = xtimes (allocated, sizeof (CHAR_T)); \
13574 + if (size_overflow_p (memory_size)) \
13575 + goto out_of_memory; \
13576 + if (result == resultbuf || result == NULL) \
13577 + memory = (CHAR_T *) malloc (memory_size); \
13579 + memory = (CHAR_T *) realloc (result, memory_size); \
13580 + if (memory == NULL) \
13581 + goto out_of_memory; \
13582 + if (result == resultbuf && length > 0) \
13583 + memcpy (memory, result, length * sizeof (CHAR_T)); \
13584 + result = memory; \
13587 + for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
13589 + if (cp != dp->dir_start)
13591 + size_t n = dp->dir_start - cp;
13592 + size_t augmented_length = xsum (length, n);
13594 + ENSURE_ALLOCATION (augmented_length);
13595 + memcpy (result + length, cp, n * sizeof (CHAR_T));
13596 + length = augmented_length;
13598 + if (i == d.count)
13601 + /* Execute a single directive. */
13602 + if (dp->conversion == '%')
13604 + size_t augmented_length;
13606 + if (!(dp->arg_index == ARG_NONE))
13608 + augmented_length = xsum (length, 1);
13609 + ENSURE_ALLOCATION (augmented_length);
13610 + result[length] = '%';
13611 + length = augmented_length;
13615 + if (!(dp->arg_index != ARG_NONE))
13618 + if (dp->conversion == 'n')
13620 + switch (a.arg[dp->arg_index].type)
13622 + case TYPE_COUNT_SCHAR_POINTER:
13623 + *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
13625 + case TYPE_COUNT_SHORT_POINTER:
13626 + *a.arg[dp->arg_index].a.a_count_short_pointer = length;
13628 + case TYPE_COUNT_INT_POINTER:
13629 + *a.arg[dp->arg_index].a.a_count_int_pointer = length;
13631 + case TYPE_COUNT_LONGINT_POINTER:
13632 + *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
13634 +#ifdef HAVE_LONG_LONG
13635 + case TYPE_COUNT_LONGLONGINT_POINTER:
13636 + *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
13645 + arg_type type = a.arg[dp->arg_index].type;
13647 + unsigned int prefix_count;
13650 + size_t tmp_length;
13651 + CHAR_T tmpbuf[700];
13654 + /* Allocate a temporary buffer of sufficient size for calling
13658 + size_t precision;
13661 + if (dp->width_start != dp->width_end)
13663 + if (dp->width_arg_index != ARG_NONE)
13667 + if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
13669 + arg = a.arg[dp->width_arg_index].a.a_int;
13670 + width = (arg < 0 ? (unsigned int) (-arg) : arg);
13674 + const CHAR_T *digitp = dp->width_start;
13677 + width = xsum (xtimes (width, 10), *digitp++ - '0');
13678 + while (digitp != dp->width_end);
13683 + if (dp->precision_start != dp->precision_end)
13685 + if (dp->precision_arg_index != ARG_NONE)
13689 + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
13691 + arg = a.arg[dp->precision_arg_index].a.a_int;
13692 + precision = (arg < 0 ? 0 : arg);
13696 + const CHAR_T *digitp = dp->precision_start + 1;
13700 + precision = xsum (xtimes (precision, 10), *digitp++ - '0');
13701 + while (digitp != dp->precision_end);
13705 + switch (dp->conversion)
13708 + case 'd': case 'i': case 'u':
13709 +# ifdef HAVE_LONG_LONG
13710 + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
13712 + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
13713 + * 0.30103 /* binary -> decimal */
13714 + * 2 /* estimate for FLAG_GROUP */
13716 + + 1 /* turn floor into ceil */
13717 + + 1; /* account for leading sign */
13720 + if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
13722 + (unsigned int) (sizeof (unsigned long) * CHAR_BIT
13723 + * 0.30103 /* binary -> decimal */
13724 + * 2 /* estimate for FLAG_GROUP */
13726 + + 1 /* turn floor into ceil */
13727 + + 1; /* account for leading sign */
13730 + (unsigned int) (sizeof (unsigned int) * CHAR_BIT
13731 + * 0.30103 /* binary -> decimal */
13732 + * 2 /* estimate for FLAG_GROUP */
13734 + + 1 /* turn floor into ceil */
13735 + + 1; /* account for leading sign */
13739 +# ifdef HAVE_LONG_LONG
13740 + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
13742 + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
13743 + * 0.333334 /* binary -> octal */
13745 + + 1 /* turn floor into ceil */
13746 + + 1; /* account for leading sign */
13749 + if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
13751 + (unsigned int) (sizeof (unsigned long) * CHAR_BIT
13752 + * 0.333334 /* binary -> octal */
13754 + + 1 /* turn floor into ceil */
13755 + + 1; /* account for leading sign */
13758 + (unsigned int) (sizeof (unsigned int) * CHAR_BIT
13759 + * 0.333334 /* binary -> octal */
13761 + + 1 /* turn floor into ceil */
13762 + + 1; /* account for leading sign */
13765 + case 'x': case 'X':
13766 +# ifdef HAVE_LONG_LONG
13767 + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
13769 + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
13770 + * 0.25 /* binary -> hexadecimal */
13772 + + 1 /* turn floor into ceil */
13773 + + 2; /* account for leading sign or alternate form */
13776 + if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
13778 + (unsigned int) (sizeof (unsigned long) * CHAR_BIT
13779 + * 0.25 /* binary -> hexadecimal */
13781 + + 1 /* turn floor into ceil */
13782 + + 2; /* account for leading sign or alternate form */
13785 + (unsigned int) (sizeof (unsigned int) * CHAR_BIT
13786 + * 0.25 /* binary -> hexadecimal */
13788 + + 1 /* turn floor into ceil */
13789 + + 2; /* account for leading sign or alternate form */
13792 + case 'f': case 'F':
13793 +# ifdef HAVE_LONG_DOUBLE
13794 + if (type == TYPE_LONGDOUBLE)
13796 + (unsigned int) (LDBL_MAX_EXP
13797 + * 0.30103 /* binary -> decimal */
13798 + * 2 /* estimate for FLAG_GROUP */
13800 + + 1 /* turn floor into ceil */
13801 + + 10; /* sign, decimal point etc. */
13805 + (unsigned int) (DBL_MAX_EXP
13806 + * 0.30103 /* binary -> decimal */
13807 + * 2 /* estimate for FLAG_GROUP */
13809 + + 1 /* turn floor into ceil */
13810 + + 10; /* sign, decimal point etc. */
13811 + tmp_length = xsum (tmp_length, precision);
13814 + case 'e': case 'E': case 'g': case 'G':
13815 + case 'a': case 'A':
13817 + 12; /* sign, decimal point, exponent etc. */
13818 + tmp_length = xsum (tmp_length, precision);
13822 +# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION
13823 + if (type == TYPE_WIDE_CHAR)
13824 + tmp_length = MB_CUR_MAX;
13831 +# ifdef HAVE_WCHAR_T
13832 + if (type == TYPE_WIDE_STRING)
13835 + local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
13837 +# if !WIDE_CHAR_VERSION
13838 + tmp_length = xtimes (tmp_length, MB_CUR_MAX);
13843 + tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
13848 + (unsigned int) (sizeof (void *) * CHAR_BIT
13849 + * 0.25 /* binary -> hexadecimal */
13851 + + 1 /* turn floor into ceil */
13852 + + 2; /* account for leading 0x */
13859 + if (tmp_length < width)
13860 + tmp_length = width;
13862 + tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
13865 + if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
13869 + size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
13871 + if (size_overflow_p (tmp_memsize))
13872 + /* Overflow, would lead to out of memory. */
13873 + goto out_of_memory;
13874 + tmp = (CHAR_T *) malloc (tmp_memsize);
13876 + /* Out of memory. */
13877 + goto out_of_memory;
13881 + /* Construct the format string for calling snprintf or
13885 + if (dp->flags & FLAG_GROUP)
13887 + if (dp->flags & FLAG_LEFT)
13889 + if (dp->flags & FLAG_SHOWSIGN)
13891 + if (dp->flags & FLAG_SPACE)
13893 + if (dp->flags & FLAG_ALT)
13895 + if (dp->flags & FLAG_ZERO)
13897 + if (dp->width_start != dp->width_end)
13899 + size_t n = dp->width_end - dp->width_start;
13900 + memcpy (p, dp->width_start, n * sizeof (CHAR_T));
13903 + if (dp->precision_start != dp->precision_end)
13905 + size_t n = dp->precision_end - dp->precision_start;
13906 + memcpy (p, dp->precision_start, n * sizeof (CHAR_T));
13912 +#ifdef HAVE_LONG_LONG
13913 + case TYPE_LONGLONGINT:
13914 + case TYPE_ULONGLONGINT:
13918 + case TYPE_LONGINT:
13919 + case TYPE_ULONGINT:
13920 +#ifdef HAVE_WINT_T
13921 + case TYPE_WIDE_CHAR:
13923 +#ifdef HAVE_WCHAR_T
13924 + case TYPE_WIDE_STRING:
13928 +#ifdef HAVE_LONG_DOUBLE
13929 + case TYPE_LONGDOUBLE:
13936 + *p = dp->conversion;
13945 + /* Construct the arguments for calling snprintf or sprintf. */
13946 + prefix_count = 0;
13947 + if (dp->width_arg_index != ARG_NONE)
13949 + if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
13951 + prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
13953 + if (dp->precision_arg_index != ARG_NONE)
13955 + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
13957 + prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
13961 + /* Prepare checking whether snprintf returns the count
13963 + ENSURE_ALLOCATION (xsum (length, 1));
13964 + result[length] = '\0';
13973 + maxlen = allocated - length;
13978 +# define SNPRINTF_BUF(arg) \
13979 + switch (prefix_count) \
13982 + retcount = SNPRINTF (result + length, maxlen, buf, \
13986 + retcount = SNPRINTF (result + length, maxlen, buf, \
13987 + prefixes[0], arg, &count); \
13990 + retcount = SNPRINTF (result + length, maxlen, buf, \
13991 + prefixes[0], prefixes[1], arg, \
13998 +# define SNPRINTF_BUF(arg) \
13999 + switch (prefix_count) \
14002 + count = sprintf (tmp, buf, arg); \
14005 + count = sprintf (tmp, buf, prefixes[0], arg); \
14008 + count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
14020 + int arg = a.arg[dp->arg_index].a.a_schar;
14021 + SNPRINTF_BUF (arg);
14026 + unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
14027 + SNPRINTF_BUF (arg);
14032 + int arg = a.arg[dp->arg_index].a.a_short;
14033 + SNPRINTF_BUF (arg);
14036 + case TYPE_USHORT:
14038 + unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
14039 + SNPRINTF_BUF (arg);
14044 + int arg = a.arg[dp->arg_index].a.a_int;
14045 + SNPRINTF_BUF (arg);
14050 + unsigned int arg = a.arg[dp->arg_index].a.a_uint;
14051 + SNPRINTF_BUF (arg);
14054 + case TYPE_LONGINT:
14056 + long int arg = a.arg[dp->arg_index].a.a_longint;
14057 + SNPRINTF_BUF (arg);
14060 + case TYPE_ULONGINT:
14062 + unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
14063 + SNPRINTF_BUF (arg);
14066 +#ifdef HAVE_LONG_LONG
14067 + case TYPE_LONGLONGINT:
14069 + long long int arg = a.arg[dp->arg_index].a.a_longlongint;
14070 + SNPRINTF_BUF (arg);
14073 + case TYPE_ULONGLONGINT:
14075 + unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
14076 + SNPRINTF_BUF (arg);
14080 + case TYPE_DOUBLE:
14082 + double arg = a.arg[dp->arg_index].a.a_double;
14083 + SNPRINTF_BUF (arg);
14086 +#ifdef HAVE_LONG_DOUBLE
14087 + case TYPE_LONGDOUBLE:
14089 + long double arg = a.arg[dp->arg_index].a.a_longdouble;
14090 + SNPRINTF_BUF (arg);
14096 + int arg = a.arg[dp->arg_index].a.a_char;
14097 + SNPRINTF_BUF (arg);
14100 +#ifdef HAVE_WINT_T
14101 + case TYPE_WIDE_CHAR:
14103 + wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
14104 + SNPRINTF_BUF (arg);
14108 + case TYPE_STRING:
14110 + const char *arg = a.arg[dp->arg_index].a.a_string;
14111 + SNPRINTF_BUF (arg);
14114 +#ifdef HAVE_WCHAR_T
14115 + case TYPE_WIDE_STRING:
14117 + const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
14118 + SNPRINTF_BUF (arg);
14122 + case TYPE_POINTER:
14124 + void *arg = a.arg[dp->arg_index].a.a_pointer;
14125 + SNPRINTF_BUF (arg);
14133 + /* Portability: Not all implementations of snprintf()
14134 + are ISO C 99 compliant. Determine the number of
14135 + bytes that snprintf() has produced or would have
14139 + /* Verify that snprintf() has NUL-terminated its
14141 + if (count < maxlen && result[length + count] != '\0')
14143 + /* Portability hack. */
14144 + if (retcount > count)
14145 + count = retcount;
14149 + /* snprintf() doesn't understand the '%n'
14151 + if (p[1] != '\0')
14153 + /* Don't use the '%n' directive; instead, look
14154 + at the snprintf() return value. */
14160 + /* Look at the snprintf() return value. */
14161 + if (retcount < 0)
14163 + /* HP-UX 10.20 snprintf() is doubly deficient:
14164 + It doesn't understand the '%n' directive,
14165 + *and* it returns -1 (rather than the length
14166 + that would have been required) when the
14167 + buffer is too small. */
14168 + size_t bigger_need =
14169 + xsum (xtimes (allocated, 2), 12);
14170 + ENSURE_ALLOCATION (bigger_need);
14174 + count = retcount;
14179 + /* Attempt to handle failure. */
14182 + if (!(result == resultbuf || result == NULL))
14184 + if (buf_malloced != NULL)
14185 + free (buf_malloced);
14192 + if (count >= tmp_length)
14193 + /* tmp_length was incorrectly calculated - fix the
14198 + /* Make room for the result. */
14199 + if (count >= maxlen)
14201 + /* Need at least count bytes. But allocate
14202 + proportionally, to avoid looping eternally if
14203 + snprintf() reports a too small count. */
14205 + xmax (xsum (length, count), xtimes (allocated, 2));
14207 + ENSURE_ALLOCATION (n);
14214 + /* The snprintf() result did fit. */
14216 + /* Append the sprintf() result. */
14217 + memcpy (result + length, tmp, count * sizeof (CHAR_T));
14218 + if (tmp != tmpbuf)
14229 + /* Add the final NUL. */
14230 + ENSURE_ALLOCATION (xsum (length, 1));
14231 + result[length] = '\0';
14233 + if (result != resultbuf && length + 1 < allocated)
14235 + /* Shrink the allocated memory if possible. */
14238 + memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T));
14239 + if (memory != NULL)
14243 + if (buf_malloced != NULL)
14244 + free (buf_malloced);
14246 + *lengthp = length;
14250 + if (!(result == resultbuf || result == NULL))
14252 + if (buf_malloced != NULL)
14253 + free (buf_malloced);
14262 +#undef USE_SNPRINTF
14263 +#undef PRINTF_PARSE
14268 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/vasnprintf.h psmisc-20.2.works.clean/intl/vasnprintf.h
14269 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/vasnprintf.h 1969-12-31 18:00:00.000000000 -0600
14270 +++ psmisc-20.2.works.clean/intl/vasnprintf.h 2004-10-13 15:18:42.000000000 -0500
14272 +/* vsprintf with automatic memory allocation.
14273 + Copyright (C) 2002-2003 Free Software Foundation, Inc.
14275 + This program is free software; you can redistribute it and/or modify it
14276 + under the terms of the GNU Library General Public License as published
14277 + by the Free Software Foundation; either version 2, or (at your option)
14278 + any later version.
14280 + This program is distributed in the hope that it will be useful,
14281 + but WITHOUT ANY WARRANTY; without even the implied warranty of
14282 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14283 + Library General Public License for more details.
14285 + You should have received a copy of the GNU Library General Public
14286 + License along with this program; if not, write to the Free Software
14287 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14290 +#ifndef _VASNPRINTF_H
14291 +#define _VASNPRINTF_H
14293 +/* Get va_list. */
14294 +#include <stdarg.h>
14297 +#include <stddef.h>
14299 +#ifndef __attribute__
14300 +/* This feature is available in gcc versions 2.5 and later. */
14301 +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
14302 +# define __attribute__(Spec) /* empty */
14304 +/* The __-protected variants of `format' and `printf' attributes
14305 + are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
14306 +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
14307 +# define __format__ format
14308 +# define __printf__ printf
14312 +#ifdef __cplusplus
14316 +/* Write formatted output to a string dynamically allocated with malloc().
14317 + You can pass a preallocated buffer for the result in RESULTBUF and its
14318 + size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
14319 + If successful, return the address of the string (this may be = RESULTBUF
14320 + if no dynamic memory allocation was necessary) and set *LENGTHP to the
14321 + number of resulting bytes, excluding the trailing NUL. Upon error, set
14322 + errno and return NULL. */
14323 +extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
14324 + __attribute__ ((__format__ (__printf__, 3, 4)));
14325 +extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
14326 + __attribute__ ((__format__ (__printf__, 3, 0)));
14328 +#ifdef __cplusplus
14332 +#endif /* _VASNPRINTF_H */
14333 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/vasnwprintf.h psmisc-20.2.works.clean/intl/vasnwprintf.h
14334 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/vasnwprintf.h 1969-12-31 18:00:00.000000000 -0600
14335 +++ psmisc-20.2.works.clean/intl/vasnwprintf.h 2004-10-13 15:18:42.000000000 -0500
14337 +/* vswprintf with automatic memory allocation.
14338 + Copyright (C) 2002-2003 Free Software Foundation, Inc.
14340 + This program is free software; you can redistribute it and/or modify it
14341 + under the terms of the GNU Library General Public License as published
14342 + by the Free Software Foundation; either version 2, or (at your option)
14343 + any later version.
14345 + This program is distributed in the hope that it will be useful,
14346 + but WITHOUT ANY WARRANTY; without even the implied warranty of
14347 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14348 + Library General Public License for more details.
14350 + You should have received a copy of the GNU Library General Public
14351 + License along with this program; if not, write to the Free Software
14352 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14355 +#ifndef _VASNWPRINTF_H
14356 +#define _VASNWPRINTF_H
14358 +/* Get va_list. */
14359 +#include <stdarg.h>
14361 +/* Get wchar_t, size_t. */
14362 +#include <stddef.h>
14364 +#ifdef __cplusplus
14368 +/* Write formatted output to a string dynamically allocated with malloc().
14369 + You can pass a preallocated buffer for the result in RESULTBUF and its
14370 + size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
14371 + If successful, return the address of the string (this may be = RESULTBUF
14372 + if no dynamic memory allocation was necessary) and set *LENGTHP to the
14373 + number of resulting bytes, excluding the trailing NUL. Upon error, set
14374 + errno and return NULL. */
14375 +extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...);
14376 +extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args);
14378 +#ifdef __cplusplus
14382 +#endif /* _VASNWPRINTF_H */
14383 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/wprintf-parse.h psmisc-20.2.works.clean/intl/wprintf-parse.h
14384 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/wprintf-parse.h 1969-12-31 18:00:00.000000000 -0600
14385 +++ psmisc-20.2.works.clean/intl/wprintf-parse.h 2004-10-13 15:18:42.000000000 -0500
14387 +/* Parse printf format string.
14388 + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
14390 + This program is free software; you can redistribute it and/or modify it
14391 + under the terms of the GNU Library General Public License as published
14392 + by the Free Software Foundation; either version 2, or (at your option)
14393 + any later version.
14395 + This program is distributed in the hope that it will be useful,
14396 + but WITHOUT ANY WARRANTY; without even the implied warranty of
14397 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14398 + Library General Public License for more details.
14400 + You should have received a copy of the GNU Library General Public
14401 + License along with this program; if not, write to the Free Software
14402 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14405 +#ifndef _WPRINTF_PARSE_H
14406 +#define _WPRINTF_PARSE_H
14408 +#include "printf-args.h"
14412 +#define FLAG_GROUP 1 /* ' flag */
14413 +#define FLAG_LEFT 2 /* - flag */
14414 +#define FLAG_SHOWSIGN 4 /* + flag */
14415 +#define FLAG_SPACE 8 /* space flag */
14416 +#define FLAG_ALT 16 /* # flag */
14417 +#define FLAG_ZERO 32
14419 +/* arg_index value indicating that no argument is consumed. */
14420 +#define ARG_NONE (~(size_t)0)
14422 +/* A parsed directive. */
14425 + const wchar_t* dir_start;
14426 + const wchar_t* dir_end;
14428 + const wchar_t* width_start;
14429 + const wchar_t* width_end;
14430 + size_t width_arg_index;
14431 + const wchar_t* precision_start;
14432 + const wchar_t* precision_end;
14433 + size_t precision_arg_index;
14434 + wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
14435 + size_t arg_index;
14437 +wchar_t_directive;
14439 +/* A parsed format string. */
14443 + wchar_t_directive *dir;
14444 + size_t max_width_length;
14445 + size_t max_precision_length;
14447 +wchar_t_directives;
14450 +/* Parses the format string. Fills in the number N of directives, and fills
14451 + in directives[0], ..., directives[N-1], and sets directives[N].dir_start
14452 + to the end of the format string. Also fills in the arg_type fields of the
14453 + arguments and the needed count of arguments. */
14459 +int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a);
14461 +#endif /* _WPRINTF_PARSE_H */
14462 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/xsize.h psmisc-20.2.works.clean/intl/xsize.h
14463 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/intl/xsize.h 1969-12-31 18:00:00.000000000 -0600
14464 +++ psmisc-20.2.works.clean/intl/xsize.h 2004-10-13 15:18:42.000000000 -0500
14466 +/* xsize.h -- Checked size_t computations.
14468 + Copyright (C) 2003 Free Software Foundation, Inc.
14470 + This program is free software; you can redistribute it and/or modify it
14471 + under the terms of the GNU Library General Public License as published
14472 + by the Free Software Foundation; either version 2, or (at your option)
14473 + any later version.
14475 + This program is distributed in the hope that it will be useful,
14476 + but WITHOUT ANY WARRANTY; without even the implied warranty of
14477 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14478 + Library General Public License for more details.
14480 + You should have received a copy of the GNU Library General Public
14481 + License along with this program; if not, write to the Free Software
14482 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14489 +#include <stddef.h>
14491 +/* Get SIZE_MAX. */
14492 +#include <limits.h>
14494 +# include <stdint.h>
14497 +/* The size of memory objects is often computed through expressions of
14498 + type size_t. Example:
14499 + void* p = malloc (header_size + n * element_size).
14500 + These computations can lead to overflow. When this happens, malloc()
14501 + returns a piece of memory that is way too small, and the program then
14502 + crashes while attempting to fill the memory.
14503 + To avoid this, the functions and macros in this file check for overflow.
14504 + The convention is that SIZE_MAX represents overflow.
14505 + malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
14506 + implementation that uses mmap --, it's recommended to use size_overflow_p()
14507 + or size_in_bounds_p() before invoking malloc().
14508 + The example thus becomes:
14509 + size_t size = xsum (header_size, xtimes (n, element_size));
14510 + void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
14513 +/* Convert an arbitrary value >= 0 to type size_t. */
14514 +#define xcast_size_t(N) \
14515 + ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
14517 +/* Sum of two sizes, with overflow check. */
14518 +static inline size_t
14520 +__attribute__ ((__pure__))
14522 +xsum (size_t size1, size_t size2)
14524 + size_t sum = size1 + size2;
14525 + return (sum >= size1 ? sum : SIZE_MAX);
14528 +/* Sum of three sizes, with overflow check. */
14529 +static inline size_t
14531 +__attribute__ ((__pure__))
14533 +xsum3 (size_t size1, size_t size2, size_t size3)
14535 + return xsum (xsum (size1, size2), size3);
14538 +/* Sum of four sizes, with overflow check. */
14539 +static inline size_t
14541 +__attribute__ ((__pure__))
14543 +xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
14545 + return xsum (xsum (xsum (size1, size2), size3), size4);
14548 +/* Maximum of two sizes, with overflow check. */
14549 +static inline size_t
14551 +__attribute__ ((__pure__))
14553 +xmax (size_t size1, size_t size2)
14555 + /* No explicit check is needed here, because for any n:
14556 + max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
14557 + return (size1 >= size2 ? size1 : size2);
14560 +/* Multiplication of a count with an element size, with overflow check.
14561 + The count must be >= 0 and the element size must be > 0.
14562 + This is a macro, not an inline function, so that it works correctly even
14563 + when N is of a wider tupe and N > SIZE_MAX. */
14564 +#define xtimes(N, ELSIZE) \
14565 + ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
14567 +/* Check for overflow. */
14568 +#define size_overflow_p(SIZE) \
14569 + ((SIZE) == SIZE_MAX)
14570 +/* Check against overflow. */
14571 +#define size_in_bounds_p(SIZE) \
14572 + ((SIZE) != SIZE_MAX)
14574 +#endif /* _XSIZE_H */
14575 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/ChangeLog psmisc-20.2.works.clean/m4/ChangeLog
14576 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/ChangeLog 1969-12-31 18:00:00.000000000 -0600
14577 +++ psmisc-20.2.works.clean/m4/ChangeLog 2004-10-13 15:11:01.000000000 -0500
14579 +2004-10-13 gettextize <bug-gnu-gettext@gnu.org>
14581 + * gettext.m4: Upgrade to gettext-0.14.1.
14582 + * intmax.m4: New file, from gettext-0.14.1.
14583 + * inttypes_h.m4: Upgrade to gettext-0.14.1.
14584 + * isc-posix.m4: New file, from gettext-0.14.1.
14585 + * lib-ld.m4: Upgrade to gettext-0.14.1.
14586 + * lib-link.m4: Upgrade to gettext-0.14.1.
14587 + * lib-prefix.m4: Upgrade to gettext-0.14.1.
14588 + * longdouble.m4: New file, from gettext-0.14.1.
14589 + * longlong.m4: New file, from gettext-0.14.1.
14590 + * nls.m4: New file, from gettext-0.14.1.
14591 + * po.m4: New file, from gettext-0.14.1.
14592 + * printf-posix.m4: New file, from gettext-0.14.1.
14593 + * progtest.m4: Upgrade to gettext-0.14.1.
14594 + * signed.m4: New file, from gettext-0.14.1.
14595 + * size_max.m4: New file, from gettext-0.14.1.
14596 + * stdint_h.m4: Upgrade to gettext-0.14.1.
14597 + * uintmax_t.m4: Upgrade to gettext-0.14.1.
14598 + * ulonglong.m4: Upgrade to gettext-0.14.1.
14599 + * wchar_t.m4: New file, from gettext-0.14.1.
14600 + * wint_t.m4: New file, from gettext-0.14.1.
14601 + * xsize.m4: New file, from gettext-0.14.1.
14602 + * Makefile.am: New file.
14604 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/Makefile psmisc-20.2.works.clean/m4/Makefile
14605 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/Makefile.am psmisc-20.2.works.clean/m4/Makefile.am
14606 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/Makefile.am 1969-12-31 18:00:00.000000000 -0600
14607 +++ psmisc-20.2.works.clean/m4/Makefile.am 2004-10-13 15:11:01.000000000 -0500
14609 +EXTRA_DIST = intmax.m4 isc-posix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4
14610 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/Makefile.in psmisc-20.2.works.clean/m4/Makefile.in
14611 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/codeset.m4 psmisc-20.2.works.clean/m4/codeset.m4
14612 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/codeset.m4 1969-12-31 18:00:00.000000000 -0600
14613 +++ psmisc-20.2.works.clean/m4/codeset.m4 2004-10-13 15:18:42.000000000 -0500
14615 +# codeset.m4 serial AM1 (gettext-0.10.40)
14616 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
14617 +dnl This file is free software, distributed under the terms of the GNU
14618 +dnl General Public License. As a special exception to the GNU General
14619 +dnl Public License, this file may be distributed as part of a program
14620 +dnl that contains a configuration script generated by Autoconf, under
14621 +dnl the same distribution terms as the rest of that program.
14623 +dnl From Bruno Haible.
14625 +AC_DEFUN([AM_LANGINFO_CODESET],
14627 + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
14628 + [AC_TRY_LINK([#include <langinfo.h>],
14629 + [char* cs = nl_langinfo(CODESET);],
14630 + am_cv_langinfo_codeset=yes,
14631 + am_cv_langinfo_codeset=no)
14633 + if test $am_cv_langinfo_codeset = yes; then
14634 + AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
14635 + [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
14638 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/codeset.m4~ psmisc-20.2.works.clean/m4/codeset.m4~
14639 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/gettext.m4 psmisc-20.2.works.clean/m4/gettext.m4
14640 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/gettext.m4 1969-12-31 18:00:00.000000000 -0600
14641 +++ psmisc-20.2.works.clean/m4/gettext.m4 2004-10-13 15:18:42.000000000 -0500
14643 +# gettext.m4 serial 28 (gettext-0.13)
14644 +dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
14645 +dnl This file is free software, distributed under the terms of the GNU
14646 +dnl General Public License. As a special exception to the GNU General
14647 +dnl Public License, this file may be distributed as part of a program
14648 +dnl that contains a configuration script generated by Autoconf, under
14649 +dnl the same distribution terms as the rest of that program.
14651 +dnl This file can can be used in projects which are not available under
14652 +dnl the GNU General Public License or the GNU Library General Public
14653 +dnl License but which still want to provide support for the GNU gettext
14654 +dnl functionality.
14655 +dnl Please note that the actual code of the GNU gettext library is covered
14656 +dnl by the GNU Library General Public License, and the rest of the GNU
14657 +dnl gettext package package is covered by the GNU General Public License.
14658 +dnl They are *not* in the public domain.
14661 +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
14662 +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
14664 +dnl Macro to add for using GNU gettext.
14666 +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
14667 +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
14668 +dnl default (if it is not specified or empty) is 'no-libtool'.
14669 +dnl INTLSYMBOL should be 'external' for packages with no intl directory,
14670 +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
14671 +dnl If INTLSYMBOL is 'use-libtool', then a libtool library
14672 +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
14673 +dnl depending on --{enable,disable}-{shared,static} and on the presence of
14674 +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
14675 +dnl $(top_builddir)/intl/libintl.a will be created.
14676 +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
14677 +dnl implementations (in libc or libintl) without the ngettext() function
14678 +dnl will be ignored. If NEEDSYMBOL is specified and is
14679 +dnl 'need-formatstring-macros', then GNU gettext implementations that don't
14680 +dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
14681 +dnl INTLDIR is used to find the intl libraries. If empty,
14682 +dnl the value `$(top_builddir)/intl/' is used.
14684 +dnl The result of the configuration is one of three cases:
14685 +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
14687 +dnl Catalog format: GNU --> install in $(datadir)
14688 +dnl Catalog extension: .mo after installation, .gmo in source tree
14689 +dnl 2) GNU gettext has been found in the system's C library.
14690 +dnl Catalog format: GNU --> install in $(datadir)
14691 +dnl Catalog extension: .mo after installation, .gmo in source tree
14692 +dnl 3) No internationalization, always use English msgid.
14693 +dnl Catalog format: none
14694 +dnl Catalog extension: none
14695 +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
14696 +dnl The use of .gmo is historical (it was needed to avoid overwriting the
14697 +dnl GNU format catalogs when building on a platform with an X/Open gettext),
14698 +dnl but we keep it in order not to force irrelevant filename changes on the
14701 +AC_DEFUN([AM_GNU_GETTEXT],
14703 + dnl Argument checking.
14704 + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
14705 + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
14707 + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
14708 + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
14710 + define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
14711 + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
14713 + AC_REQUIRE([AM_PO_SUBDIRS])dnl
14714 + ifelse(gt_included_intl, yes, [
14715 + AC_REQUIRE([AM_INTL_SUBDIR])dnl
14718 + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
14719 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
14720 + AC_REQUIRE([AC_LIB_RPATH])
14722 + dnl Sometimes libintl requires libiconv, so first search for libiconv.
14723 + dnl Ideally we would do this search only after the
14724 + dnl if test "$USE_NLS" = "yes"; then
14725 + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
14726 + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
14727 + dnl the configure script would need to contain the same shell code
14728 + dnl again, outside any 'if'. There are two solutions:
14729 + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
14730 + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
14731 + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
14732 + dnl documented, we avoid it.
14733 + ifelse(gt_included_intl, yes, , [
14734 + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
14740 + ifelse(gt_included_intl, yes, [
14741 + BUILD_INCLUDED_LIBINTL=no
14742 + USE_INCLUDED_LIBINTL=no
14748 + dnl If we use NLS figure out what method
14749 + if test "$USE_NLS" = "yes"; then
14750 + gt_use_preinstalled_gnugettext=no
14751 + ifelse(gt_included_intl, yes, [
14752 + AC_MSG_CHECKING([whether included gettext is requested])
14753 + AC_ARG_WITH(included-gettext,
14754 + [ --with-included-gettext use the GNU gettext library included here],
14755 + nls_cv_force_use_gnu_gettext=$withval,
14756 + nls_cv_force_use_gnu_gettext=no)
14757 + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
14759 + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
14760 + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
14762 + dnl User does not insist on using GNU NLS library. Figure out what
14763 + dnl to use. If GNU gettext is available we use this. Else we have
14764 + dnl to fall back to GNU NLS library.
14766 + dnl Add a version number to the cache macros.
14767 + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
14768 + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
14769 + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
14771 + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
14772 + [AC_TRY_LINK([#include <libintl.h>
14773 +]ifelse([$2], [need-formatstring-macros],
14774 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
14775 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
14778 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
14779 +changequote([,])dnl
14780 +], [])[extern int _nl_msg_cat_cntr;
14781 +extern int *_nl_domain_bindings;],
14782 + [bindtextdomain ("", "");
14783 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
14784 + gt_cv_func_gnugettext_libc=yes,
14785 + gt_cv_func_gnugettext_libc=no)])
14787 + if test "$gt_cv_func_gnugettext_libc" != "yes"; then
14788 + dnl Sometimes libintl requires libiconv, so first search for libiconv.
14789 + ifelse(gt_included_intl, yes, , [
14792 + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
14793 + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
14794 + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
14795 + dnl even if libiconv doesn't exist.
14796 + AC_LIB_LINKFLAGS_BODY([intl])
14797 + AC_CACHE_CHECK([for GNU gettext in libintl],
14798 + gt_cv_func_gnugettext_libintl,
14799 + [gt_save_CPPFLAGS="$CPPFLAGS"
14800 + CPPFLAGS="$CPPFLAGS $INCINTL"
14801 + gt_save_LIBS="$LIBS"
14802 + LIBS="$LIBS $LIBINTL"
14803 + dnl Now see whether libintl exists and does not depend on libiconv.
14804 + AC_TRY_LINK([#include <libintl.h>
14805 +]ifelse([$2], [need-formatstring-macros],
14806 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
14807 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
14810 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
14811 +changequote([,])dnl
14812 +], [])[extern int _nl_msg_cat_cntr;
14814 +#ifdef __cplusplus
14817 +const char *_nl_expand_alias ();],
14818 + [bindtextdomain ("", "");
14819 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
14820 + gt_cv_func_gnugettext_libintl=yes,
14821 + gt_cv_func_gnugettext_libintl=no)
14822 + dnl Now see whether libintl exists and depends on libiconv.
14823 + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
14824 + LIBS="$LIBS $LIBICONV"
14825 + AC_TRY_LINK([#include <libintl.h>
14826 +]ifelse([$2], [need-formatstring-macros],
14827 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
14828 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
14831 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
14832 +changequote([,])dnl
14833 +], [])[extern int _nl_msg_cat_cntr;
14835 +#ifdef __cplusplus
14838 +const char *_nl_expand_alias ();],
14839 + [bindtextdomain ("", "");
14840 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
14841 + [LIBINTL="$LIBINTL $LIBICONV"
14842 + LTLIBINTL="$LTLIBINTL $LTLIBICONV"
14843 + gt_cv_func_gnugettext_libintl=yes
14846 + CPPFLAGS="$gt_save_CPPFLAGS"
14847 + LIBS="$gt_save_LIBS"])
14850 + dnl If an already present or preinstalled GNU gettext() is found,
14851 + dnl use it. But if this macro is used in GNU gettext, and GNU
14852 + dnl gettext is already preinstalled in libintl, we update this
14853 + dnl libintl. (Cf. the install rule in intl/Makefile.in.)
14854 + if test "$gt_cv_func_gnugettext_libc" = "yes" \
14855 + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
14856 + && test "$PACKAGE" != gettext-runtime \
14857 + && test "$PACKAGE" != gettext-tools; }; then
14858 + gt_use_preinstalled_gnugettext=yes
14860 + dnl Reset the values set by searching for libintl.
14866 + ifelse(gt_included_intl, yes, [
14867 + if test "$gt_use_preinstalled_gnugettext" != "yes"; then
14868 + dnl GNU gettext is not found in the C library.
14869 + dnl Fall back on included GNU gettext library.
14870 + nls_cv_use_gnu_gettext=yes
14874 + if test "$nls_cv_use_gnu_gettext" = "yes"; then
14875 + dnl Mark actions used to generate GNU NLS library.
14876 + BUILD_INCLUDED_LIBINTL=yes
14877 + USE_INCLUDED_LIBINTL=yes
14878 + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
14879 + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
14880 + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
14883 + if test "$gt_use_preinstalled_gnugettext" = "yes" \
14884 + || test "$nls_cv_use_gnu_gettext" = "yes"; then
14885 + dnl Mark actions to use GNU gettext tools.
14890 + if test "$gt_use_preinstalled_gnugettext" = "yes" \
14891 + || test "$nls_cv_use_gnu_gettext" = "yes"; then
14892 + AC_DEFINE(ENABLE_NLS, 1,
14893 + [Define to 1 if translation of program messages to the user's native language
14900 + AC_MSG_CHECKING([whether to use NLS])
14901 + AC_MSG_RESULT([$USE_NLS])
14902 + if test "$USE_NLS" = "yes"; then
14903 + AC_MSG_CHECKING([where the gettext function comes from])
14904 + if test "$gt_use_preinstalled_gnugettext" = "yes"; then
14905 + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
14906 + gt_source="external libintl"
14911 + gt_source="included intl directory"
14913 + AC_MSG_RESULT([$gt_source])
14916 + if test "$USE_NLS" = "yes"; then
14918 + if test "$gt_use_preinstalled_gnugettext" = "yes"; then
14919 + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
14920 + AC_MSG_CHECKING([how to link with libintl])
14921 + AC_MSG_RESULT([$LIBINTL])
14922 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
14925 + dnl For backward compatibility. Some packages may be using this.
14926 + AC_DEFINE(HAVE_GETTEXT, 1,
14927 + [Define if the GNU gettext() function is already present or preinstalled.])
14928 + AC_DEFINE(HAVE_DCGETTEXT, 1,
14929 + [Define if the GNU dcgettext() function is already present or preinstalled.])
14932 + dnl We need to process the po/ directory.
14936 + ifelse(gt_included_intl, yes, [
14937 + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
14938 + dnl to 'yes' because some of the testsuite requires it.
14939 + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
14940 + BUILD_INCLUDED_LIBINTL=yes
14943 + dnl Make all variables we use known to autoconf.
14944 + AC_SUBST(BUILD_INCLUDED_LIBINTL)
14945 + AC_SUBST(USE_INCLUDED_LIBINTL)
14946 + AC_SUBST(CATOBJEXT)
14948 + dnl For backward compatibility. Some configure.ins may be using this.
14949 + nls_cv_header_intl=
14950 + nls_cv_header_libgt=
14952 + dnl For backward compatibility. Some Makefiles may be using this.
14953 + DATADIRNAME=share
14954 + AC_SUBST(DATADIRNAME)
14956 + dnl For backward compatibility. Some Makefiles may be using this.
14958 + AC_SUBST(INSTOBJEXT)
14960 + dnl For backward compatibility. Some Makefiles may be using this.
14964 + dnl For backward compatibility. Some Makefiles may be using this.
14965 + if test "$USE_INCLUDED_LIBINTL" = yes; then
14966 + INTLOBJS="\$(GETTOBJS)"
14968 + AC_SUBST(INTLOBJS)
14970 + dnl Enable libtool support if the surrounding package wishes it.
14971 + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
14972 + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
14975 + dnl For backward compatibility. Some Makefiles may be using this.
14976 + INTLLIBS="$LIBINTL"
14977 + AC_SUBST(INTLLIBS)
14979 + dnl Make all documented variables known to autoconf.
14980 + AC_SUBST(LIBINTL)
14981 + AC_SUBST(LTLIBINTL)
14986 +dnl Checks for all prerequisites of the intl subdirectory,
14987 +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
14988 +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
14989 +AC_DEFUN([AM_INTL_SUBDIR],
14991 + AC_REQUIRE([AC_PROG_INSTALL])dnl
14992 + AC_REQUIRE([AM_MKINSTALLDIRS])dnl
14993 + AC_REQUIRE([AC_PROG_CC])dnl
14994 + AC_REQUIRE([AC_CANONICAL_HOST])dnl
14995 + AC_REQUIRE([AC_PROG_RANLIB])dnl
14996 + AC_REQUIRE([AC_ISC_POSIX])dnl
14997 + AC_REQUIRE([AC_HEADER_STDC])dnl
14998 + AC_REQUIRE([AC_C_CONST])dnl
14999 + AC_REQUIRE([bh_C_SIGNED])dnl
15000 + AC_REQUIRE([AC_C_INLINE])dnl
15001 + AC_REQUIRE([AC_TYPE_OFF_T])dnl
15002 + AC_REQUIRE([AC_TYPE_SIZE_T])dnl
15003 + AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
15004 + AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
15005 + AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
15006 + AC_REQUIRE([gt_TYPE_WINT_T])dnl
15007 + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
15008 + AC_REQUIRE([jm_AC_HEADER_STDINT_H])
15009 + AC_REQUIRE([gt_TYPE_INTMAX_T])
15010 + AC_REQUIRE([gt_PRINTF_POSIX])
15011 + AC_REQUIRE([AC_FUNC_ALLOCA])dnl
15012 + AC_REQUIRE([AC_FUNC_MMAP])dnl
15013 + AC_REQUIRE([jm_GLIBC21])dnl
15014 + AC_REQUIRE([gt_INTDIV0])dnl
15015 + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
15016 + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
15017 + AC_REQUIRE([gt_INTTYPES_PRI])dnl
15018 + AC_REQUIRE([gl_XSIZE])dnl
15020 + AC_CHECK_TYPE([ptrdiff_t], ,
15021 + [AC_DEFINE([ptrdiff_t], [long],
15022 + [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
15024 + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
15025 +stdlib.h string.h unistd.h sys/param.h])
15026 + AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
15027 +mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
15028 +strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
15031 + dnl Use the _snprintf function only if it is declared (because on NetBSD it
15032 + dnl is defined as a weak alias of snprintf; we prefer to use the latter).
15033 + gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
15034 + gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
15036 + dnl Use the *_unlocked functions only if they are declared.
15037 + dnl (because some of them were defined without being declared in Solaris
15038 + dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
15039 + dnl on Solaris 2.5.1 to run on Solaris 2.6).
15040 + dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
15041 + gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
15042 + gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
15043 + gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
15045 + case $gt_cv_func_printf_posix in
15046 + *yes) HAVE_POSIX_PRINTF=1 ;;
15047 + *) HAVE_POSIX_PRINTF=0 ;;
15049 + AC_SUBST([HAVE_POSIX_PRINTF])
15050 + if test "$ac_cv_func_asprintf" = yes; then
15055 + AC_SUBST([HAVE_ASPRINTF])
15056 + if test "$ac_cv_func_snprintf" = yes; then
15061 + AC_SUBST([HAVE_SNPRINTF])
15062 + if test "$ac_cv_func_wprintf" = yes; then
15067 + AC_SUBST([HAVE_WPRINTF])
15070 + AM_LANGINFO_CODESET
15071 + if test $ac_cv_header_locale_h = yes; then
15075 + dnl intl/plural.c is generated from intl/plural.y. It requires bison,
15076 + dnl because plural.y uses bison specific features. It requires at least
15077 + dnl bison-1.26 because earlier versions generate a plural.c that doesn't
15079 + dnl bison is only needed for the maintainer (who touches plural.y). But in
15080 + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
15081 + dnl the rule in general Makefile. Now, some people carelessly touch the
15082 + dnl files or have a broken "make" program, hence the plural.c rule will
15083 + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
15084 + dnl present or too old.
15085 + AC_CHECK_PROGS([INTLBISON], [bison])
15086 + if test -z "$INTLBISON"; then
15089 + dnl Found it, now check the version.
15090 + AC_MSG_CHECKING([version of bison])
15091 +changequote(<<,>>)dnl
15092 + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
15093 + case $ac_prog_version in
15094 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
15095 + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
15096 +changequote([,])dnl
15097 + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
15098 + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
15100 + AC_MSG_RESULT([$ac_prog_version])
15102 + if test $ac_verc_fail = yes; then
15108 +dnl gt_CHECK_DECL(FUNC, INCLUDES)
15109 +dnl Check whether a function is declared.
15110 +AC_DEFUN([gt_CHECK_DECL],
15112 + AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
15113 + [AC_TRY_COMPILE([$2], [
15115 + char *p = (char *) $1;
15117 +], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
15118 + if test $ac_cv_have_decl_$1 = yes; then
15123 + AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
15124 + [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
15128 +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
15129 +AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
15130 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/gettext.m4~ psmisc-20.2.works.clean/m4/gettext.m4~
15131 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/glibc21.m4 psmisc-20.2.works.clean/m4/glibc21.m4
15132 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/glibc21.m4 1969-12-31 18:00:00.000000000 -0600
15133 +++ psmisc-20.2.works.clean/m4/glibc21.m4 2004-10-13 15:18:42.000000000 -0500
15135 +# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
15136 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
15137 +dnl This file is free software, distributed under the terms of the GNU
15138 +dnl General Public License. As a special exception to the GNU General
15139 +dnl Public License, this file may be distributed as part of a program
15140 +dnl that contains a configuration script generated by Autoconf, under
15141 +dnl the same distribution terms as the rest of that program.
15143 +# Test for the GNU C Library, version 2.1 or newer.
15144 +# From Bruno Haible.
15146 +AC_DEFUN([jm_GLIBC21],
15148 + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
15149 + ac_cv_gnu_library_2_1,
15150 + [AC_EGREP_CPP([Lucky GNU user],
15152 +#include <features.h>
15153 +#ifdef __GNU_LIBRARY__
15154 + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
15159 + ac_cv_gnu_library_2_1=yes,
15160 + ac_cv_gnu_library_2_1=no)
15163 + AC_SUBST(GLIBC21)
15164 + GLIBC21="$ac_cv_gnu_library_2_1"
15167 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/glibc21.m4~ psmisc-20.2.works.clean/m4/glibc21.m4~
15168 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/iconv.m4 psmisc-20.2.works.clean/m4/iconv.m4
15169 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/iconv.m4 1969-12-31 18:00:00.000000000 -0600
15170 +++ psmisc-20.2.works.clean/m4/iconv.m4 2004-10-13 15:18:42.000000000 -0500
15172 +# iconv.m4 serial AM4 (gettext-0.11.3)
15173 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
15174 +dnl This file is free software, distributed under the terms of the GNU
15175 +dnl General Public License. As a special exception to the GNU General
15176 +dnl Public License, this file may be distributed as part of a program
15177 +dnl that contains a configuration script generated by Autoconf, under
15178 +dnl the same distribution terms as the rest of that program.
15180 +dnl From Bruno Haible.
15182 +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
15184 + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
15185 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
15186 + AC_REQUIRE([AC_LIB_RPATH])
15188 + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
15190 + AC_LIB_LINKFLAGS_BODY([iconv])
15193 +AC_DEFUN([AM_ICONV_LINK],
15195 + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
15196 + dnl those with the standalone portable GNU libiconv installed).
15198 + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
15200 + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
15202 + dnl Add $INCICONV to CPPFLAGS before performing the following checks,
15203 + dnl because if the user has installed libiconv and not disabled its use
15204 + dnl via --without-libiconv-prefix, he wants to use it. The first
15205 + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
15206 + am_save_CPPFLAGS="$CPPFLAGS"
15207 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
15209 + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
15210 + am_cv_func_iconv="no, consider installing GNU libiconv"
15211 + am_cv_lib_iconv=no
15212 + AC_TRY_LINK([#include <stdlib.h>
15213 +#include <iconv.h>],
15214 + [iconv_t cd = iconv_open("","");
15215 + iconv(cd,NULL,NULL,NULL,NULL);
15216 + iconv_close(cd);],
15217 + am_cv_func_iconv=yes)
15218 + if test "$am_cv_func_iconv" != yes; then
15219 + am_save_LIBS="$LIBS"
15220 + LIBS="$LIBS $LIBICONV"
15221 + AC_TRY_LINK([#include <stdlib.h>
15222 +#include <iconv.h>],
15223 + [iconv_t cd = iconv_open("","");
15224 + iconv(cd,NULL,NULL,NULL,NULL);
15225 + iconv_close(cd);],
15226 + am_cv_lib_iconv=yes
15227 + am_cv_func_iconv=yes)
15228 + LIBS="$am_save_LIBS"
15231 + if test "$am_cv_func_iconv" = yes; then
15232 + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
15234 + if test "$am_cv_lib_iconv" = yes; then
15235 + AC_MSG_CHECKING([how to link with libiconv])
15236 + AC_MSG_RESULT([$LIBICONV])
15238 + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
15240 + CPPFLAGS="$am_save_CPPFLAGS"
15244 + AC_SUBST(LIBICONV)
15245 + AC_SUBST(LTLIBICONV)
15248 +AC_DEFUN([AM_ICONV],
15251 + if test "$am_cv_func_iconv" = yes; then
15252 + AC_MSG_CHECKING([for iconv declaration])
15253 + AC_CACHE_VAL(am_cv_proto_iconv, [
15255 +#include <stdlib.h>
15256 +#include <iconv.h>
15258 +#ifdef __cplusplus
15261 +#if defined(__STDC__) || defined(__cplusplus)
15262 +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
15266 +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
15267 + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
15268 + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
15269 + AC_MSG_RESULT([$]{ac_t:-
15270 + }[$]am_cv_proto_iconv)
15271 + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
15272 + [Define as const if the declaration of iconv() needs const.])
15275 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/iconv.m4~ psmisc-20.2.works.clean/m4/iconv.m4~
15276 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/intdiv0.m4 psmisc-20.2.works.clean/m4/intdiv0.m4
15277 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/intdiv0.m4 1969-12-31 18:00:00.000000000 -0600
15278 +++ psmisc-20.2.works.clean/m4/intdiv0.m4 2004-10-13 15:18:42.000000000 -0500
15280 +# intdiv0.m4 serial 1 (gettext-0.11.3)
15281 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
15282 +dnl This file is free software, distributed under the terms of the GNU
15283 +dnl General Public License. As a special exception to the GNU General
15284 +dnl Public License, this file may be distributed as part of a program
15285 +dnl that contains a configuration script generated by Autoconf, under
15286 +dnl the same distribution terms as the rest of that program.
15288 +dnl From Bruno Haible.
15290 +AC_DEFUN([gt_INTDIV0],
15292 + AC_REQUIRE([AC_PROG_CC])dnl
15293 + AC_REQUIRE([AC_CANONICAL_HOST])dnl
15295 + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
15296 + gt_cv_int_divbyzero_sigfpe,
15299 +#include <stdlib.h>
15300 +#include <signal.h>
15303 +#ifdef __cplusplus
15304 +sigfpe_handler (int sig)
15306 +sigfpe_handler (sig) int sig;
15309 + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
15310 + exit (sig != SIGFPE);
15320 + signal (SIGFPE, sigfpe_handler);
15321 +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
15322 +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
15323 + signal (SIGTRAP, sigfpe_handler);
15325 +/* Linux/SPARC yields signal SIGILL. */
15326 +#if defined (__sparc__) && defined (__linux__)
15327 + signal (SIGILL, sigfpe_handler);
15334 +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
15336 + # Guess based on the CPU.
15337 + case "$host_cpu" in
15338 + alpha* | i[34567]86 | m68k | s390*)
15339 + gt_cv_int_divbyzero_sigfpe="guessing yes";;
15341 + gt_cv_int_divbyzero_sigfpe="guessing no";;
15345 + case "$gt_cv_int_divbyzero_sigfpe" in
15349 + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
15350 + [Define if integer division by zero raises signal SIGFPE.])
15352 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/intdiv0.m4~ psmisc-20.2.works.clean/m4/intdiv0.m4~
15353 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/intmax.m4 psmisc-20.2.works.clean/m4/intmax.m4
15354 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/intmax.m4 1969-12-31 18:00:00.000000000 -0600
15355 +++ psmisc-20.2.works.clean/m4/intmax.m4 2004-10-13 15:18:42.000000000 -0500
15357 +# intmax.m4 serial 1 (gettext-0.12)
15358 +dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
15359 +dnl This file is free software, distributed under the terms of the GNU
15360 +dnl General Public License. As a special exception to the GNU General
15361 +dnl Public License, this file may be distributed as part of a program
15362 +dnl that contains a configuration script generated by Autoconf, under
15363 +dnl the same distribution terms as the rest of that program.
15365 +dnl From Bruno Haible.
15366 +dnl Test whether the system has the 'intmax_t' type, but don't attempt to
15367 +dnl find a replacement if it is lacking.
15369 +AC_DEFUN([gt_TYPE_INTMAX_T],
15371 + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
15372 + AC_REQUIRE([jm_AC_HEADER_STDINT_H])
15373 + AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
15374 + [AC_TRY_COMPILE([
15375 +#include <stddef.h>
15376 +#include <stdlib.h>
15377 +#if HAVE_STDINT_H_WITH_UINTMAX
15378 +#include <stdint.h>
15380 +#if HAVE_INTTYPES_H_WITH_UINTMAX
15381 +#include <inttypes.h>
15383 +], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
15384 + if test $gt_cv_c_intmax_t = yes; then
15385 + AC_DEFINE(HAVE_INTMAX_T, 1,
15386 + [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
15389 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/intmax.m4~ psmisc-20.2.works.clean/m4/intmax.m4~
15390 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes-pri.m4 psmisc-20.2.works.clean/m4/inttypes-pri.m4
15391 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes-pri.m4 1969-12-31 18:00:00.000000000 -0600
15392 +++ psmisc-20.2.works.clean/m4/inttypes-pri.m4 2004-10-13 15:18:42.000000000 -0500
15394 +# inttypes-pri.m4 serial 1 (gettext-0.11.4)
15395 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
15396 +dnl This file is free software, distributed under the terms of the GNU
15397 +dnl General Public License. As a special exception to the GNU General
15398 +dnl Public License, this file may be distributed as part of a program
15399 +dnl that contains a configuration script generated by Autoconf, under
15400 +dnl the same distribution terms as the rest of that program.
15402 +dnl From Bruno Haible.
15404 +# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
15405 +# macros to non-string values. This is the case on AIX 4.3.3.
15407 +AC_DEFUN([gt_INTTYPES_PRI],
15409 + AC_REQUIRE([gt_HEADER_INTTYPES_H])
15410 + if test $gt_cv_header_inttypes_h = yes; then
15411 + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
15412 + gt_cv_inttypes_pri_broken,
15414 + AC_TRY_COMPILE([#include <inttypes.h>
15418 +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
15421 + if test "$gt_cv_inttypes_pri_broken" = yes; then
15422 + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
15423 + [Define if <inttypes.h> exists and defines unusable PRI* macros.])
15426 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes-pri.m4~ psmisc-20.2.works.clean/m4/inttypes-pri.m4~
15427 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes.m4 psmisc-20.2.works.clean/m4/inttypes.m4
15428 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes.m4 1969-12-31 18:00:00.000000000 -0600
15429 +++ psmisc-20.2.works.clean/m4/inttypes.m4 2004-10-13 15:18:42.000000000 -0500
15431 +# inttypes.m4 serial 1 (gettext-0.11.4)
15432 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
15433 +dnl This file is free software, distributed under the terms of the GNU
15434 +dnl General Public License. As a special exception to the GNU General
15435 +dnl Public License, this file may be distributed as part of a program
15436 +dnl that contains a configuration script generated by Autoconf, under
15437 +dnl the same distribution terms as the rest of that program.
15439 +dnl From Paul Eggert.
15441 +# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
15444 +AC_DEFUN([gt_HEADER_INTTYPES_H],
15446 + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
15449 + [#include <sys/types.h>
15450 +#include <inttypes.h>],
15451 + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
15453 + if test $gt_cv_header_inttypes_h = yes; then
15454 + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
15455 + [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
15458 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes.m4~ psmisc-20.2.works.clean/m4/inttypes.m4~
15459 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes_h.m4 psmisc-20.2.works.clean/m4/inttypes_h.m4
15460 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes_h.m4 1969-12-31 18:00:00.000000000 -0600
15461 +++ psmisc-20.2.works.clean/m4/inttypes_h.m4 2004-10-13 15:18:42.000000000 -0500
15463 +# inttypes_h.m4 serial 5 (gettext-0.12)
15464 +dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
15465 +dnl This file is free software, distributed under the terms of the GNU
15466 +dnl General Public License. As a special exception to the GNU General
15467 +dnl Public License, this file may be distributed as part of a program
15468 +dnl that contains a configuration script generated by Autoconf, under
15469 +dnl the same distribution terms as the rest of that program.
15471 +dnl From Paul Eggert.
15473 +# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
15474 +# doesn't clash with <sys/types.h>, and declares uintmax_t.
15476 +AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
15478 + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
15480 + [#include <sys/types.h>
15481 +#include <inttypes.h>],
15482 + [uintmax_t i = (uintmax_t) -1;],
15483 + jm_ac_cv_header_inttypes_h=yes,
15484 + jm_ac_cv_header_inttypes_h=no)])
15485 + if test $jm_ac_cv_header_inttypes_h = yes; then
15486 + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
15487 + [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
15488 + and declares uintmax_t. ])
15491 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/inttypes_h.m4~ psmisc-20.2.works.clean/m4/inttypes_h.m4~
15492 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/isc-posix.m4 psmisc-20.2.works.clean/m4/isc-posix.m4
15493 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/isc-posix.m4 1969-12-31 18:00:00.000000000 -0600
15494 +++ psmisc-20.2.works.clean/m4/isc-posix.m4 2004-10-13 15:18:42.000000000 -0500
15496 +# isc-posix.m4 serial 2 (gettext-0.11.2)
15497 +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
15498 +dnl This file is free software, distributed under the terms of the GNU
15499 +dnl General Public License. As a special exception to the GNU General
15500 +dnl Public License, this file may be distributed as part of a program
15501 +dnl that contains a configuration script generated by Autoconf, under
15502 +dnl the same distribution terms as the rest of that program.
15504 +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
15506 +# This test replaces the one in autoconf.
15507 +# Currently this macro should have the same name as the autoconf macro
15508 +# because gettext's gettext.m4 (distributed in the automake package)
15509 +# still uses it. Otherwise, the use in gettext.m4 makes autoheader
15510 +# give these diagnostics:
15511 +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
15512 +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
15514 +undefine([AC_ISC_POSIX])
15516 +AC_DEFUN([AC_ISC_POSIX],
15518 + dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
15519 + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
15522 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/isc-posix.m4~ psmisc-20.2.works.clean/m4/isc-posix.m4~
15523 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lcmessage.m4 psmisc-20.2.works.clean/m4/lcmessage.m4
15524 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lcmessage.m4 1969-12-31 18:00:00.000000000 -0600
15525 +++ psmisc-20.2.works.clean/m4/lcmessage.m4 2004-10-13 15:18:42.000000000 -0500
15527 +# lcmessage.m4 serial 3 (gettext-0.11.3)
15528 +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
15529 +dnl This file is free software, distributed under the terms of the GNU
15530 +dnl General Public License. As a special exception to the GNU General
15531 +dnl Public License, this file may be distributed as part of a program
15532 +dnl that contains a configuration script generated by Autoconf, under
15533 +dnl the same distribution terms as the rest of that program.
15535 +dnl This file can can be used in projects which are not available under
15536 +dnl the GNU General Public License or the GNU Library General Public
15537 +dnl License but which still want to provide support for the GNU gettext
15538 +dnl functionality.
15539 +dnl Please note that the actual code of the GNU gettext library is covered
15540 +dnl by the GNU Library General Public License, and the rest of the GNU
15541 +dnl gettext package package is covered by the GNU General Public License.
15542 +dnl They are *not* in the public domain.
15545 +dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
15547 +# Check whether LC_MESSAGES is available in <locale.h>.
15549 +AC_DEFUN([AM_LC_MESSAGES],
15551 + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
15552 + [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
15553 + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
15554 + if test $am_cv_val_LC_MESSAGES = yes; then
15555 + AC_DEFINE(HAVE_LC_MESSAGES, 1,
15556 + [Define if your <locale.h> file defines LC_MESSAGES.])
15559 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lcmessage.m4~ psmisc-20.2.works.clean/m4/lcmessage.m4~
15560 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-ld.m4 psmisc-20.2.works.clean/m4/lib-ld.m4
15561 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-ld.m4 1969-12-31 18:00:00.000000000 -0600
15562 +++ psmisc-20.2.works.clean/m4/lib-ld.m4 2004-10-13 15:18:42.000000000 -0500
15564 +# lib-ld.m4 serial 3 (gettext-0.13)
15565 +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
15566 +dnl This file is free software, distributed under the terms of the GNU
15567 +dnl General Public License. As a special exception to the GNU General
15568 +dnl Public License, this file may be distributed as part of a program
15569 +dnl that contains a configuration script generated by Autoconf, under
15570 +dnl the same distribution terms as the rest of that program.
15572 +dnl Subroutines of libtool.m4,
15573 +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
15574 +dnl with libtool.m4.
15576 +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
15577 +AC_DEFUN([AC_LIB_PROG_LD_GNU],
15578 +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
15579 +[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
15580 +case `$LD -v 2>&1 </dev/null` in
15581 +*GNU* | *'with BFD'*)
15582 + acl_cv_prog_gnu_ld=yes ;;
15584 + acl_cv_prog_gnu_ld=no ;;
15586 +with_gnu_ld=$acl_cv_prog_gnu_ld
15589 +dnl From libtool-1.4. Sets the variable LD.
15590 +AC_DEFUN([AC_LIB_PROG_LD],
15591 +[AC_ARG_WITH(gnu-ld,
15592 +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
15593 +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
15594 +AC_REQUIRE([AC_PROG_CC])dnl
15595 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
15596 +# Prepare PATH_SEPARATOR.
15597 +# The user is always right.
15598 +if test "${PATH_SEPARATOR+set}" != set; then
15599 + echo "#! /bin/sh" >conf$$.sh
15600 + echo "exit 0" >>conf$$.sh
15601 + chmod +x conf$$.sh
15602 + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
15603 + PATH_SEPARATOR=';'
15610 +if test "$GCC" = yes; then
15611 + # Check if gcc -print-prog-name=ld gives a path.
15612 + AC_MSG_CHECKING([for ld used by GCC])
15615 + # gcc leaves a trailing carriage return which upsets mingw
15616 + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
15618 + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
15621 + # Accept absolute paths.
15622 + [[\\/]* | [A-Za-z]:[\\/]*)]
15623 + [re_direlt='/[^/][^/]*/\.\./']
15624 + # Canonicalize the path of ld
15625 + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
15626 + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
15627 + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
15629 + test -z "$LD" && LD="$ac_prog"
15632 + # If it fails, then pretend we aren't using GCC.
15636 + # If it is relative, then search for the first ld in PATH.
15637 + with_gnu_ld=unknown
15640 +elif test "$with_gnu_ld" = yes; then
15641 + AC_MSG_CHECKING([for GNU ld])
15643 + AC_MSG_CHECKING([for non-GNU ld])
15645 +AC_CACHE_VAL(acl_cv_path_LD,
15646 +[if test -z "$LD"; then
15647 + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
15648 + for ac_dir in $PATH; do
15649 + test -z "$ac_dir" && ac_dir=.
15650 + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
15651 + acl_cv_path_LD="$ac_dir/$ac_prog"
15652 + # Check to see if the program is GNU ld. I'd rather use --version,
15653 + # but apparently some GNU ld's only accept -v.
15654 + # Break only if it was the GNU/non-GNU ld that we prefer.
15655 + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
15656 + *GNU* | *'with BFD'*)
15657 + test "$with_gnu_ld" != no && break ;;
15659 + test "$with_gnu_ld" != yes && break ;;
15663 + IFS="$ac_save_ifs"
15665 + acl_cv_path_LD="$LD" # Let the user override the test with a path.
15667 +LD="$acl_cv_path_LD"
15668 +if test -n "$LD"; then
15669 + AC_MSG_RESULT($LD)
15671 + AC_MSG_RESULT(no)
15673 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
15674 +AC_LIB_PROG_LD_GNU
15676 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-ld.m4~ psmisc-20.2.works.clean/m4/lib-ld.m4~
15677 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-link.m4 psmisc-20.2.works.clean/m4/lib-link.m4
15678 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-link.m4 1969-12-31 18:00:00.000000000 -0600
15679 +++ psmisc-20.2.works.clean/m4/lib-link.m4 2004-10-13 15:18:42.000000000 -0500
15681 +# lib-link.m4 serial 4 (gettext-0.12)
15682 +dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
15683 +dnl This file is free software, distributed under the terms of the GNU
15684 +dnl General Public License. As a special exception to the GNU General
15685 +dnl Public License, this file may be distributed as part of a program
15686 +dnl that contains a configuration script generated by Autoconf, under
15687 +dnl the same distribution terms as the rest of that program.
15689 +dnl From Bruno Haible.
15691 +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
15692 +dnl the libraries corresponding to explicit and implicit dependencies.
15693 +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
15694 +dnl augments the CPPFLAGS variable.
15695 +AC_DEFUN([AC_LIB_LINKFLAGS],
15697 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
15698 + AC_REQUIRE([AC_LIB_RPATH])
15699 + define([Name],[translit([$1],[./-], [___])])
15700 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
15701 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
15702 + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
15703 + AC_LIB_LINKFLAGS_BODY([$1], [$2])
15704 + ac_cv_lib[]Name[]_libs="$LIB[]NAME"
15705 + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
15706 + ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
15708 + LIB[]NAME="$ac_cv_lib[]Name[]_libs"
15709 + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
15710 + INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
15711 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
15712 + AC_SUBST([LIB]NAME)
15713 + AC_SUBST([LTLIB]NAME)
15714 + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
15715 + dnl results of this search when this library appears as a dependency.
15716 + HAVE_LIB[]NAME=yes
15721 +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
15722 +dnl searches for libname and the libraries corresponding to explicit and
15723 +dnl implicit dependencies, together with the specified include files and
15724 +dnl the ability to compile and link the specified testcode. If found, it
15725 +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
15726 +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
15727 +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
15728 +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
15729 +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
15731 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
15732 + AC_REQUIRE([AC_LIB_RPATH])
15733 + define([Name],[translit([$1],[./-], [___])])
15734 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
15735 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
15737 + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
15739 + AC_LIB_LINKFLAGS_BODY([$1], [$2])
15741 + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
15742 + dnl because if the user has installed lib[]Name and not disabled its use
15743 + dnl via --without-lib[]Name-prefix, he wants to use it.
15744 + ac_save_CPPFLAGS="$CPPFLAGS"
15745 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
15747 + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
15748 + ac_save_LIBS="$LIBS"
15749 + LIBS="$LIBS $LIB[]NAME"
15750 + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
15751 + LIBS="$ac_save_LIBS"
15753 + if test "$ac_cv_lib[]Name" = yes; then
15754 + HAVE_LIB[]NAME=yes
15755 + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
15756 + AC_MSG_CHECKING([how to link with lib[]$1])
15757 + AC_MSG_RESULT([$LIB[]NAME])
15759 + HAVE_LIB[]NAME=no
15760 + dnl If $LIB[]NAME didn't lead to a usable library, we don't need
15761 + dnl $INC[]NAME either.
15762 + CPPFLAGS="$ac_save_CPPFLAGS"
15766 + AC_SUBST([HAVE_LIB]NAME)
15767 + AC_SUBST([LIB]NAME)
15768 + AC_SUBST([LTLIB]NAME)
15773 +dnl Determine the platform dependent parameters needed to use rpath:
15774 +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
15775 +dnl hardcode_direct, hardcode_minus_L.
15776 +AC_DEFUN([AC_LIB_RPATH],
15778 + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
15779 + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
15780 + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
15781 + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
15782 + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
15783 + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
15784 + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
15786 + rm -f ./conftest.sh
15787 + acl_cv_rpath=done
15790 + libext="$acl_cv_libext"
15791 + shlibext="$acl_cv_shlibext"
15792 + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
15793 + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
15794 + hardcode_direct="$acl_cv_hardcode_direct"
15795 + hardcode_minus_L="$acl_cv_hardcode_minus_L"
15796 + dnl Determine whether the user wants rpath handling at all.
15797 + AC_ARG_ENABLE(rpath,
15798 + [ --disable-rpath do not hardcode runtime library paths],
15799 + :, enable_rpath=yes)
15802 +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
15803 +dnl the libraries corresponding to explicit and implicit dependencies.
15804 +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
15805 +AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
15807 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
15808 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
15809 + dnl By default, look in $includedir and $libdir.
15810 + use_additional=yes
15811 + AC_LIB_WITH_FINAL_PREFIX([
15812 + eval additional_includedir=\"$includedir\"
15813 + eval additional_libdir=\"$libdir\"
15815 + AC_LIB_ARG_WITH([lib$1-prefix],
15816 +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
15817 + --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
15819 + if test "X$withval" = "Xno"; then
15820 + use_additional=no
15822 + if test "X$withval" = "X"; then
15823 + AC_LIB_WITH_FINAL_PREFIX([
15824 + eval additional_includedir=\"$includedir\"
15825 + eval additional_libdir=\"$libdir\"
15828 + additional_includedir="$withval/include"
15829 + additional_libdir="$withval/lib"
15833 + dnl Search the library and its dependencies in $additional_libdir and
15834 + dnl $LDFLAGS. Using breadth-first-seach.
15840 + names_already_handled=
15841 + names_next_round='$1 $2'
15842 + while test -n "$names_next_round"; do
15843 + names_this_round="$names_next_round"
15844 + names_next_round=
15845 + for name in $names_this_round; do
15847 + for n in $names_already_handled; do
15848 + if test "$n" = "$name"; then
15849 + already_handled=yes
15853 + if test -z "$already_handled"; then
15854 + names_already_handled="$names_already_handled $name"
15855 + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
15856 + dnl or AC_LIB_HAVE_LINKFLAGS call.
15857 + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15858 + eval value=\"\$HAVE_LIB$uppername\"
15859 + if test -n "$value"; then
15860 + if test "$value" = yes; then
15861 + eval value=\"\$LIB$uppername\"
15862 + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
15863 + eval value=\"\$LTLIB$uppername\"
15864 + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
15866 + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
15867 + dnl that this library doesn't exist. So just drop it.
15871 + dnl Search the library lib$name in $additional_libdir and $LDFLAGS
15872 + dnl and the already constructed $LIBNAME/$LTLIBNAME.
15877 + if test $use_additional = yes; then
15878 + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15879 + found_dir="$additional_libdir"
15880 + found_so="$additional_libdir/lib$name.$shlibext"
15881 + if test -f "$additional_libdir/lib$name.la"; then
15882 + found_la="$additional_libdir/lib$name.la"
15885 + if test -f "$additional_libdir/lib$name.$libext"; then
15886 + found_dir="$additional_libdir"
15887 + found_a="$additional_libdir/lib$name.$libext"
15888 + if test -f "$additional_libdir/lib$name.la"; then
15889 + found_la="$additional_libdir/lib$name.la"
15894 + if test "X$found_dir" = "X"; then
15895 + for x in $LDFLAGS $LTLIB[]NAME; do
15896 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
15899 + dir=`echo "X$x" | sed -e 's/^X-L//'`
15900 + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15902 + found_so="$dir/lib$name.$shlibext"
15903 + if test -f "$dir/lib$name.la"; then
15904 + found_la="$dir/lib$name.la"
15907 + if test -f "$dir/lib$name.$libext"; then
15909 + found_a="$dir/lib$name.$libext"
15910 + if test -f "$dir/lib$name.la"; then
15911 + found_la="$dir/lib$name.la"
15917 + if test "X$found_dir" != "X"; then
15922 + if test "X$found_dir" != "X"; then
15923 + dnl Found the library.
15924 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
15925 + if test "X$found_so" != "X"; then
15926 + dnl Linking with a shared library. We attempt to hardcode its
15927 + dnl directory into the executable's runpath, unless it's the
15928 + dnl standard /usr/lib.
15929 + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15930 + dnl No hardcoding is needed.
15931 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
15933 + dnl Use an explicit option to hardcode DIR into the resulting
15935 + dnl Potentially add DIR to ltrpathdirs.
15936 + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
15938 + for x in $ltrpathdirs; do
15939 + if test "X$x" = "X$found_dir"; then
15944 + if test -z "$haveit"; then
15945 + ltrpathdirs="$ltrpathdirs $found_dir"
15947 + dnl The hardcoding into $LIBNAME is system dependent.
15948 + if test "$hardcode_direct" = yes; then
15949 + dnl Using DIR/libNAME.so during linking hardcodes DIR into the
15950 + dnl resulting binary.
15951 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
15953 + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15954 + dnl Use an explicit option to hardcode DIR into the resulting
15956 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
15957 + dnl Potentially add DIR to rpathdirs.
15958 + dnl The rpathdirs will be appended to $LIBNAME at the end.
15960 + for x in $rpathdirs; do
15961 + if test "X$x" = "X$found_dir"; then
15966 + if test -z "$haveit"; then
15967 + rpathdirs="$rpathdirs $found_dir"
15970 + dnl Rely on "-L$found_dir".
15971 + dnl But don't add it if it's already contained in the LDFLAGS
15972 + dnl or the already constructed $LIBNAME
15974 + for x in $LDFLAGS $LIB[]NAME; do
15975 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
15976 + if test "X$x" = "X-L$found_dir"; then
15981 + if test -z "$haveit"; then
15982 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
15984 + if test "$hardcode_minus_L" != no; then
15985 + dnl FIXME: Not sure whether we should use
15986 + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
15988 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
15990 + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
15991 + dnl here, because this doesn't fit in flags passed to the
15992 + dnl compiler. So give up. No hardcoding. This affects only
15993 + dnl very old systems.
15994 + dnl FIXME: Not sure whether we should use
15995 + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
15997 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
16003 + if test "X$found_a" != "X"; then
16004 + dnl Linking with a static library.
16005 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
16007 + dnl We shouldn't come here, but anyway it's good to have a
16009 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
16012 + dnl Assume the include files are nearby.
16013 + additional_includedir=
16014 + case "$found_dir" in
16016 + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16017 + additional_includedir="$basedir/include"
16020 + if test "X$additional_includedir" != "X"; then
16021 + dnl Potentially add $additional_includedir to $INCNAME.
16022 + dnl But don't add it
16023 + dnl 1. if it's the standard /usr/include,
16024 + dnl 2. if it's /usr/local/include and we are using GCC on Linux,
16025 + dnl 3. if it's already present in $CPPFLAGS or the already
16026 + dnl constructed $INCNAME,
16027 + dnl 4. if it doesn't exist as a directory.
16028 + if test "X$additional_includedir" != "X/usr/include"; then
16030 + if test "X$additional_includedir" = "X/usr/local/include"; then
16031 + if test -n "$GCC"; then
16033 + linux*) haveit=yes;;
16037 + if test -z "$haveit"; then
16038 + for x in $CPPFLAGS $INC[]NAME; do
16039 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
16040 + if test "X$x" = "X-I$additional_includedir"; then
16045 + if test -z "$haveit"; then
16046 + if test -d "$additional_includedir"; then
16047 + dnl Really add $additional_includedir to $INCNAME.
16048 + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
16054 + dnl Look for dependencies.
16055 + if test -n "$found_la"; then
16056 + dnl Read the .la file. It defines the variables
16057 + dnl dlname, library_names, old_library, dependency_libs, current,
16058 + dnl age, revision, installed, dlopen, dlpreopen, libdir.
16059 + save_libdir="$libdir"
16060 + case "$found_la" in
16061 + */* | *\\*) . "$found_la" ;;
16062 + *) . "./$found_la" ;;
16064 + libdir="$save_libdir"
16065 + dnl We use only dependency_libs.
16066 + for dep in $dependency_libs; do
16069 + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16070 + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
16071 + dnl But don't add it
16072 + dnl 1. if it's the standard /usr/lib,
16073 + dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
16074 + dnl 3. if it's already present in $LDFLAGS or the already
16075 + dnl constructed $LIBNAME,
16076 + dnl 4. if it doesn't exist as a directory.
16077 + if test "X$additional_libdir" != "X/usr/lib"; then
16079 + if test "X$additional_libdir" = "X/usr/local/lib"; then
16080 + if test -n "$GCC"; then
16082 + linux*) haveit=yes;;
16086 + if test -z "$haveit"; then
16088 + for x in $LDFLAGS $LIB[]NAME; do
16089 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
16090 + if test "X$x" = "X-L$additional_libdir"; then
16095 + if test -z "$haveit"; then
16096 + if test -d "$additional_libdir"; then
16097 + dnl Really add $additional_libdir to $LIBNAME.
16098 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
16102 + for x in $LDFLAGS $LTLIB[]NAME; do
16103 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
16104 + if test "X$x" = "X-L$additional_libdir"; then
16109 + if test -z "$haveit"; then
16110 + if test -d "$additional_libdir"; then
16111 + dnl Really add $additional_libdir to $LTLIBNAME.
16112 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
16119 + dir=`echo "X$dep" | sed -e 's/^X-R//'`
16120 + if test "$enable_rpath" != no; then
16121 + dnl Potentially add DIR to rpathdirs.
16122 + dnl The rpathdirs will be appended to $LIBNAME at the end.
16124 + for x in $rpathdirs; do
16125 + if test "X$x" = "X$dir"; then
16130 + if test -z "$haveit"; then
16131 + rpathdirs="$rpathdirs $dir"
16133 + dnl Potentially add DIR to ltrpathdirs.
16134 + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
16136 + for x in $ltrpathdirs; do
16137 + if test "X$x" = "X$dir"; then
16142 + if test -z "$haveit"; then
16143 + ltrpathdirs="$ltrpathdirs $dir"
16148 + dnl Handle this in the next round.
16149 + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16152 + dnl Handle this in the next round. Throw away the .la's
16153 + dnl directory; it is already contained in a preceding -L
16155 + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16158 + dnl Most likely an immediate library name.
16159 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
16160 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
16166 + dnl Didn't find the library; assume it is in the system directories
16167 + dnl known to the linker and runtime loader. (All the system
16168 + dnl directories known to the linker should also be known to the
16169 + dnl runtime loader, otherwise the system is severely misconfigured.)
16170 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
16171 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
16177 + if test "X$rpathdirs" != "X"; then
16178 + if test -n "$hardcode_libdir_separator"; then
16179 + dnl Weird platform: only the last -rpath option counts, the user must
16180 + dnl pass all path elements in one option. We can arrange that for a
16181 + dnl single library, but not when more than one $LIBNAMEs are used.
16183 + for found_dir in $rpathdirs; do
16184 + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16186 + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
16187 + acl_save_libdir="$libdir"
16188 + libdir="$alldirs"
16189 + eval flag=\"$hardcode_libdir_flag_spec\"
16190 + libdir="$acl_save_libdir"
16191 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
16193 + dnl The -rpath options are cumulative.
16194 + for found_dir in $rpathdirs; do
16195 + acl_save_libdir="$libdir"
16196 + libdir="$found_dir"
16197 + eval flag=\"$hardcode_libdir_flag_spec\"
16198 + libdir="$acl_save_libdir"
16199 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
16203 + if test "X$ltrpathdirs" != "X"; then
16204 + dnl When using libtool, the option that works for both libraries and
16205 + dnl executables is -R. The -R options are cumulative.
16206 + for found_dir in $ltrpathdirs; do
16207 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
16212 +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
16213 +dnl unless already present in VAR.
16214 +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
16215 +dnl contains two or three consecutive elements that belong together.
16216 +AC_DEFUN([AC_LIB_APPENDTOVAR],
16218 + for element in [$2]; do
16220 + for x in $[$1]; do
16221 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
16222 + if test "X$x" = "X$element"; then
16227 + if test -z "$haveit"; then
16228 + [$1]="${[$1]}${[$1]:+ }$element"
16232 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-link.m4~ psmisc-20.2.works.clean/m4/lib-link.m4~
16233 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-prefix.m4 psmisc-20.2.works.clean/m4/lib-prefix.m4
16234 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-prefix.m4 1969-12-31 18:00:00.000000000 -0600
16235 +++ psmisc-20.2.works.clean/m4/lib-prefix.m4 2004-10-13 15:18:42.000000000 -0500
16237 +# lib-prefix.m4 serial 3 (gettext-0.13)
16238 +dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
16239 +dnl This file is free software, distributed under the terms of the GNU
16240 +dnl General Public License. As a special exception to the GNU General
16241 +dnl Public License, this file may be distributed as part of a program
16242 +dnl that contains a configuration script generated by Autoconf, under
16243 +dnl the same distribution terms as the rest of that program.
16245 +dnl From Bruno Haible.
16247 +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
16248 +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
16249 +dnl require excessive bracketing.
16250 +ifdef([AC_HELP_STRING],
16251 +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
16252 +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
16254 +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
16255 +dnl to access previously installed libraries. The basic assumption is that
16256 +dnl a user will want packages to use other packages he previously installed
16257 +dnl with the same --prefix option.
16258 +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
16259 +dnl libraries, but is otherwise very convenient.
16260 +AC_DEFUN([AC_LIB_PREFIX],
16262 + AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
16263 + AC_REQUIRE([AC_PROG_CC])
16264 + AC_REQUIRE([AC_CANONICAL_HOST])
16265 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
16266 + dnl By default, look in $includedir and $libdir.
16267 + use_additional=yes
16268 + AC_LIB_WITH_FINAL_PREFIX([
16269 + eval additional_includedir=\"$includedir\"
16270 + eval additional_libdir=\"$libdir\"
16272 + AC_LIB_ARG_WITH([lib-prefix],
16273 +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
16274 + --without-lib-prefix don't search for libraries in includedir and libdir],
16276 + if test "X$withval" = "Xno"; then
16277 + use_additional=no
16279 + if test "X$withval" = "X"; then
16280 + AC_LIB_WITH_FINAL_PREFIX([
16281 + eval additional_includedir=\"$includedir\"
16282 + eval additional_libdir=\"$libdir\"
16285 + additional_includedir="$withval/include"
16286 + additional_libdir="$withval/lib"
16290 + if test $use_additional = yes; then
16291 + dnl Potentially add $additional_includedir to $CPPFLAGS.
16292 + dnl But don't add it
16293 + dnl 1. if it's the standard /usr/include,
16294 + dnl 2. if it's already present in $CPPFLAGS,
16295 + dnl 3. if it's /usr/local/include and we are using GCC on Linux,
16296 + dnl 4. if it doesn't exist as a directory.
16297 + if test "X$additional_includedir" != "X/usr/include"; then
16299 + for x in $CPPFLAGS; do
16300 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
16301 + if test "X$x" = "X-I$additional_includedir"; then
16306 + if test -z "$haveit"; then
16307 + if test "X$additional_includedir" = "X/usr/local/include"; then
16308 + if test -n "$GCC"; then
16310 + linux*) haveit=yes;;
16314 + if test -z "$haveit"; then
16315 + if test -d "$additional_includedir"; then
16316 + dnl Really add $additional_includedir to $CPPFLAGS.
16317 + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
16322 + dnl Potentially add $additional_libdir to $LDFLAGS.
16323 + dnl But don't add it
16324 + dnl 1. if it's the standard /usr/lib,
16325 + dnl 2. if it's already present in $LDFLAGS,
16326 + dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
16327 + dnl 4. if it doesn't exist as a directory.
16328 + if test "X$additional_libdir" != "X/usr/lib"; then
16330 + for x in $LDFLAGS; do
16331 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
16332 + if test "X$x" = "X-L$additional_libdir"; then
16337 + if test -z "$haveit"; then
16338 + if test "X$additional_libdir" = "X/usr/local/lib"; then
16339 + if test -n "$GCC"; then
16341 + linux*) haveit=yes;;
16345 + if test -z "$haveit"; then
16346 + if test -d "$additional_libdir"; then
16347 + dnl Really add $additional_libdir to $LDFLAGS.
16348 + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
16356 +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
16357 +dnl acl_final_exec_prefix, containing the values to which $prefix and
16358 +dnl $exec_prefix will expand at the end of the configure script.
16359 +AC_DEFUN([AC_LIB_PREPARE_PREFIX],
16361 + dnl Unfortunately, prefix and exec_prefix get only finally determined
16362 + dnl at the end of configure.
16363 + if test "X$prefix" = "XNONE"; then
16364 + acl_final_prefix="$ac_default_prefix"
16366 + acl_final_prefix="$prefix"
16368 + if test "X$exec_prefix" = "XNONE"; then
16369 + acl_final_exec_prefix='${prefix}'
16371 + acl_final_exec_prefix="$exec_prefix"
16373 + acl_save_prefix="$prefix"
16374 + prefix="$acl_final_prefix"
16375 + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
16376 + prefix="$acl_save_prefix"
16379 +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
16380 +dnl variables prefix and exec_prefix bound to the values they will have
16381 +dnl at the end of the configure script.
16382 +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
16384 + acl_save_prefix="$prefix"
16385 + prefix="$acl_final_prefix"
16386 + acl_save_exec_prefix="$exec_prefix"
16387 + exec_prefix="$acl_final_exec_prefix"
16389 + exec_prefix="$acl_save_exec_prefix"
16390 + prefix="$acl_save_prefix"
16392 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/lib-prefix.m4~ psmisc-20.2.works.clean/m4/lib-prefix.m4~
16393 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/longdouble.m4 psmisc-20.2.works.clean/m4/longdouble.m4
16394 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/longdouble.m4 1969-12-31 18:00:00.000000000 -0600
16395 +++ psmisc-20.2.works.clean/m4/longdouble.m4 2004-10-13 15:18:42.000000000 -0500
16397 +# longdouble.m4 serial 1 (gettext-0.12)
16398 +dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
16399 +dnl This file is free software, distributed under the terms of the GNU
16400 +dnl General Public License. As a special exception to the GNU General
16401 +dnl Public License, this file may be distributed as part of a program
16402 +dnl that contains a configuration script generated by Autoconf, under
16403 +dnl the same distribution terms as the rest of that program.
16405 +dnl From Bruno Haible.
16406 +dnl Test whether the compiler supports the 'long double' type.
16407 +dnl Prerequisite: AC_PROG_CC
16409 +AC_DEFUN([gt_TYPE_LONGDOUBLE],
16411 + AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
16412 + [if test "$GCC" = yes; then
16413 + gt_cv_c_long_double=yes
16416 + /* The Stardent Vistra knows sizeof(long double), but does not support it. */
16417 + long double foo = 0.0;
16418 + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
16419 + int array [2*(sizeof(long double) >= sizeof(double)) - 1];
16421 + gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
16423 + if test $gt_cv_c_long_double = yes; then
16424 + AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
16427 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/longdouble.m4~ psmisc-20.2.works.clean/m4/longdouble.m4~
16428 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/longlong.m4 psmisc-20.2.works.clean/m4/longlong.m4
16429 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/longlong.m4 1969-12-31 18:00:00.000000000 -0600
16430 +++ psmisc-20.2.works.clean/m4/longlong.m4 2004-10-13 15:18:42.000000000 -0500
16432 +# longlong.m4 serial 4
16433 +dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
16434 +dnl This file is free software, distributed under the terms of the GNU
16435 +dnl General Public License. As a special exception to the GNU General
16436 +dnl Public License, this file may be distributed as part of a program
16437 +dnl that contains a configuration script generated by Autoconf, under
16438 +dnl the same distribution terms as the rest of that program.
16440 +dnl From Paul Eggert.
16442 +# Define HAVE_LONG_LONG if 'long long' works.
16444 +AC_DEFUN([jm_AC_TYPE_LONG_LONG],
16446 + AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
16447 + [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
16448 + [long long llmax = (long long) -1;
16449 + return ll << i | ll >> i | llmax / ll | llmax % ll;],
16450 + ac_cv_type_long_long=yes,
16451 + ac_cv_type_long_long=no)])
16452 + if test $ac_cv_type_long_long = yes; then
16453 + AC_DEFINE(HAVE_LONG_LONG, 1,
16454 + [Define if you have the 'long long' type.])
16457 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/longlong.m4~ psmisc-20.2.works.clean/m4/longlong.m4~
16458 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/nls.m4 psmisc-20.2.works.clean/m4/nls.m4
16459 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/nls.m4 1969-12-31 18:00:00.000000000 -0600
16460 +++ psmisc-20.2.works.clean/m4/nls.m4 2004-10-13 15:18:42.000000000 -0500
16462 +# nls.m4 serial 1 (gettext-0.12)
16463 +dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
16464 +dnl This file is free software, distributed under the terms of the GNU
16465 +dnl General Public License. As a special exception to the GNU General
16466 +dnl Public License, this file may be distributed as part of a program
16467 +dnl that contains a configuration script generated by Autoconf, under
16468 +dnl the same distribution terms as the rest of that program.
16470 +dnl This file can can be used in projects which are not available under
16471 +dnl the GNU General Public License or the GNU Library General Public
16472 +dnl License but which still want to provide support for the GNU gettext
16473 +dnl functionality.
16474 +dnl Please note that the actual code of the GNU gettext library is covered
16475 +dnl by the GNU Library General Public License, and the rest of the GNU
16476 +dnl gettext package package is covered by the GNU General Public License.
16477 +dnl They are *not* in the public domain.
16480 +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
16481 +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
16483 +AC_DEFUN([AM_NLS],
16485 + AC_MSG_CHECKING([whether NLS is requested])
16486 + dnl Default is enabled NLS
16487 + AC_ARG_ENABLE(nls,
16488 + [ --disable-nls do not use Native Language Support],
16489 + USE_NLS=$enableval, USE_NLS=yes)
16490 + AC_MSG_RESULT($USE_NLS)
16491 + AC_SUBST(USE_NLS)
16494 +AC_DEFUN([AM_MKINSTALLDIRS],
16496 + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
16497 + dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
16498 + dnl Try to locate it.
16500 + if test -n "$ac_aux_dir"; then
16501 + case "$ac_aux_dir" in
16502 + /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
16503 + *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
16506 + if test -z "$MKINSTALLDIRS"; then
16507 + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
16509 + AC_SUBST(MKINSTALLDIRS)
16511 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/nls.m4~ psmisc-20.2.works.clean/m4/nls.m4~
16512 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/po.m4 psmisc-20.2.works.clean/m4/po.m4
16513 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/po.m4 1969-12-31 18:00:00.000000000 -0600
16514 +++ psmisc-20.2.works.clean/m4/po.m4 2004-10-13 15:18:42.000000000 -0500
16516 +# po.m4 serial 3 (gettext-0.14)
16517 +dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
16518 +dnl This file is free software, distributed under the terms of the GNU
16519 +dnl General Public License. As a special exception to the GNU General
16520 +dnl Public License, this file may be distributed as part of a program
16521 +dnl that contains a configuration script generated by Autoconf, under
16522 +dnl the same distribution terms as the rest of that program.
16524 +dnl This file can can be used in projects which are not available under
16525 +dnl the GNU General Public License or the GNU Library General Public
16526 +dnl License but which still want to provide support for the GNU gettext
16527 +dnl functionality.
16528 +dnl Please note that the actual code of the GNU gettext library is covered
16529 +dnl by the GNU Library General Public License, and the rest of the GNU
16530 +dnl gettext package package is covered by the GNU General Public License.
16531 +dnl They are *not* in the public domain.
16534 +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
16535 +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
16537 +dnl Checks for all prerequisites of the po subdirectory.
16538 +AC_DEFUN([AM_PO_SUBDIRS],
16540 + AC_REQUIRE([AC_PROG_MAKE_SET])dnl
16541 + AC_REQUIRE([AC_PROG_INSTALL])dnl
16542 + AC_REQUIRE([AM_MKINSTALLDIRS])dnl
16543 + AC_REQUIRE([AM_NLS])dnl
16545 + dnl Perform the following tests also if --disable-nls has been given,
16546 + dnl because they are needed for "make dist" to work.
16548 + dnl Search for GNU msgfmt in the PATH.
16549 + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
16550 + dnl The second test excludes FreeBSD msgfmt.
16551 + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
16552 + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
16553 + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
16555 + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
16557 + dnl Search for GNU xgettext 0.12 or newer in the PATH.
16558 + dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
16559 + dnl The second test excludes FreeBSD xgettext.
16560 + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
16561 + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
16562 + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
16564 + dnl Remove leftover from FreeBSD xgettext call.
16565 + rm -f messages.po
16567 + dnl Search for GNU msgmerge 0.11 or newer in the PATH.
16568 + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
16569 + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
16571 + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
16572 + dnl Test whether we really found GNU msgfmt.
16573 + if test "$GMSGFMT" != ":"; then
16574 + dnl If it is no GNU msgfmt we define it as : so that the
16575 + dnl Makefiles still can work.
16576 + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
16577 + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
16580 + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
16582 + [found $GMSGFMT program is not GNU msgfmt; ignore it])
16587 + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
16588 + dnl Test whether we really found GNU xgettext.
16589 + if test "$XGETTEXT" != ":"; then
16590 + dnl If it is no GNU xgettext we define it as : so that the
16591 + dnl Makefiles still can work.
16592 + if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
16593 + (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
16597 + [found xgettext program is not GNU xgettext; ignore it])
16600 + dnl Remove leftover from FreeBSD xgettext call.
16601 + rm -f messages.po
16604 + AC_OUTPUT_COMMANDS([
16605 + for ac_file in $CONFIG_FILES; do
16606 + # Support "outfile[:infile[:infile...]]"
16607 + case "$ac_file" in
16608 + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16610 + # PO directories have a Makefile.in generated from Makefile.in.in.
16611 + case "$ac_file" in */Makefile.in)
16612 + # Adjust a relative srcdir.
16613 + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
16614 + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
16615 + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
16616 + # In autoconf-2.13 it is called $ac_given_srcdir.
16617 + # In autoconf-2.50 it is called $srcdir.
16618 + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
16619 + case "$ac_given_srcdir" in
16620 + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
16621 + /*) top_srcdir="$ac_given_srcdir" ;;
16622 + *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
16624 + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
16625 + rm -f "$ac_dir/POTFILES"
16626 + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
16627 + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
16628 + POMAKEFILEDEPS="POTFILES.in"
16629 + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
16630 + # on $ac_dir but don't depend on user-specified configuration
16632 + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
16633 + # The LINGUAS file contains the set of available languages.
16634 + if test -n "$OBSOLETE_ALL_LINGUAS"; then
16635 + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
16637 + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
16638 + # Hide the ALL_LINGUAS assigment from automake.
16639 + eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
16640 + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
16642 + # The set of available languages was given in configure.in.
16643 + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
16645 + # Compute POFILES
16646 + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
16647 + # Compute UPDATEPOFILES
16648 + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
16649 + # Compute DUMMYPOFILES
16650 + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
16651 + # Compute GMOFILES
16652 + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
16653 + case "$ac_given_srcdir" in
16655 + *) srcdirpre='$(srcdir)/' ;;
16661 + for lang in $ALL_LINGUAS; do
16662 + POFILES="$POFILES $srcdirpre$lang.po"
16663 + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
16664 + DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
16665 + GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
16667 + # CATALOGS depends on both $ac_dir and the user's LINGUAS
16668 + # environment variable.
16670 + if test -n "$ALL_LINGUAS"; then
16671 + for presentlang in $ALL_LINGUAS; do
16673 + if test "%UNSET%" != "$LINGUAS"; then
16674 + desiredlanguages="$LINGUAS"
16676 + desiredlanguages="$ALL_LINGUAS"
16678 + for desiredlang in $desiredlanguages; do
16679 + # Use the presentlang catalog if desiredlang is
16680 + # a. equal to presentlang, or
16681 + # b. a variant of presentlang (because in this case,
16682 + # presentlang can be used as a fallback for messages
16683 + # which are not translated in the desiredlang catalog).
16684 + case "$desiredlang" in
16685 + "$presentlang"*) useit=yes;;
16688 + if test $useit = yes; then
16689 + INST_LINGUAS="$INST_LINGUAS $presentlang"
16694 + if test -n "$INST_LINGUAS"; then
16695 + for lang in $INST_LINGUAS; do
16696 + CATALOGS="$CATALOGS $lang.gmo"
16699 + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
16700 + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
16701 + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
16702 + if test -f "$f"; then
16704 + *.orig | *.bak | *~) ;;
16705 + *) cat "$f" >> "$ac_dir/Makefile" ;;
16713 + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
16714 + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
16716 + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
16717 + # Capture the value of LINGUAS because we need it to compute CATALOGS.
16718 + LINGUAS="${LINGUAS-%UNSET%}"
16722 +dnl Postprocesses a Makefile in a directory containing PO files.
16723 +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
16725 + # When this code is run, in config.status, two variables have already been
16727 + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
16728 + # - LINGUAS is the value of the environment variable LINGUAS at configure
16732 + # Adjust a relative srcdir.
16733 + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
16734 + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
16735 + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
16736 + # In autoconf-2.13 it is called $ac_given_srcdir.
16737 + # In autoconf-2.50 it is called $srcdir.
16738 + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
16739 + case "$ac_given_srcdir" in
16740 + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
16741 + /*) top_srcdir="$ac_given_srcdir" ;;
16742 + *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
16745 + # Find a way to echo strings without interpreting backslash.
16746 + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
16749 + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
16750 + gt_echo='printf %s\n'
16757 + gt_echo='echo_func'
16761 + # A sed script that extracts the value of VARIABLE from a Makefile.
16763 +# Test if the hold space is empty.
16768 +# Yes it was empty. Look if we have the expected variable definition.
16769 +/^[ ]*VARIABLE[ ]*=/{
16770 + # Seen the first line of the variable definition.
16771 + s/^[ ]*VARIABLE[ ]*=//
16776 +# Here we are processing a line from the variable definition.
16777 +# Remove comment, more precisely replace it with a space.
16779 +# See if the line ends in a backslash.
16783 +# Print the line, without the trailing backslash.
16786 +# There was no trailing backslash. The end of the variable definition is
16787 +# reached. Clear the hold space.
16792 +# A trailing backslash means that the variable definition continues in the
16793 +# next line. Put a nonempty string into the hold space to indicate this.
16798 +changequote([,])dnl
16800 + # Set POTFILES to the value of the Makefile variable POTFILES.
16801 + sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
16802 + POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
16803 + # Compute POTFILES_DEPS as
16804 + # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
16806 + for file in $POTFILES; do
16807 + POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
16809 + POMAKEFILEDEPS=""
16811 + if test -n "$OBSOLETE_ALL_LINGUAS"; then
16812 + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
16814 + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
16815 + # The LINGUAS file contains the set of available languages.
16816 + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
16817 + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
16819 + # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
16820 + sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
16821 + ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
16823 + # Hide the ALL_LINGUAS assigment from automake.
16824 + eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
16825 + # Compute POFILES
16826 + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
16827 + # Compute UPDATEPOFILES
16828 + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
16829 + # Compute DUMMYPOFILES
16830 + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
16831 + # Compute GMOFILES
16832 + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
16833 + # Compute PROPERTIESFILES
16834 + # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
16835 + # Compute CLASSFILES
16836 + # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
16837 + # Compute QMFILES
16838 + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
16839 + # Compute MSGFILES
16840 + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
16841 + # Compute RESOURCESDLLFILES
16842 + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
16843 + case "$ac_given_srcdir" in
16845 + *) srcdirpre='$(srcdir)/' ;;
16855 + RESOURCESDLLFILES=
16856 + for lang in $ALL_LINGUAS; do
16857 + POFILES="$POFILES $srcdirpre$lang.po"
16858 + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
16859 + DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
16860 + GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
16861 + PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
16862 + CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
16863 + QMFILES="$QMFILES $srcdirpre$lang.qm"
16864 + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
16865 + MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
16866 + frobbedlang=`echo $lang | sed -e 's/_/-/g'`
16867 + RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
16869 + # CATALOGS depends on both $ac_dir and the user's LINGUAS
16870 + # environment variable.
16872 + if test -n "$ALL_LINGUAS"; then
16873 + for presentlang in $ALL_LINGUAS; do
16875 + if test "%UNSET%" != "$LINGUAS"; then
16876 + desiredlanguages="$LINGUAS"
16878 + desiredlanguages="$ALL_LINGUAS"
16880 + for desiredlang in $desiredlanguages; do
16881 + # Use the presentlang catalog if desiredlang is
16882 + # a. equal to presentlang, or
16883 + # b. a variant of presentlang (because in this case,
16884 + # presentlang can be used as a fallback for messages
16885 + # which are not translated in the desiredlang catalog).
16886 + case "$desiredlang" in
16887 + "$presentlang"*) useit=yes;;
16890 + if test $useit = yes; then
16891 + INST_LINGUAS="$INST_LINGUAS $presentlang"
16900 + if test -n "$INST_LINGUAS"; then
16901 + for lang in $INST_LINGUAS; do
16902 + CATALOGS="$CATALOGS $lang.gmo"
16903 + JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
16904 + QTCATALOGS="$QTCATALOGS $lang.qm"
16905 + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
16906 + TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
16907 + frobbedlang=`echo $lang | sed -e 's/_/-/g'`
16908 + CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
16912 + sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
16913 + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
16914 + # Add dependencies that cannot be formulated as a simple suffix rule.
16915 + for lang in $ALL_LINGUAS; do
16916 + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
16917 + cat >> "$ac_file.tmp" <<EOF
16918 +$frobbedlang.msg: $lang.po
16919 + @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
16920 + \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
16924 + if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
16925 + # Add dependencies that cannot be formulated as a simple suffix rule.
16926 + for lang in $ALL_LINGUAS; do
16927 + frobbedlang=`echo $lang | sed -e 's/_/-/g'`
16928 + cat >> "$ac_file.tmp" <<EOF
16929 +$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
16930 + @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
16931 + \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
16935 + if test -n "$POMAKEFILEDEPS"; then
16936 + cat >> "$ac_file.tmp" <<EOF
16937 +Makefile: $POMAKEFILEDEPS
16940 + mv "$ac_file.tmp" "$ac_file"
16942 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/po.m4~ psmisc-20.2.works.clean/m4/po.m4~
16943 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/printf-posix.m4 psmisc-20.2.works.clean/m4/printf-posix.m4
16944 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/printf-posix.m4 1969-12-31 18:00:00.000000000 -0600
16945 +++ psmisc-20.2.works.clean/m4/printf-posix.m4 2004-10-13 15:18:42.000000000 -0500
16947 +# printf-posix.m4 serial 2 (gettext-0.13.1)
16948 +dnl Copyright (C) 2003 Free Software Foundation, Inc.
16949 +dnl This file is free software, distributed under the terms of the GNU
16950 +dnl General Public License. As a special exception to the GNU General
16951 +dnl Public License, this file may be distributed as part of a program
16952 +dnl that contains a configuration script generated by Autoconf, under
16953 +dnl the same distribution terms as the rest of that program.
16955 +dnl From Bruno Haible.
16956 +dnl Test whether the printf() function supports POSIX/XSI format strings with
16959 +AC_DEFUN([gt_PRINTF_POSIX],
16961 + AC_REQUIRE([AC_PROG_CC])
16962 + AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
16963 + gt_cv_func_printf_posix,
16966 +#include <stdio.h>
16967 +#include <string.h>
16968 +/* The string "%2$d %1$d", with dollar characters protected from the shell's
16969 + dollar expansion (possibly an autoconf bug). */
16970 +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
16971 +static char buf[100];
16974 + sprintf (buf, format, 33, 55);
16975 + return (strcmp (buf, "55 33") != 0);
16976 +}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
16978 + AC_EGREP_CPP(notposix, [
16979 +#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
16982 + ], gt_cv_func_printf_posix="guessing no",
16983 + gt_cv_func_printf_posix="guessing yes")
16986 + case $gt_cv_func_printf_posix in
16988 + AC_DEFINE(HAVE_POSIX_PRINTF, 1,
16989 + [Define if your printf() function supports format strings with positions.])
16993 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/printf-posix.m4~ psmisc-20.2.works.clean/m4/printf-posix.m4~
16994 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/progtest.m4 psmisc-20.2.works.clean/m4/progtest.m4
16995 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/progtest.m4 1969-12-31 18:00:00.000000000 -0600
16996 +++ psmisc-20.2.works.clean/m4/progtest.m4 2004-10-13 15:18:42.000000000 -0500
16998 +# progtest.m4 serial 3 (gettext-0.12)
16999 +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
17000 +dnl This file is free software, distributed under the terms of the GNU
17001 +dnl General Public License. As a special exception to the GNU General
17002 +dnl Public License, this file may be distributed as part of a program
17003 +dnl that contains a configuration script generated by Autoconf, under
17004 +dnl the same distribution terms as the rest of that program.
17006 +dnl This file can can be used in projects which are not available under
17007 +dnl the GNU General Public License or the GNU Library General Public
17008 +dnl License but which still want to provide support for the GNU gettext
17009 +dnl functionality.
17010 +dnl Please note that the actual code of the GNU gettext library is covered
17011 +dnl by the GNU Library General Public License, and the rest of the GNU
17012 +dnl gettext package package is covered by the GNU General Public License.
17013 +dnl They are *not* in the public domain.
17016 +dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
17018 +# Search path for a program which passes the given test.
17020 +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
17021 +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
17022 +AC_DEFUN([AM_PATH_PROG_WITH_TEST],
17024 +# Prepare PATH_SEPARATOR.
17025 +# The user is always right.
17026 +if test "${PATH_SEPARATOR+set}" != set; then
17027 + echo "#! /bin/sh" >conf$$.sh
17028 + echo "exit 0" >>conf$$.sh
17029 + chmod +x conf$$.sh
17030 + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
17031 + PATH_SEPARATOR=';'
17038 +# Find out how to test for executable files. Don't use a zero-byte file,
17039 +# as systems may use methods other than mode bits to determine executability.
17040 +cat >conf$$.file <<_ASEOF
17044 +chmod +x conf$$.file
17045 +if test -x conf$$.file >/dev/null 2>&1; then
17046 + ac_executable_p="test -x"
17048 + ac_executable_p="test -f"
17052 +# Extract the first word of "$2", so it can be a program name with args.
17053 +set dummy $2; ac_word=[$]2
17054 +AC_MSG_CHECKING([for $ac_word])
17055 +AC_CACHE_VAL(ac_cv_path_$1,
17057 + [[\\/]]* | ?:[[\\/]]*)
17058 + ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
17061 + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
17062 + for ac_dir in ifelse([$5], , $PATH, [$5]); do
17063 + IFS="$ac_save_IFS"
17064 + test -z "$ac_dir" && ac_dir=.
17065 + for ac_exec_ext in '' $ac_executable_extensions; do
17066 + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
17068 + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
17074 + IFS="$ac_save_IFS"
17075 +dnl If no 4th arg is given, leave the cache variable unset,
17076 +dnl so AC_PATH_PROGS will keep looking.
17077 +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
17081 +$1="$ac_cv_path_$1"
17082 +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
17083 + AC_MSG_RESULT([$]$1)
17085 + AC_MSG_RESULT(no)
17089 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/progtest.m4~ psmisc-20.2.works.clean/m4/progtest.m4~
17090 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/signed.m4 psmisc-20.2.works.clean/m4/signed.m4
17091 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/signed.m4 1969-12-31 18:00:00.000000000 -0600
17092 +++ psmisc-20.2.works.clean/m4/signed.m4 2004-10-13 15:18:42.000000000 -0500
17094 +# signed.m4 serial 1 (gettext-0.10.40)
17095 +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
17096 +dnl This file is free software, distributed under the terms of the GNU
17097 +dnl General Public License. As a special exception to the GNU General
17098 +dnl Public License, this file may be distributed as part of a program
17099 +dnl that contains a configuration script generated by Autoconf, under
17100 +dnl the same distribution terms as the rest of that program.
17102 +dnl From Bruno Haible.
17104 +AC_DEFUN([bh_C_SIGNED],
17106 + AC_CACHE_CHECK([for signed], bh_cv_c_signed,
17107 + [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
17108 + if test $bh_cv_c_signed = no; then
17109 + AC_DEFINE(signed, ,
17110 + [Define to empty if the C compiler doesn't support this keyword.])
17113 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/signed.m4~ psmisc-20.2.works.clean/m4/signed.m4~
17114 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/size_max.m4 psmisc-20.2.works.clean/m4/size_max.m4
17115 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/size_max.m4 1969-12-31 18:00:00.000000000 -0600
17116 +++ psmisc-20.2.works.clean/m4/size_max.m4 2004-10-13 15:18:42.000000000 -0500
17118 +# size_max.m4 serial 2
17119 +dnl Copyright (C) 2003 Free Software Foundation, Inc.
17120 +dnl This file is free software, distributed under the terms of the GNU
17121 +dnl General Public License. As a special exception to the GNU General
17122 +dnl Public License, this file may be distributed as part of a program
17123 +dnl that contains a configuration script generated by Autoconf, under
17124 +dnl the same distribution terms as the rest of that program.
17126 +dnl From Bruno Haible.
17128 +AC_DEFUN([gl_SIZE_MAX],
17130 + AC_CHECK_HEADERS(stdint.h)
17131 + dnl First test whether the system already has SIZE_MAX.
17132 + AC_MSG_CHECKING([for SIZE_MAX])
17134 + AC_EGREP_CPP([Found it], [
17135 +#include <limits.h>
17137 +#include <stdint.h>
17143 + if test -z "$result"; then
17144 + dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
17145 + dnl than the type 'unsigned long'.
17146 + dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
17147 + dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
17148 + _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
17149 + [#include <stddef.h>], result=?)
17150 + _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
17151 + [#include <stddef.h>], result=?)
17152 + _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
17153 + [#include <stddef.h>], result=?)
17154 + if test "$fits_in_uint" = 1; then
17155 + dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
17156 + dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
17157 + AC_TRY_COMPILE([#include <stddef.h>
17158 + extern size_t foo;
17159 + extern unsigned long foo;
17160 + ], [], fits_in_uint=0)
17162 + if test -z "$result"; then
17163 + if test "$fits_in_uint" = 1; then
17164 + result="$res_hi$res_lo"U
17166 + result="$res_hi$res_lo"UL
17169 + dnl Shouldn't happen, but who knows...
17170 + result='~(size_t)0'
17173 + AC_MSG_RESULT([$result])
17174 + if test "$result" != yes; then
17175 + AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
17176 + [Define as the maximum value of type 'size_t', if the system doesn't define it.])
17179 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/size_max.m4~ psmisc-20.2.works.clean/m4/size_max.m4~
17180 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/stdint_h.m4 psmisc-20.2.works.clean/m4/stdint_h.m4
17181 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/stdint_h.m4 1969-12-31 18:00:00.000000000 -0600
17182 +++ psmisc-20.2.works.clean/m4/stdint_h.m4 2004-10-13 15:18:42.000000000 -0500
17184 +# stdint_h.m4 serial 3 (gettext-0.12)
17185 +dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
17186 +dnl This file is free software, distributed under the terms of the GNU
17187 +dnl General Public License. As a special exception to the GNU General
17188 +dnl Public License, this file may be distributed as part of a program
17189 +dnl that contains a configuration script generated by Autoconf, under
17190 +dnl the same distribution terms as the rest of that program.
17192 +dnl From Paul Eggert.
17194 +# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
17195 +# doesn't clash with <sys/types.h>, and declares uintmax_t.
17197 +AC_DEFUN([jm_AC_HEADER_STDINT_H],
17199 + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
17201 + [#include <sys/types.h>
17202 +#include <stdint.h>],
17203 + [uintmax_t i = (uintmax_t) -1;],
17204 + jm_ac_cv_header_stdint_h=yes,
17205 + jm_ac_cv_header_stdint_h=no)])
17206 + if test $jm_ac_cv_header_stdint_h = yes; then
17207 + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
17208 + [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
17209 + and declares uintmax_t. ])
17212 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/stdint_h.m4~ psmisc-20.2.works.clean/m4/stdint_h.m4~
17213 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/uintmax_t.m4 psmisc-20.2.works.clean/m4/uintmax_t.m4
17214 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/uintmax_t.m4 1969-12-31 18:00:00.000000000 -0600
17215 +++ psmisc-20.2.works.clean/m4/uintmax_t.m4 2004-10-13 15:18:42.000000000 -0500
17217 +# uintmax_t.m4 serial 7 (gettext-0.12)
17218 +dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
17219 +dnl This file is free software, distributed under the terms of the GNU
17220 +dnl General Public License. As a special exception to the GNU General
17221 +dnl Public License, this file may be distributed as part of a program
17222 +dnl that contains a configuration script generated by Autoconf, under
17223 +dnl the same distribution terms as the rest of that program.
17225 +dnl From Paul Eggert.
17229 +# Define uintmax_t to 'unsigned long' or 'unsigned long long'
17230 +# if it is not already defined in <stdint.h> or <inttypes.h>.
17232 +AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
17234 + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
17235 + AC_REQUIRE([jm_AC_HEADER_STDINT_H])
17236 + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
17237 + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
17238 + test $ac_cv_type_unsigned_long_long = yes \
17239 + && ac_type='unsigned long long' \
17240 + || ac_type='unsigned long'
17241 + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
17242 + [Define to unsigned long or unsigned long long
17243 + if <stdint.h> and <inttypes.h> don't define.])
17245 + AC_DEFINE(HAVE_UINTMAX_T, 1,
17246 + [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
17249 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/uintmax_t.m4~ psmisc-20.2.works.clean/m4/uintmax_t.m4~
17250 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/ulonglong.m4 psmisc-20.2.works.clean/m4/ulonglong.m4
17251 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/ulonglong.m4 1969-12-31 18:00:00.000000000 -0600
17252 +++ psmisc-20.2.works.clean/m4/ulonglong.m4 2004-10-13 15:18:42.000000000 -0500
17254 +# ulonglong.m4 serial 3
17255 +dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
17256 +dnl This file is free software, distributed under the terms of the GNU
17257 +dnl General Public License. As a special exception to the GNU General
17258 +dnl Public License, this file may be distributed as part of a program
17259 +dnl that contains a configuration script generated by Autoconf, under
17260 +dnl the same distribution terms as the rest of that program.
17262 +dnl From Paul Eggert.
17264 +# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
17266 +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
17268 + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
17269 + [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
17270 + [unsigned long long ullmax = (unsigned long long) -1;
17271 + return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
17272 + ac_cv_type_unsigned_long_long=yes,
17273 + ac_cv_type_unsigned_long_long=no)])
17274 + if test $ac_cv_type_unsigned_long_long = yes; then
17275 + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
17276 + [Define if you have the 'unsigned long long' type.])
17279 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/ulonglong.m4~ psmisc-20.2.works.clean/m4/ulonglong.m4~
17280 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/wchar_t.m4 psmisc-20.2.works.clean/m4/wchar_t.m4
17281 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/wchar_t.m4 1969-12-31 18:00:00.000000000 -0600
17282 +++ psmisc-20.2.works.clean/m4/wchar_t.m4 2004-10-13 15:18:42.000000000 -0500
17284 +# wchar_t.m4 serial 1 (gettext-0.12)
17285 +dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
17286 +dnl This file is free software, distributed under the terms of the GNU
17287 +dnl General Public License. As a special exception to the GNU General
17288 +dnl Public License, this file may be distributed as part of a program
17289 +dnl that contains a configuration script generated by Autoconf, under
17290 +dnl the same distribution terms as the rest of that program.
17292 +dnl From Bruno Haible.
17293 +dnl Test whether <stddef.h> has the 'wchar_t' type.
17294 +dnl Prerequisite: AC_PROG_CC
17296 +AC_DEFUN([gt_TYPE_WCHAR_T],
17298 + AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
17299 + [AC_TRY_COMPILE([#include <stddef.h>
17300 + wchar_t foo = (wchar_t)'\0';], ,
17301 + gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
17302 + if test $gt_cv_c_wchar_t = yes; then
17303 + AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
17306 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/wchar_t.m4~ psmisc-20.2.works.clean/m4/wchar_t.m4~
17307 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/wint_t.m4 psmisc-20.2.works.clean/m4/wint_t.m4
17308 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/wint_t.m4 1969-12-31 18:00:00.000000000 -0600
17309 +++ psmisc-20.2.works.clean/m4/wint_t.m4 2004-10-13 15:18:42.000000000 -0500
17311 +# wint_t.m4 serial 1 (gettext-0.12)
17312 +dnl Copyright (C) 2003 Free Software Foundation, Inc.
17313 +dnl This file is free software, distributed under the terms of the GNU
17314 +dnl General Public License. As a special exception to the GNU General
17315 +dnl Public License, this file may be distributed as part of a program
17316 +dnl that contains a configuration script generated by Autoconf, under
17317 +dnl the same distribution terms as the rest of that program.
17319 +dnl From Bruno Haible.
17320 +dnl Test whether <wchar.h> has the 'wint_t' type.
17321 +dnl Prerequisite: AC_PROG_CC
17323 +AC_DEFUN([gt_TYPE_WINT_T],
17325 + AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
17326 + [AC_TRY_COMPILE([#include <wchar.h>
17327 + wint_t foo = (wchar_t)'\0';], ,
17328 + gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
17329 + if test $gt_cv_c_wint_t = yes; then
17330 + AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
17333 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/wint_t.m4~ psmisc-20.2.works.clean/m4/wint_t.m4~
17334 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/xsize.m4 psmisc-20.2.works.clean/m4/xsize.m4
17335 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/xsize.m4 1969-12-31 18:00:00.000000000 -0600
17336 +++ psmisc-20.2.works.clean/m4/xsize.m4 2004-10-13 15:18:42.000000000 -0500
17338 +# xsize.m4 serial 2
17339 +dnl Copyright (C) 2003 Free Software Foundation, Inc.
17340 +dnl This file is free software, distributed under the terms of the GNU
17341 +dnl General Public License. As a special exception to the GNU General
17342 +dnl Public License, this file may be distributed as part of a program
17343 +dnl that contains a configuration script generated by Autoconf, under
17344 +dnl the same distribution terms as the rest of that program.
17346 +AC_DEFUN([gl_XSIZE],
17348 + dnl Prerequisites of lib/xsize.h.
17349 + AC_REQUIRE([gl_SIZE_MAX])
17350 + AC_CHECK_HEADERS(stdint.h)
17352 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/m4/xsize.m4~ psmisc-20.2.works.clean/m4/xsize.m4~
17353 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/missing psmisc-20.2.works.clean/missing
17354 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/mkinstalldirs psmisc-20.2.works.clean/mkinstalldirs
17355 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/Makefile.in.in psmisc-20.2.works.clean/po/Makefile.in.in
17356 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/Makefile.in.in 2001-04-13 23:00:46.000000000 -0500
17357 +++ psmisc-20.2.works.clean/po/Makefile.in.in 2004-10-13 15:18:42.000000000 -0500
17359 -# Makefile for program source directory in GNU NLS utilities package.
17360 -# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
17361 +# Makefile for PO directory in any package using GNU gettext.
17362 +# Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
17364 -# This file file be copied and used freely without restrictions. It can
17365 -# be used in projects which are not available under the GNU Public License
17366 -# but which still want to provide support for the GNU gettext functionality.
17367 -# Please note that the actual code is *not* freely available.
17368 +# This file can be copied and used freely without restrictions. It can
17369 +# be used in projects which are not available under the GNU General Public
17370 +# License but which still want to provide support for the GNU gettext
17372 +# Please note that the actual code of GNU gettext is covered by the GNU
17373 +# General Public License and is *not* in the public domain.
17375 +# Origin: gettext-0.14
17377 PACKAGE = @PACKAGE@
17378 VERSION = @VERSION@
17379 @@ -14,88 +18,139 @@
17382 top_srcdir = @top_srcdir@
17387 exec_prefix = @exec_prefix@
17388 -datadir = $(prefix)/share
17389 +datadir = @datadir@
17390 localedir = $(datadir)/locale
17391 -gettextsrcdir = $(prefix)/share/gettext/po
17393 +gettextsrcdir = $(datadir)/gettext/po
17395 INSTALL = @INSTALL@
17396 INSTALL_DATA = @INSTALL_DATA@
17397 MKINSTALLDIRS = @MKINSTALLDIRS@
17398 -mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
17399 +mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
17403 GMSGFMT = @GMSGFMT@
17405 XGETTEXT = @XGETTEXT@
17406 MSGMERGE = msgmerge
17410 -CPPFLAGS = @CPPFLAGS@
17412 -INCLUDES = -I.. -I$(top_srcdir)/intl
17414 -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
17415 +MSGMERGE_UPDATE = @MSGMERGE@ --update
17418 +MSGFILTER = msgfilter
17420 POFILES = @POFILES@
17421 GMOFILES = @GMOFILES@
17422 -DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
17423 -$(POFILES) $(GMOFILES)
17424 +UPDATEPOFILES = @UPDATEPOFILES@
17425 +DUMMYPOFILES = @DUMMYPOFILES@
17426 +DISTFILES.common = Makefile.in.in remove-potcdate.sin \
17427 +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
17428 +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
17429 +$(POFILES) $(GMOFILES) \
17430 +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
17434 CATALOGS = @CATALOGS@
17437 -.SUFFIXES: .c .o .po .pox .gmo .mo
17441 +# Makevars gets inserted here. (Don't remove this line!)
17444 - $(MAKE) $(PACKAGE).pot
17445 - $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
17447 +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
17450 - $(MSGFMT) -o $@ $<
17451 + @echo "$(MSGFMT) -c -o $@ $<"; \
17452 + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
17455 - file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
17456 - && rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
17457 + @lang=`echo $* | sed -e 's,.*/,,'`; \
17458 + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
17459 + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
17460 + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
17463 + sed -e '/^#/d' $< > t-$@
17469 -all-yes: $(CATALOGS)
17473 -# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
17474 +# stamp-po is a timestamp denoting the last time at which the CATALOGS have
17475 +# been loosely updated. Its purpose is that when a developer or translator
17476 +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
17477 +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
17478 +# invocations of "make" will do nothing. This timestamp would not be necessary
17479 +# if updating the $(CATALOGS) would always touch them; however, the rule for
17480 +# $(POFILES) has been designed to not touch files that don't need to be
17482 +stamp-po: $(srcdir)/$(DOMAIN).pot
17483 + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
17484 + @echo "touch stamp-po"
17485 + @echo timestamp > stamp-poT
17486 + @mv stamp-poT stamp-po
17488 +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
17489 # otherwise packages like GCC can not be built if only parts of the source
17490 # have been downloaded.
17492 -$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
17493 - $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
17494 - --add-comments --keyword=_ --keyword=N_ \
17495 +# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
17496 +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
17497 +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
17498 + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
17499 + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
17500 --files-from=$(srcdir)/POTFILES.in \
17501 - && test ! -f $(PACKAGE).po \
17502 - || ( rm -f $(srcdir)/$(PACKAGE).pot \
17503 - && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
17504 + --copyright-holder='$(COPYRIGHT_HOLDER)' \
17505 + --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
17506 + test ! -f $(DOMAIN).po || { \
17507 + if test -f $(srcdir)/$(DOMAIN).pot; then \
17508 + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
17509 + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
17510 + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
17511 + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
17513 + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
17514 + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
17517 + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
17521 +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
17522 +# every "make" invocation, only create it when it is missing.
17523 +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
17524 +$(srcdir)/$(DOMAIN).pot:
17525 + $(MAKE) $(DOMAIN).pot-update
17527 +# This target rebuilds a PO file if $(DOMAIN).pot has changed.
17528 +# Note that a PO file is not touched if it doesn't need to be changed.
17529 +$(POFILES): $(srcdir)/$(DOMAIN).pot
17530 + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
17531 + if test -f "$(srcdir)/$${lang}.po"; then \
17532 + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
17533 + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
17534 + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
17536 + $(MAKE) $${lang}.po-create; \
17540 install: install-exec install-data
17542 install-data: install-data-@USE_NLS@
17543 - if test "$(PACKAGE)" = "gettext"; then \
17544 + if test "$(PACKAGE)" = "gettext-tools"; then \
17545 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
17546 - $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
17547 - $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
17548 + for file in $(DISTFILES.common) Makevars.template; do \
17549 + $(INSTALL_DATA) $(srcdir)/$$file \
17550 + $(DESTDIR)$(gettextsrcdir)/$$file; \
17552 + for file in Makevars; do \
17553 + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
17558 @@ -105,41 +160,118 @@
17559 @catalogs='$(CATALOGS)'; \
17560 for cat in $$catalogs; do \
17561 cat=`basename $$cat`; \
17562 - lang=`echo $$cat | sed 's/\.gmo$$//'`; \
17563 + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
17564 dir=$(localedir)/$$lang/LC_MESSAGES; \
17565 $(mkinstalldirs) $(DESTDIR)$$dir; \
17566 - if test -r $$cat; then \
17567 - $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
17568 - echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
17570 - $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
17571 - echo "installing $(srcdir)/$$cat as" \
17572 - "$(DESTDIR)$$dir/$(PACKAGE).mo"; \
17574 + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
17575 + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
17576 + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
17577 + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
17578 + if test -n "$$lc"; then \
17579 + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
17580 + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
17581 + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
17582 + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
17583 + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
17584 + for file in *; do \
17585 + if test -f $$file; then \
17586 + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
17589 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
17591 + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
17594 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
17595 + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
17598 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
17599 + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
17600 + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
17601 + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
17602 + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
17607 -# Define this as empty until I found a useful application.
17609 +install-strip: install
17612 - catalogs='$(CATALOGS)'; \
17613 +installdirs: installdirs-exec installdirs-data
17615 +installdirs-data: installdirs-data-@USE_NLS@
17616 + if test "$(PACKAGE)" = "gettext-tools"; then \
17617 + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
17621 +installdirs-data-no:
17622 +installdirs-data-yes:
17623 + $(mkinstalldirs) $(DESTDIR)$(datadir)
17624 + @catalogs='$(CATALOGS)'; \
17625 for cat in $$catalogs; do \
17626 cat=`basename $$cat`; \
17627 - lang=`echo $$cat | sed 's/\.gmo$$//'`; \
17628 - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
17629 + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
17630 + dir=$(localedir)/$$lang/LC_MESSAGES; \
17631 + $(mkinstalldirs) $(DESTDIR)$$dir; \
17632 + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
17633 + if test -n "$$lc"; then \
17634 + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
17635 + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
17636 + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
17637 + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
17638 + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
17639 + for file in *; do \
17640 + if test -f $$file; then \
17641 + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
17644 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
17646 + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
17649 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
17650 + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
17656 - if test "$(PACKAGE)" = "gettext"; then \
17657 - rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
17659 +# Define this as empty until I found a useful application.
17662 +uninstall: uninstall-exec uninstall-data
17664 +uninstall-data: uninstall-data-@USE_NLS@
17665 + if test "$(PACKAGE)" = "gettext-tools"; then \
17666 + for file in $(DISTFILES.common) Makevars.template; do \
17667 + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
17672 +uninstall-data-no:
17673 +uninstall-data-yes:
17674 + catalogs='$(CATALOGS)'; \
17675 + for cat in $$catalogs; do \
17676 + cat=`basename $$cat`; \
17677 + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
17678 + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
17679 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
17685 -dvi info tags TAGS ID:
17686 +info dvi ps pdf html tags TAGS ctags CTAGS ID:
17689 - rm -f core core.* *.pox $(PACKAGE).po *.new.po
17690 + rm -f remove-potcdate.sed
17692 + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
17696 @@ -150,58 +282,85 @@
17697 maintainer-clean: distclean
17698 @echo "This command is intended for maintainers to use;"
17699 @echo "it deletes files that may require special tools to rebuild."
17700 - rm -f $(GMOFILES)
17701 + rm -f stamp-po $(GMOFILES)
17703 -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
17704 +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
17708 # This is a separate target because 'update-po' must be executed before.
17709 dist2: $(DISTFILES)
17710 dists="$(DISTFILES)"; \
17711 + if test "$(PACKAGE)" = "gettext-tools"; then \
17712 + dists="$$dists Makevars.template"; \
17714 + if test -f $(srcdir)/ChangeLog; then \
17715 + dists="$$dists ChangeLog"; \
17717 + for i in 0 1 2 3 4 5 6 7 8 9; do \
17718 + if test -f $(srcdir)/ChangeLog.$$i; then \
17719 + dists="$$dists ChangeLog.$$i"; \
17722 + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
17723 for file in $$dists; do \
17724 - cp -p $(srcdir)/$$file $(distdir); \
17725 + if test -f $$file; then \
17726 + cp -p $$file $(distdir); \
17728 + cp -p $(srcdir)/$$file $(distdir); \
17732 update-po: Makefile
17733 - $(MAKE) $(PACKAGE).pot
17734 - if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
17735 + $(MAKE) $(DOMAIN).pot-update
17736 + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
17737 + $(MAKE) update-gmo
17739 +# General rule for creating PO files.
17742 + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
17743 + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
17746 +# General rule for updating PO files.
17749 + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
17750 + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
17752 + echo "$$lang:"; \
17753 + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
17754 + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
17756 - catalogs='$(GMOFILES)'; \
17757 - for cat in $$catalogs; do \
17758 - cat=`basename $$cat`; \
17759 - lang=`echo $$cat | sed 's/\.gmo$$//'`; \
17760 - echo "$$lang:"; \
17761 - if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
17762 - mv -f $$lang.new.po $$lang.po; \
17763 + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
17764 + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
17765 + rm -f $$tmpdir/$$lang.new.po; \
17767 - echo "msgmerge for $$cat failed!"; \
17768 - rm -f $$lang.new.po; \
17769 + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
17772 + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
17777 - $(MAKE) update-gmo
17779 + echo "msgmerge for $$lang.po failed!" 1>&2; \
17780 + rm -f $$tmpdir/$$lang.new.po; \
17785 update-gmo: Makefile $(GMOFILES)
17788 -POTFILES: POTFILES.in
17789 - ( if test 'x$(srcdir)' != 'x.'; then \
17790 - posrcprefix='$(top_srcdir)/'; \
17792 - posrcprefix="../"; \
17795 - && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
17796 - -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
17797 - | sed -e '$$s/\\$$//') > $@-t \
17798 - && chmod a-w $@-t \
17801 -Makefile: Makefile.in.in ../config.status POTFILES
17803 +Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
17804 + cd $(top_builddir) \
17805 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
17806 $(SHELL) ./config.status
17810 # Tell versions [3.59,3.63) of GNU make not to export all variables.
17811 # Otherwise a system limit (for SysV at least) may be exceeded.
17813 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/Makefile.in.in~ psmisc-20.2.works.clean/po/Makefile.in.in~
17814 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/Makevars psmisc-20.2.works.clean/po/Makevars
17815 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/Makevars 1969-12-31 18:00:00.000000000 -0600
17816 +++ psmisc-20.2.works.clean/po/Makevars 2004-10-13 15:18:42.000000000 -0500
17818 +# Makefile variables for PO directory in any package using GNU gettext.
17820 +# Usually the message domain is the same as the package name.
17821 +DOMAIN = $(PACKAGE)
17823 +# These two variables depend on the location of this directory.
17827 +# These options get passed to xgettext.
17828 +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
17830 +# This is the copyright holder that gets inserted into the header of the
17831 +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
17832 +# package. (Note that the msgstr strings, extracted from the package's
17833 +# sources, belong to the copyright holder of the package.) Translators are
17834 +# expected to transfer the copyright for their translations to this person
17835 +# or entity, or to disclaim their copyright. The empty string stands for
17836 +# the public domain; in this case the translators are expected to disclaim
17837 +# their copyright.
17838 +COPYRIGHT_HOLDER = Free Software Foundation, Inc.
17840 +# This is the email address or URL to which the translators shall report
17841 +# bugs in the untranslated strings:
17842 +# - Strings which are not entire sentences, see the maintainer guidelines
17843 +# in the GNU gettext documentation, section 'Preparing Strings'.
17844 +# - Strings which use unclear terms or require additional context to be
17846 +# - Strings which make invalid assumptions about notation of date, time or
17848 +# - Pluralisation problems.
17849 +# - Incorrect English spelling.
17850 +# - Incorrect formatting.
17851 +# It can be your email address, or a mailing list address where translators
17852 +# can write to without being subscribed, or the URL of a web page through
17853 +# which the translators can contact you.
17854 +MSGID_BUGS_ADDRESS =
17856 +# This is the list of locale categories, beyond LC_MESSAGES, for which the
17857 +# message catalogs shall be used. It is usually empty.
17858 +EXTRA_LOCALE_CATEGORIES =
17859 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/Rules-quot psmisc-20.2.works.clean/po/Rules-quot
17860 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/Rules-quot 1969-12-31 18:00:00.000000000 -0600
17861 +++ psmisc-20.2.works.clean/po/Rules-quot 2004-10-13 15:18:42.000000000 -0500
17863 +# Special Makefile rules for English message catalogs with quotation marks.
17865 +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
17867 +.SUFFIXES: .insert-header .po-update-en
17869 +en@quot.po-create:
17870 + $(MAKE) en@quot.po-update
17871 +en@boldquot.po-create:
17872 + $(MAKE) en@boldquot.po-update
17874 +en@quot.po-update: en@quot.po-update-en
17875 +en@boldquot.po-update: en@boldquot.po-update-en
17877 +.insert-header.po-update-en:
17878 + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
17879 + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
17881 + echo "$$lang:"; \
17882 + ll=`echo $$lang | sed -e 's/@.*//'`; \
17883 + LC_ALL=C; export LC_ALL; \
17885 + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
17886 + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
17887 + rm -f $$tmpdir/$$lang.new.po; \
17889 + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
17892 + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
17897 + echo "creation of $$lang.po failed!" 1>&2; \
17898 + rm -f $$tmpdir/$$lang.new.po; \
17901 +en@quot.insert-header: insert-header.sin
17902 + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
17904 +en@boldquot.insert-header: insert-header.sin
17905 + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
17907 +mostlyclean: mostlyclean-quot
17909 + rm -f *.insert-header
17910 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/Rules-quot~ psmisc-20.2.works.clean/po/Rules-quot~
17911 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/boldquot.sed psmisc-20.2.works.clean/po/boldquot.sed
17912 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/boldquot.sed 1969-12-31 18:00:00.000000000 -0600
17913 +++ psmisc-20.2.works.clean/po/boldquot.sed 2004-10-13 15:18:42.000000000 -0500
17915 +s/"\([^"]*\)"/“\1”/g
17916 +s/`\([^`']*\)'/‘\1’/g
17917 +s/ '\([^`']*\)' / ‘\1’ /g
17918 +s/ '\([^`']*\)'$/ ‘\1’/g
17919 +s/^'\([^`']*\)' /‘\1’ /g
17925 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/boldquot.sed~ psmisc-20.2.works.clean/po/boldquot.sed~
17926 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/en@boldquot.header psmisc-20.2.works.clean/po/en@boldquot.header
17927 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/en@boldquot.header 1969-12-31 18:00:00.000000000 -0600
17928 +++ psmisc-20.2.works.clean/po/en@boldquot.header 2004-10-13 15:18:42.000000000 -0500
17930 +# All this catalog "translates" are quotation characters.
17931 +# The msgids must be ASCII and therefore cannot contain real quotation
17932 +# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
17933 +# and double quote (0x22). These substitutes look strange; see
17934 +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
17936 +# This catalog translates grave accent (0x60) and apostrophe (0x27) to
17937 +# left single quotation mark (U+2018) and right single quotation mark (U+2019).
17938 +# It also translates pairs of apostrophe (0x27) to
17939 +# left single quotation mark (U+2018) and right single quotation mark (U+2019)
17940 +# and pairs of quotation mark (0x22) to
17941 +# left double quotation mark (U+201C) and right double quotation mark (U+201D).
17943 +# When output to an UTF-8 terminal, the quotation characters appear perfectly.
17944 +# When output to an ISO-8859-1 terminal, the single quotation marks are
17945 +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
17946 +# grave/acute accent (by libiconv), and the double quotation marks are
17947 +# transliterated to 0x22.
17948 +# When output to an ASCII terminal, the single quotation marks are
17949 +# transliterated to apostrophes, and the double quotation marks are
17950 +# transliterated to 0x22.
17952 +# This catalog furthermore displays the text between the quotation marks in
17953 +# bold face, assuming the VT100/XTerm escape sequences.
17955 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/en@boldquot.header~ psmisc-20.2.works.clean/po/en@boldquot.header~
17956 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/en@quot.header psmisc-20.2.works.clean/po/en@quot.header
17957 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/en@quot.header 1969-12-31 18:00:00.000000000 -0600
17958 +++ psmisc-20.2.works.clean/po/en@quot.header 2004-10-13 15:18:42.000000000 -0500
17960 +# All this catalog "translates" are quotation characters.
17961 +# The msgids must be ASCII and therefore cannot contain real quotation
17962 +# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
17963 +# and double quote (0x22). These substitutes look strange; see
17964 +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
17966 +# This catalog translates grave accent (0x60) and apostrophe (0x27) to
17967 +# left single quotation mark (U+2018) and right single quotation mark (U+2019).
17968 +# It also translates pairs of apostrophe (0x27) to
17969 +# left single quotation mark (U+2018) and right single quotation mark (U+2019)
17970 +# and pairs of quotation mark (0x22) to
17971 +# left double quotation mark (U+201C) and right double quotation mark (U+201D).
17973 +# When output to an UTF-8 terminal, the quotation characters appear perfectly.
17974 +# When output to an ISO-8859-1 terminal, the single quotation marks are
17975 +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
17976 +# grave/acute accent (by libiconv), and the double quotation marks are
17977 +# transliterated to 0x22.
17978 +# When output to an ASCII terminal, the single quotation marks are
17979 +# transliterated to apostrophes, and the double quotation marks are
17980 +# transliterated to 0x22.
17982 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/en@quot.header~ psmisc-20.2.works.clean/po/en@quot.header~
17983 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/insert-header.sin psmisc-20.2.works.clean/po/insert-header.sin
17984 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/insert-header.sin 1969-12-31 18:00:00.000000000 -0600
17985 +++ psmisc-20.2.works.clean/po/insert-header.sin 2004-10-13 15:18:42.000000000 -0500
17987 +# Sed script that inserts the file called HEADER before the header entry.
17989 +# At each occurrence of a line starting with "msgid ", we execute the following
17990 +# commands. At the first occurrence, insert the file. At the following
17991 +# occurrences, do nothing. The distinction between the first and the following
17992 +# occurrences is achieved by looking at the hold space.
17995 +# Test if the hold space is empty.
17998 +# Yes it was empty. First occurrence. Read the file.
18000 +# Output the file's contents by reading the next line. But don't lose the
18001 +# current line while doing this.
18006 +# The hold space was nonempty. Following occurrences. Do nothing.
18010 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/insert-header.sin~ psmisc-20.2.works.clean/po/insert-header.sin~
18011 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/quot.sed psmisc-20.2.works.clean/po/quot.sed
18012 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/quot.sed 1969-12-31 18:00:00.000000000 -0600
18013 +++ psmisc-20.2.works.clean/po/quot.sed 2004-10-13 15:18:42.000000000 -0500
18015 +s/"\([^"]*\)"/“\1”/g
18016 +s/`\([^`']*\)'/‘\1’/g
18017 +s/ '\([^`']*\)' / ‘\1’ /g
18018 +s/ '\([^`']*\)'$/ ‘\1’/g
18019 +s/^'\([^`']*\)' /‘\1’ /g
18021 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/quot.sed~ psmisc-20.2.works.clean/po/quot.sed~
18022 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/remove-potcdate.sin psmisc-20.2.works.clean/po/remove-potcdate.sin
18023 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/remove-potcdate.sin 1969-12-31 18:00:00.000000000 -0600
18024 +++ psmisc-20.2.works.clean/po/remove-potcdate.sin 2004-10-13 15:18:42.000000000 -0500
18026 +# Sed script that remove the POT-Creation-Date line in the header entry
18027 +# from a POT file.
18029 +# The distinction between the first and the following occurrences of the
18030 +# pattern is achieved by looking at the hold space.
18031 +/^"POT-Creation-Date: .*"$/{
18033 +# Test if the hold space is empty.
18036 +# Yes it was empty. First occurrence. Remove the line.
18041 +# The hold space was nonempty. Following occurrences. Do nothing.
18045 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/remove-potcdate.sin~ psmisc-20.2.works.clean/po/remove-potcdate.sin~
18046 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/po/stamp-po psmisc-20.2.works.clean/po/stamp-po
18047 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/po/stamp-po 1969-12-31 18:00:00.000000000 -0600
18048 +++ psmisc-20.2.works.clean/po/stamp-po 2004-10-13 15:11:01.000000000 -0500
18051 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/src/Makefile.am psmisc-20.2.works.clean/src/Makefile.am
18052 --- tmp/work/psmisc-20.2-r0/psmisc-20.2/src/Makefile.am 2001-06-15 07:17:55.000000000 -0500
18053 +++ psmisc-20.2.works.clean/src/Makefile.am 2004-10-13 15:11:01.000000000 -0500
18056 CFLAGS = -Wall -DLOCALEDIR=\"/usr/share/locale\"
18057 +INCLUDES = -I$(top_srcdir)/intl
18060 bin_PROGRAMS = fuser killall pstree
18062 diff -urNd -urNd tmp/work/psmisc-20.2-r0/psmisc-20.2/src/Makefile.in psmisc-20.2.works.clean/src/Makefile.in