NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/42124: setlocale(3) never returns NULL with none existing locale.



The following reply was made to PR lib/42124; it has been noted by GNATS.

From: Takehiko NOZAKI <takehiko.nozaki%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: lib/42124: setlocale(3) never returns NULL with none existing 
        locale.
Date: Sat, 26 Sep 2009 11:53:42 +0900

 --00032555999e1d85cb0474722c5a
 Content-Type: text/plain; charset=ISO-8859-1
 
 hi,
 
 please try attached patch, i'll commit this tomorrow.
 sorry for your inconvinience.
 
 
 very truly yours.
 -- 
 Takehiko NOZAKI<takehiko.nozaki%gmail.com@localhost>
 
 --00032555999e1d85cb0474722c5a
 Content-Type: application/octet-stream; name=patch-setlocale
 Content-Disposition: attachment; filename=patch-setlocale
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_g01rmzgi0
 
 SW5kZXg6IGdlbmVyaWNfbGNfYWxsLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2hvbWUvdG5vemFr
 aS9jdnN1cC9OZXRCU0Qvc3JjL2xpYi9saWJjL2xvY2FsZS9nZW5lcmljX2xjX2FsbC5jLHYKcmV0
 cmlldmluZyByZXZpc2lvbiAxLjIKZGlmZiAtdSAtcjEuMiBnZW5lcmljX2xjX2FsbC5jCi0tLSBn
 ZW5lcmljX2xjX2FsbC5jCTExIEphbiAyMDA5IDAyOjQ2OjI4IC0wMDAwCTEuMgorKysgZ2VuZXJp
 Y19sY19hbGwuYwkyNiBTZXAgMjAwOSAxMDozNDo0MiAtMDAwMApAQCAtNTYsMTAgKzU2LDExIEBA
 CiAJX2xvY2FsZV9jYXRlZ29yeV90ICpsOwogCWNoYXIgaGVhZFtfTE9DQUxFTkFNRV9MRU5fTUFY
 ICogKF9MQ19MQVNUIC0gMSldLCAqd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