nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | General Information |
2 | =================== |
||
3 | |||
4 | This is GLib version 2.48.1. GLib is the low-level core |
||
5 | library that forms the basis for projects such as GTK+ and GNOME. It |
||
6 | provides data structure handling for C, portability wrappers, and |
||
7 | interfaces for such runtime functionality as an event loop, threads, |
||
8 | dynamic loading, and an object system. |
||
9 | |||
10 | The official download locations are: |
||
11 | ftp://ftp.gtk.org/pub/glib |
||
12 | http://download.gnome.org/sources/glib |
||
13 | |||
14 | The official web site is: |
||
15 | http://www.gtk.org/ |
||
16 | |||
17 | Information about mailing lists can be found at |
||
18 | http://www.gtk.org/mailing-lists.php |
||
19 | |||
20 | To subscribe, send mail to gtk-list-request@gnome.org |
||
21 | with the subject "subscribe". |
||
22 | |||
23 | Installation |
||
24 | ============ |
||
25 | |||
26 | See the file 'INSTALL' |
||
27 | |||
28 | How to report bugs |
||
29 | ================== |
||
30 | |||
31 | Bugs should be reported to the GNOME bug tracking system. |
||
32 | (http://bugzilla.gnome.org, product glib.) You will need |
||
33 | to create an account for yourself. |
||
34 | |||
35 | In the bug report please include: |
||
36 | |||
37 | * Information about your system. For instance: |
||
38 | |||
39 | - What operating system and version |
||
40 | - For Linux, what version of the C library |
||
41 | |||
42 | And anything else you think is relevant. |
||
43 | |||
44 | * How to reproduce the bug. |
||
45 | |||
46 | If you can reproduce it with one of the test programs that are built |
||
47 | in the tests/ subdirectory, that will be most convenient. Otherwise, |
||
48 | please include a short test program that exhibits the behavior. |
||
49 | As a last resort, you can also provide a pointer to a larger piece |
||
50 | of software that can be downloaded. |
||
51 | |||
52 | * If the bug was a crash, the exact text that was printed out |
||
53 | when the crash occured. |
||
54 | |||
55 | * Further information such as stack traces may be useful, but |
||
56 | is not necessary. |
||
57 | |||
58 | Patches |
||
59 | ======= |
||
60 | |||
61 | Patches should also be submitted to bugzilla.gnome.org. If the |
||
62 | patch fixes an existing bug, add the patch as an attachment |
||
63 | to that bug report. |
||
64 | |||
65 | Otherwise, enter a new bug report that describes the patch, |
||
66 | and attach the patch to that bug report. |
||
67 | |||
68 | Patches should be in unified diff form. (The -up option to GNU diff.) |
||
69 | |||
70 | Notes about GLib 2.48 |
||
71 | ===================== |
||
72 | |||
73 | * The system copy of PCRE is now used by default to implement GRegex. |
||
74 | Configure with --with-pcre=internal if a system PCRE version |
||
75 | is unavailable or undesired. |
||
76 | |||
77 | Notes about GLib 2.46 |
||
78 | ===================== |
||
79 | |||
80 | * GTask no longer imposes a fixed limit on the number of tasks that |
||
81 | can be run_in_thread() simultaneously, since doing this inevitably |
||
82 | results in deadlocks in some use cases. Instead, it now has a base |
||
83 | number of threads that can be used "for free", but will gradually |
||
84 | add more threads to the pool if too much time passes without any |
||
85 | tasks completing. |
||
86 | |||
87 | The exact behavior may continue to change in the future, and it's |
||
88 | possible that some future version of GLib may not do any |
||
89 | rate-limiting at all. As a result, you should no longer assume that |
||
90 | GTask will rate-limit tasks itself (or, by extension, that calls to |
||
91 | certain async gio methods will automatically be rate-limited for |
||
92 | you). If you have a very large number of tasks to run, and don't |
||
93 | want them to all run at once, you should rate-limit them yourself. |
||
94 | |||
95 | Notes about GLib 2.40 |
||
96 | ===================== |
||
97 | |||
98 | * g_test_run() no longer runs tests in exactly the order they are |
||
99 | registered; instead, it groups them according to test suites (ie, |
||
100 | path components) like the documentation always claimed it did. In |
||
101 | some cases, this can result in a sub-optimal ordering of tests, |
||
102 | relative to the old behavior. The fix is to change the test paths to |
||
103 | properly group together the tests that should run together. (eg, if |
||
104 | you want to run test_foo_simple(), test_bar_simple(), and |
||
105 | test_foo_using_bar() in that order, they should have test paths like |
||
106 | "/simple/foo", "/simple/bar", "/complex/foo-using-bar", not |
||
107 | "/foo/simple", "/bar/simple", "/foo/using-bar" (which would result |
||
108 | in test_foo_using_bar() running before test_bar_simple()). |
||
109 | |||
110 | (The behavior actually changed in GLib 2.36, but it was not |
||
111 | documented at the time, since we didn't realize it mattered.) |
||
112 | |||
113 | Notes about GLib 2.36 |
||
114 | ===================== |
||
115 | |||
116 | * It is no longer necessary to call g_type_init(). If you are |
||
117 | loading GLib as a dynamic module, you should be careful to avoid |
||
118 | unloading it, then subsequently loading it again. This never |
||
119 | really worked before, but it is now explicitly undefined behavior. |
||
120 | Note that if g_type_init() was the only explicit use of a GObject |
||
121 | API and you are using linker flags such as --no-add-needed, then |
||
122 | you may have to artificially use some GObject call to keep the |
||
123 | linker from optimizing away -lgobject. We recommend to use |
||
124 | g_type_ensure (G_TYPE_OBJECT) for this purpose. |
||
125 | |||
126 | * This release contains an incompatible change to the g_get_home_dir() |
||
127 | function. Previously, this function would effectively ignore the HOME |
||
128 | environment variable and always return the value from /etc/password. |
||
129 | As of this version, the HOME variable is used if it is set and the |
||
130 | value from /etc/passwd is only used as a fallback. |
||
131 | |||
132 | * The 'flowinfo' and 'scope_id' fields of GInetSocketAddress |
||
133 | (introduced in GLib 2.32) have been fixed to be in host byte order |
||
134 | rather than network byte order. This is an incompatible change, but |
||
135 | the previous behavior was clearly broken, so it seems unlikely that |
||
136 | anyone was using it. |
||
137 | |||
138 | Notes about GLib 2.34 |
||
139 | ===================== |
||
140 | |||
141 | * GIO now looks for thumbnails in XDG_CACHE_HOME, following a |
||
142 | recent alignment of the thumbnail spec with the basedir spec. |
||
143 | |||
144 | * The default values for GThreadPools max_unused_threads and |
||
145 | max_idle_time settings have been changed to 2 and 15*1000, |
||
146 | respectively. |
||
147 | |||
148 | Notes about GLib 2.32 |
||
149 | ===================== |
||
150 | |||
151 | * It is no longer necessary to use g_thread_init() or to link against |
||
152 | libgthread. libglib is now always thread-enabled. Custom thread |
||
153 | system implementations are no longer supported (including errorcheck |
||
154 | mutexes). |
||
155 | |||
156 | * The thread and synchronisation APIs have been updated. |
||
157 | GMutex and GCond can be statically allocated without explicit |
||
158 | initialisation, as can new types GRWLock and GRecMutex. The |
||
159 | GStatic_______ variants of these types have been deprecated. GPrivate |
||
160 | can also be statically allocated and has a nicer API (deprecating |
||
161 | GStaticPrivate). Finally, g_thread_create() has been replaced with a |
||
162 | substantially simplified g_thread_new(). |
||
163 | |||
164 | * The g_once_init_enter()/_leave() functions have been replaced with |
||
165 | macros that allow for a pointer to any gsize-sized object, not just a |
||
166 | gsize*. The assertions to ensure that a pointer to a correctly-sized |
||
167 | object is being used will not work with generic pointers (ie: (void*) |
||
168 | and (gpointer) casts) which would have worked with the old version. |
||
169 | |||
170 | * It is now mandatory to include glib.h instead of individual headers. |
||
171 | |||
172 | * The -uninstalled variants of the pkg-config files have been dropped. |
||
173 | |||
174 | * For a long time, gobject-2.0.pc mistakenly declared a public |
||
175 | dependency on gthread-2.0.pc (when the dependency should have been |
||
176 | private). This means that programs got away with calling |
||
177 | g_thread_init() without explicitly listing gthread-2.0.pc among their |
||
178 | dependencies. |
||
179 | |||
180 | gthread has now been removed as a gobject dependency, which will cause |
||
181 | such programs to break. |
||
182 | |||
183 | The fix for this problem is either to declare an explicit dependency |
||
184 | on gthread-2.0.pc (if you care about compatibility with older GLib |
||
185 | versions) or to stop calling g_thread_init(). |
||
186 | |||
187 | * g_debug() output is no longer enabled by default. It can be enabled |
||
188 | on a per-domain basis with the G_MESSAGES_DEBUG environment variable |
||
189 | like |
||
190 | G_MESSAGES_DEBUG=domain1,domain2 |
||
191 | or |
||
192 | G_MESSAGES_DEBUG=all |
||
193 | |||
194 | Notes about GLib 2.30 |
||
195 | ===================== |
||
196 | |||
197 | * GObject includes a generic marshaller, g_cclosure_marshal_generic. |
||
198 | To use it, simply specify NULL as the marshaller in g_signal_new(). |
||
199 | The generic marshaller is implemented with libffi, and consequently |
||
200 | GObject depends on libffi now. |
||
201 | |||
202 | Notes about GLib 2.28 |
||
203 | ===================== |
||
204 | |||
205 | * The GApplication API has changed compared to the version that was |
||
206 | included in the 2.25 development snapshots. Existing users will need |
||
207 | adjustments. |
||
208 | |||
209 | Notes about GLib 2.26 |
||
210 | ===================== |
||
211 | |||
212 | * Nothing noteworthy. |
||
213 | |||
214 | Notes about GLib 2.24 |
||
215 | ===================== |
||
216 | |||
217 | * It is now allowed to call g_thread_init(NULL) multiple times, and |
||
218 | to call glib functions before g_thread_init(NULL) is called |
||
219 | (although the later is mainly a change in docs as this worked before |
||
220 | too). See the GThread reference documentation for the details. |
||
221 | |||
222 | * GObject now links to GThread and threads are enabled automatically |
||
223 | when g_type_init() is called. |
||
224 | |||
225 | * GObject no longer allows to call g_object_set() on construct-only properties |
||
226 | while an object is being initialized. If this behavior is needed, setting a |
||
227 | custom constructor that just chains up will re-enable this functionality. |
||
228 | |||
229 | * GMappedFile on an empty file now returns NULL for the contents instead of |
||
230 | returning an empty string. The documentation specifically states that code |
||
231 | may not rely on nul-termination here so any breakage caused by this change |
||
232 | is a bug in application code. |
||
233 | |||
234 | Notes about GLib 2.22 |
||
235 | ===================== |
||
236 | |||
237 | * Repeated calls to g_simple_async_result_set_op_res_gpointer used |
||
238 | to leak the data. This has been fixed to always call the provided |
||
239 | destroy notify. |
||
240 | |||
241 | Notes about GLib 2.20 |
||
242 | ===================== |
||
243 | |||
244 | * The functions for launching applications (e.g. g_app_info_launch() + |
||
245 | friends) now passes a FUSE file:// URI if possible (requires gvfs |
||
246 | with the FUSE daemon to be running and operational). With gvfs 2.26, |
||
247 | FUSE file:// URIs will be mapped back to gio URIs in the GFile |
||
248 | constructors. The intent of this change is to better integrate |
||
249 | POSIX-only applications, see bug #528670 for the rationale. The |
||
250 | only user-visible change is when an application needs to examine an |
||
251 | URI passed to it (e.g. as a positional parameter). Instead of |
||
252 | looking at the given URI, the application will now need to look at |
||
253 | the result of g_file_get_uri() after having constructed a GFile |
||
254 | object with the given URI. |
||
255 | |||
256 | Notes about GLib 2.18 |
||
257 | ===================== |
||
258 | |||
259 | * The recommended way of using GLib has always been to only include the |
||
260 | toplevel headers glib.h, glib-object.h and gio.h. GLib enforces this by |
||
261 | generating an error when individual headers are directly included. |
||
262 | To help with the transition, the enforcement is not turned on by |
||
263 | default for GLib headers (it is turned on for GObject and GIO). |
||
264 | To turn it on, define the preprocessor symbol G_DISABLE_SINGLE_INCLUDES. |
||
265 | |||
266 | Notes about GLib 2.16 |
||
267 | ===================== |
||
268 | |||
269 | * GLib now includes GIO, which adds optional dependencies against libattr |
||
270 | and libselinux for extended attribute and SELinux support. Use |
||
271 | --disable-xattr and --disable-selinux to build without these. |
||
272 | |||
273 | Notes about GLib 2.10 |
||
274 | ===================== |
||
275 | |||
276 | * The functions g_snprintf() and g_vsnprintf() have been removed from |
||
277 | the gprintf.h header, since they are already declared in glib.h. This |
||
278 | doesn't break documented use of gprintf.h, but people have been known |
||
279 | to include gprintf.h without including glib.h. |
||
280 | |||
281 | * The Unicode support has been updated to Unicode 4.1. This adds several |
||
282 | new members to the GUnicodeBreakType enumeration. |
||
283 | |||
284 | * The support for Solaris threads has been retired. Solaris has provided |
||
285 | POSIX threads for long enough now to have them available on every |
||
286 | Solaris platform. |
||
287 | |||
288 | * 'make check' has been changed to validate translations by calling |
||
289 | msgfmt with the -c option. As a result, it may fail on systems with |
||
290 | older gettext implementations (GNU gettext < 0.14.1, or Solaris gettext). |
||
291 | 'make check' will also fail on systems where the C compiler does not |
||
292 | support ELF visibility attributes. |
||
293 | |||
294 | * The GMemChunk API has been deprecated in favour of a new 'slice |
||
295 | allocator'. See the g_slice documentation for more details. |
||
296 | |||
297 | * A new type, GInitiallyUnowned, has been introduced, which is |
||
298 | intended to serve as a common implementation of the 'floating reference' |
||
299 | concept that is e.g. used by GtkObject. Note that changing the |
||
300 | inheritance hierarchy of a type can cause problems for language |
||
301 | bindings and other code which needs to work closely with the type |
||
302 | system. Therefore, switching to GInitiallyUnowned should be done |
||
303 | carefully. g_object_compat_control() has been added to GLib 2.8.5 |
||
304 | to help with the transition. |
||
305 | |||
306 | Notes about GLib 2.6.0 |
||
307 | ====================== |
||
308 | |||
309 | * GLib 2.6 introduces the concept of 'GLib filename encoding', which is the |
||
310 | on-disk encoding on Unix, but UTF-8 on Windows. All GLib functions |
||
311 | returning or accepting pathnames have been changed to expect |
||
312 | filenames in this encoding, and the common POSIX functions dealing |
||
313 | with pathnames have been wrapped. These wrappers are declared in the |
||
314 | header <glib/gstdio.h> which must be included explicitly; it is not |
||
315 | included through <glib.h>. |
||
316 | |||
317 | On current (NT-based) Windows versions, where the on-disk file names |
||
318 | are Unicode, these wrappers use the wide-character API in the C |
||
319 | library. Thus applications can handle file names containing any |
||
320 | Unicode characters through GLib's own API and its POSIX wrappers, |
||
321 | not just file names restricted to characters in the system codepage. |
||
322 | |||
323 | To keep binary compatibility with applications compiled against |
||
324 | older versions of GLib, the Windows DLL still provides entry points |
||
325 | with the old semantics using the old names, and applications |
||
326 | compiled against GLib 2.6 will actually use new names for the |
||
327 | functions. This is transparent to the programmer. |
||
328 | |||
329 | When compiling against GLib 2.6, applications intended to be |
||
330 | portable to Windows must take the UTF-8 file name encoding into |
||
331 | consideration, and use the gstdio wrappers to access files whose |
||
332 | names have been constructed from strings returned from GLib. |
||
333 | |||
334 | * Likewise, g_get_user_name() and g_get_real_name() have been changed |
||
335 | to return UTF-8 on Windows, while keeping the old semantics for |
||
336 | applications compiled against older versions of GLib. |
||
337 | |||
338 | * The GLib uses an '_' prefix to indicate private symbols that |
||
339 | must not be used by applications. On some platforms, symbols beginning |
||
340 | with prefixes such as _g will be exported from the library, on others not. |
||
341 | In no case can applications use these private symbols. In addition to that, |
||
342 | GLib+ 2.6 makes several symbols private which were not in any installed |
||
343 | header files and were never intended to be exported. |
||
344 | |||
345 | * To reduce code size and improve efficiency, GLib, when compiled |
||
346 | with the GNU toolchain, has separate internal and external entry |
||
347 | points for exported functions. The internal names, which begin with |
||
348 | IA__, may be seen when debugging a GLib program. |
||
349 | |||
350 | * On Windows, GLib no longer opens a console window when printing |
||
351 | warning messages if stdout or stderr are invalid, as they are in |
||
352 | "Windows subsystem" (GUI) applications. Simply redirect stdout or |
||
353 | stderr if you need to see them. |
||
354 | |||
355 | * The child watch functionality tends to reveal a bug in many |
||
356 | thread implementations (in particular the older LinuxThreads |
||
357 | implementation on Linux) where it's not possible to call waitpid() |
||
358 | for a child created in a different thread. For this reason, for |
||
359 | maximum portability, you should structure your code to fork all |
||
360 | child processes that you want to wait for from the main thread. |
||
361 | |||
362 | * A problem was recently discovered with g_signal_connect_object(); |
||
363 | it doesn't actually disconnect the signal handler once the object being |
||
364 | connected to dies, just disables it. See the API docs for the function |
||
365 | for further details and the correct workaround that will continue to |
||
366 | work with future versions of GLib. |