]> mj.ucw.cz Git - libucw.git/blob - ucw/doc/basics.txt
Released as 6.5.16.
[libucw.git] / ucw / doc / basics.txt
1 LibUCW Basics
2 =============
3
4 Every program using LibUCW should start with `#include <ucw/lib.h>` which
5 brings in the most frequently used library functions, macros and types.
6 This should be done before you include any of the system headers, since
7 `lib.h` defines the feature macros of the system C library.
8
9 Portability
10 -----------
11
12 LibUCW is written in C99 with a couple of GNU extensions mixed in where needed.
13 It currently requires the GNU C compiler version 4.0 or newer, but most modules
14 should be very easy to adapt to a different C99 compiler. (A notable exception
15 is `stkstring.h`, which is heavily tied to GNU extensions.)
16
17 The library has been developed on Linux with the GNU libc and it is known to run
18 on Darwin, too. The authors did not try using it on other systems, but most of
19 the code is written for a generic POSIX system, so porting to any UNIX-like system
20 should be a piece of cake.
21
22 Threads
23 -------
24 Generally, functions in the UCW library are reentrant as long as you call them
25 on different data. Accessing the same object from different threads is not supported,
26 unless otherwise told. This also applies to functions acting on any kind of global state.
27
28 ucw/lib.h
29 ---------
30
31 !!ucw/lib.h
32
33 ucw/config.h
34 ------------
35 This header contains the standard set of types used by LibUCW. It is automatically
36 included by `ucw/lib.h`.
37
38 !!ucw/config.h