Move sys_symlink() to libreplace.
[nivanova/samba-autobuild/.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 chown
50 getpass
51 readline (the library)
52 inet_ntoa
53 inet_ntop
54 inet_pton
55 inet_aton
56 strtoll
57 strtoull
58 socketpair
59 strptime
60 getaddrinfo
61 freeaddrinfo
62 getnameinfo
63 gai_strerror
64 getifaddrs
65 freeifaddrs
66 utime
67 utimes
68 link
69 readlink
70 symlink
71
72 Types:
73 bool
74 socklen_t
75 uint_t
76 uint{8,16,32,64}_t
77 int{8,16,32,64}_t
78 intptr_t
79 sig_atomic_t
80
81 Constants:
82 PATH_NAME_MAX
83 UINT{16,32,64}_MAX
84 INT32_MAX
85 RTLD_LAZY
86 HOST_NAME_MAX
87 UINT16_MAX
88 UINT32_MAX
89 UINT64_MAX
90 CHAR_BIT
91
92 Macros:
93 va_copy
94 __FUNCTION__
95 __FILE__
96 __LINE__
97 __LINESTR__
98 __location__
99 __STRING
100 __STRINGSTRING
101 MIN
102 MAX
103 QSORT_CAST
104 ZERO_STRUCT
105 ZERO_STRUCTP
106 ZERO_STRUCTPN
107 ZERO_ARRAY
108 ARRAY_SIZE
109 PTR_DIFF
110
111 Headers:
112 stdint.h
113 stdbool.h
114
115 Optional C keywords:
116 volatile
117
118 Prerequisites:
119 memset (for bzero)
120 syslog (for vsyslog)
121 mktemp (for mkstemp and mkdtemp)