Use dup2() replacement from libreplace.
[ira/wip.git] / lib / replace / README
1 This subsystem ensures that we can always use a certain core set of 
2 functions and types, that are either provided by the OS or by replacement 
3 functions / definitions in this subsystem. The aim is to try to stick 
4 to POSIX functions in here as much as possible. Convenience functions 
5 that are available on no platform at all belong in other subsystems
6 (such as LIBUTIL).
7
8 The following functions are guaranteed:
9
10 ftruncate
11 strlcpy
12 strlcat
13 mktime
14 rename
15 initgroups
16 memmove
17 strdup
18 setlinebuf
19 vsyslog
20 timegm
21 setenv
22 unsetenv
23 strndup
24 strnlen
25 waitpid
26 seteuid
27 setegid
28 asprintf
29 snprintf
30 vasprintf
31 vsnprintf
32 opendir
33 readdir
34 telldir
35 seekdir
36 closedir
37 dlopen
38 dlclose
39 dlsym
40 dlerror
41 chroot
42 bzero
43 strerror
44 errno
45 mkdtemp
46 mkstemp (a secure one!)
47 pread
48 pwrite
49 getpass
50 readline (the library)
51 inet_ntoa
52 inet_ntop
53 inet_pton
54 inet_aton
55 strtoll
56 strtoull
57 socketpair
58 strptime
59 getaddrinfo
60 freeaddrinfo
61 getnameinfo
62 gai_strerror
63 getifaddrs
64 freeifaddrs
65 utime
66 utimes
67 dup2
68
69 Types:
70 bool
71 socklen_t
72 uint_t
73 uint{8,16,32,64}_t
74 int{8,16,32,64}_t
75 intptr_t
76 sig_atomic_t
77
78 Constants:
79 PATH_NAME_MAX
80 UINT{16,32,64}_MAX
81 INT32_MAX
82 RTLD_LAZY
83 HOST_NAME_MAX
84 UINT16_MAX
85 UINT32_MAX
86 UINT64_MAX
87 CHAR_BIT
88
89 Macros:
90 va_copy
91 __FUNCTION__
92 __FILE__
93 __LINE__
94 __LINESTR__
95 __location__
96 __STRING
97 __STRINGSTRING
98 MIN
99 MAX
100 QSORT_CAST
101 ZERO_STRUCT
102 ZERO_STRUCTP
103 ZERO_STRUCTPN
104 ZERO_ARRAY
105 ARRAY_SIZE
106 PTR_DIFF
107
108 Headers:
109 stdint.h
110 stdbool.h
111
112 Optional C keywords:
113 volatile
114
115 Prerequisites:
116 memset (for bzero)
117 syslog (for vsyslog)
118 mktemp (for mkstemp and mkdtemp)