Re: I'm done with O_CLOEXEC

2015-03-21 Thread Jürg Billeter
On Fri, 2015-03-20 at 16:43 -0400, Ryan Lortie wrote: What led me to this was the dup3() system call. This is a variant of dup2() that was added (as part of the efforts mentioned above) to avoid the O_CLOEXEC race: int dup3(int oldfd, int newfd, int flags); unfortunately: dup3(0,

Re: I'm done with O_CLOEXEC

2015-03-21 Thread Jürg Billeter
On Sat, 2015-03-21 at 01:32 -0400, Ryan Lortie wrote: It seems that this is a (slightly) recent addition. It's documented: F_DUPFD_CLOEXEC (int; since Linux 2.6.24) so I'm sure we'll probably still need to write an ifdef with a fallback... If you're referring to older Linux

Re: g_filename_to_uri() issue in glib-win32

2012-05-23 Thread Jürg Billeter
On Wed, 2012-05-23 at 06:48 +0100, John Emmas wrote: But whatever that (second) character looked like, it's decimal value would always be 246 (because the UTF-8 sequence C3 B6 translates to decimal 246). The URI translation of decimal 246 is %F6. U+00F6 is the Unicode codepoint but URI

Re: _wstat on Windows (actually stat stuff in general)

2011-09-26 Thread Jürg Billeter
On Mon, 2011-09-26 at 13:55 +0200, Jernej Simončič wrote: On Mon, 26 Sep 2011 08:59:29 +0200, Kean Johnston wrote: So, for stat, we have to do a double conversion: first from the input UTF-8 to UTF-16, and then from UTF-16 to MBCS so that we can call stat instead of wstat so that users

Re: _wstat on Windows (actually stat stuff in general)

2011-09-26 Thread Jürg Billeter
On Mon, 2011-09-26 at 19:11 +0200, Kean Johnston wrote: Couldn't GLib directly use GetFileAttributesExW instead, or does this Sadly the file attributes constants dont have anything like FILE_ATTRIBUTE_SYMLINK etc, so we wouldn't be able to determine if the file is a symbolic link or not.

Re: GLib next cycle update

2011-09-19 Thread Jürg Billeter
On Sun, 2011-09-18 at 13:11 -0400, Ryan Lortie wrote: - initialise on the first g_thread_create() call This seems like it would avoid any chance of races in gslice initialisation but it means that we wouldn't be safe with respect to threads that weren't created by GLib (like some

Re: Problems with GBufferedOutputStream

2009-08-14 Thread Jürg Billeter
On Fri, 2009-08-14 at 20:49 +0200, Sebastian Pölsterl wrote: I came across a problem with GBufferedOutputStream and g_output_stream_write recently. If I try to write more data than the buffer size, not everything is written to the file. From the documentation of g_output_stream_write: On

Re: gio-standalone fails to build 'G_GNUC_PRETTY_FUNCTION'

2008-09-29 Thread Jürg Billeter
Hi, On Sat, 2008-09-27 at 11:27 +0200, comicinker wrote: Hi I'm trying to build the svn version of gio-standalone (Rev 761) on a Ubuntu Hardy machine. gio-standalone has been merged into glib in 2.15.x. You shouldn't use gio-standalone anymore. Jürg

Re: Proposal for a collection API in glib

2008-07-18 Thread Jürg Billeter
Hi Havoc, On Thu, 2008-07-17 at 13:37 -0400, Havoc Pennington wrote: 2) Another idea would be an equivalent to registering boxed types: g_iterator_type_register_static(const char *name, GBoxedCopyFunc boxed_copy, GBoxedFreeFunc boxed_free, GIteratorNextFunc iterator_next, GIteratorGetFunc

Re: [GIO] Errors from async stream methods

2008-02-28 Thread Jürg Billeter
Hi Mikkel, On Thu, 2008-02-28 at 23:05 +0100, Mikkel Kamstrup Erlandsen wrote: I am wondering how errors are reported in the g_*put_stream_*_async methods. Inside gio I see that a SimpleAsyncResult is used for this. It has a GError error member, but it is not exposed in any public api as

Re: GIO API review

2007-12-11 Thread Jürg Billeter
On Tue, 2007-12-11 at 21:22 +0200, Vincent Geddes wrote: Hi, On Tue, 2007-12-11 at 17:48 +0100, Michael Natterer wrote: Also, subclasses should probably append their name, not prepend it: GFilterOutputStream - GIOOutputStreamFilter GUnixOutputStream - GIOOutputStreamUnix ...

Re: Signals with gchar** arguments

2007-11-15 Thread Jürg Billeter
On Thu, 2007-11-15 at 12:52 +0100, Mathias Hasselmann wrote: So my question is: How to solve this issue? - Introduce a new fundamental type G_TYPE_STRING_PTR duplicating the behaviour of G_TYPE_POINTER under a new name. - Patch gtk-doc to retrieve the real argument by inspecting