X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libevent%2Futil-internal.h;h=47fe962d9a6fb4c52268852c97d82d8afa79a834;hb=d7c6070cde285ce17d1b1a7dc32cfd956c8c553e;hp=d51bc000d0f5a97ca0fde121a669e39111ef5e1e;hpb=8738d9b90a40334ba92e889ca3818de3ea42de8b;p=netatalk.git diff --git a/libevent/util-internal.h b/libevent/util-internal.h index d51bc000..47fe962d 100644 --- a/libevent/util-internal.h +++ b/libevent/util-internal.h @@ -161,6 +161,11 @@ char EVUTIL_TOLOWER(char c); #define EVUTIL_UPCAST(ptr, type, field) \ ((type *)(((char*)(ptr)) - evutil_offsetof(type, field))) +/* As open(pathname, flags, mode), except that the file is always opened with + * the close-on-exec flag set. (And the mode argument is mandatory.) + */ +int evutil_open_closeonexec(const char *pathname, int flags, unsigned mode); + int evutil_read_file(const char *filename, char **content_out, size_t *len_out, int is_binary);