Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-09-16 Thread Christoph Otto
chromatic via RT wrote: On Monday 15 September 2008 23:21:26 Christoph Otto wrote: --- src/pmc/os.pmc (revision 31173) +++ src/pmc/os.pmc (working copy) @@ -31,9 +31,6 @@ #include parrot/parrot.h -/* XXX Check if we need to deallocate strerror strings */ -/* XXX apparently,

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-09-16 Thread Andy Dougherty
I think you've gone about this in the right way, but need to handle the various cases a bit more broadly. Specifically, you can't assume that everyone has strerror() at all (Solaris 8 doesn't, for example) nor that everyone who uses int strerror_r() will also define either _XOPEN_SOURCE or

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-09-13 Thread Christoph Otto
After looking around Parrot and realizing that there were several other places where strerror is used, I'm trying a different approach. The attached patch adds config/gen/platform/generic/strerror.c, which contains a new function Parrot_strerror. This is just a wrapper to abstract away the

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-09-11 Thread Christoph Otto
Will Coleda via RT wrote: On Tue Jul 22 23:34:13 2008, [EMAIL PROTECTED] wrote: Christoph Otto via RT wrote: This version of the patch should dtrt with all versions of strerror_r. It works on my Debian/x86 box and I'll be testing it on any *nix I can get my hands on Tuesday. If it works

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-23 Thread Christoph Otto
Christoph Otto via RT wrote: This version of the patch should dtrt with all versions of strerror_r. It works on my Debian/x86 box and I'll be testing it on any *nix I can get my hands on Tuesday. If it works fine there, if someone can test it on windows and if the patch looks OK, I'll

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-23 Thread Will Coleda via RT
On Tue Jul 22 23:34:13 2008, [EMAIL PROTECTED] wrote: Christoph Otto via RT wrote: This version of the patch should dtrt with all versions of strerror_r. It works on my Debian/x86 box and I'll be testing it on any *nix I can get my hands on Tuesday. If it works fine there, if someone

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-23 Thread Christoph Otto via RT
On Tue Jul 22 23:34:13 2008, [EMAIL PROTECTED] wrote: This patch contains a fix and a simplification. It should now be cross-platform and thread-safe. I'll test on some other *nixes and go on from there. If nothing else it works fine on Ubuntu/x86. It also works in FreeBSD 7.0 and

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-22 Thread Christoph Otto
Andy Dougherty via RT wrote: On Thu, 17 Jul 2008, Christoph Otto via RT wrote: On Thu Jul 17 15:53:12 2008, julianalbo wrote: On Thu, Jul 17, 2008 at 9:59 PM, Christoph Otto via RT [EMAIL PROTECTED] wrote: trick. The attached patch (v5) properly fixes the problem on my system. There

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-18 Thread chromatic
On Thursday 17 July 2008 15:44:36 NotFound wrote: [EMAIL PROTECTED] wrote: With this patch, the new tests still pass on Linux/x86. The patch uses STRING-strstart to avoid leaking a malloc'd buffer when throwing an exception, which may or may not be considered kosher in this situation.

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-18 Thread Christoph Otto via RT
On Thu Jul 17 15:53:12 2008, julianalbo wrote: On Thu, Jul 17, 2008 at 9:59 PM, Christoph Otto via RT [EMAIL PROTECTED] wrote: With this patch, the new tests still pass on Linux/x86. The patch uses STRING-strstart to avoid leaking a malloc'd buffer when throwing an exception, which may

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-18 Thread jerry gay
On Thu, Jul 17, 2008 at 7:44 PM, Christoph Otto via RT [EMAIL PROTECTED] wrote: On Thu Jul 17 15:53:12 2008, julianalbo wrote: On Thu, Jul 17, 2008 at 9:59 PM, Christoph Otto via RT [EMAIL PROTECTED] wrote: With this patch, the new tests still pass on Linux/x86. The patch uses

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-18 Thread Andy Dougherty
On Thu, 17 Jul 2008, Christoph Otto via RT wrote: On Thu Jul 17 15:53:12 2008, julianalbo wrote: On Thu, Jul 17, 2008 at 9:59 PM, Christoph Otto via RT [EMAIL PROTECTED] wrote: trick. The attached patch (v5) properly fixes the problem on my system. There shouldn't be any remaining

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-17 Thread Christoph Otto via RT
On Wed Apr 23 18:18:00 2008, [EMAIL PROTECTED] wrote: This thread trailed off about 4 months ago. Could we get an update on its status, i.e., whether it should be applied, what OSes it's passing on, etc. Thank you very much. kid51 The tests passed because the strerror/strerror_r code

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-17 Thread Christoph Otto via RT
On Thu Jul 17 01:17:51 2008, cotto wrote: On Wed Apr 23 18:18:00 2008, [EMAIL PROTECTED] wrote: This thread trailed off about 4 months ago. Could we get an update on its status, i.e., whether it should be applied, what OSes it's passing on, etc. Thank you very much. kid51 The

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-07-17 Thread NotFound
On Thu, Jul 17, 2008 at 9:59 PM, Christoph Otto via RT [EMAIL PROTECTED] wrote: With this patch, the new tests still pass on Linux/x86. The patch uses STRING-strstart to avoid leaking a malloc'd buffer when throwing an exception, which may or may not be considered kosher in this situation.

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2008-04-23 Thread James Keenan via RT
This thread trailed off about 4 months ago. Could we get an update on its status, i.e., whether it should be applied, what OSes it's passing on, etc. Thank you very much. kid51

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2007-11-29 Thread Will Coleda
On Nov 28, 2007, at 1:29 AM, Joe Sadusk via RT wrote: Heh, ok, grammar fixed and resubmitted. And yes, I've tested it on Linux (Fedora 7) and Windows with MSVC 2005. I don't have a non-glibc unix to try it out with however. Joe On Mon Nov 26 09:50:28 2007, [EMAIL PROTECTED] wrote: On

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2007-11-28 Thread Joe Sadusk via RT
Heh, ok, grammar fixed and resubmitted. And yes, I've tested it on Linux (Fedora 7) and Windows with MSVC 2005. I don't have a non-glibc unix to try it out with however. Joe On Mon Nov 26 09:50:28 2007, [EMAIL PROTECTED] wrote: On Sunday 25 November 2007 21:48:01 Joe Sadusk via RT wrote:

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2007-11-26 Thread Joe Sadusk via RT
Ok, here's try two. Platform specific stuff has been moved into config/gen/platform, and non-win32 platforms use strerror_r directly. On Fri Nov 23 01:29:35 2007, kjs wrote: On Nov 22, 2007 9:03 PM, Joe Sadusk via RT [EMAIL PROTECTED] wrote: Reposting this because this is my first patch, and

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2007-11-26 Thread chromatic
On Sunday 25 November 2007 21:48:01 Joe Sadusk via RT wrote: Ok, here's try two. Platform specific stuff has been moved into config/gen/platform, and non-win32 platforms use strerror_r directly. Change its to it's in the comment before #define ERRBUF_SIZE and this patch looks reasonable to

Re: [perl #46681] [TODO] [C] Use strerror_r instead of strerror

2007-11-23 Thread Klaas-Jan Stol
On Nov 22, 2007 9:03 PM, Joe Sadusk via RT [EMAIL PROTECTED] wrote: Reposting this because this is my first patch, and it didn't occur to me that if I don't CC perl6-internals, no one would notice it. It turns out that strerror_r is POSIX only, and windows has the slightly different

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2007-11-22 Thread Joe Sadusk via RT
Reposting this because this is my first patch, and it didn't occur to me that if I don't CC perl6-internals, no one would notice it. It turns out that strerror_r is POSIX only, and windows has the slightly different strerror_s (exactly the same except the arguments are in a different order). I

[perl #46681] [TODO] [C] Use strerror_r instead of strerror

2007-10-22 Thread via RT
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46681] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=46681 In src/pmc/file.pmc there is the todo item: /* XXX apparently, strerror_r is