10 # define PORTABILITY_H
13 # define DIMOF(a) ((int) (sizeof(a)/sizeof(a[0])) )
29 int daemon(
int nochdir,
int noclose);
34 int setenv(
const char *name,
const char *value,
int why);
37 # ifndef HAVE_STRERROR
42 # ifndef HAVE_STRCHRNUL
47 # ifndef HAVE_ALPHASORT
50 alphasort(
const void *dirent1,
const void *dirent2);
54 size_t strnlen(
const char *s,
size_t maxlen);
60 char *
strndup(
const char *str,
size_t len);
66 # if defined(ON_BSD) || defined(ON_SOLARIS)
67 # define SUPPORT_PROCFS 0
69 # define SUPPORT_PROCFS 1
74 # if !GLIB_CHECK_VERSION(2,28,0)
78 g_list_free_full(GList * list, GDestroyNotify free_func)
80 g_list_foreach(list, (GFunc) free_func, NULL);
86 # ifndef HAVE_DBUSBASICVALUE
88 # include <dbus/dbus.h>
111 unsigned char bytes[8];
117 # ifdef DBUS_HAVE_INT64
121 DBus8ByteStruct eight;
134 # define ENOTUNIQ 190
146 # define EREMOTEIO 193
173 # ifndef EKEYREJECTED
174 # define EKEYREJECTED 200
181 # define __FUNCTION__ __func__
184 # ifdef __MY_UNKNOWN_C
185 # define __FUNCTION__ "__FUNCTION__"
int alphasort(const void *dirent1, const void *dirent2)
char * strerror(int errnum)
char * strndup(const char *str, size_t len)
int daemon(int nochdir, int noclose)
int setenv(const char *name, const char *value, int why)
size_t strnlen(const char *s, size_t maxlen)
char * strchrnul(const char *s, int c_in)