fef70f435b511c8668a254d884e759f4461d73db
[platform/upstream/glib.git] / README.in
1 General Information
2 ===================
3
4 This is GLib version @GLIB_VERSION@. 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 ftp site is:
11   ftp://ftp.gtk.org/pub/glib
12
13 The official web site is:
14   http://www.gtk.org/
15
16 Information about mailing lists can be found at
17   http://www.gtk.org/mailing-lists.html
18
19 To subscribe: mail -s subscribe gtk-list-request@gnome.org < /dev/null
20 (Send mail to gtk-list-request@gnome.org with the subject "subscribe")
21
22 Installation
23 ============
24
25 See the file 'INSTALL'
26
27 Notes about GLib 2.32
28 =====================
29
30 * It is no longer necessary to use g_thread_init() or to link against
31   libgthread.  libglib is now always thread-enabled.  Custom thread
32   system implementations are no longer supported (including errorcheck
33   mutexes).
34
35 * The thread and synchronisation APIs have been updated.
36   GMutex and GCond can be statically allocated without explicit
37   initialisation, as can new types GRWLock and GRecMutex.  The
38   GStatic_______ variants of these types have been deprecated.  GPrivate
39   can also be statically allocated and has a nicer API (deprecating
40   GStaticPrivate).  Finally, g_thread_create() has been replaced with a
41   substantially simplified g_thread_new().
42
43 * The g_once_init_enter()/_leave() functions have been replaced with
44   macros that allow for a pointer to any gsize-sized object, not just a
45   gsize*.  The assertions to ensure that a pointer to a correctly-sized
46   object is being used will not work with generic pointers (ie: (void*)
47   and (gpointer) casts) which would have worked with the old version.
48
49 * It is now mandatory to include glib.h instead of individual headers.
50
51 * The -uninstalled variants of the pkg-config files have been dropped.
52
53 Notes about GLib 2.30
54 =====================
55
56 * GObject includes a generic marshaller, g_cclosure_marshal_generic.
57   To use it, simply specify NULL as the marshaller in g_signal_new().
58   The generic marshaller is implemented with libffi, and consequently
59   GObject depends on libffi now.
60
61 Notes about GLib 2.28
62 =====================
63
64 * The GApplication API has changed compared to the version that was
65   included in the 2.25 development snapshots. Existing users will need
66   adjustments.
67
68 Notes about GLib 2.26
69 =====================
70
71 * Nothing noteworthy.
72
73 Notes about GLib 2.24
74 =====================
75
76 * It is now allowed to call g_thread_init(NULL) multiple times, and
77   to call glib functions before g_thread_init(NULL) is called
78   (although the later is mainly a change in docs as this worked before
79   too). See the GThread reference documentation for the details.
80
81 * GObject now links to GThread and threads are enabled automatically
82   when g_type_init() is called.
83
84 * GObject no longer allows to call g_object_set() on construct-only properties
85   while an object is being initialized. If this behavior is needed, setting a
86   custom constructor that just chains up will re-enable this functionality.
87
88 * GMappedFile on an empty file now returns NULL for the contents instead of
89   returning an empty string. The documentation specifically states that code
90   may not rely on nul-termination here so any breakage caused by this change
91   is a bug in application code.
92
93 Notes about GLib 2.22
94 =====================
95
96 * Repeated calls to g_simple_async_result_set_op_res_gpointer used
97   to leak the data. This has been fixed to always call the provided
98   destroy notify.
99
100 Notes about GLib 2.20
101 =====================
102
103 * The functions for launching applications (e.g. g_app_info_launch() +
104   friends) now passes a FUSE file:// URI if possible (requires gvfs
105   with the FUSE daemon to be running and operational). With gvfs 2.26,
106   FUSE file:// URIs will be mapped back to gio URIs in the GFile
107   constructors. The intent of this change is to better integrate
108   POSIX-only applications, see bug #528670 for the rationale.  The
109   only user-visible change is when an application needs to examine an
110   URI passed to it (e.g. as a positional parameter). Instead of
111   looking at the given URI, the application will now need to look at
112   the result of g_file_get_uri() after having constructed a GFile
113   object with the given URI.
114
115 Notes about GLib 2.18
116 =====================
117
118 * The recommended way of using GLib has always been to only include the
119   toplevel headers glib.h, glib-object.h and gio.h. GLib enforces this by
120   generating an error when individual headers are directly included.
121   To help with the transition, the enforcement is not turned on by
122   default for GLib headers (it is turned on for GObject and GIO).
123   To turn it on, define the preprocessor symbol G_DISABLE_SINGLE_INCLUDES.
124
125 Notes about GLib 2.16
126 =====================
127
128 * GLib now includes GIO, which adds optional dependencies against libattr
129   and libselinux for extended attribute and SELinux support. Use
130   --disable-xattr and --disable-selinux to build without these.
131
132 Notes about GLib 2.10
133 =====================
134
135 * The functions g_snprintf() and g_vsnprintf() have been removed from
136   the gprintf.h header, since they are already declared in glib.h. This
137   doesn't break documented use of gprintf.h, but people have been known
138   to include gprintf.h without including glib.h.
139
140 * The Unicode support has been updated to Unicode 4.1. This adds several
141   new members to the GUnicodeBreakType enumeration.
142
143 * The support for Solaris threads has been retired. Solaris has provided
144   POSIX threads for long enough now to have them available on every
145   Solaris platform.
146
147 * 'make check' has been changed to validate translations by calling
148   msgfmt with the -c option. As a result, it may fail on systems with
149   older gettext implementations (GNU gettext < 0.14.1, or Solaris gettext).
150   'make check' will also fail on systems where the C compiler does not
151   support ELF visibility attributes.
152
153 * The GMemChunk API has been deprecated in favour of a new 'slice
154   allocator'. See the g_slice documentation for more details.
155
156 * A new type, GInitiallyUnowned, has been introduced, which is
157   intended to serve as a common implementation of the 'floating reference'
158   concept that is e.g. used by GtkObject. Note that changing the
159   inheritance hierarchy of a type can cause problems for language
160   bindings and other code which needs to work closely with the type
161   system. Therefore, switching to GInitiallyUnowned should be done
162   carefully. g_object_compat_control() has been added to GLib 2.8.5
163   to help with the transition.
164
165 Notes about GLib 2.6.0
166 ======================
167
168 * GLib 2.6 introduces the concept of 'GLib filename encoding', which is the
169   on-disk encoding on Unix, but UTF-8 on Windows. All GLib functions
170   returning or accepting pathnames have been changed to expect
171   filenames in this encoding, and the common POSIX functions dealing
172   with pathnames have been wrapped. These wrappers are declared in the
173   header <glib/gstdio.h> which must be included explicitly; it is not
174   included through <glib.h>.
175
176   On current (NT-based) Windows versions, where the on-disk file names
177   are Unicode, these wrappers use the wide-character API in the C
178   library. Thus applications can handle file names containing any
179   Unicode characters through GLib's own API and its POSIX wrappers,
180   not just file names restricted to characters in the system codepage.
181
182   To keep binary compatibility with applications compiled against
183   older versions of GLib, the Windows DLL still provides entry points
184   with the old semantics using the old names, and applications
185   compiled against GLib 2.6 will actually use new names for the
186   functions. This is transparent to the programmer.
187
188   When compiling against GLib 2.6, applications intended to be
189   portable to Windows must take the UTF-8 file name encoding into
190   consideration, and use the gstdio wrappers to access files whose
191   names have been constructed from strings returned from GLib.
192
193 * Likewise, g_get_user_name() and g_get_real_name() have been changed
194   to return UTF-8 on Windows, while keeping the old semantics for
195   applications compiled against older versions of GLib.
196
197 * The GLib uses an '_' prefix to indicate private symbols that
198   must not be used by applications. On some platforms, symbols beginning
199   with prefixes such as _g will be exported from the library, on others not.
200   In no case can applications use these private symbols. In addition to that,
201   GLib+ 2.6 makes several symbols private which were not in any installed
202   header files and were never intended to be exported.
203
204 * To reduce code size and improve efficiency, GLib, when compiled
205   with the GNU toolchain, has separate internal and external entry
206   points for exported functions. The internal names, which begin with
207   IA__, may be seen when debugging a GLib program.
208
209 * On Windows, GLib no longer opens a console window when printing
210   warning messages if stdout or stderr are invalid, as they are in
211   "Windows subsystem" (GUI) applications. Simply redirect stdout or
212   stderr if you need to see them.
213
214 * The child watch functionality tends to reveal a bug in many
215   thread implementations (in particular the older LinuxThreads
216   implementation on Linux) where it's not possible to call waitpid()
217   for a child created in a different thread. For this reason, for
218   maximum portability, you should structure your code to fork all
219   child processes that you want to wait for from the main thread.
220
221 * A problem was recently discovered with g_signal_connect_object();
222   it doesn't actually disconnect the signal handler once the object being
223   connected to dies, just disables it. See the API docs for the function
224   for further details and the correct workaround that will continue to
225   work with future versions of GLib.
226
227 How to report bugs
228 ==================
229
230 Bugs should be reported to the GNOME bug tracking system.
231 (http://bugzilla.gnome.org, product glib.) You will need
232 to create an account for yourself.
233
234 In the bug report please include:
235
236 * Information about your system. For instance:
237
238    - What operating system and version
239    - For Linux, what version of the C library
240
241   And anything else you think is relevant.
242
243 * How to reproduce the bug.
244
245   If you can reproduce it with one of the test programs that are built
246   in the tests/ subdirectory, that will be most convenient.  Otherwise,
247   please include a short test program that exhibits the behavior.
248   As a last resort, you can also provide a pointer to a larger piece
249   of software that can be downloaded.
250
251 * If the bug was a crash, the exact text that was printed out
252   when the crash occured.
253
254 * Further information such as stack traces may be useful, but
255   is not necessary.
256
257 Patches
258 =======
259
260 Patches should also be submitted to bugzilla.gnome.org. If the
261 patch fixes an existing bug, add the patch as an attachment
262 to that bug report.
263
264 Otherwise, enter a new bug report that describes the patch,
265 and attach the patch to that bug report.
266
267 Patches should be in unified diff form. (The -up option to GNUdiff.)