aboutsummaryrefslogtreecommitdiff
path: root/support/support.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-06-02 15:50:36 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-06-02 15:50:36 +0200
commit2714c5f3c95f90977167c1d21326d907fb76b419 (patch)
tree5c3fc58f8177144973b0714aed382f8b32dadd84 /support/support.h
parent673cb072a4710bd4bf6029a062d2867cca929c43 (diff)
downloadglibc-2714c5f3c95f90977167c1d21326d907fb76b419.zip
glibc-2714c5f3c95f90977167c1d21326d907fb76b419.tar.gz
glibc-2714c5f3c95f90977167c1d21326d907fb76b419.tar.bz2
resolv: Tests for various versions of res_init
Diffstat (limited to 'support/support.h')
-rw-r--r--support/support.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/support/support.h b/support/support.h
index 7292e2a..4b5f04c 100644
--- a/support/support.h
+++ b/support/support.h
@@ -44,6 +44,21 @@ void set_fortify_handler (void (*handler) (int sig));
void oom_error (const char *function, size_t size)
__attribute__ ((nonnull (1)));
+/* Return a pointer to a memory region of SIZE bytes. The memory is
+ initialized to zero and will be shared with subprocesses (across
+ fork). The returned pointer must be freed using
+ support_shared_free; it is not compatible with the malloc
+ functions. */
+void *support_shared_allocate (size_t size);
+
+/* Deallocate a pointer returned by support_shared_allocate. */
+void support_shared_free (void *);
+
+/* Write CONTENTS to the file PATH. Create or truncate the file as
+ needed. The file mode is 0666 masked by the umask. Terminate the
+ process on error. */
+void support_write_file_string (const char *path, const char *contents);
+
/* Error-checking wrapper functions which terminate the process on
error. */